Added a new "adaptive" chore period type (closes #1495)

This commit is contained in:
Bernd Bestel
2022-02-10 18:06:33 +01:00
parent 091a93ff4e
commit 69a7ea6057
12 changed files with 147 additions and 13 deletions

View File

@@ -31,6 +31,15 @@ Grocy.Components.ChoreCard.Refresh = function(choreId)
$("#chorecard-chore-last-tracked-timeago").removeClass("timeago-date-only");
}
if (choreDetails.average_execution_frequency_hours == null)
{
$('#chorecard-average-execution-frequency').text(__t("Unknown"));
}
else
{
$('#chorecard-average-execution-frequency').text(moment.duration(parseInt(choreDetails.average_execution_frequency_hours) / 24, "days").humanize());
}
RefreshContextualTimeago(".chorecard");
},
function(xhr)