From a2f8f271937780a198cf6340293ec7a49513e124 Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Sat, 11 Dec 2021 19:12:08 -0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20support=20for=20lockable=20?= =?UTF-8?q?recipes=20(#876)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: :sparkles: support for lockable recipes * feat(backend): :sparkles: check user can update before updating recipe * test(backend): :white_check_mark: add recipe lock tests * feat(frontend): :sparkles: disabled lock action when not owner * test(backend): :white_check_mark: test non-owner can't lock recipe * hide quantity on zero value * fix(backend): :bug: temp/partial fix for recipes with same name. WIP --- .../Domain/Recipe/RecipeActionMenu.vue | 23 ++++++- .../Domain/Recipe/RecipeSettingsMenu.vue | 6 ++ .../recipes/use-recipe-ingredients.ts | 6 +- frontend/pages/recipe/_slug/index.vue | 3 +- mealie/db/data_access_layer/_access_model.py | 47 ++++++++++++-- mealie/db/models/recipe/settings.py | 3 + mealie/schema/recipe/recipe_settings.py | 5 +- .../_base_http_service/base_http_service.py | 2 +- mealie/services/recipe/recipe_service.py | 24 ++++++-- tests/fixtures/fixture_users.py | 61 ++++++++++++++++++- .../user_recipe_tests/test_recipe_owner.py | 43 ++++++++++++- 11 files changed, 202 insertions(+), 21 deletions(-) diff --git a/frontend/components/Domain/Recipe/RecipeActionMenu.vue b/frontend/components/Domain/Recipe/RecipeActionMenu.vue index cd9e6123e..f68c2785f 100644 --- a/frontend/components/Domain/Recipe/RecipeActionMenu.vue +++ b/frontend/components/Domain/Recipe/RecipeActionMenu.vue @@ -22,10 +22,9 @@
- +