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 ?? ""}` : "-" };