From 5bc6101e12421e3b92645574e7c9f825870618db Mon Sep 17 00:00:00 2001 From: Bright Date: Fri, 15 Nov 2024 16:57:20 +0700 Subject: [PATCH] change profile.salary --- src/controllers/ProfileController.ts | 3 +-- src/controllers/ProfileEmployeeController.ts | 4 ++-- src/controllers/ProfileEmployeeTempController.ts | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 9474d641..0ac4d955 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -4569,8 +4569,7 @@ export class ProfileController extends Controller { node: null, nodeId: null, type: profile.employeeClass, - salary: - profile && profile.profileSalary.length > 0 ? profile.profileSalary[0].amount : null, + salary: profile.amount, }; if (_profile.child4Id != null) { _profile.node = 4; diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index 035dc241..06de5896 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -1970,7 +1970,7 @@ export class ProfileEmployeeController extends Controller { child4ShortName: child4 == null ? null : child4.orgChild4ShortName, node: null, nodeId: null, - salary: profile && profile.profileSalary.length > 0 ? profile.profileSalary[0].amount : null, + salary: profile.amount, }; return new HttpSuccess(_profile); } @@ -3970,7 +3970,7 @@ export class ProfileEmployeeController extends Controller { node: null, nodeId: null, posNo: shortName, - salary: profile && profile.profileSalary.length > 0 ? profile.profileSalary[0].amount : null, + salary: profile.amount, education: profile && profile.profileEducations.length > 0 ? `${profile.profileEducations[0].degree ?? ""}/${profile.profileEducations[0].field ?? ""}` diff --git a/src/controllers/ProfileEmployeeTempController.ts b/src/controllers/ProfileEmployeeTempController.ts index 029110e8..f1e4f66b 100644 --- a/src/controllers/ProfileEmployeeTempController.ts +++ b/src/controllers/ProfileEmployeeTempController.ts @@ -1861,7 +1861,7 @@ export class ProfileEmployeeTempController extends Controller { ? null : profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)?.orgChild4 .orgChild4Name, - salary: profile && profile.profileSalary.length > 0 ? profile.profileSalary[0].amount : null, + salary: profile.amount, }; return new HttpSuccess(_profile); }