Files
towercontrol/components/HomePageClient.tsx
Julien Froidefond e6d24f2693 feat: extend task management with new statuses and centralized configuration
- Added `cancelled` and `freeze` statuses to `TasksResponse`, `HomePageClientProps`, and `useTasks` for comprehensive task tracking.
- Updated task forms to dynamically load statuses using `getAllStatuses`, enhancing maintainability and reducing hardcoded values.
- Refactored Kanban components to utilize centralized status configuration, improving consistency across the application.
- Adjusted visibility toggle and swimlanes to reflect new status options, ensuring a seamless user experience.
2025-09-14 23:06:50 +02:00

52 lines
1.2 KiB
TypeScript

'use client';
import { KanbanBoardContainer } from '@/components/kanban/BoardContainer';
import { Header } from '@/components/ui/Header';
import { TasksProvider, useTasksContext } from '@/contexts/TasksContext';
import { Task, Tag } from '@/lib/types';
interface HomePageClientProps {
initialTasks: Task[];
initialStats: {
total: number;
completed: number;
inProgress: number;
todo: number;
cancelled: number;
freeze: number;
completionRate: number;
};
initialTags: (Tag & { usage: number })[];
}
function HomePageContent() {
const { stats, syncing } = useTasksContext();
return (
<div className="min-h-screen bg-slate-950">
<Header
title="TowerControl"
subtitle="Gestionnaire de tâches moderne"
stats={stats}
syncing={syncing}
/>
<main className="h-[calc(100vh-120px)]">
<KanbanBoardContainer />
</main>
</div>
);
}
export function HomePageClient({ initialTasks, initialStats, initialTags }: HomePageClientProps) {
return (
<TasksProvider
initialTasks={initialTasks}
initialStats={initialStats}
initialTags={initialTags}
>
<HomePageContent />
</TasksProvider>
);
}