diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 72ad4fda..b7d32a98 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -423,7 +423,7 @@ export class ProfileController extends Controller { const educations = await this.educationRepository.find({ select: ["startDate", "endDate", "educationLevel", "degree", "field", "institute"], where: { profileId: id }, - order: {lastUpdatedAt:"DESC"}, + order: { lastUpdatedAt: "DESC" }, }); const Education = educations.map((item) => ({ Institute: item.institute, @@ -1590,6 +1590,12 @@ export class ProfileController extends Controller { null ? null : profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)?.orgChild4; + const position = await this.positionRepository.findOne({ + relations: ["posExecutive"], + where: { + posMasterId: posMaster?.id, + }, + }); const _profile: any = { profileId: profile.id, prefix: profile.prefix, @@ -1606,6 +1612,10 @@ export class ProfileController extends Controller { posTypeName: profile.posType == null ? null : profile.posType.posTypeName, posTypeRank: profile.posType == null ? null : profile.posType.posTypeRank, posTypeId: profile.posType == null ? null : profile.posType.id, + posExecutiveName: + position == null || position.posExecutive == null + ? null + : position.posExecutive.posExecutiveName, rootId: root == null ? null : root.id, root: root == null ? null : root.orgRootName, rootShortName: root == null ? null : root.orgRootShortName,