no message

This commit is contained in:
kittapath 2024-11-14 18:03:56 +07:00
parent ff49b53713
commit c0bfd46fc3
4 changed files with 365 additions and 122 deletions

View file

@ -231,20 +231,23 @@ export class ProfileEmployeeController extends Controller {
where: { profileEmployeeId: id },
order: { lastUpdatedAt: "DESC" },
});
const Education = educations && educations.length > 0
? educations.map((item) => ({
institute: item.institute ? item.institute : "-",
date:
item.startDate && item.endDate
? `${Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.startDate))} - ${Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.endDate))}`
: "-",
degree: item.degree && item.field ? `${item.degree} ${item.field}` : "-",
}))
: [{
institute: "-",
date: "-",
degree: "-",
}]
const Education =
educations && educations.length > 0
? educations.map((item) => ({
institute: item.institute ? item.institute : "-",
date:
item.startDate && item.endDate
? `${Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.startDate))} - ${Extension.ToThaiNumber(Extension.ToThaiFullDate2(item.endDate))}`
: "-",
degree: item.degree && item.field ? `${item.degree} ${item.field}` : "-",
}))
: [
{
institute: "-",
date: "-",
degree: "-",
},
];
const mapData = {
// Id: profile.id,
@ -1985,8 +1988,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 && profile.profileSalary.length > 0 ? profile.profileSalary[0].amount : null,
};
return new HttpSuccess(_profile);
}
@ -3856,15 +3858,15 @@ export class ProfileEmployeeController extends Controller {
"current_holders.orgChild3",
"current_holders.orgChild4",
"profileSalary",
"profileEducations"
"profileEducations",
],
order: {
// profileSalary: {
// order: "DESC",
// },
profileEducations: {
createdAt: "DESC"
}
createdAt: "DESC",
},
},
});
if (!profile) {
@ -3986,11 +3988,11 @@ export class ProfileEmployeeController extends Controller {
node: null,
nodeId: null,
posNo: shortName,
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 ?? ""}`
: "-"
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 ?? ""}`
: "-",
};
if (_profile.child4Id != null) {