Add condition selector for mode

This commit is contained in:
philipp lang 2024-04-19 22:13:55 +02:00
parent 5310686b9c
commit 37c8f35b58
1 changed files with 7 additions and 0 deletions

View File

@ -5,6 +5,8 @@
</ui-note>
<div v-else>
<f-select id="mode" v-model="inner.mode" :options="modeOptions" name="mode" label="Modus"></f-select>
<ui-icon-button class="mt-4 mb-2" icon="plus" @click="addCondition">Bedingung einfügen</ui-icon-button>
<div v-for="(condition, index) in inner.ifs" :key="index" class="grid grid-cols-[1fr_1fr_1fr_max-content] gap-2">
@ -61,6 +63,11 @@ const comparatorOptions = ref([
{id: 'isNotIn', name: 'ist nicht in', defaultValue: []},
]);
const modeOptions = ref([
{id: 'all', name: 'alle Bedingungen müssen zutreffen'},
{id: 'any', name: 'mindestens eine Bedingung muss zutreffen'},
]);
const fields = computed(() => {
const result = [];
props.single.config.sections.forEach((section) => {