From e8db2b6401fa460e90b2c5082f8085ef27ed5ce0 Mon Sep 17 00:00:00 2001 From: Patrick Magauran Date: Tue, 6 Feb 2024 22:37:25 -0500 Subject: [PATCH] Clicking on Recipe in Meal Plan auto does servings --- vue/src/apps/MealPlanView/MealPlanView.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vue/src/apps/MealPlanView/MealPlanView.vue b/vue/src/apps/MealPlanView/MealPlanView.vue index 58793c70..4e431ee2 100644 --- a/vue/src/apps/MealPlanView/MealPlanView.vue +++ b/vue/src/apps/MealPlanView/MealPlanView.vue @@ -126,7 +126,7 @@
- {{ plan.entry.recipe.name }} + {{ plan.entry.recipe.name }} {{ plan.entry.title }}
@@ -169,7 +169,7 @@ v-if="contextData && contextData.originalItem && contextData.originalItem.entry.recipe != null" @click=" $refs.menu.close() - openRecipe(contextData.originalItem.entry.recipe) + openRecipe(contextData.originalItem.entry.recipe, contextData.originalItem.entry.servings) " > @@ -392,8 +392,10 @@ export default { }, }, methods: { - openRecipe: function (recipe) { - window.open(this.resolveDjangoUrl("view_recipe", recipe.id)) + openRecipe: function (recipe, servings) { + let ur = this.resolveDjangoUrl("view_recipe", `${recipe.id}-${servings}`) + console.log(ur) + window.open(ur) }, setStartingDay(days) { if (this.settings.startingDayOfWeek + days < 0) {