feat: update checkbox actions to include type parameter

- Modified `addTodayCheckboxAction` and `addYesterdayCheckboxAction` to accept a `type` parameter for better flexibility in checkbox creation.
- Updated corresponding function signatures in `daily.ts` to reflect the new parameter, ensuring consistent usage across the application.
This commit is contained in:
Julien Froidefond
2025-09-19 08:50:55 +02:00
parent c2681f9399
commit 128167341e
2 changed files with 6 additions and 4 deletions

View File

@@ -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
});