diff --git a/migrations/0077.sql b/migrations/0077.sql index ca753808..55c4ec2e 100644 --- a/migrations/0077.sql +++ b/migrations/0077.sql @@ -19,7 +19,8 @@ SELECT WHEN period_config LIKE '%saturday%' THEN DATETIME(IFNULL(MAX(l.tracked_time), DATETIME('now', 'localtime')), '1 days', 'weekday 6') END WHEN 'monthly' THEN DATETIME(IFNULL(MAX(l.tracked_time), DATETIME('now', 'localtime')), '+1 month', 'start of month', '+' || CAST(h.period_days - 1 AS TEXT) || ' day') - END AS next_estimated_execution_time + END AS next_estimated_execution_time, + h.track_date_only FROM chores h LEFT JOIN chores_log l ON h.id = l.chore_id diff --git a/public/js/grocy.js b/public/js/grocy.js index 2a64f45b..a44c9c6c 100644 --- a/public/js/grocy.js +++ b/public/js/grocy.js @@ -302,6 +302,7 @@ RefreshContextualTimeago = function() 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"); + var isDateWithoutTime = element.hasClass("timeago-date-only"); if (isNever) { @@ -315,6 +316,11 @@ RefreshContextualTimeago = function() { element.timeago("update", timestamp); } + + if (isDateWithoutTime) + { + element.prev().text(element.prev().text().substring(0, 10)); + } }); } RefreshContextualTimeago(); diff --git a/views/choresjournal.blade.php b/views/choresjournal.blade.php index c97aae37..96cab621 100644 --- a/views/choresjournal.blade.php +++ b/views/choresjournal.blade.php @@ -55,8 +55,8 @@ @endif - {{ $choreLogEntry->tracked_time }} - + {{ $choreLogEntry->tracked_time }} + @if ($choreLogEntry->done_by_user_id !== null && !empty($choreLogEntry->done_by_user_id)) diff --git a/views/choresoverview.blade.php b/views/choresoverview.blade.php index 9d327ada..59a67a20 100644 --- a/views/choresoverview.blade.php +++ b/views/choresoverview.blade.php @@ -85,14 +85,14 @@ @if(FindObjectInArrayByPropertyValue($chores, 'id', $curentChoreEntry->chore_id)->period_type !== \Grocy\Services\ChoresService::CHORE_TYPE_MANUALLY) {{ $curentChoreEntry->next_estimated_execution_time }} - + @else ... @endif {{ $curentChoreEntry->last_tracked_time }} - + @if(FindObjectInArrayByPropertyValue($chores, 'id', $curentChoreEntry->chore_id)->period_type !== \Grocy\Services\ChoresService::CHORE_TYPE_MANUALLY && $curentChoreEntry->next_estimated_execution_time < date('Y-m-d H:i:s')) overdue @elseif(FindObjectInArrayByPropertyValue($chores, 'id', $curentChoreEntry->chore_id)->period_type !== \Grocy\Services\ChoresService::CHORE_TYPE_MANUALLY && $curentChoreEntry->next_estimated_execution_time < date('Y-m-d H:i:s', strtotime("+$nextXDays days"))) duesoon @endif