Squashed commit

Improved locale number display on stockoverview page
Fixed choresoverview chore execution color highlighting
Highlight recipe ingredients based on the new due score (references #1813)
Reworked current price handling views (mostly needed for recipes)
This commit is contained in:
Bernd Bestel
2022-03-31 22:52:38 +02:00
parent fbb84277bf
commit cd60c239af
7 changed files with 194 additions and 21 deletions

View File

@@ -123,17 +123,24 @@ $(document).on('click', '.track-chore-button', function(e)
{
var choreRow = $('#chore-' + choreId + '-row');
var nextXDaysThreshold = moment().add($("#info-due-soon-chores").data("next-x-days"), "days");
var todayThreshold = moment().endOf("day");
var now = moment();
var nextExecutionTime = moment(result.next_estimated_execution_time);
choreRow.removeClass("table-warning");
choreRow.removeClass("table-danger");
choreRow.removeClass("table-info");
$('#chore-' + choreId + '-due-filter-column').html("");
if (nextExecutionTime.isBefore(now))
{
choreRow.addClass("table-danger");
$('#chore-' + choreId + '-due-filter-column').html("overdue");
}
else if (nextExecutionTime.isSameOrBefore(todayThreshold))
{
choreRow.addClass("table-info");
$('#chore-' + choreId + '-due-filter-column').html("duetoday");
}
else if (nextExecutionTime.isBefore(nextXDaysThreshold))
{
choreRow.addClass("table-warning");
@@ -332,7 +339,6 @@ $("#reschedule-chore-clear-button").on("click", function(e)
);
});
if (GetUriParam("user") !== undefined)
{
$("#user-filter").val("xx" + GetUriParam("user") + "xx");