From ad49a2265ae82921b1aeadb952c7172fecf1a2f2 Mon Sep 17 00:00:00 2001 From: Matthieu Haineault Date: Mon, 22 Dec 2025 11:12:14 -0500 Subject: [PATCH] feat(shifts): added a new route to enable shift creation/modification/deleting using the timesheets_approval page --- .../authentication/controllers/auth.controller.ts | 4 ++-- src/time-and-attendance/shifts/shift.controller.ts | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/identity-and-account/authentication/controllers/auth.controller.ts b/src/identity-and-account/authentication/controllers/auth.controller.ts index dc526e9..d0a2523 100644 --- a/src/identity-and-account/authentication/controllers/auth.controller.ts +++ b/src/identity-and-account/authentication/controllers/auth.controller.ts @@ -17,8 +17,8 @@ export class AuthController { @Get('/callback') @UseGuards(OIDCLoginGuard) loginCallback(@Req() req: Request, @Res() res: Response) { - res.redirect("http://10.100.251.2:9013/#/v1/login-success"); - // res.redirect(process.env.REDIRECT_URL_DEV!); + // res.redirect("http://10.100.251.2:9013/#/v1/login-success"); + res.redirect(process.env.REDIRECT_URL_DEV!); } @Get('/me') 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')