Commit bca56504 authored by Cage, Gregory's avatar Cage, Gregory
Browse files

Disable batch and colletion form inputs for repated input forms

parent 1c372019
Loading
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ const props = withDefaults(
        collectionTypes?: Array<string>;
        flavor?: string;
        tag?: string;
        singleDatasetInput?: boolean;
    }>(),
    {
        loading: false,
@@ -50,6 +51,7 @@ const props = withDefaults(
        collectionTypes: undefined,
        flavor: undefined,
        tag: undefined,
        singleDatasetInput: false,
    }
);

@@ -523,6 +525,17 @@ const noOptionsWarningMessage = computed(() => {
        <div class="d-flex flex-column">
            <BButtonGroup v-if="variant && variant.length > 1" buttons class="align-self-start">
                <BButton
                    v-if="props.singleDatasetInput"
                    v-for="(v, index) in variant.slice(0,1)"
                    :key="index"
                    v-b-tooltip.hover.bottom
                    :pressed="currentField === index"
                    :title="v.tooltip"
                    @click="currentField = index">
                    <FontAwesomeIcon :icon="['far', v.icon]" />
                </BButton>
                <BButton
                    v-else
                    v-for="(v, index) in variant"
                    :key="index"
                    v-b-tooltip.hover.bottom
+3 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ interface FormElementProps {
    connectedEnableIcon?: string;
    connectedDisableIcon?: string;
    workflowBuildingMode?: boolean;
    singleDatasetInput?: boolean;
}

const props = withDefaults(defineProps<FormElementProps>(), {
@@ -63,6 +64,7 @@ const props = withDefaults(defineProps<FormElementProps>(), {
    connectedEnableIcon: "fa fa-times",
    connectedDisableIcon: "fa fa-arrows-alt-h",
    workflowBuildingMode: false,
    singleDatasetInput: false,
});

const emit = defineEmits<{
@@ -298,6 +300,7 @@ function onAlert(value: string | undefined) {
                :tag="attrs.tag"
                :type="props.type"
                :collection-types="attrs.collection_types"
                :singleDatasetInput="props.singleDatasetInput"
                @alert="onAlert" />
            <FormDrilldown
                v-else-if="props.type === 'drill_down'"
+6 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
                        :refresh-on-change="false"
                        :disabled="sustainConditionals"
                        :attributes="input.test_param"
                        :singleDatasetInput="singleDatasetInput"
                        @change="onChange" />
                    <div v-for="(caseDetails, caseId) in input.cases" :key="caseId">
                        <FormNode
@@ -59,6 +60,7 @@
                :collapsed-disable-icon="collapsedDisableIcon"
                :loading="loading"
                :workflow-building-mode="workflowBuildingMode"
                :singleDatasetInput="singleDatasetInput"
                @change="onChange" />
        </div>
    </div>
@@ -129,6 +131,10 @@ export default {
            type: Boolean,
            default: false,
        },
        singleDatasetInput: {
            type: Boolean,
            default: false,
        },
    },
    methods: {
        getPrefix(name, index) {
+5 −1
Original line number Diff line number Diff line
@@ -59,6 +59,10 @@ const props = defineProps({
        type: String,
        default: null,
    },
    singleDatasetInput: {
        type: Boolean,
        default: true,
    },
});

const emit = defineEmits<{
@@ -169,7 +173,7 @@ const { keyObject } = useKeyedObjects();
            </template>

            <template v-slot:body>
                <FormNode v-bind="props.passthroughProps" :inputs="cache" :prefix="getPrefix(cacheId)" />
                <FormNode v-bind="props.passthroughProps" :inputs="cache" :prefix="getPrefix(cacheId)" :singleDatasetInput="props.singleDatasetInput" />
            </template>
        </FormCard>