refs #6595 - PR2 - Resolve conflicts #144

Merged
alexm merged 250 commits from hyervoni-branch-PR-2 into dev 2024-01-11 12:22:28 +00:00
1 changed files with 12 additions and 16 deletions
Showing only changes of commit a8c6b6f638 - Show all commits

View File

@ -27,7 +27,7 @@ const $props = defineProps({
});
const role = useRole();
const popup = ref(null);
const showForm = ref(false);
const value = computed({
get() {
@ -38,35 +38,31 @@ const value = computed({
},
});
const isDeliveryAssistant = computed(() => {
const isAllowedToCreate = computed(() => {
return role.hasAny($props.rolesAllowedToCreate);
});
const openCreateForm = () => {
popup.value.show();
const toggleForm = () => {
showForm.value = !showForm.value;
};
</script>
<template>
<VnSelectFilter
label="Label"
v-model="value"
:options="options"
option-value="value"
option-label="label"
hide-selected
>
<template v-if="isDeliveryAssistant" #append>
<VnSelectFilter v-model="value" :options="options">
<template v-if="isAllowedToCreate" #append>
<QIcon
@click.stop.prevent="openCreateForm()"
@click.stop.prevent="toggleForm()"
name="add"
size="19px"
class="add-icon"
/>
<QDialog ref="popup" cover transition-show="scale" transition-hide="scale">
<slot name="form" />
<QDialog v-model="showForm" transition-show="scale" transition-hide="scale">
<slot name="form" @close-form="toggleForm()" />
</QDialog>
</template>
<template v-for="(_, slotName) in $slots" #[slotName]="slotData" :key="slotName">
<slot :name="slotName" v-bind="slotData" :key="slotName" />
</template>
</VnSelectFilter>
</template>