From 3a62e94ad8d50f3e25a4b7cb077e754bdcfcf8c4 Mon Sep 17 00:00:00 2001 From: fullsizemalt <106900403+fullsizemalt@users.noreply.github.com> Date: Mon, 12 Jan 2026 14:58:57 -0800 Subject: [PATCH] fix: Replace hardcoded task counts with real calculations - Overdue: tasks with dueDate in the past - Due Today: tasks due today - Completed 24h: tasks completed in last 24 hours --- frontend/src/pages/TasksPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/TasksPage.tsx b/frontend/src/pages/TasksPage.tsx index 2a58f1c..0995cd7 100644 --- a/frontend/src/pages/TasksPage.tsx +++ b/frontend/src/pages/TasksPage.tsx @@ -100,9 +100,9 @@ export default function TasksPage() { {/* Metrics Row */}
t.assigneeId === user?.id).length} icon={User} color="text-[var(--color-primary)]" /> - - t.status !== 'COMPLETED').length} icon={Clock} color="text-[var(--color-warning)]" /> - + t.status !== 'COMPLETED' && t.dueDate && new Date(t.dueDate) < new Date()).length} icon={AlertCircle} color="text-[var(--color-error)]" /> + t.status !== 'COMPLETED' && t.dueDate && new Date(t.dueDate).toDateString() === new Date().toDateString()).length} icon={Clock} color="text-[var(--color-warning)]" /> + t.status === 'COMPLETED' && t.completedAt && new Date(t.completedAt) > new Date(Date.now() - 24 * 60 * 60 * 1000)).length} icon={CheckCircle2} color="text-[var(--color-accent)]" />