diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 4b5ceba8..7d530528 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -2164,7 +2164,7 @@ export class CommandController extends Controller { profile.lastUpdateUserId = req.user.sub; profile.lastUpdateFullName = req.user.name; profile.lastUpdatedAt = new Date(); - profile.dateStart = new Date(); + // profile.dateStart = new Date(); if (item.isLeave == true) { await removeProfileInOrganize(profile.id, "OFFICER"); } @@ -2299,6 +2299,7 @@ export class CommandController extends Controller { const delUserKeycloak = await deleteUser(profile.keycloak); if (delUserKeycloak) profile.keycloak = _null; profile.roleKeycloaks = []; + profile.isActive = false; } profile.position = _null; profile.posTypeId = _null; @@ -3007,6 +3008,7 @@ export class CommandController extends Controller { profile.keycloak = userKeycloakId; profile.roleKeycloaks = roleKeycloak ? [roleKeycloak] : []; profile.email = item.bodyProfile.email; + profile.dateStart = item.bodyProfile.dateStart; await this.profileRepository.save(profile); setLogDataDiff(req, { before, after: profile }); }