feat(ui): allow adding a new category in cookbook management dropdown

This commit is contained in:
sophiafema 2025-08-16 15:33:35 +00:00
commit d330c0b425
2 changed files with 9 additions and 3 deletions

View file

@ -186,7 +186,7 @@
v-else-if="field.type === Organizer.Category" v-else-if="field.type === Organizer.Category"
v-model="field.organizers" v-model="field.organizers"
:selector-type="Organizer.Category" :selector-type="Organizer.Category"
:show-add="false" :show-add="true"
:show-label="false" :show-label="false"
:show-icon="false" :show-icon="false"
variant="underlined" variant="underlined"

View file

@ -11,12 +11,10 @@
multiple multiple
:variant="variant" :variant="variant"
:prepend-inner-icon="icon" :prepend-inner-icon="icon"
:append-icon="showAdd ? $globals.icons.create : undefined"
return-object return-object
auto-select-first auto-select-first
class="pa-0" class="pa-0"
@update:model-value="resetSearchInput" @update:model-value="resetSearchInput"
@click:append="dialog = true"
> >
<template #chip="{ item, index }"> <template #chip="{ item, index }">
<v-chip <v-chip
@ -32,6 +30,14 @@
{{ item.value }} {{ item.value }}
</v-chip> </v-chip>
</template> </template>
<template v-if="showAdd" #append-item>
<v-divider class="my-2" />
<v-list-item
:title="`+ ${$t('general.add')}`"
class="text-primary"
@click="dialog = true"
/>
</template>
<template <template
v-if="showAdd" v-if="showAdd"