comment update dna(keycloak) when command
This commit is contained in:
parent
060ac81532
commit
5102805278
1 changed files with 42 additions and 42 deletions
|
|
@ -4257,12 +4257,12 @@ export class CommandController extends Controller {
|
|||
}
|
||||
await this.profileRepository.save(profile);
|
||||
|
||||
if (profile.id) {
|
||||
await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||
[profile.id],
|
||||
"PROFILE",
|
||||
);
|
||||
}
|
||||
// if (profile.id) {
|
||||
// await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||
// [profile.id],
|
||||
// "PROFILE",
|
||||
// );
|
||||
// }
|
||||
|
||||
// update user attribute in keycloak
|
||||
await updateUserAttributes(profile.keycloak ?? "", {
|
||||
|
|
@ -4511,12 +4511,12 @@ export class CommandController extends Controller {
|
|||
}
|
||||
await this.profileEmployeeRepository.save(profile);
|
||||
|
||||
if (profile.id) {
|
||||
await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||
[profile.id],
|
||||
"PROFILE_EMPLOYEE",
|
||||
);
|
||||
}
|
||||
// if (profile.id) {
|
||||
// await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||
// [profile.id],
|
||||
// "PROFILE_EMPLOYEE",
|
||||
// );
|
||||
// }
|
||||
|
||||
// Task #2190
|
||||
if (code && ["C-PM-23", "C-PM-43"].includes(code)) {
|
||||
|
|
@ -4734,12 +4734,12 @@ export class CommandController extends Controller {
|
|||
profile.amountSpecial = item.amountSpecial ?? _null;
|
||||
await this.profileRepository.save(profile, { data: req });
|
||||
|
||||
if (profile.id) {
|
||||
await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||
[profile.id],
|
||||
"PROFILE",
|
||||
);
|
||||
}
|
||||
// if (profile.id) {
|
||||
// await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||
// [profile.id],
|
||||
// "PROFILE",
|
||||
// );
|
||||
// }
|
||||
}
|
||||
Object.assign(data, { ...item, ...meta });
|
||||
const history = new ProfileSalaryHistory();
|
||||
|
|
@ -5224,12 +5224,12 @@ export class CommandController extends Controller {
|
|||
// _profile.posLevelId = _null;
|
||||
}
|
||||
await this.profileRepository.save(_profile);
|
||||
if (_profile.id) {
|
||||
await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||
[_profile.id],
|
||||
"PROFILE",
|
||||
);
|
||||
}
|
||||
// if (_profile.id) {
|
||||
// await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||
// [_profile.id],
|
||||
// "PROFILE",
|
||||
// );
|
||||
// }
|
||||
}
|
||||
}
|
||||
// ลูกจ้าง
|
||||
|
|
@ -5407,12 +5407,12 @@ export class CommandController extends Controller {
|
|||
// _profile.posLevelId = _null;
|
||||
}
|
||||
await this.profileEmployeeRepository.save(_profile);
|
||||
if (_profile.id) {
|
||||
await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||
[_profile.id],
|
||||
"PROFILE_EMPLOYEE",
|
||||
);
|
||||
}
|
||||
// if (_profile.id) {
|
||||
// await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||
// [_profile.id],
|
||||
// "PROFILE_EMPLOYEE",
|
||||
// );
|
||||
// }
|
||||
}
|
||||
}
|
||||
// Task #2190
|
||||
|
|
@ -5745,12 +5745,12 @@ export class CommandController extends Controller {
|
|||
}
|
||||
await this.profileEmployeeRepository.save(_profile);
|
||||
|
||||
if (_profile.id) {
|
||||
await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||
[_profile.id],
|
||||
"PROFILE_EMPLOYEE",
|
||||
);
|
||||
}
|
||||
// if (_profile.id) {
|
||||
// await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||
// [_profile.id],
|
||||
// "PROFILE_EMPLOYEE",
|
||||
// );
|
||||
// }
|
||||
}
|
||||
}),
|
||||
);
|
||||
|
|
@ -6185,12 +6185,12 @@ export class CommandController extends Controller {
|
|||
this.salaryRepo.save(profileSalary),
|
||||
]);
|
||||
|
||||
if (profile.id) {
|
||||
await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||
[profile.id],
|
||||
"PROFILE",
|
||||
);
|
||||
}
|
||||
// if (profile.id) {
|
||||
// await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||
// [profile.id],
|
||||
// "PROFILE",
|
||||
// );
|
||||
// }
|
||||
|
||||
const history = new ProfileSalaryHistory();
|
||||
Object.assign(history, { ...profileSalary, id: undefined });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue