mirror of
https://github.com/grocy/grocy.git
synced 2025-08-19 03:40:10 +00:00
Fixed row highlighting after product actions on the stock overview page
This commit is contained in:
@@ -313,7 +313,7 @@ function RefreshProductRow(productId)
|
||||
function(result)
|
||||
{
|
||||
var productRow = $('#product-' + productId + '-row');
|
||||
var expiringThreshold = moment().add("-" + $("#info-expiring-products").data("next-x-days"), "days");
|
||||
var expiringThreshold = moment().add($("#info-expiring-products").data("next-x-days"), "days");
|
||||
var now = moment();
|
||||
var nextBestBeforeDate = moment(result.next_best_before_date);
|
||||
|
||||
@@ -326,7 +326,7 @@ function RefreshProductRow(productId)
|
||||
{
|
||||
productRow.addClass("table-danger");
|
||||
}
|
||||
else if (nextBestBeforeDate.isAfter(expiringThreshold))
|
||||
else if (nextBestBeforeDate.isBefore(expiringThreshold))
|
||||
{
|
||||
productRow.addClass("table-warning");
|
||||
}
|
||||
|
Reference in New Issue
Block a user