Merge branch 'develop' into adiDev
This commit is contained in:
commit
7c78545613
2 changed files with 32 additions and 29 deletions
|
|
@ -199,47 +199,47 @@ export class ProfileController extends Controller {
|
|||
order: { lastUpdatedAt: "DESC" },
|
||||
});
|
||||
const Education = educations.map((item) => ({
|
||||
Institute: item.institute,
|
||||
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}` : "",
|
||||
: "-",
|
||||
Degree: item.degree && item.field ? `${item.degree} ${item.field}` : "-",
|
||||
}));
|
||||
|
||||
const mapData = {
|
||||
Id: profile.id,
|
||||
CitizenId: profile.citizenId != null ? Extension.ToThaiNumber(profile.citizenId) : "",
|
||||
Prefix: profile.prefix != null ? profile.prefix : "",
|
||||
FirstName: profile.firstName != null ? profile.firstName : "",
|
||||
LastName: profile.lastName != null ? profile.lastName : "",
|
||||
CitizenId: profile.citizenId != null ? Extension.ToThaiNumber(profile.citizenId) : "-",
|
||||
Prefix: profile.prefix != null ? profile.prefix : null,
|
||||
FirstName: profile.firstName != null ? profile.firstName : null,
|
||||
LastName: profile.lastName != null ? profile.lastName : null,
|
||||
DateOfBirth:
|
||||
profile.birthDate != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiShortDate_monthYear(profile.birthDate))
|
||||
: "",
|
||||
: "-",
|
||||
DateRetire:
|
||||
profile.dateRetire != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiShortDate_monthYear(profile.dateRetire))
|
||||
: "",
|
||||
: "-",
|
||||
RegistrationAddress: Extension.ToThaiNumber(
|
||||
`${_regisAddres}${_subDistrict}${_district}${_province}${registrationZipCode}`,
|
||||
),
|
||||
SalaryAmount:
|
||||
profile.profileSalary.length > 0 && profile.profileSalary[0].amount != null
|
||||
? Extension.ToThaiNumber(profile.profileSalary[0].amount.toLocaleString())
|
||||
: "",
|
||||
: "-",
|
||||
Education: Education,
|
||||
AppointText:
|
||||
profile.dateAppoint != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiShortDate_monthYear(profile.dateAppoint))
|
||||
: "",
|
||||
: "-",
|
||||
SalaryDate:
|
||||
profile.profileSalary.length > 0 && profile.profileSalary[0].date != null
|
||||
? Extension.ToThaiNumber(
|
||||
Extension.ToThaiShortDate_monthYear(profile.profileSalary[0].date),
|
||||
)
|
||||
: "",
|
||||
PositionName: profile.position != null ? profile.position : "",
|
||||
: "-",
|
||||
PositionName: profile.position != null ? profile.position : "-",
|
||||
OcFullPath: `${_child4}${_child3}${_child2}${_child1}${_root}`,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -205,44 +205,47 @@ export class ProfileEmployeeController extends Controller {
|
|||
order: { lastUpdatedAt: "DESC" },
|
||||
});
|
||||
const Education = educations.map((item) => ({
|
||||
Institute: item.institute,
|
||||
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}` : "",
|
||||
: "-",
|
||||
Degree: item.degree && item.field ? `${item.degree} ${item.field}` : "-",
|
||||
}));
|
||||
|
||||
const mapData = {
|
||||
Id: profile.id,
|
||||
CitizenId: profile.citizenId != null ? Extension.ToThaiNumber(profile.citizenId) : "",
|
||||
Prefix: profile.prefix != null ? profile.prefix : "",
|
||||
FirstName: profile.firstName != null ? profile.firstName : "",
|
||||
LastName: profile.lastName != null ? profile.lastName : "",
|
||||
CitizenId: profile.citizenId != null ? Extension.ToThaiNumber(profile.citizenId) : "-",
|
||||
Prefix: profile.prefix != null ? profile.prefix : null,
|
||||
FirstName: profile.firstName != null ? profile.firstName : null,
|
||||
LastName: profile.lastName != null ? profile.lastName : null,
|
||||
DateOfBirth:
|
||||
profile.birthDate != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate(profile.birthDate))
|
||||
: "",
|
||||
? Extension.ToThaiNumber(Extension.ToThaiShortDate_monthYear(profile.birthDate))
|
||||
: "-",
|
||||
DateRetire:
|
||||
profile.dateRetire != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate(profile.dateRetire))
|
||||
: "",
|
||||
? Extension.ToThaiNumber(Extension.ToThaiShortDate_monthYear(profile.dateRetire))
|
||||
: "-",
|
||||
RegistrationAddress: `${_regisAddres}${_subDistrict}${_district}${_province}${registrationZipCode}`,
|
||||
SalaryAmount:
|
||||
profile.profileSalarys.length > 0 && profile.profileSalarys[0].amount != null
|
||||
? Extension.ToThaiNumber(profile.profileSalarys[0].amount.toLocaleString())
|
||||
: "",
|
||||
: "-",
|
||||
Education: Education,
|
||||
// profile.profileEducations.length > 0 &&
|
||||
// profile.profileEducations[profile.profileEducations.length - 1].institute != null
|
||||
// ? profile.profileEducations[profile.profileEducations.length - 1].institute
|
||||
// : "",
|
||||
AppointText: profile.dateAppoint != null ? profile.dateAppoint : "",
|
||||
AppointText:
|
||||
profile.dateAppoint != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiShortDate_monthYear(profile.dateAppoint))
|
||||
: "-",
|
||||
SalaryDate:
|
||||
profile.profileSalarys.length > 0 && profile.profileSalarys[0].date != null
|
||||
? Extension.ToThaiNumber(Extension.ToThaiFullDate(profile.profileSalarys[0].date))
|
||||
: "",
|
||||
PositionName: profile.position != null ? profile.position : "",
|
||||
? Extension.ToThaiNumber(Extension.ToThaiShortDate_monthYear(profile.profileSalarys[0].date))
|
||||
: "-",
|
||||
PositionName: profile.position != null ? profile.position : "-",
|
||||
OcFullPath: `${_child4}${_child3}${_child2}${_child1}${_root}`,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue