* refactor to be stock/entry/{entryId}

* Allow recipeform add productworkflow

* on document ready stockdetail filter based on ProductPicker

* openDate fixes for undo

* RefreshStockDetailRow refresh location-id
This commit is contained in:
kriddles
2020-01-22 14:08:49 -06:00
committed by Bernd Bestel
parent 101355cae2
commit ef9f28d154
8 changed files with 114 additions and 94 deletions

View File

@@ -26,9 +26,8 @@
jsonData.open = $("#open").is(":checked");
var stockRowId = GetUriParam('stockRowId');
jsonData.id = stockRowId;
Grocy.Api.Put("stock", jsonData,
Grocy.Api.Put("stock/entry/" + stockRowId, jsonData,
function(result)
{
var successMessage = __t('Stock entry successfully updated') + '<br><a class="btn btn-secondary btn-sm mt-2" href="#" onclick="UndoStockBookingEntry(\'' + result.id + '\',\'' + stockRowId + '\')"><i class="fas fa-undo"></i> ' + __t("Undo") + '</a>';
@@ -84,7 +83,7 @@ if (Grocy.Components.DateTimePicker)
}
var stockRowId = GetUriParam('stockRowId');
Grocy.Api.Get("stock/" + stockRowId + "/entry",
Grocy.Api.Get("stock/entry/" + stockRowId,
function (stockEntry)
{
Grocy.Components.LocationPicker.SetId(stockEntry.location_id);