From 045a33f0db5c990c685ea61f94f9f8701ca80d70 Mon Sep 17 00:00:00 2001 From: Kurt Riddlesperger Date: Wed, 22 Jan 2020 11:13:49 -0600 Subject: [PATCH] RefreshStockDetailRow refresh location-id --- public/viewjs/stockdetail.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/viewjs/stockdetail.js b/public/viewjs/stockdetail.js index 6df593fe..13d4b093 100644 --- a/public/viewjs/stockdetail.js +++ b/public/viewjs/stockdetail.js @@ -160,6 +160,8 @@ function RefreshStockDetailRow(stockRowId) }); $('#stock-' + stockRowId + '-best-before-date-timeago').attr('datetime', result.best_before_date + ' 23:59:59'); + $(".stock-consume-button").attr('data-location-id',result.location_id); + var locationName = ""; Grocy.Api.Get("objects/locations/" + result.location_id, function(locationResult) @@ -174,6 +176,7 @@ function RefreshStockDetailRow(stockRowId) $('#stock-' + stockRowId + '-location').parent().effect('highlight', { }, 500); $('#stock-' + stockRowId + '-location').fadeOut(500, function() { + $(this).attr('data-location-id',result.location_id); $(this).text(locationName).fadeIn(500); });