feat: implement Daily management features and update UI

- Marked tasks as completed in TODO for Daily management service, data model, and interactive checkboxes.
- Added a new link to the Daily page in the Header component for easy navigation.
- Introduced DailyCheckbox model in Prisma schema and corresponding TypeScript interfaces for better data handling.
- Updated database schema to include daily checkboxes, enhancing task management capabilities.
This commit is contained in:
Julien Froidefond
2025-09-15 18:04:46 +02:00
parent 74ef79eb70
commit cf2e360ce9
14 changed files with 1423 additions and 10 deletions

View File

@@ -162,3 +162,39 @@ export class ValidationError extends Error {
this.name = 'ValidationError';
}
}
// Types pour les dailies
export interface DailyCheckbox {
id: string;
date: Date;
text: string;
isChecked: boolean;
order: number;
taskId?: string;
task?: Task; // Relation optionnelle vers une tâche
createdAt: Date;
updatedAt: Date;
}
// Interface pour créer/modifier une checkbox
export interface CreateDailyCheckboxData {
date: Date;
text: string;
taskId?: string;
order?: number;
isChecked?: boolean;
}
export interface UpdateDailyCheckboxData {
text?: string;
isChecked?: boolean;
taskId?: string;
order?: number;
}
// Interface pour récupérer les checkboxes d'une journée
export interface DailyView {
date: Date;
yesterday: DailyCheckbox[]; // Checkboxes de la veille
today: DailyCheckbox[]; // Checkboxes du jour
}