From 10a3a243d57bba1dbe1f4b10e2b058f900f36fdf Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Mon, 19 Aug 2024 16:35:07 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=E0=B8=9F=E0=B8=B4=E0=B8=A7=20current=5Fholder=20,=20next=5Fhol?= =?UTF-8?q?der=20fullName?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/PositionController.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/controllers/PositionController.ts b/src/controllers/PositionController.ts index 75f3d7ee..1e39dc55 100644 --- a/src/controllers/PositionController.ts +++ b/src/controllers/PositionController.ts @@ -3042,7 +3042,8 @@ export class PositionController extends Controller { node = 0; nodeId = posMaster.orgRootId; } - + const fullNameCurrentHolder = posMaster.current_holder?posMaster.current_holder.prefix+posMaster.current_holder.firstName+" "+posMaster.current_holder.lastName:null; + const fullNameNextHolder = posMaster.next_holder?posMaster.next_holder.prefix+posMaster.next_holder.firstName+" "+posMaster.next_holder.lastName:null; return { id: posMaster.id, node: node, @@ -3058,6 +3059,10 @@ export class PositionController extends Controller { orgShortname: shortName, isSit: posMaster.isSit, isPosition: posMaster.positions.filter((x) => x.positionName == body.position).length > 0, + current_holder: posMaster.current_holderId ? posMaster.current_holderId : null, + current_holderName: fullNameCurrentHolder, + next_holder: posMaster.next_holderId ? posMaster.next_holderId : null, + next_holderName: fullNameNextHolder, positions: posMaster.positions.map((position) => ({ id: position.id, positionName: position.positionName,