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);
|
await this.profileRepository.save(profile);
|
||||||
|
|
||||||
if (profile.id) {
|
// if (profile.id) {
|
||||||
await this.keycloakAttributeService.clearOrgDnaAttributes(
|
// await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||||
[profile.id],
|
// [profile.id],
|
||||||
"PROFILE",
|
// "PROFILE",
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
// update user attribute in keycloak
|
// update user attribute in keycloak
|
||||||
await updateUserAttributes(profile.keycloak ?? "", {
|
await updateUserAttributes(profile.keycloak ?? "", {
|
||||||
|
|
@ -4511,12 +4511,12 @@ export class CommandController extends Controller {
|
||||||
}
|
}
|
||||||
await this.profileEmployeeRepository.save(profile);
|
await this.profileEmployeeRepository.save(profile);
|
||||||
|
|
||||||
if (profile.id) {
|
// if (profile.id) {
|
||||||
await this.keycloakAttributeService.clearOrgDnaAttributes(
|
// await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||||
[profile.id],
|
// [profile.id],
|
||||||
"PROFILE_EMPLOYEE",
|
// "PROFILE_EMPLOYEE",
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Task #2190
|
// Task #2190
|
||||||
if (code && ["C-PM-23", "C-PM-43"].includes(code)) {
|
if (code && ["C-PM-23", "C-PM-43"].includes(code)) {
|
||||||
|
|
@ -4734,12 +4734,12 @@ export class CommandController extends Controller {
|
||||||
profile.amountSpecial = item.amountSpecial ?? _null;
|
profile.amountSpecial = item.amountSpecial ?? _null;
|
||||||
await this.profileRepository.save(profile, { data: req });
|
await this.profileRepository.save(profile, { data: req });
|
||||||
|
|
||||||
if (profile.id) {
|
// if (profile.id) {
|
||||||
await this.keycloakAttributeService.clearOrgDnaAttributes(
|
// await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||||
[profile.id],
|
// [profile.id],
|
||||||
"PROFILE",
|
// "PROFILE",
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
Object.assign(data, { ...item, ...meta });
|
Object.assign(data, { ...item, ...meta });
|
||||||
const history = new ProfileSalaryHistory();
|
const history = new ProfileSalaryHistory();
|
||||||
|
|
@ -5224,12 +5224,12 @@ export class CommandController extends Controller {
|
||||||
// _profile.posLevelId = _null;
|
// _profile.posLevelId = _null;
|
||||||
}
|
}
|
||||||
await this.profileRepository.save(_profile);
|
await this.profileRepository.save(_profile);
|
||||||
if (_profile.id) {
|
// if (_profile.id) {
|
||||||
await this.keycloakAttributeService.clearOrgDnaAttributes(
|
// await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||||
[_profile.id],
|
// [_profile.id],
|
||||||
"PROFILE",
|
// "PROFILE",
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ลูกจ้าง
|
// ลูกจ้าง
|
||||||
|
|
@ -5407,12 +5407,12 @@ export class CommandController extends Controller {
|
||||||
// _profile.posLevelId = _null;
|
// _profile.posLevelId = _null;
|
||||||
}
|
}
|
||||||
await this.profileEmployeeRepository.save(_profile);
|
await this.profileEmployeeRepository.save(_profile);
|
||||||
if (_profile.id) {
|
// if (_profile.id) {
|
||||||
await this.keycloakAttributeService.clearOrgDnaAttributes(
|
// await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||||
[_profile.id],
|
// [_profile.id],
|
||||||
"PROFILE_EMPLOYEE",
|
// "PROFILE_EMPLOYEE",
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Task #2190
|
// Task #2190
|
||||||
|
|
@ -5745,12 +5745,12 @@ export class CommandController extends Controller {
|
||||||
}
|
}
|
||||||
await this.profileEmployeeRepository.save(_profile);
|
await this.profileEmployeeRepository.save(_profile);
|
||||||
|
|
||||||
if (_profile.id) {
|
// if (_profile.id) {
|
||||||
await this.keycloakAttributeService.clearOrgDnaAttributes(
|
// await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||||
[_profile.id],
|
// [_profile.id],
|
||||||
"PROFILE_EMPLOYEE",
|
// "PROFILE_EMPLOYEE",
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
@ -6185,12 +6185,12 @@ export class CommandController extends Controller {
|
||||||
this.salaryRepo.save(profileSalary),
|
this.salaryRepo.save(profileSalary),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (profile.id) {
|
// if (profile.id) {
|
||||||
await this.keycloakAttributeService.clearOrgDnaAttributes(
|
// await this.keycloakAttributeService.clearOrgDnaAttributes(
|
||||||
[profile.id],
|
// [profile.id],
|
||||||
"PROFILE",
|
// "PROFILE",
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
const history = new ProfileSalaryHistory();
|
const history = new ProfileSalaryHistory();
|
||||||
Object.assign(history, { ...profileSalary, id: undefined });
|
Object.assign(history, { ...profileSalary, id: undefined });
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue