diff --git a/docs/docs/overrides/api.html b/docs/docs/overrides/api.html index 8c7f4880d..a6f596205 100644 --- a/docs/docs/overrides/api.html +++ b/docs/docs/overrides/api.html @@ -14,7 +14,7 @@
diff --git a/frontend/components/Domain/Recipe/RecipeDialogAddToShoppingList.vue b/frontend/components/Domain/Recipe/RecipeDialogAddToShoppingList.vue index 789d59bd4..6f233b84f 100644 --- a/frontend/components/Domain/Recipe/RecipeDialogAddToShoppingList.vue +++ b/frontend/components/Domain/Recipe/RecipeDialogAddToShoppingList.vue @@ -204,6 +204,10 @@ export default defineComponent({ shoppingListShowAllToggled: false, }); + const userHousehold = computed(() => { + return $auth.user?.householdSlug || ""; + }); + const shoppingListChoices = computed(() => { return props.shoppingLists.filter((list) => preferences.value.viewAllLists || list.userId === $auth.user?.id); }); @@ -248,8 +252,9 @@ export default defineComponent({ } const shoppingListIngredients: ShoppingListIngredient[] = recipe.recipeIngredient.map((ing) => { + const householdsWithFood = (ing.food?.householdsWithIngredientFood || []); return { - checked: !ing.food?.onHand, + checked: !householdsWithFood.includes(userHousehold.value), ingredient: ing, disableAmount: recipe.settings?.disableAmount || false, } @@ -276,7 +281,8 @@ export default defineComponent({ } // Store the on-hand ingredients for later - if (ing.ingredient.food?.onHand) { + const householdsWithFood = (ing.ingredient.food?.householdsWithIngredientFood || []); + if (householdsWithFood.includes(userHousehold.value)) { onHandIngs.push(ing); return sections; } diff --git a/frontend/components/Domain/Recipe/RecipeLastMade.vue b/frontend/components/Domain/Recipe/RecipeLastMade.vue index d60de97b4..178db28bd 100644 --- a/frontend/components/Domain/Recipe/RecipeLastMade.vue +++ b/frontend/components/Domain/Recipe/RecipeLastMade.vue @@ -96,7 +96,12 @@ {{ $globals.icons.calendar }} - {{ $t('recipe.last-made-date', { date: value ? new Date(value).toLocaleDateString($i18n.locale) : $t("general.never") } ) }} +
+ {{ $t('recipe.last-made-date', { date: lastMade ? new Date(lastMade).toLocaleDateString($i18n.locale) : $t("general.never") } ) }} +
+
+ +
@@ -110,7 +115,7 @@