mirror of
https://github.com/grocy/grocy.git
synced 2025-08-19 11:48:55 +00:00
Fixed date "never" display on stock overview page (again closes #296)
This commit is contained in:
@@ -299,13 +299,15 @@ RefreshContextualTimeago = function()
|
||||
{
|
||||
var element = $(this);
|
||||
var timestamp = element.attr("datetime");
|
||||
|
||||
var isNever = timestamp && timestamp.substring(0, 10) == "2999-12-31";
|
||||
var isToday = timestamp && timestamp.length == 10 && timestamp.substring(0, 10) == moment().format("YYYY-MM-DD");
|
||||
|
||||
if (isNever)
|
||||
{
|
||||
element.prev().text(__t("Never"));
|
||||
}
|
||||
if (isToday)
|
||||
else if (isToday)
|
||||
{
|
||||
element.text(__t("Today"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user