mirror of
https://github.com/grocy/grocy.git
synced 2025-09-29 19:12:24 +00:00
Add a "shopping list item to stock flow" (references #98)
This commit is contained in:
@@ -23,7 +23,7 @@ Grocy.Components.ProductPicker.SetValue = function(value)
|
||||
|
||||
Grocy.Components.ProductPicker.InProductAddWorkflow = function()
|
||||
{
|
||||
return typeof GetUriParam('createdproduct') !== "undefined";
|
||||
return typeof GetUriParam('createdproduct') !== "undefined" || typeof GetUriParam('product') !== "undefined";
|
||||
}
|
||||
|
||||
Grocy.Components.ProductPicker.InProductModifyWorkflow = function()
|
||||
@@ -74,6 +74,17 @@ if (typeof prefillProduct !== "undefined")
|
||||
}
|
||||
}
|
||||
|
||||
var prefillProductId = GetUriParam("product");
|
||||
if (typeof prefillProductId !== "undefined")
|
||||
{
|
||||
$('#product_id').val(prefillProductId);
|
||||
$('#product_id').data('combobox').refresh();
|
||||
$('#product_id').trigger('change');
|
||||
|
||||
var nextInputElement = $(Grocy.Components.ProductPicker.GetPicker().parent().data('next-input-selector').toString());
|
||||
nextInputElement.focus();
|
||||
}
|
||||
|
||||
var addBarcode = GetUriParam('addbarcodetoselection');
|
||||
if (addBarcode !== undefined)
|
||||
{
|
||||
|
Reference in New Issue
Block a user