fix(access): fix module access update
This commit is contained in:
parent
049571c08d
commit
4b0a45adcc
|
|
@ -8,7 +8,7 @@ import { Result } from "src/common/errors/result-error.factory";
|
||||||
|
|
||||||
import { toCompanyCodeFromString } from "src/identity-and-account/employees/employee.utils";
|
import { toCompanyCodeFromString } from "src/identity-and-account/employees/employee.utils";
|
||||||
import { EmployeeDetailedDto } from "src/identity-and-account/employees/employee-detailed.dto";
|
import { EmployeeDetailedDto } from "src/identity-and-account/employees/employee-detailed.dto";
|
||||||
import { toBooleanFromKeys } from "src/common/utils/boolean-utils";
|
import { toBooleanFromString } from "src/identity-and-account/employees/services/employees-get.service";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class EmployeesUpdateService {
|
export class EmployeesUpdateService {
|
||||||
|
|
@ -23,7 +23,7 @@ export class EmployeesUpdateService {
|
||||||
|
|
||||||
const company_code = toCompanyCodeFromString(dto.company_name);
|
const company_code = toCompanyCodeFromString(dto.company_name);
|
||||||
const supervisor_id = await this.toIdFromFullName(dto.supervisor_full_name);
|
const supervisor_id = await this.toIdFromFullName(dto.supervisor_full_name);
|
||||||
const normalized_access = toBooleanFromKeys<Modules>(dto.user_module_access);
|
const normalized_access = toBooleanFromString(dto.user_module_access);
|
||||||
const last_work_day = dto.last_work_day ? toDateFromString(dto.last_work_day) : null;
|
const last_work_day = dto.last_work_day ? toDateFromString(dto.last_work_day) : null;
|
||||||
|
|
||||||
await this.prisma.$transaction(async (tx) => {
|
await this.prisma.$transaction(async (tx) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user