From b8b35547aa95418b5b2bc61aada2e1054e8798a7 Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Mon, 15 Sep 2025 08:49:02 +0200 Subject: [PATCH] feat: add cancelled and freeze stats to Header component - Introduced `cancelled` and `freeze` properties to `HeaderProps` for enhanced task tracking. - Updated rendering logic to conditionally display `StatCard` components for `FREEZE` and `CANCEL` statuses based on their values, improving user feedback on task distribution. --- components/ui/Header.tsx | 52 ++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/components/ui/Header.tsx b/components/ui/Header.tsx index 9388936..4e0b813 100644 --- a/components/ui/Header.tsx +++ b/components/ui/Header.tsx @@ -9,6 +9,8 @@ interface HeaderProps { completed: number; inProgress: number; todo: number; + cancelled: number; + freeze: number; completionRate: number; }; syncing?: boolean; @@ -61,21 +63,41 @@ export function Header({ title, subtitle, stats, syncing = false }: HeaderProps) value={String(stats.total).padStart(2, '0')} color="blue" /> - - - + {stats.completed > 0 && ( + + )} + {stats.inProgress > 0 && ( + + )} + {stats.todo > 0 && ( + + )} + {stats.freeze > 0 && ( + + )} + {stats.cancelled > 0 && ( + + )}