mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00: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…
x
Reference in New Issue
Block a user