mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 19:16:37 +00:00
Don't remove products from stock overview on consuming all and the product has a min. stock amount & show it again on undo
This commit is contained in:
@@ -298,8 +298,21 @@ RefreshContextualTimeago = function()
|
||||
$("time.timeago").each(function()
|
||||
{
|
||||
var element = $(this);
|
||||
|
||||
if (!element.hasAttr("datetime"))
|
||||
{
|
||||
element.text("")
|
||||
return
|
||||
}
|
||||
|
||||
var timestamp = element.attr("datetime");
|
||||
|
||||
if (timestamp.isEmpty())
|
||||
{
|
||||
element.text("")
|
||||
return
|
||||
}
|
||||
|
||||
var isNever = timestamp && timestamp.substring(0, 10) == "2999-12-31";
|
||||
var isToday = timestamp && timestamp.substring(0, 10) == moment().format("YYYY-MM-DD");
|
||||
var isDateWithoutTime = element.hasClass("timeago-date-only");
|
||||
|
Reference in New Issue
Block a user