Added a new stock settings to always show all products on /stockoverview (closes #2398)

This commit is contained in:
Bernd Bestel
2025-01-15 21:44:45 +01:00
parent 113a9ecf39
commit b0dded1346
10 changed files with 149 additions and 7 deletions

View File

@@ -318,6 +318,7 @@ RefreshContextualTimeago = function(rootSelector = "#page-content")
}
var isNever = timestamp && timestamp.substring(0, 10) == "2999-12-31";
var isUnknown = timestamp && timestamp.substring(0, 10) == "2888-12-31";
var isToday = timestamp && timestamp.substring(0, 10) == moment().format("YYYY-MM-DD");
var isDateWithoutTime = element.hasClass("timeago-date-only");
@@ -326,6 +327,11 @@ RefreshContextualTimeago = function(rootSelector = "#page-content")
element.prev().text(__t("Never"));
element.text("");
}
else if (isUnknown)
{
element.prev().text(__t("Unknown"));
element.text("");
}
else if (isToday)
{
element.text(__t("Today"));