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:
36
lib/types.ts
36
lib/types.ts
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user