diff --git a/src/modules/timesheets/components/shift-list-day.vue b/src/modules/timesheets/components/shift-list-day.vue index 70aed74..bb89fbe 100644 --- a/src/modules/timesheets/components/shift-list-day.vue +++ b/src/modules/timesheets/components/shift-list-day.vue @@ -79,6 +79,7 @@ } const onClickApplyDailyPreset = async () => { + console.log(timesheetId, weekDayIndex, day.value.date, employeeEmail); await timesheetApi.applyPreset(timesheetId, weekDayIndex, day.value.date, employeeEmail); } diff --git a/src/modules/timesheets/components/shift-list.vue b/src/modules/timesheets/components/shift-list.vue index d5ea723..0a8cd2f 100644 --- a/src/modules/timesheets/components/shift-list.vue +++ b/src/modules/timesheets/components/shift-list.vue @@ -103,7 +103,7 @@ > diff --git a/src/stores/timesheet-store.ts b/src/stores/timesheet-store.ts index 83c85ee..626a098 100644 --- a/src/stores/timesheet-store.ts +++ b/src/stores/timesheet-store.ts @@ -178,7 +178,7 @@ export const useTimesheetStore = defineStore('timesheet', () => { try { let response; - if (week_day_index && date) + if (week_day_index !== undefined && date !== undefined) response = await timesheetService.applyPresetToDay(timesheet_id, week_day_index, date, employeeEmail); else response = await timesheetService.applyPresetToWeek(timesheet_id, employeeEmail);