From 2809626c458da1a9068e8f76bfca084e0b491d08 Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Mon, 12 Feb 2024 12:23:37 +0700 Subject: [PATCH] fix word --- src/controllers/PositionController.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/controllers/PositionController.ts b/src/controllers/PositionController.ts index e627face..83a0cebb 100644 --- a/src/controllers/PositionController.ts +++ b/src/controllers/PositionController.ts @@ -742,7 +742,7 @@ export class PositionController extends Controller { relations: ["posLevel", "posType", "posExecutive"], }); - let shortName = null; + let shortName = ""; if (body.isAll === true) { if ( @@ -1014,7 +1014,7 @@ export class PositionController extends Controller { id: item.id, orgShortName: item.orgRoot == null - ? "-" + ? null : item.orgChild1 == null ? item.orgRoot.orgRootShortName : item.orgChild2 == null @@ -1024,10 +1024,10 @@ export class PositionController extends Controller { : item.orgChild4 == null ? item.orgChild3.orgChild3ShortName : item.orgChild4.orgChild4ShortName, - lastUpdatedAt: item.lastUpdatedAt, - posMasterNoPrefix: item.posMasterNoPrefix, - posMasterNo: item.posMasterNo, - posMasterNoSuffix: item.posMasterNoSuffix, + lastUpdatedAt: item.lastUpdatedAt?item.posMasterNo:null, + posMasterNoPrefix: item.posMasterNoPrefix?item.posMasterNoPrefix:null, + posMasterNo: item.posMasterNo?item.posMasterNo:null, + posMasterNoSuffix: item.posMasterNoSuffix?item.posMasterNoSuffix:null, })); return new HttpSuccess(_data); }