diff --git a/src/modules/shared/utils/resolve-employee-timesheet.utils.ts b/src/modules/shared/utils/resolve-employee-timesheet.utils.ts index 5fb7877..1117dca 100644 --- a/src/modules/shared/utils/resolve-employee-timesheet.utils.ts +++ b/src/modules/shared/utils/resolve-employee-timesheet.utils.ts @@ -1,6 +1,6 @@ import { Injectable } from "@nestjs/common"; import { Prisma, PrismaClient } from "@prisma/client"; -import { weekStartMondayUTC } from "src/modules/shifts/helpers/shifts-date-time-helpers"; +import { weekStartSundayUTC } from "src/modules/shifts/helpers/shifts-date-time-helpers"; import { PrismaService } from "src/prisma/prisma.service"; @@ -14,7 +14,7 @@ export class EmployeeTimesheetResolver { readonly ensureForDate = async (employee_id: number, date: Date, client?: Tx, ): Promise<{id: number; start_date: Date }> => { const db = client ?? this.prisma; - const startOfWeek = weekStartMondayUTC(date); + const startOfWeek = weekStartSundayUTC(date); const existing = await db.timesheets.findFirst({ where: { employee_id: employee_id, diff --git a/src/modules/shifts/shifts.module.ts b/src/modules/shifts/shifts.module.ts index 103442a..2e507e2 100644 --- a/src/modules/shifts/shifts.module.ts +++ b/src/modules/shifts/shifts.module.ts @@ -5,11 +5,24 @@ import { ShiftsCommandService } from './services/shifts-command.service'; import { NotificationsModule } from '../notifications/notifications.module'; import { ShiftsQueryService } from './services/shifts-query.service'; import { ShiftsArchivalService } from './services/shifts-archival.service'; +import { BankCodesResolver } from '../shared/utils/resolve-bank-type-id.utils'; +import { EmployeeIdEmailResolver } from '../shared/utils/resolve-email-id.utils'; @Module({ imports: [BusinessLogicsModule, NotificationsModule], controllers: [ShiftsController], - providers: [ShiftsQueryService, ShiftsCommandService, ShiftsArchivalService], - exports: [ShiftsQueryService, ShiftsCommandService, ShiftsArchivalService], + providers: [ + ShiftsQueryService, + ShiftsCommandService, + ShiftsArchivalService, + BankCodesResolver, + EmployeeIdEmailResolver], + exports: [ + ShiftsQueryService, + ShiftsCommandService, + ShiftsArchivalService, + BankCodesResolver, + EmployeeIdEmailResolver + ], }) export class ShiftsModule {}