fixed showAll centering and added to recipe dialog

This commit is contained in:
Michael Genson 2024-02-23 19:11:28 +00:00
parent 44cd2fef1c
commit 478a4e5d73
2 changed files with 15 additions and 1 deletions

View File

@ -4,6 +4,7 @@
<v-card-text> <v-card-text>
<v-card <v-card
v-for="list in shoppingLists" v-for="list in shoppingLists"
v-if="showAll || $auth.user && $auth.user.id == list.userId"
:key="list.id" :key="list.id"
hover hover
class="my-2 left-border" class="my-2 left-border"
@ -14,6 +15,18 @@
</v-card-title> </v-card-title>
</v-card> </v-card>
</v-card-text> </v-card-text>
<template #card-actions>
<v-btn
text
color="grey"
@click="dialog = false"
>
{{ $t("general.cancel") }}
</v-btn>
<div class="d-flex justify-end" style="width: 100%;">
<v-checkbox v-model="showAll" hideDetails :label="$tc('general.show-all')" class="my-auto mr-4" />
</div>
</template>
</BaseDialog> </BaseDialog>
<BaseDialog <BaseDialog
v-if="shoppingListIngredientDialog" v-if="shoppingListIngredientDialog"
@ -181,6 +194,7 @@ export default defineComponent({
const state = reactive({ const state = reactive({
shoppingListDialog: true, shoppingListDialog: true,
shoppingListIngredientDialog: false, shoppingListIngredientDialog: false,
showAll: false,
}); });
const recipeIngredientSections = ref<ShoppingListRecipeIngredientSection[]>([]); const recipeIngredientSections = ref<ShoppingListRecipeIngredientSection[]>([]);

View File

@ -17,7 +17,7 @@
</BasePageTitle> </BasePageTitle>
<v-container class="d-flex justify-end px-0 pt-0 pb-4"> <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" /> <v-checkbox v-model="showAll" hideDetails :label="$tc('general.show-all')" class="my-auto mr-4" />
<BaseButton create @click="createDialog = true" /> <BaseButton create @click="createDialog = true" />
</v-container> </v-container>