fix(expense): rename import to avoid confusion

This commit is contained in:
Nicolas Drolet 2025-10-07 16:27:30 -04:00
parent cc310e286d
commit 6254410f66

View File

@ -1,6 +1,6 @@
import { Injectable, NotFoundException } from "@nestjs/common"; import { Injectable, NotFoundException } from "@nestjs/common";
import { PrismaService } from "src/prisma/prisma.service"; import { PrismaService } from "src/prisma/prisma.service";
import { DayExpensesDto, ExpenseDto } from "src/modules/timesheets/dtos/timesheet-period.dto"; import { DayExpensesDto as ExpenseListResponseDto, ExpenseDto } from "src/modules/timesheets/dtos/timesheet-period.dto";
import { EmployeesRepo } from "../repos/employee.repo"; import { EmployeesRepo } from "../repos/employee.repo";
import { round2, toUTCDateOnly } from "src/modules/timesheets/utils/timesheet.helpers"; import { round2, toUTCDateOnly } from "src/modules/timesheets/utils/timesheet.helpers";
import { EXPENSE_TYPES } from "src/modules/timesheets/types/timesheet.types"; import { EXPENSE_TYPES } from "src/modules/timesheets/types/timesheet.types";
@ -18,7 +18,7 @@ export class ExpensesQueryService {
email: string, email: string,
year: number, year: number,
period_no: number period_no: number
): Promise<DayExpensesDto> { ): Promise<ExpenseListResponseDto> {
//fetch employe_id using email //fetch employe_id using email
const employee_id = await this.employeeRepo.findIdByEmail(email); const employee_id = await this.employeeRepo.findIdByEmail(email);
if(!employee_id) throw new NotFoundException(`Employee with email: ${email} not found`); if(!employee_id) throw new NotFoundException(`Employee with email: ${email} not found`);