mirror of
https://github.com/grocy/grocy.git
synced 2026-04-05 20:36:15 +02:00
stockdetail refresh with location name
This commit is contained in:
parent
17c3776b09
commit
36a6c56f5c
|
|
@ -249,11 +249,20 @@ function RefreshStockDetailRow(stockRowId)
|
|||
$(this).text(result.best_before_date).fadeIn(500);
|
||||
});
|
||||
|
||||
var locationName = "";
|
||||
Grocy.Api.Get("objects/locations/" + result.location_id,
|
||||
function(locationResult)
|
||||
{
|
||||
locationName = locationResult.name;
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
console.error(xhr);
|
||||
});
|
||||
$('#stock-' + stockRowId + '-location').parent().effect('highlight', { }, 500);
|
||||
$('#stock-' + stockRowId + '-location').fadeOut(500, function()
|
||||
{
|
||||
//TODO grab location name instead of id
|
||||
$(this).text(result.location_id).fadeIn(500);
|
||||
$(this).text(locationName).fadeIn(500);
|
||||
});
|
||||
|
||||
$('#stock-' + stockRowId + '-price').parent().effect('highlight', { }, 500);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user