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:
@@ -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[]) => {
|
||||
|
||||
Reference in New Issue
Block a user