recipes can create products (#501)

This commit is contained in:
kriddles
2020-01-21 13:20:26 -06:00
committed by Bernd Bestel
parent c22496ca7c
commit 3a36bdaf45
5 changed files with 56 additions and 2 deletions

View File

@@ -1,4 +1,8 @@
$('#save-recipe-button').on('click', function(e)
$(document).ready(function() {
Grocy.Components.ProductPicker.GetPicker().trigger('change');
} );
$('#save-recipe-button').on('click', function(e)
{
e.preventDefault();
@@ -349,3 +353,13 @@ $(window).on("message", function(e)
}
});
Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
{
var productId = $(e.target).val();
if (productId)
{
Grocy.Components.ProductCard.Refresh(productId);
}
});