This commit is contained in:
Bright 2024-11-15 16:26:26 +07:00
parent f6e01f95a2
commit 722dc85509

View file

@ -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 });
}