From efff0bf99f240ca8280aa20c9389ce3f2b2a66cf Mon Sep 17 00:00:00 2001 From: Bright Date: Thu, 14 Nov 2024 17:29:54 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=A7=E0=B8=B8?= =?UTF-8?q?=E0=B8=92=E0=B8=B4/=E0=B8=AA=E0=B8=B2=E0=B8=82=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/ProfileController.ts | 11 ++++++++++- src/controllers/ProfileEmployeeController.ts | 2 +- src/controllers/ProfileEmployeeTempController.ts | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index f999ea91..a4572d10 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -5491,7 +5491,7 @@ export class ProfileController extends Controller { salary: profile ? profile.amount : null, education: profile && profile.profileEducations.length > 0 - ? `${profile.profileEducations[0].degree ?? ""}-${profile.profileEducations[0].field ?? ""}` + ? `${profile.profileEducations[0].degree ?? ""}/${profile.profileEducations[0].field ?? ""}` : "-", }; @@ -5695,7 +5695,13 @@ export class ProfileController extends Controller { "current_holders.orgChild2", "current_holders.orgChild3", "current_holders.orgChild4", + "profileEducations", ], + order: { + profileEducations: { + createdAt: "DESC", + }, + }, }); if (!profile) { throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลบุคคลนี้ในระบบ"); @@ -5779,6 +5785,9 @@ export class ProfileController extends Controller { child4ShortName: child4 == null ? null : child4.orgChild4ShortName, node: null, nodeId: null, + education: profile && profile.profileEducations.length > 0 + ? `${profile.profileEducations[0].degree ?? ""}/${profile.profileEducations[0].field ?? ""}` + : "-", }; if (_profile.child4Id != null) { diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index 20014907..c0c48341 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -3989,7 +3989,7 @@ export class ProfileEmployeeController extends Controller { salary: profile && profile.profileSalary.length > 0 ? profile.profileSalary[0].amount : null, education: profile && profile.profileEducations.length > 0 - ? `${profile.profileEducations[0].degree ?? ""}-${profile.profileEducations[0].field ?? ""}` + ? `${profile.profileEducations[0].degree ?? ""}/${profile.profileEducations[0].field ?? ""}` : "-" }; diff --git a/src/controllers/ProfileEmployeeTempController.ts b/src/controllers/ProfileEmployeeTempController.ts index 2ad44993..e5993981 100644 --- a/src/controllers/ProfileEmployeeTempController.ts +++ b/src/controllers/ProfileEmployeeTempController.ts @@ -3580,7 +3580,7 @@ export class ProfileEmployeeTempController extends Controller { nodeId: null, posNo: shortName, education: profile && profile.profileEducations.length > 0 - ? `${profile.profileEducations[0].degree ?? ""}-${profile.profileEducations[0].field ?? ""}` + ? `${profile.profileEducations[0].degree ?? ""}/${profile.profileEducations[0].field ?? ""}` : "-" };