From 60d7e63da8c8e58ce40fe5e0791d4cbd99b1efc3 Mon Sep 17 00:00:00 2001 From: smilerz Date: Sun, 31 Oct 2021 15:18:00 -0500 Subject: [PATCH] add to shopping from card context menu --- cookbook/serializer.py | 2 +- cookbook/templates/include/log_cooking.html | 3 +- cookbook/templates/shopping_list.html | 13 +- cookbook/templates/url_import.html | 1 - cookbook/views/api.py | 1 - vue/src/apps/ModelListView/ModelListView.vue | 52 +++--- vue/src/components/Badges/OnHand.vue | 69 +++---- vue/src/components/Badges/Shopping.vue | 172 +++++++++--------- .../ContextMenu/GenericContextMenu.vue | 62 +++---- vue/src/components/GenericHorizontalCard.vue | 12 +- vue/src/components/GenericOrderedPill.vue | 121 ++++++------ .../components/Modals/GenericModalForm.vue | 1 - vue/src/components/RecipeCard.vue | 3 + vue/src/utils/models.js | 2 + vue/src/utils/openapi/api.ts | 14 +- vue/vue.config.js | 1 - 16 files changed, 279 insertions(+), 250 deletions(-) diff --git a/cookbook/serializer.py b/cookbook/serializer.py index 5ad8fd0b..4fbbcde4 100644 --- a/cookbook/serializer.py +++ b/cookbook/serializer.py @@ -673,7 +673,7 @@ class ShoppingListEntrySerializer(WritableNestedModelSerializer): recipe_mealplan = ShoppingListRecipeSerializer(source='list_recipe', read_only=True) amount = CustomDecimalField() created_by = UserNameSerializer(read_only=True) - completed_at = serializers.DateTimeField(allow_null=True) + completed_at = serializers.DateTimeField(allow_null=True, required=False) def get_fields(self, *args, **kwargs): fields = super().get_fields(*args, **kwargs) diff --git a/cookbook/templates/include/log_cooking.html b/cookbook/templates/include/log_cooking.html index b7549f19..3c586c94 100644 --- a/cookbook/templates/include/log_cooking.html +++ b/cookbook/templates/include/log_cooking.html @@ -1,4 +1,5 @@ {% load i18n %} +{% comment %} TODO: Deprecate {% endcomment %}