fix ประวัติการศึกษา
This commit is contained in:
parent
6055802f10
commit
96957663e5
3 changed files with 48 additions and 21 deletions
|
|
@ -231,14 +231,20 @@ export class ProfileEmployeeController extends Controller {
|
|||
where: { profileEmployeeId: id },
|
||||
order: { lastUpdatedAt: "DESC" },
|
||||
});
|
||||
const Education = 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}` : "-",
|
||||
}));
|
||||
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue