diff --git a/public/viewjs/mealplan.js b/public/viewjs/mealplan.js index 20929f1a..36df81f2 100644 --- a/public/viewjs/mealplan.js +++ b/public/viewjs/mealplan.js @@ -783,5 +783,16 @@ Grocy.Components.RecipePicker.GetPicker().on('change', function(e) $("#recipe_servings").focus(); $("#recipe_servings").select(); }, 200); + + Grocy.Api.Get('objects/recipes/' + recipeId, + function(recipe) + { + $("#recipe_servings").val(recipe.base_servings); + }, + function(xhr) + { + console.error(xhr); + } + ); } });