fix(timesheet): fix issue where daily presets were not applying correctly

This commit is contained in:
Nic D 2026-03-23 15:33:17 -04:00
parent 985b8a7564
commit 25cd208bfd
3 changed files with 3 additions and 2 deletions

View File

@ -79,6 +79,7 @@
} }
const onClickApplyDailyPreset = async () => { const onClickApplyDailyPreset = async () => {
console.log(timesheetId, weekDayIndex, day.value.date, employeeEmail);
await timesheetApi.applyPreset(timesheetId, weekDayIndex, day.value.date, employeeEmail); await timesheetApi.applyPreset(timesheetId, weekDayIndex, day.value.date, employeeEmail);
} }

View File

@ -103,7 +103,7 @@
> >
<ShiftListDay <ShiftListDay
v-model="row[dayIndex]!.day" v-model="row[dayIndex]!.day"
:week-day-index="dayIndex" :week-day-index="rowIndex"
:timesheet-id="day.timesheetId" :timesheet-id="day.timesheetId"
:timesheet-approved="day.isTimesheetApproved" :timesheet-approved="day.isTimesheetApproved"
/> />

View File

@ -178,7 +178,7 @@ export const useTimesheetStore = defineStore('timesheet', () => {
try { try {
let response; 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); response = await timesheetService.applyPresetToDay(timesheet_id, week_day_index, date, employeeEmail);
else else
response = await timesheetService.applyPresetToWeek(timesheet_id, employeeEmail); response = await timesheetService.applyPresetToWeek(timesheet_id, employeeEmail);