diff --git a/src/identity-and-account/employees/services/employees-create.service.ts b/src/identity-and-account/employees/services/employees-create.service.ts index 380dcd5..ca4c256 100644 --- a/src/identity-and-account/employees/services/employees-create.service.ts +++ b/src/identity-and-account/employees/services/employees-create.service.ts @@ -1,11 +1,10 @@ import { Injectable } from "@nestjs/common"; import { Users } from "@prisma/client"; import { Result } from "src/common/errors/result-error.factory"; -import { Modules } from "src/common/mappers/module-access.mapper"; -import { toBooleanFromKeys } from "src/common/utils/boolean-utils"; import { toDateFromString } from "src/common/utils/date-utils"; import { EmployeeDetailedDto } from "src/identity-and-account/employees/employee-detailed.dto"; import { toCompanyCodeFromString } from "src/identity-and-account/employees/employee.utils"; +import { toBooleanFromString } from "src/identity-and-account/employees/services/employees-get.service"; import { PrismaService } from "src/prisma/prisma.service"; @Injectable() @@ -13,7 +12,7 @@ export class EmployeesCreateService { constructor(private readonly prisma: PrismaService) { } async createEmployee(dto: EmployeeDetailedDto): Promise> { - const normalized_access = toBooleanFromKeys(dto.user_module_access); + const normalized_access = toBooleanFromString(dto.user_module_access); const supervisor_id = await this.toIdFromFullName(dto.supervisor_full_name); const company_code = toCompanyCodeFromString(dto.company_name); const first_work_day = toDateFromString(dto.first_work_day);