From 25cd208bfd0f9b860376099933f8d53f132b50f5 Mon Sep 17 00:00:00 2001 From: Nic D Date: Mon, 23 Mar 2026 15:33:17 -0400 Subject: [PATCH] fix(timesheet): fix issue where daily presets were not applying correctly --- src/modules/timesheets/components/shift-list-day.vue | 1 + src/modules/timesheets/components/shift-list.vue | 2 +- src/stores/timesheet-store.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) 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);