mirror of
https://github.com/grocy/grocy.git
synced 2026-03-28 07:39:25 +01:00
Default initial recipe add for mealplan to use recipe's base_servings (#554)
This commit is contained in:
parent
97095d6e68
commit
2c0f7f0883
|
|
@ -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);
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user