diff --git a/src/time-and-attendance/pay-period/services/pay-periods-query.service.ts b/src/time-and-attendance/pay-period/services/pay-periods-query.service.ts index c2edc42..59b399c 100644 --- a/src/time-and-attendance/pay-period/services/pay-periods-query.service.ts +++ b/src/time-and-attendance/pay-period/services/pay-periods-query.service.ts @@ -256,7 +256,7 @@ export class PayPeriodsQueryService { if (employee.last_work_day !== null) { is_active = this.checkForInactiveDate(employee.last_work_day) } - + by_employee.set(employee.id, { email: employee.user.email, employee_name: employee.user.first_name + ' ' + employee.user.last_name, diff --git a/src/time-and-attendance/shifts/shift.controller.ts b/src/time-and-attendance/shifts/shift.controller.ts index ccd6799..f392ce1 100644 --- a/src/time-and-attendance/shifts/shift.controller.ts +++ b/src/time-and-attendance/shifts/shift.controller.ts @@ -21,7 +21,13 @@ export class ShiftController { @Post('create') @ModuleAccessAllowed(ModulesEnum.timesheets) createBatch(@Access('email') email: string, @Body() dtos: ShiftDto[]): Promise> { - return this.create_service.createOneOrManyShifts(email, dtos) + return this.create_service.createOneOrManyShifts(email, dtos); + } + + @Post('create/:email') + @ModuleAccessAllowed(ModulesEnum.timesheets_approval) + createBatchByTimesheetsApproval(@Param('email') email:string, @Body() dtos: ShiftDto[]): Promise> { + return this.create_service.createOneOrManyShifts(email,dtos); } @Patch('update')