diff --git a/frontend/app/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageIngredientToolsView.vue b/frontend/app/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageIngredientToolsView.vue index ae77cb54e..68f2fee8b 100644 --- a/frontend/app/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageIngredientToolsView.vue +++ b/frontend/app/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageIngredientToolsView.vue @@ -62,17 +62,18 @@ const toolStore = isOwnGroup.value ? useToolStore() : null; const { user } = usePageUser(); const { isEditMode } = usePageState(props.recipe.slug); -const recipeTools = computed(() => { +const recipeTools = ref([]); +watch(() => props.recipe.tools, () => { if (!(user.householdSlug && toolStore)) { - return props.recipe.tools.map(tool => ({ ...tool, onHand: false }) as RecipeToolWithOnHand); + recipeTools.value = props.recipe.tools.map(tool => ({ ...tool, onHand: false }) as RecipeToolWithOnHand); } else { - return props.recipe.tools.map((tool) => { + recipeTools.value = props.recipe.tools.map((tool) => { const onHand = tool.householdsWithTool?.includes(user.householdSlug) || false; return { ...tool, onHand } as RecipeToolWithOnHand; }); } -}); +}, { immediate: true }); function updateTool(index: number) { if (user.id && user.householdSlug && toolStore) {