Compare commits

..

No commits in common. "b0cfbc70363b04dd86a9ceee990117b6b07078bd" and "ad9a7dcbb6b4af069e5311df34ae409912a5137e" have entirely different histories.

3 changed files with 13 additions and 12 deletions

View file

@ -4312,8 +4312,11 @@ export class CommandController extends Controller {
body.data.map(async (item) => {
const profile = await this.profileRepository.findOne({
where: { id: item.profileId },
// relations: ["roleKeycloaks"],
relations: {
roleKeycloaks: true
roleKeycloaks: true,
posType: true,
posLevel: true,
},
});
if (!profile) {
@ -4609,8 +4612,6 @@ export class CommandController extends Controller {
await this.positionRepository.save(positionNew, { data: req });
}
await CreatePosMasterHistoryOfficer(posMaster.id, req);
profile.posMasterNo = getPosMasterNo(posMaster);
profile.org = getOrgFullName(posMaster);
}
const newMapProfileSalary = {
profileId: profile.id,

View file

@ -2372,7 +2372,7 @@ export class OrganizationDotnetController extends Controller {
@Security("internalAuth")
async GetProfileForProcessCheckInAsync(@Path() keycloakId: string) {
try {
// console.log(`[check-keycloak] START - keycloakId=${keycloakId}`);
console.log(`[check-keycloak] START - keycloakId=${keycloakId}`);
/* =========================
* 1. Load profile (Officer)
@ -2447,14 +2447,14 @@ export class OrganizationDotnetController extends Controller {
child4DnaId: currentHolder?.orgChild4?.ancestorDNA ?? null,
};
// console.log(
// `[check-keycloak] SUCCESS_EMPLOYEE - keycloakId=${keycloakId}, profileType=EMPLOYEE`,
// );
console.log(
`[check-keycloak] SUCCESS_EMPLOYEE - keycloakId=${keycloakId}, profileType=EMPLOYEE`,
);
return new HttpSuccess(mapProfile);
}
// console.log(`[check-keycloak] OFFICER_FOUND - keycloakId=${keycloakId}`);
console.log(`[check-keycloak] OFFICER_FOUND - keycloakId=${keycloakId}`);
/* =========================================
* 2. current holder (Officer)
@ -2494,9 +2494,9 @@ export class OrganizationDotnetController extends Controller {
child4DnaId: currentHolder?.orgChild4?.ancestorDNA ?? null,
};
// console.log(
// `[check-keycloak] SUCCESS_OFFICER - keycloakId=${keycloakId}, profileType=OFFICER`,
// );
console.log(
`[check-keycloak] SUCCESS_OFFICER - keycloakId=${keycloakId}, profileType=OFFICER`,
);
return new HttpSuccess(mapProfile);
} catch (error: any) {

View file

@ -19,7 +19,7 @@ export async function handleInternalAuth(request: express.Request) {
throw new HttpError(HttpStatus.UNAUTHORIZED, "Invalid API Key");
}
// console.log(`[InternalAuth] Authentication successful`);
console.log(`[InternalAuth] Authentication successful`);
return {
sub: "internal_service",