mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 03:04:36 +00:00
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:
@@ -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");
|
||||
|
Reference in New Issue
Block a user