mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-06-03 21:55:22 -04:00
added "show all" toggle on list of shopping lists
This commit is contained in:
parent
0bf3aed287
commit
8e5ea1df5e
@ -142,6 +142,7 @@
|
|||||||
"save": "Save",
|
"save": "Save",
|
||||||
"settings": "Settings",
|
"settings": "Settings",
|
||||||
"share": "Share",
|
"share": "Share",
|
||||||
|
"show-all": "Show All",
|
||||||
"shuffle": "Shuffle",
|
"shuffle": "Shuffle",
|
||||||
"sort": "Sort",
|
"sort": "Sort",
|
||||||
"sort-alphabetically": "Alphabetical",
|
"sort-alphabetically": "Alphabetical",
|
||||||
|
@ -505,6 +505,7 @@ export interface ShoppingListOut {
|
|||||||
createdAt?: string;
|
createdAt?: string;
|
||||||
updateAt?: string;
|
updateAt?: string;
|
||||||
groupId: string;
|
groupId: string;
|
||||||
|
userId: string;
|
||||||
id: string;
|
id: string;
|
||||||
listItems?: ShoppingListItemOut[];
|
listItems?: ShoppingListItemOut[];
|
||||||
recipeReferences: ShoppingListRecipeRefOut[];
|
recipeReferences: ShoppingListRecipeRefOut[];
|
||||||
@ -568,6 +569,7 @@ export interface ShoppingListSave {
|
|||||||
createdAt?: string;
|
createdAt?: string;
|
||||||
updateAt?: string;
|
updateAt?: string;
|
||||||
groupId: string;
|
groupId: string;
|
||||||
|
userId: string;
|
||||||
}
|
}
|
||||||
export interface ShoppingListSummary {
|
export interface ShoppingListSummary {
|
||||||
name?: string;
|
name?: string;
|
||||||
@ -577,6 +579,7 @@ export interface ShoppingListSummary {
|
|||||||
createdAt?: string;
|
createdAt?: string;
|
||||||
updateAt?: string;
|
updateAt?: string;
|
||||||
groupId: string;
|
groupId: string;
|
||||||
|
userId: string;
|
||||||
id: string;
|
id: string;
|
||||||
recipeReferences: ShoppingListRecipeRefOut[];
|
recipeReferences: ShoppingListRecipeRefOut[];
|
||||||
labelSettings: ShoppingListMultiPurposeLabelOut[];
|
labelSettings: ShoppingListMultiPurposeLabelOut[];
|
||||||
@ -589,6 +592,7 @@ export interface ShoppingListUpdate {
|
|||||||
createdAt?: string;
|
createdAt?: string;
|
||||||
updateAt?: string;
|
updateAt?: string;
|
||||||
groupId: string;
|
groupId: string;
|
||||||
|
userId: string;
|
||||||
id: string;
|
id: string;
|
||||||
listItems?: ShoppingListItemOut[];
|
listItems?: ShoppingListItemOut[];
|
||||||
}
|
}
|
||||||
|
@ -15,10 +15,20 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #title>{{ $t('shopping-list.shopping-lists') }}</template>
|
<template #title>{{ $t('shopping-list.shopping-lists') }}</template>
|
||||||
</BasePageTitle>
|
</BasePageTitle>
|
||||||
<BaseButton create @click="createDialog = true" />
|
|
||||||
|
<v-container class="d-flex justify-end px-0 pt-0 pb-4">
|
||||||
|
<v-checkbox v-model="showAll" :label="$tc('general.show-all')" class="my-auto mr-4" />
|
||||||
|
<BaseButton create @click="createDialog = true" />
|
||||||
|
</v-container>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<v-card v-for="list in shoppingLists" :key="list.id" class="my-2 left-border" :to="`/shopping-lists/${list.id}`">
|
<v-card
|
||||||
|
v-for="list in shoppingLists"
|
||||||
|
v-if="showAll || ($auth.user && $auth.user.id == list.userId)"
|
||||||
|
:key="list.id"
|
||||||
|
class="my-2 left-border"
|
||||||
|
:to="`/shopping-lists/${list.id}`
|
||||||
|
">
|
||||||
<v-card-title>
|
<v-card-title>
|
||||||
<v-icon left>
|
<v-icon left>
|
||||||
{{ $globals.icons.cartCheck }}
|
{{ $globals.icons.cartCheck }}
|
||||||
@ -56,6 +66,7 @@ export default defineComponent({
|
|||||||
createDialog: false,
|
createDialog: false,
|
||||||
deleteDialog: false,
|
deleteDialog: false,
|
||||||
deleteTarget: "",
|
deleteTarget: "",
|
||||||
|
showAll: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const shoppingLists = useAsync(async () => {
|
const shoppingLists = useAsync(async () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user