fix(timesheet): fix issue where daily presets were not applying correctly
This commit is contained in:
parent
985b8a7564
commit
25cd208bfd
|
|
@ -79,6 +79,7 @@
|
|||
}
|
||||
|
||||
const onClickApplyDailyPreset = async () => {
|
||||
console.log(timesheetId, weekDayIndex, day.value.date, employeeEmail);
|
||||
await timesheetApi.applyPreset(timesheetId, weekDayIndex, day.value.date, employeeEmail);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@
|
|||
>
|
||||
<ShiftListDay
|
||||
v-model="row[dayIndex]!.day"
|
||||
:week-day-index="dayIndex"
|
||||
:week-day-index="rowIndex"
|
||||
:timesheet-id="day.timesheetId"
|
||||
:timesheet-approved="day.isTimesheetApproved"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user