From 615e3bfa3d73cbb1ab2f6db816af6d4e0d2ca702 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Thu, 17 Oct 2024 20:41:39 +0200 Subject: [PATCH] ugly but working shopping list --- cookbook/views/api.py | 2 +- .../components/display/ShoppingLineItem.vue | 369 ++++++++++++++++++ .../components/display/ShoppingListView.vue | 65 ++- vue3/src/stores/ShoppingStore.ts | 2 +- 4 files changed, 416 insertions(+), 22 deletions(-) create mode 100644 vue3/src/components/display/ShoppingLineItem.vue diff --git a/cookbook/views/api.py b/cookbook/views/api.py index b65d776af8..ee500199dc 100644 --- a/cookbook/views/api.py +++ b/cookbook/views/api.py @@ -2017,7 +2017,7 @@ def meal_plans_to_ical(queryset, filename): @api_view(['POST']) @permission_classes([CustomIsUser & CustomTokenHasReadWriteScope]) def ingredient_from_string(request): - text = request.POST['text'] + text = request.data['text'] ingredient_parser = IngredientParser(request, False) amount, unit, food, note = ingredient_parser.parse(text) diff --git a/vue3/src/components/display/ShoppingLineItem.vue b/vue3/src/components/display/ShoppingLineItem.vue new file mode 100644 index 0000000000..5af733e0dd --- /dev/null +++ b/vue3/src/components/display/ShoppingLineItem.vue @@ -0,0 +1,369 @@ + + + + + + diff --git a/vue3/src/components/display/ShoppingListView.vue b/vue3/src/components/display/ShoppingListView.vue index 2e915bda60..db358290b1 100644 --- a/vue3/src/components/display/ShoppingListView.vue +++ b/vue3/src/components/display/ShoppingListView.vue @@ -1,35 +1,32 @@