mirror of
https://github.com/hay-kot/mealie.git
synced 2025-07-11 15:47:13 -07:00
feat: Add the ability to flag a food as "on hand", to exclude from shopping list (#3777)
This commit is contained in:
parent
4831adb0f3
commit
a062a4beaa
8 changed files with 112 additions and 9 deletions
|
@ -87,6 +87,14 @@
|
|||
:label="$t('data-pages.foods.food-label')"
|
||||
>
|
||||
</v-autocomplete>
|
||||
<v-checkbox
|
||||
v-model="createTarget.onHand"
|
||||
hide-details
|
||||
:label="$t('tool.on-hand')"
|
||||
/>
|
||||
<p class="text-caption mt-1">
|
||||
{{ $t("data-pages.foods.on-hand-checkbox-label") }}
|
||||
</p>
|
||||
</v-form> </v-card-text
|
||||
></BaseDialog>
|
||||
|
||||
|
@ -134,6 +142,14 @@
|
|||
:label="$t('data-pages.foods.food-label')"
|
||||
>
|
||||
</v-autocomplete>
|
||||
<v-checkbox
|
||||
v-model="editTarget.onHand"
|
||||
hide-details
|
||||
:label="$t('tool.on-hand')"
|
||||
/>
|
||||
<p class="text-caption mt-1">
|
||||
{{ $t("data-pages.foods.on-hand-checkbox-label") }}
|
||||
</p>
|
||||
</v-form>
|
||||
</v-card-text>
|
||||
<template #custom-card-action>
|
||||
|
@ -243,6 +259,11 @@
|
|||
{{ item.label.name }}
|
||||
</MultiPurposeLabel>
|
||||
</template>
|
||||
<template #item.onHand="{ item }">
|
||||
<v-icon :color="item.onHand ? 'success' : undefined">
|
||||
{{ item.onHand ? $globals.icons.check : $globals.icons.close }}
|
||||
</v-icon>
|
||||
</template>
|
||||
<template #button-bottom>
|
||||
<BaseButton @click="seedDialog = true">
|
||||
<template #icon> {{ $globals.icons.database }} </template>
|
||||
|
@ -300,6 +321,11 @@ export default defineComponent({
|
|||
value: "label",
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
text: i18n.tc("tool.on-hand"),
|
||||
value: "onHand",
|
||||
show: true,
|
||||
},
|
||||
];
|
||||
|
||||
const foodStore = useFoodStore();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue