feat: add toggle all functionality for daily checkboxes

- Implemented `toggleAllToday` and `toggleAllYesterday` methods in `useDaily` for batch checkbox state management.
- Updated `DailySection` to include a button for toggling all checkboxes, enhancing user interaction.
- Integrated new toggle functions in `DailyPageClient` to support the updated checkbox handling.
This commit is contained in:
Julien Froidefond
2025-09-16 08:09:13 +02:00
parent c2f949325a
commit 11200f85ac
3 changed files with 95 additions and 3 deletions

View File

@@ -32,6 +32,8 @@ export function DailyPageClient({
addTodayCheckbox,
addYesterdayCheckbox,
toggleCheckbox,
toggleAllToday,
toggleAllYesterday,
updateCheckbox,
deleteCheckbox,
goToPreviousDay,
@@ -218,6 +220,7 @@ export function DailyPageClient({
onToggleCheckbox={handleToggleCheckbox}
onUpdateCheckbox={handleUpdateCheckbox}
onDeleteCheckbox={handleDeleteCheckbox}
onToggleAll={toggleAllYesterday}
saving={saving}
refreshing={refreshing}
/>
@@ -231,6 +234,7 @@ export function DailyPageClient({
onToggleCheckbox={handleToggleCheckbox}
onUpdateCheckbox={handleUpdateCheckbox}
onDeleteCheckbox={handleDeleteCheckbox}
onToggleAll={toggleAllToday}
saving={saving}
refreshing={refreshing}
/>