diff --git a/src/time-and-attendance/schedule-presets/schedule-presets.controller.ts b/src/time-and-attendance/schedule-presets/schedule-presets.controller.ts index 5fd2cbf..c699679 100644 --- a/src/time-and-attendance/schedule-presets/schedule-presets.controller.ts +++ b/src/time-and-attendance/schedule-presets/schedule-presets.controller.ts @@ -56,12 +56,12 @@ export class SchedulePresetsController { return await this.applyService.applyPresetToTimesheet(email, timesheet_id); } - @Post('apply-preset/:employeeEmail') + @Post('apply-preset/:email') @ModuleAccessAllowed(ModulesEnum.timesheets_approval) async applyPresetToTimesheetFromApproval( @Access('email') email: string, @Body('timesheet_id') timesheet_id: number, - @Param('employeeEmail') employee_email: string, + @Param('email') employee_email: string, ) { return await this.applyService.applyPresetToTimesheet(email, timesheet_id, employee_email); } @@ -77,14 +77,14 @@ export class SchedulePresetsController { return await this.applyService.applyPresetToDay(email, timesheet_id, week_day_index, date); } - @Post('apply-day-preset/:employeeEmail') + @Post('apply-day-preset/:email') @ModuleAccessAllowed(ModulesEnum.timesheets_approval) async applyPresetToDayFromApproval( @Access('email') email: string, @Body('timesheet_id') timesheet_id: number, @Body('week_day_index') week_day_index: number, @Body('date') date: string, - @Param('employeeEmail') employee_email: string, + @Param('email') employee_email: string, ) { return await this.applyService.applyPresetToDay(email, timesheet_id, week_day_index, date, employee_email); } diff --git a/src/time-and-attendance/schedule-presets/services/schedule-presets-apply.service.ts b/src/time-and-attendance/schedule-presets/services/schedule-presets-apply.service.ts index 5b3a756..fb88d1f 100644 --- a/src/time-and-attendance/schedule-presets/services/schedule-presets-apply.service.ts +++ b/src/time-and-attendance/schedule-presets/services/schedule-presets-apply.service.ts @@ -77,7 +77,7 @@ export class SchedulePresetsApplyService { created_shifts.push(shift.data); } - const response = await this.shiftService.createOneOrManyShifts(user_email, created_shifts); + const response = await this.shiftService.createOneOrManyShifts(user_email, created_shifts, false); if (response.success) { // notify timesheet-approval observers of changes if (!employee_email) {