From b1f81b4b952fd87bd0ae88116ffcb241dcadc3be Mon Sep 17 00:00:00 2001
From: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
Date: Tue, 12 Nov 2024 16:12:41 +0100
Subject: [PATCH] fix: Cookmode hide additional ingredients if all ingredients
are linked (#4539)
---
.../components/Domain/Recipe/RecipePage/RecipePage.vue | 7 +++----
.../RecipePage/RecipePageParts/RecipePageInstructions.vue | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/frontend/components/Domain/Recipe/RecipePage/RecipePage.vue b/frontend/components/Domain/Recipe/RecipePage/RecipePage.vue
index 823f9f734..2489e4af1 100644
--- a/frontend/components/Domain/Recipe/RecipePage/RecipePage.vue
+++ b/frontend/components/Domain/Recipe/RecipePage/RecipePage.vue
@@ -104,8 +104,9 @@
:recipe="recipe"
:scale="scale"
/>
-
-
+
+
+
{{ $t('recipe.not-linked-ingredients') }}
{
- console.log("inst",props.recipe.recipeInstruction);
return props.recipe.recipeIngredient.filter((ingredient) => {
return !props.recipe.recipeInstructions.some((step) => step.ingredientReferences?.map((ref) => ref.referenceId).includes(ingredient.referenceId));
})
})
- console.log(notLinkedIngredients);
/** =============================================================
* Recipe Snapshot on Mount
diff --git a/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageInstructions.vue b/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageInstructions.vue
index 24c2eea5c..171fdaeaa 100644
--- a/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageInstructions.vue
+++ b/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageInstructions.vue
@@ -338,7 +338,7 @@ export default defineComponent({
},
setup(props, context) {
- const { i18n, req, $vuetify } = useContext();
+ const { i18n, req } = useContext();
const BASE_URL = detectServerBaseUrl(req);
const { isCookMode, toggleCookMode, isEditForm } = usePageState(props.recipe.slug);