From 257411fe19db7001bbe6531253805f0d48a976b7 Mon Sep 17 00:00:00 2001 From: Bright Date: Tue, 25 Feb 2025 18:11:20 +0700 Subject: [PATCH 1/3] 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, From 3836062c1036f4d868c7b52b2b845f1e182f2a83 Mon Sep 17 00:00:00 2001 From: Bright Date: Tue, 25 Feb 2025 18:24:38 +0700 Subject: [PATCH 2/3] fix issue #1217 --- src/controllers/ProfileEmployeeController.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index 0d76392c..9669f637 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -2806,9 +2806,7 @@ export class ProfileEmployeeController extends Controller { name: fullName, birthDate: item.birthDate, positionLevel: item.posLevelId, - positionLevelName: item.posLevel == null && item.posType == null - ? null - : `${item.posType?.posTypeShortName} ${item.posLevel?.posLevelName}`, + positionLevelName: item.posLevel?.posLevelName, positionType: item.posTypeId, positionTypeName: item.posType?.posTypeName, posNo: shortName, @@ -2838,7 +2836,9 @@ export class ProfileEmployeeController extends Controller { posTypeId: item.posTypeId, posTypeName: item.posType?.posTypeName, posLevelId: item.posLevelId, - posLevelName: item.posLevel?.posLevelName, + posLevelName: item.posLevel == null && item.posType == null + ? null + : `${item.posType?.posTypeShortName} ${item.posLevel?.posLevelName}`, educationDegree: latestProfileEducation != null && latestProfileEducation.educationLevel != null ? latestProfileEducation.educationLevel @@ -4627,9 +4627,7 @@ export class ProfileEmployeeController extends Controller { name: fullName, birthDate: item.birthDate, positionLevel: item.posLevelId, - positionLevelName: item.posLevel == null && item.posType == null - ? null - : `${item.posType?.posTypeShortName} ${item.posLevel?.posLevelName}`, + positionLevelName: item.posLevel?.posLevelName, positionType: item.posTypeId, positionTypeName: item.posType?.posTypeName, posNo: shortName, @@ -4639,7 +4637,9 @@ export class ProfileEmployeeController extends Controller { posTypeId: item.posTypeId, posTypeName: item.posType?.posTypeName, posLevelId: item.posLevelId, - posLevelName: item.posLevel?.posLevelName, + posLevelName: item.posLevel == null && item.posType == null + ? null + : `${item.posType?.posTypeShortName} ${item.posLevel?.posLevelName}`, educationDegree: latestProfileEducation != null && latestProfileEducation.educationLevel != null ? latestProfileEducation.educationLevel From a890b8f06eff20d73307a1eda44d5bdb8166f65b Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Wed, 26 Feb 2025 14:11:58 +0700 Subject: [PATCH 3/3] fix report --- src/controllers/CommandController.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 74be9cb5..4c524fe6 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -3423,6 +3423,7 @@ export class CommandController extends Controller { profileId: profile.id, commandId: item.commandId, position: profile.position, + positionName: profile.position, positionType: profile?.posType?.posTypeName ?? null, positionLevel: profile?.posLevel?.posLevelName ?? null, positionExecutive: position?.posExecutive?.posExecutiveName ?? null, @@ -3612,6 +3613,7 @@ export class CommandController extends Controller { profileEmployeeId: profile.id, commandId: item.commandId, position: profile.position, + positionName: profile.position, positionType: profile?.posType?.posTypeName ?? null, positionLevel: profile?.posLevel?.posLevelName ?? null, amount: item.amount ? item.amount : null,