From 0ce1191437b4b2fade29c563430817dc3a154740 Mon Sep 17 00:00:00 2001 From: Matthieu Haineault Date: Wed, 22 Oct 2025 10:13:42 -0400 Subject: [PATCH] fix(pay-period): replug pay-period module --- docs/swagger/swagger-spec.json | 18 ++++++- src/app.module.ts | 4 +- src/modules/pay-periods/pay-periods.module.ts | 48 +++++++++---------- 3 files changed, 42 insertions(+), 28 deletions(-) diff --git a/docs/swagger/swagger-spec.json b/docs/swagger/swagger-spec.json index de9670c..1ecbc6b 100644 --- a/docs/swagger/swagger-spec.json +++ b/docs/swagger/swagger-spec.json @@ -662,7 +662,23 @@ "operationId": "TimesheetController_getTimesheetByIds", "parameters": [ { - "name": "timesheet_ids", + "name": "employee_email", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "year", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "period_number", "required": true, "in": "query", "schema": { diff --git a/src/app.module.ts b/src/app.module.ts index 04f2348..4179229 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -15,7 +15,6 @@ import { HealthController } from './health/health.controller'; import { NotificationsModule } from './modules/notifications/notifications.module'; import { OauthSessionsModule } from './modules/oauth-sessions/oauth-sessions.module'; import { OvertimeService } from './modules/business-logics/services/overtime.service'; -// import { PayperiodsModule } from './modules/pay-periods/pay-periods.module'; import { PreferencesModule } from './modules/preferences/preferences.module'; import { PrismaModule } from './prisma/prisma.module'; import { ScheduleModule } from '@nestjs/schedule'; @@ -27,6 +26,7 @@ import { APP_FILTER, APP_PIPE } from '@nestjs/core'; import { HttpExceptionFilter } from './common/filters/http-exception.filter'; import { ValidationError } from 'class-validator'; import { SchedulePresetsModule } from './modules/schedule-presets/schedule-presets.module'; +import { PayperiodsModule } from './modules/pay-periods/pay-periods.module'; @Module({ imports: [ @@ -43,7 +43,7 @@ import { SchedulePresetsModule } from './modules/schedule-presets/schedule-prese // LeaveRequestsModule, NotificationsModule, OauthSessionsModule, - // PayperiodsModule, + PayperiodsModule, PreferencesModule, PrismaModule, ScheduleModule.forRoot(), //cronjobs diff --git a/src/modules/pay-periods/pay-periods.module.ts b/src/modules/pay-periods/pay-periods.module.ts index 5f73d93..6ba5c63 100644 --- a/src/modules/pay-periods/pay-periods.module.ts +++ b/src/modules/pay-periods/pay-periods.module.ts @@ -1,27 +1,25 @@ -// import { PrismaModule } from "src/prisma/prisma.module"; -// import { PayPeriodsController } from "./controllers/pay-periods.controller"; -// import { Module } from "@nestjs/common"; -// import { PayPeriodsCommandService } from "./services/pay-periods-command.service"; -// import { PayPeriodsQueryService } from "./services/pay-periods-query.service"; -// import { TimesheetsModule } from "../timesheets/timesheets.module"; -// import { ExpensesCommandService } from "../expenses/services/expenses-command.service"; -// import { SharedModule } from "../shared/shared.module"; -// import { PrismaService } from "src/prisma/prisma.service"; -// import { BusinessLogicsModule } from "../business-logics/business-logics.module"; +import { PrismaModule } from "src/prisma/prisma.module"; +import { PayPeriodsController } from "./controllers/pay-periods.controller"; +import { Module } from "@nestjs/common"; +import { PayPeriodsCommandService } from "./services/pay-periods-command.service"; +import { PayPeriodsQueryService } from "./services/pay-periods-query.service"; +import { TimesheetsModule } from "../timesheets/timesheets.module"; +import { SharedModule } from "../shared/shared.module"; +import { PrismaService } from "src/prisma/prisma.service"; +import { BusinessLogicsModule } from "../business-logics/business-logics.module"; -// @Module({ -// imports: [PrismaModule, TimesheetsModule, SharedModule, BusinessLogicsModule], -// providers: [ -// PayPeriodsQueryService, -// PayPeriodsCommandService, -// ExpensesCommandService, -// PrismaService, -// ], -// controllers: [PayPeriodsController], -// exports: [ -// PayPeriodsQueryService, -// PayPeriodsCommandService, -// ] -// }) +@Module({ + imports: [PrismaModule, TimesheetsModule, SharedModule, BusinessLogicsModule], + providers: [ + PayPeriodsQueryService, + PayPeriodsCommandService, + PrismaService, + ], + controllers: [PayPeriodsController], + exports: [ + PayPeriodsQueryService, + PayPeriodsCommandService, + ] +}) -// export class PayperiodsModule {} \ No newline at end of file +export class PayperiodsModule {} \ No newline at end of file