mirror of
https://github.com/grocy/grocy.git
synced 2025-08-19 11:48:55 +00:00
Display just "unlimited" on the product card for the average shelf life if it is > 200 years
This commit is contained in:
@@ -52,6 +52,10 @@ Grocy.Components.ProductCard.Refresh = function(productId)
|
||||
{
|
||||
$('#productcard-product-average-shelf-life').text(__t("Unknown"));
|
||||
}
|
||||
else if (parseInt(productDetails.average_shelf_life_days) > 73000) // > 200 years aka forever
|
||||
{
|
||||
$('#productcard-product-average-shelf-life').text(__t("Unlimited"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#productcard-product-average-shelf-life').text(moment.duration(productDetails.average_shelf_life_days, "days").humanize());
|
||||
|
Reference in New Issue
Block a user