Fixed that tasks without a due date were highlighted in red (fixes #1833)

This commit is contained in:
Bernd Bestel 2022-03-23 19:35:48 +01:00
parent 9db66048d1
commit f0db2a7709
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 6 additions and 2 deletions

View File

@ -43,7 +43,7 @@
### Tasks
- xxx
- Fixed that tasks without a due date were highlighted in red (like overdue tasks)
### Batteries

View File

@ -20,7 +20,11 @@ class TasksController extends BaseController
foreach ($tasks as $task)
{
if ($task->due_date < date('Y-m-d 23:59:59', strtotime('-1 days')))
if (empty($task->due_date))
{
$task->due_type = '';
}
elseif ($task->due_date < date('Y-m-d 23:59:59', strtotime('-1 days')))
{
$task->due_type = 'overdue';
}