feat: enhance checkbox update functionality

- Updated `handleUpdateCheckbox` to accept an optional `date` parameter for modifying date/time.
- Adjusted related components (`DailyCheckboxItem`, `DailySection`, `EditCheckboxModal`) to support the new date functionality, improving task management capabilities.
- Added date input field in `EditCheckboxModal` for user interaction with date/time settings.
This commit is contained in:
Julien Froidefond
2025-09-30 10:02:58 +02:00
parent df7d2a9afa
commit d1d65cdca1
4 changed files with 25 additions and 8 deletions

View File

@@ -103,12 +103,17 @@ export function DailyPageClient({
await refreshDailyDates();
};
const handleUpdateCheckbox = async (checkboxId: string, text: string, type: DailyCheckboxType, taskId?: string) => {
const handleUpdateCheckbox = async (checkboxId: string, text: string, type: DailyCheckboxType, taskId?: string, date?: Date) => {
await updateCheckbox(checkboxId, {
text,
type,
taskId // Permet la liaison tâche pour tous les types
taskId, // Permet la liaison tâche pour tous les types
date // Permet la modification de la date/heure
});
// Refresh dates après modification pour mettre à jour le calendrier si la date a changé
if (date) {
await refreshDailyDates();
}
};
const handleReorderCheckboxes = async (date: Date, checkboxIds: string[]) => {