From 0816d6b0e33ce4a8d4cd74ac00876ab166fd2dcf Mon Sep 17 00:00:00 2001 From: Bright Date: Tue, 5 Nov 2024 22:45:44 +0700 Subject: [PATCH] =?UTF-8?q?fix=20=E0=B9=81=E0=B8=99=E0=B8=9A=E0=B8=97?= =?UTF-8?q?=E0=B9=89=E0=B8=B2=E0=B8=A2=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1?= =?UTF-8?q?=E0=B9=88=E0=B8=87=E0=B8=A3=E0=B8=B1=E0=B8=81=E0=B8=A9=E0=B8=B2?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/CommandController.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index fa26d3d1..60e1075e 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -3122,7 +3122,6 @@ export class CommandController extends Controller { body.refIds.map(async (item, i) => { const posMasterAct = await this.posMasterActRepository.findOne({ relations: [ - "posMaster", "posMaster", "posMaster.orgRoot", "posMaster.orgChild1", @@ -3172,18 +3171,17 @@ export class CommandController extends Controller { .join("/"); var _data = { no: Extension.ToThaiNumber((i + 1).toString()), - fullName: - posMasterAct.posMasterChild?.current_holder?.prefix ?? - "" + posMasterAct.posMasterChild?.current_holder?.firstName ?? - "" + " " + posMasterAct.posMasterChild?.current_holder?.lastName ?? - null, + fullName: `${item.Prefix ?? ""}${item.FirstName ?? ""} ${item.LastName ?? ""}`, oc: (posMasterAct.posMasterChild?.current_holder?.position ?? "-") + "/" + (_organization ?? "-"), postype: posMasterAct.posMasterChild?.current_holder?.posType?.posTypeName ?? "-", poslevel: posMasterAct.posMasterChild?.current_holder?.posLevel?.posLevelName ?? "-", - organizationNew: _organizationNew ?? "-", + organizationNew: + (posMasterAct.posMaster?.current_holder?.position ?? "-") + + "/" + + (_organizationNew ?? "-"), // date: Extension.ToThaiShortDate_noPrefix(new Date()), dateStart: "-", dateEnd: "-",