From b8421d29edd2e919ed65a414e422b3266c29d220 Mon Sep 17 00:00:00 2001 From: harid Date: Thu, 15 Jan 2026 11:49:08 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=AA=E0=B9=88=E0=B8=87=E0=B8=9F=E0=B8=B4?= =?UTF-8?q?=E0=B8=A5=E0=B8=94=E0=B9=8C=E0=B8=95=E0=B8=B3=E0=B9=81=E0=B8=AB?= =?UTF-8?q?=E0=B8=99=E0=B9=88=E0=B8=87=E0=B8=97=E0=B8=B2=E0=B8=87=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=9A=E0=B8=A3=E0=B8=B4=E0=B8=AB=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=20#2195?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OrganizationDotnetController.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/controllers/OrganizationDotnetController.ts b/src/controllers/OrganizationDotnetController.ts index 19d9eb0c..9357d8af 100644 --- a/src/controllers/OrganizationDotnetController.ts +++ b/src/controllers/OrganizationDotnetController.ts @@ -1026,6 +1026,23 @@ export class OrganizationDotnetController extends Controller { oc = `${_profileCurrent.orgChild4?.orgChild4Name}`; } } + const position = await this.positionRepository.findOne({ + where: { + positionIsSelected: true, + posMaster: { + orgRevisionId: profile.current_holders.find( + (x) => + x.orgRevision?.orgRevisionIsDraft == false && + x.orgRevision?.orgRevisionIsCurrent == true, + )?.orgRevisionId, + current_holderId: profile.id, + }, + }, + order: { createdAt: "DESC" }, + relations: { + posExecutive: true, + }, + }); const mapProfile = { id: profile.id, avatar: profile.avatar, @@ -1178,6 +1195,9 @@ export class OrganizationDotnetController extends Controller { profileInsignia: profile.profileInsignias.length > 0 ? profile.profileInsignias[0] : null, profileType: "OFFICER", positionLeaveName: positionLeaveName, + posExecutiveName: position == null || position.posExecutive == null + ? null + : position.posExecutive.posExecutiveName, oc: oc, };