From 257411fe19db7001bbe6531253805f0d48a976b7 Mon Sep 17 00:00:00 2001 From: Bright Date: Tue, 25 Feb 2025 18:11:20 +0700 Subject: [PATCH] fix issue #1217 --- src/controllers/ProfileEmployeeController.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index 1d9eee4e..0d76392c 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -2806,7 +2806,9 @@ export class ProfileEmployeeController extends Controller { name: fullName, birthDate: item.birthDate, positionLevel: item.posLevelId, - positionLevelName: item.posLevel?.posLevelName, + positionLevelName: item.posLevel == null && item.posType == null + ? null + : `${item.posType?.posTypeShortName} ${item.posLevel?.posLevelName}`, positionType: item.posTypeId, positionTypeName: item.posType?.posTypeName, posNo: shortName, @@ -4625,7 +4627,9 @@ export class ProfileEmployeeController extends Controller { name: fullName, birthDate: item.birthDate, positionLevel: item.posLevelId, - positionLevelName: item.posLevel?.posLevelName, + positionLevelName: item.posLevel == null && item.posType == null + ? null + : `${item.posType?.posTypeShortName} ${item.posLevel?.posLevelName}`, positionType: item.posTypeId, positionTypeName: item.posType?.posTypeName, posNo: shortName,