Compare commits

...

3 commits

Author SHA1 Message Date
harid
b0cfbc7036 fix #2510
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m5s
2026-05-29 17:37:19 +07:00
185aedc53f remove log success 2026-05-29 17:23:45 +07:00
20c6c412b8 remove log success 2026-05-29 14:24:50 +07:00
3 changed files with 12 additions and 13 deletions

View file

@ -4312,11 +4312,8 @@ 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,
posType: true,
posLevel: true,
roleKeycloaks: true
},
});
if (!profile) {
@ -4612,6 +4609,8 @@ 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",