mirror of
https://github.com/grocy/grocy.git
synced 2025-08-28 09:01:14 +00:00
Squashed commit
Fixed number input min/max amount handling Only (auto) save valid user inputs More filters on the stock journal pages Save the last price per used barcode and preselect that as a total price on purchase if not empty (closes #1131) Don't apply conversions for only_check_single_unit_in_stock ingredients (fixes #1120) Render shopping list userfields (closes #1052) Fixed Focus when adding included recipes (closes #1019) Order all base objects with NOCASE (closes #1086)
This commit is contained in:
@@ -21,6 +21,9 @@ $('#save-shoppinglist-button').on('click', function(e)
|
||||
Grocy.Api.Post('stock/shoppinglist/add-product', jsonData,
|
||||
function(result)
|
||||
{
|
||||
Grocy.EditObjectId = result.created_object_id;
|
||||
Grocy.Components.UserfieldsForm.Save();
|
||||
|
||||
if (GetUriParam("embedded") !== undefined)
|
||||
{
|
||||
Grocy.Api.Get('stock/products/' + jsonData.product_id,
|
||||
@@ -54,6 +57,9 @@ $('#save-shoppinglist-button').on('click', function(e)
|
||||
Grocy.Api.Post('objects/shopping_list', jsonData,
|
||||
function(result)
|
||||
{
|
||||
Grocy.EditObjectId = result.created_object_id;
|
||||
Grocy.Components.UserfieldsForm.Save();
|
||||
|
||||
if (GetUriParam("embedded") !== undefined)
|
||||
{
|
||||
if (jsonData.product_id)
|
||||
@@ -94,6 +100,8 @@ $('#save-shoppinglist-button').on('click', function(e)
|
||||
Grocy.Api.Put('objects/shopping_list/' + Grocy.EditObjectId, jsonData,
|
||||
function(result)
|
||||
{
|
||||
Grocy.Components.UserfieldsForm.Save();
|
||||
|
||||
if (GetUriParam("embedded") !== undefined)
|
||||
{
|
||||
if (jsonData.product_id)
|
||||
@@ -216,3 +224,5 @@ if (GetUriParam("amount") !== undefined)
|
||||
$(".input-group-productamountpicker").trigger("change");
|
||||
Grocy.FrontendHelpers.ValidateForm('shoppinglist-form');
|
||||
}
|
||||
|
||||
Grocy.Components.UserfieldsForm.Load();
|
||||
|
Reference in New Issue
Block a user