diff --git a/cookbook/views/api.py b/cookbook/views/api.py index b65d776af..ee500199d 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 000000000..5af733e0d --- /dev/null +++ b/vue3/src/components/display/ShoppingLineItem.vue @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + {{ a.amount }} {{ + a.unit + }} + + + + + {{ food.name }} + {{ info_row }} + + + + + + + + + + + + + + + + + {{ food_row }} + {{ food.description }} + + + + + {{ $t('Quick actions') }} + {{ $t('Category') }} + + + + {{ $t('Postpone') }} + + + + {{ $t('Entries') }} + + + + + + + + + {{ e.amount }} {{ e.unit?.name }} {{ food.name }} + + + + {{ + e.recipe_mealplan.recipe_name + }} ({{ + e.recipe_mealplan.servings + }} {{ $t('Servings') }}) + + + {{ e.recipe_mealplan.mealplan_type }} + {{ DateTime().fromJSDate(e.recipe_mealplan.mealplan_from_date).toLocaleString(DateTime.DATETIME_SHORT)}} + + + + {{ e.created_by.display_name }} {{ DateTime().fromJSDate(e.created_at).toLocaleString(DateTime.DATETIME_SHORT) }} + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ $t("Add") }} + {{ $t("Ignore_Shopping") }} + + {{ $t('Delete_All') }} + + + + + + + + + + + + + + + + + + diff --git a/vue3/src/components/display/ShoppingListView.vue b/vue3/src/components/display/ShoppingListView.vue index 2e915bda6..db358290b 100644 --- a/vue3/src/components/display/ShoppingListView.vue +++ b/vue3/src/components/display/ShoppingListView.vue @@ -1,35 +1,32 @@ - Shopping List - Recipes + {{ $t('Shopping_list') }} + {{ $t('Recipes') }} - - + + + + + + {{ category.name }} - {{category.stats}} - - - {{ item[1].food.name }} - - - - - + + @@ -38,7 +35,7 @@ - Recipes + {{ $t('Recipes') }} @@ -46,12 +43,40 @@ diff --git a/vue3/src/stores/ShoppingStore.ts b/vue3/src/stores/ShoppingStore.ts index e12bbc88e..f3e14dac2 100644 --- a/vue3/src/stores/ShoppingStore.ts +++ b/vue3/src/stores/ShoppingStore.ts @@ -497,7 +497,7 @@ export const useShoppingStore = defineStore(_STORE_ID, () => { } } - return {entries, supermarkets, supermarketCategories, getEntriesByGroup, getFlatEntries, hasFailedItems, refreshFromAPI} + return {entries, supermarkets, supermarketCategories, getEntriesByGroup, getFlatEntries, hasFailedItems, refreshFromAPI, createObject, deleteObject, updateObject, undoChange, setEntriesCheckedState, delayEntries} }) // enable hot reload for store