mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Fixed row highlighting after product actions on the stock overview page
This commit is contained in:
parent
654d00dd67
commit
cc2bf68f31
@ -1,6 +1,7 @@
|
||||
### Stock improvements/fixes
|
||||
- Fixed that barcode lookups now compare the whole barcode, not parts of it (e. g. when you have two products with the barcodes `$1` and `$10` and scan `$1` maybe the product of `$10` was found till now)
|
||||
- Fixed that the "X products are already expired" count on the stock overview page was wrong
|
||||
- Fixed that after product actions (consume/purchase/etc.) on the stock overview page the highlighting of the row was maybe wrong
|
||||
- It's now possible to accumulate min. stock amounts on parent product level (new option per product, means the sub product will never be "missing" then, only the parent product)
|
||||
- When adding a product to the shopping list from the new context/more menu from the stock overview page and if the product is already on the shopping list, the amount of that entry will be updated acccordingly instead of adding a new (double) shopping list item
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user