From e257a8d29b47d50918fc45911a2f0a2b3939b04e Mon Sep 17 00:00:00 2001 From: smilerz Date: Tue, 21 Dec 2021 18:38:16 -0600 Subject: [PATCH] fix responsive display of shopping list --- cookbook/views/lists.py | 2 - .../ShoppingListView/ShoppingListView.vue | 71 +++++++++-------- vue/src/components/Modals/ShoppingModal.vue | 2 +- vue/src/components/ShoppingLineItem.vue | 79 ++++++++++++------- 4 files changed, 90 insertions(+), 64 deletions(-) diff --git a/cookbook/views/lists.py b/cookbook/views/lists.py index 6d8bfdf6..85fb9b5c 100644 --- a/cookbook/views/lists.py +++ b/cookbook/views/lists.py @@ -225,8 +225,6 @@ def step(request): @group_required('user') def shopping_list_new(request): - # recipe-param is the name of the parameters used when filtering recipes by this attribute - # model-name is the models.js name of the model, probably ALL-CAPS return render( request, 'shoppinglist_template.html', diff --git a/vue/src/apps/ShoppingListView/ShoppingListView.vue b/vue/src/apps/ShoppingListView/ShoppingListView.vue index f41bd536..277a872d 100644 --- a/vue/src/apps/ShoppingListView/ShoppingListView.vue +++ b/vue/src/apps/ShoppingListView/ShoppingListView.vue @@ -2,7 +2,7 @@
{{ $t("OfflineAlert") }}
-
+
@@ -149,24 +149,28 @@ - {{ s.name }} + +
+
{{ s.name }}
- - - - - - +
+ + + + + + +
+
@@ -180,19 +184,24 @@
x.ingredients) .flat() - .filter((x) => !x.food.on_hand && !x.food.ignore_shopping) + .filter((x) => !x?.food?.on_hand && !x?.food?.ignore_shopping) .map((x) => x.id), ] this.recipe_servings = result.data?.servings diff --git a/vue/src/components/ShoppingLineItem.vue b/vue/src/components/ShoppingLineItem.vue index 5d3ff35a..4b80c6e9 100644 --- a/vue/src/components/ShoppingLineItem.vue +++ b/vue/src/components/ShoppingLineItem.vue @@ -1,37 +1,50 @@