diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 16f64aaf..aec3db55 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -310,13 +310,13 @@ export class ProfileController extends Controller { BirthDay: profiles?.birthDate ? new Date(profiles.birthDate).getDate() : null, BirthDayText: profiles.birthDate != null - ? Extension.ToThaiNumber(Extension.ToThaiFullDate(profiles.birthDate)) + ? Extension.ToThaiNumber(Extension.ToThaiShortDate(profiles.birthDate)) : "", BirthMonth: profiles?.birthDate ? new Date(profiles.birthDate).getMonth() + 1 : null, // Months are zero-based BirthYear: profiles?.birthDate ? new Date(profiles.birthDate).getFullYear() : null, BirthYearText: profiles.birthDate != null - ? Extension.ToThaiNumber(Extension.ToThaiFullDate(profiles.birthDate)) + ? Extension.ToThaiNumber(Extension.ToThaiShortDate(profiles.birthDate)) : "", Address: "", District: "", @@ -417,7 +417,7 @@ export class ProfileController extends Controller { }); const salary = salarys.map((item) => ({ - SalaryDate: item.date ?? null, + SalaryDate: Extension.ToThaiShortDate(item.date) ?? null, Position: item.position ?? null, PosNo: item.posNo ?? null, Salary: "", diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index cec130a3..dbee92c5 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -323,13 +323,13 @@ export class ProfileEmployeeController extends Controller { BirthDay: profiles?.birthDate ? new Date(profiles.birthDate).getDate() : null, BirthDayText: profiles.birthDate != null - ? Extension.ToThaiNumber(Extension.ToThaiFullDate(profiles.birthDate)) + ? Extension.ToThaiNumber(Extension.ToThaiShortDate(profiles.birthDate)) : "", BirthMonth: profiles?.birthDate ? new Date(profiles.birthDate).getMonth() + 1 : null, // Months are zero-based BirthYear: profiles?.birthDate ? new Date(profiles.birthDate).getFullYear() : null, BirthYearText: profiles.birthDate != null - ? Extension.ToThaiNumber(Extension.ToThaiFullDate(profiles.birthDate)) + ? Extension.ToThaiNumber(Extension.ToThaiShortDate(profiles.birthDate)) : "", Address: "", District: "", @@ -430,7 +430,7 @@ export class ProfileEmployeeController extends Controller { }); const salary = salarys.map((item) => ({ - SalaryDate: item.date ?? null, + SalaryDate: Extension.ToThaiShortDate(item.date) ?? null, Position: item.position ?? null, PosNo: item.posNo ?? null, Salary: "",