diff --git a/hooks/useDaily.ts b/hooks/useDaily.ts index d547fba..6cabe94 100644 --- a/hooks/useDaily.ts +++ b/hooks/useDaily.ts @@ -87,7 +87,7 @@ export function useDaily(initialDate?: Date, initialDailyView?: DailyView): UseD try { setError(null); - const result = await addTodayCheckboxAction(text, taskId); + const result = await addTodayCheckboxAction(text, type, taskId); if (result.success && result.data) { // Mise à jour optimiste @@ -117,7 +117,7 @@ export function useDaily(initialDate?: Date, initialDailyView?: DailyView): UseD try { setError(null); - const result = await addYesterdayCheckboxAction(text, taskId); + const result = await addYesterdayCheckboxAction(text, type, taskId); if (result.success && result.data) { // Mise à jour optimiste diff --git a/src/actions/daily.ts b/src/actions/daily.ts index d1835dd..b239594 100644 --- a/src/actions/daily.ts +++ b/src/actions/daily.ts @@ -79,7 +79,7 @@ export async function addCheckboxToDaily(dailyId: string, content: string, taskI /** * Ajoute une checkbox pour aujourd'hui */ -export async function addTodayCheckbox(content: string, taskId?: string): Promise<{ +export async function addTodayCheckbox(content: string, type?: 'task' | 'meeting', taskId?: string): Promise<{ success: boolean; data?: DailyCheckbox; error?: string; @@ -88,6 +88,7 @@ export async function addTodayCheckbox(content: string, taskId?: string): Promis const newCheckbox = await dailyService.addCheckbox({ date: new Date(), text: content, + type: type || 'task', taskId }); @@ -105,7 +106,7 @@ export async function addTodayCheckbox(content: string, taskId?: string): Promis /** * Ajoute une checkbox pour hier */ -export async function addYesterdayCheckbox(content: string, taskId?: string): Promise<{ +export async function addYesterdayCheckbox(content: string, type?: 'task' | 'meeting', taskId?: string): Promise<{ success: boolean; data?: DailyCheckbox; error?: string; @@ -117,6 +118,7 @@ export async function addYesterdayCheckbox(content: string, taskId?: string): Pr const newCheckbox = await dailyService.addCheckbox({ date: yesterday, text: content, + type: type || 'task', taskId });