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 () => {
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user