mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-27 16:24:31 -04:00 
			
		
		
		
	added "show all" toggle on list of shopping lists
This commit is contained in:
		| @@ -142,6 +142,7 @@ | ||||
|     "save": "Save", | ||||
|     "settings": "Settings", | ||||
|     "share": "Share", | ||||
|     "show-all": "Show All", | ||||
|     "shuffle": "Shuffle", | ||||
|     "sort": "Sort", | ||||
|     "sort-alphabetically": "Alphabetical", | ||||
|   | ||||
| @@ -505,6 +505,7 @@ export interface ShoppingListOut { | ||||
|   createdAt?: string; | ||||
|   updateAt?: string; | ||||
|   groupId: string; | ||||
|   userId: string; | ||||
|   id: string; | ||||
|   listItems?: ShoppingListItemOut[]; | ||||
|   recipeReferences: ShoppingListRecipeRefOut[]; | ||||
| @@ -568,6 +569,7 @@ export interface ShoppingListSave { | ||||
|   createdAt?: string; | ||||
|   updateAt?: string; | ||||
|   groupId: string; | ||||
|   userId: string; | ||||
| } | ||||
| export interface ShoppingListSummary { | ||||
|   name?: string; | ||||
| @@ -577,6 +579,7 @@ export interface ShoppingListSummary { | ||||
|   createdAt?: string; | ||||
|   updateAt?: string; | ||||
|   groupId: string; | ||||
|   userId: string; | ||||
|   id: string; | ||||
|   recipeReferences: ShoppingListRecipeRefOut[]; | ||||
|   labelSettings: ShoppingListMultiPurposeLabelOut[]; | ||||
| @@ -589,6 +592,7 @@ export interface ShoppingListUpdate { | ||||
|   createdAt?: string; | ||||
|   updateAt?: string; | ||||
|   groupId: string; | ||||
|   userId: string; | ||||
|   id: string; | ||||
|   listItems?: ShoppingListItemOut[]; | ||||
| } | ||||
|   | ||||
| @@ -15,10 +15,20 @@ | ||||
|       </template> | ||||
|       <template #title>{{ $t('shopping-list.shopping-lists') }}</template> | ||||
|     </BasePageTitle> | ||||
|  | ||||
|     <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> | ||||
|       <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-icon left> | ||||
|             {{ $globals.icons.cartCheck }} | ||||
| @@ -56,6 +66,7 @@ export default defineComponent({ | ||||
|       createDialog: false, | ||||
|       deleteDialog: false, | ||||
|       deleteTarget: "", | ||||
|       showAll: false, | ||||
|     }); | ||||
|  | ||||
|     const shoppingLists = useAsync(async () => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user