From d458240b2bb5041b05dc62bd398577d78a6450ac Mon Sep 17 00:00:00 2001 From: kittapath Date: Tue, 14 Jan 2025 18:49:41 +0700 Subject: [PATCH] edit profie salary --- src/controllers/ProfileEmployeeController.ts | 12 ++++-------- src/controllers/ProfileEmployeeTempController.ts | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index 10ff5e45..3ef9e1bd 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -316,17 +316,13 @@ export class ProfileEmployeeController extends Controller { ? Extension.ToThaiNumber(Extension.ToThaiShortDate_monthYear(profile.dateRetire)) : "", salaryAmount: - profile.profileSalary.length > 0 && profile.profileSalary[0].amount != null - ? Extension.ToThaiNumber(profile.profileSalary[0].amount.toLocaleString()) - : "", + profile.amount != null ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : "", registrationAddress: Extension.ToThaiNumber( `${_regisAddres}${_subDistrict}${_district}${_province}${registrationZipCode}`, ), - salaryDate: - profile.profileSalary.length > 0 && profile.profileSalary[0].date != null - ? Extension.ToThaiNumber( - Extension.ToThaiShortDate_monthYear(profile.profileSalary[0].date), - ) + date: + salary_raw.length > 0 && salary_raw[0].date != null + ? Extension.ToThaiNumber(Extension.ToThaiShortDate(salary_raw[0].date)) : "", positionName: profile.position != null ? profile.position : "", appointText: diff --git a/src/controllers/ProfileEmployeeTempController.ts b/src/controllers/ProfileEmployeeTempController.ts index 74ec8626..f1c0bb87 100644 --- a/src/controllers/ProfileEmployeeTempController.ts +++ b/src/controllers/ProfileEmployeeTempController.ts @@ -311,17 +311,13 @@ export class ProfileEmployeeTempController extends Controller { ? Extension.ToThaiNumber(Extension.ToThaiShortDate_monthYear(profile.dateRetire)) : "", salaryAmount: - profile.profileSalary.length > 0 && profile.profileSalary[0].amount != null - ? Extension.ToThaiNumber(profile.profileSalary[0].amount.toLocaleString()) - : "", + profile.amount != null ? Extension.ToThaiNumber(profile.amount.toLocaleString()) : "", registrationAddress: Extension.ToThaiNumber( `${_regisAddres}${_subDistrict}${_district}${_province}${registrationZipCode}`, ), - salaryDate: - profile.profileSalary.length > 0 && profile.profileSalary[0].date != null - ? Extension.ToThaiNumber( - Extension.ToThaiShortDate_monthYear(profile.profileSalary[0].date), - ) + date: + salary_raw.length > 0 && salary_raw[0].date != null + ? Extension.ToThaiNumber(Extension.ToThaiShortDate(salary_raw[0].date)) : "", positionName: profile.position != null ? profile.position : "", appointText: