From ece5bbf051811ecd8cde792f18f8d83ac5d53455 Mon Sep 17 00:00:00 2001 From: Bright Date: Tue, 25 Feb 2025 11:30:45 +0700 Subject: [PATCH] fix posLevel --- src/controllers/ProfileGovernmentEmployeeController.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/controllers/ProfileGovernmentEmployeeController.ts b/src/controllers/ProfileGovernmentEmployeeController.ts index d8db83ed..5dabc746 100644 --- a/src/controllers/ProfileGovernmentEmployeeController.ts +++ b/src/controllers/ProfileGovernmentEmployeeController.ts @@ -111,7 +111,7 @@ export class ProfileGovernmentEmployeeController extends Controller { posLevel: record.posType == null && record.posLevel == null ? null - : `${record.posType.posTypeShortName}${record.posLevel.posLevelName}`, //ระดับ + : `${record.posType.posTypeShortName} ${record.posLevel.posLevelName}`, //ระดับ posMasterNo: posMaster == null ? null : `${orgShortName} ${posMaster.posMasterNo}`, //เลขที่ตำแหน่ง posType: record.posType == null ? null : record.posType.posTypeName, //ประเภท dateLeave: record.birthDate == null ? null : calculateRetireDate(record.birthDate), @@ -299,7 +299,9 @@ export class ProfileGovernmentEmployeeController extends Controller { const data = { org: org, //สังกัด position: record.position, //ตำแหน่ง - posLevel: record.posLevel == null ? null : record.posLevel.posLevelName, //ระดับ + posLevel: record.posLevel == null && record.posType == null + ? null + : `${record.posType.posTypeShortName} ${record.posLevel.posLevelName}`, //ระดับ posMasterNo: posMaster == null ? null : `${orgShortName} ${posMaster.posMasterNo}`, //เลขที่ตำแหน่ง posType: record.posType == null ? null : record.posType.posTypeName, //ประเภท dateLeave: record.birthDate == null ? null : calculateRetireDate(record.birthDate), //วันเกษียณ