แก้ไขชื่อตัวแปร
This commit is contained in:
parent
a592b45769
commit
d8f2f59044
2 changed files with 19 additions and 19 deletions
|
|
@ -301,7 +301,7 @@ export class ProfileController extends Controller {
|
||||||
const _child3 = child3 ? `${child3.orgChild3Name}/` : "";
|
const _child3 = child3 ? `${child3.orgChild3Name}/` : "";
|
||||||
const _child4 = child4 ? `${child4.orgChild4Name}/` : "";
|
const _child4 = child4 ? `${child4.orgChild4Name}/` : "";
|
||||||
|
|
||||||
const profile = {
|
const Profile = {
|
||||||
CitizenId: profiles?.citizenId ?? null,
|
CitizenId: profiles?.citizenId ?? null,
|
||||||
Prefix: profiles?.prefix != null ? profiles.prefix : "",
|
Prefix: profiles?.prefix != null ? profiles.prefix : "",
|
||||||
FirstName: profiles?.firstName != null ? profiles.firstName : "",
|
FirstName: profiles?.firstName != null ? profiles.firstName : "",
|
||||||
|
|
@ -362,7 +362,7 @@ export class ProfileController extends Controller {
|
||||||
where: { profileId: id },
|
where: { profileId: id },
|
||||||
select: ["certificateType", "issuer", "certificateNo", "issueDate"],
|
select: ["certificateType", "issuer", "certificateNo", "issueDate"],
|
||||||
});
|
});
|
||||||
const cert = certs.map((item) => ({
|
const Cert = certs.map((item) => ({
|
||||||
CertificateType: item.certificateType ?? null,
|
CertificateType: item.certificateType ?? null,
|
||||||
Issuer: item.issuer ?? null,
|
Issuer: item.issuer ?? null,
|
||||||
CertificateNo: item.certificateNo ?? null,
|
CertificateNo: item.certificateNo ?? null,
|
||||||
|
|
@ -372,7 +372,7 @@ export class ProfileController extends Controller {
|
||||||
select: ["startDate", "endDate", "place", "department"],
|
select: ["startDate", "endDate", "place", "department"],
|
||||||
where: { profileId: id },
|
where: { profileId: id },
|
||||||
});
|
});
|
||||||
const training = trainings.map((item) => ({
|
const Training = trainings.map((item) => ({
|
||||||
institute: item.department ?? null,
|
institute: item.department ?? null,
|
||||||
start: Extension.ToThaiShortDate(item.startDate) ?? null,
|
start: Extension.ToThaiShortDate(item.startDate) ?? null,
|
||||||
end: Extension.ToThaiShortDate(item.endDate) ?? null,
|
end: Extension.ToThaiShortDate(item.endDate) ?? null,
|
||||||
|
|
@ -385,7 +385,7 @@ export class ProfileController extends Controller {
|
||||||
select: ["refCommandDate", "refCommandNo", "detail"],
|
select: ["refCommandDate", "refCommandNo", "detail"],
|
||||||
where: { profileId: id },
|
where: { profileId: id },
|
||||||
});
|
});
|
||||||
const discipline = disciplines.map((item) => ({
|
const Discipline = disciplines.map((item) => ({
|
||||||
DisciplineYear: new Date(item.refCommandDate).getFullYear() ?? null,
|
DisciplineYear: new Date(item.refCommandDate).getFullYear() ?? null,
|
||||||
DisciplineDetail: item.detail ?? null,
|
DisciplineDetail: item.detail ?? null,
|
||||||
RefNo: item.refCommandNo ?? null,
|
RefNo: item.refCommandNo ?? null,
|
||||||
|
|
@ -395,7 +395,7 @@ export class ProfileController extends Controller {
|
||||||
select: ["startDate", "endDate", "educationLevel", "degree", "field", "institute"],
|
select: ["startDate", "endDate", "educationLevel", "degree", "field", "institute"],
|
||||||
where: { profileId: id },
|
where: { profileId: id },
|
||||||
});
|
});
|
||||||
const education = educations.map((item) => ({
|
const Education = educations.map((item) => ({
|
||||||
Institute: item.institute ?? null,
|
Institute: item.institute ?? null,
|
||||||
Start: new Date(item.startDate).getFullYear() ?? null,
|
Start: new Date(item.startDate).getFullYear() ?? null,
|
||||||
End: new Date(item.endDate).getFullYear() ?? null,
|
End: new Date(item.endDate).getFullYear() ?? null,
|
||||||
|
|
@ -416,7 +416,7 @@ export class ProfileController extends Controller {
|
||||||
where: { profileId: id },
|
where: { profileId: id },
|
||||||
});
|
});
|
||||||
|
|
||||||
const salary = salarys.map((item) => ({
|
const Salary = salarys.map((item) => ({
|
||||||
SalaryDate: Extension.ToThaiShortDate(item.date) ?? null,
|
SalaryDate: Extension.ToThaiShortDate(item.date) ?? null,
|
||||||
Position: item.position ?? null,
|
Position: item.position ?? null,
|
||||||
PosNo: item.posNo ?? null,
|
PosNo: item.posNo ?? null,
|
||||||
|
|
@ -429,12 +429,12 @@ export class ProfileController extends Controller {
|
||||||
OcFullPath: `${_child4}${_child3}${_child2}${_child1}${_root}`,
|
OcFullPath: `${_child4}${_child3}${_child2}${_child1}${_root}`,
|
||||||
}));
|
}));
|
||||||
return new HttpSuccess({
|
return new HttpSuccess({
|
||||||
profile,
|
Profile,
|
||||||
cert,
|
Cert,
|
||||||
training,
|
Training,
|
||||||
discipline,
|
Discipline,
|
||||||
education,
|
Education,
|
||||||
salary,
|
Salary,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -314,7 +314,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
const _child3 = child3 ? `${child3.orgChild3Name}/` : "";
|
const _child3 = child3 ? `${child3.orgChild3Name}/` : "";
|
||||||
const _child4 = child4 ? `${child4.orgChild4Name}/` : "";
|
const _child4 = child4 ? `${child4.orgChild4Name}/` : "";
|
||||||
|
|
||||||
const profile = {
|
const Profile = {
|
||||||
CitizenId: profiles?.citizenId ?? null,
|
CitizenId: profiles?.citizenId ?? null,
|
||||||
Prefix: profiles?.prefix != null ? profiles.prefix : "",
|
Prefix: profiles?.prefix != null ? profiles.prefix : "",
|
||||||
FirstName: profiles?.firstName != null ? profiles.firstName : "",
|
FirstName: profiles?.firstName != null ? profiles.firstName : "",
|
||||||
|
|
@ -375,7 +375,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
where: { profileEmployeeId: id },
|
where: { profileEmployeeId: id },
|
||||||
select: ["certificateType", "issuer", "certificateNo", "issueDate"],
|
select: ["certificateType", "issuer", "certificateNo", "issueDate"],
|
||||||
});
|
});
|
||||||
const cert = certs.map((item) => ({
|
const Cert = certs.map((item) => ({
|
||||||
CertificateType: item.certificateType ?? null,
|
CertificateType: item.certificateType ?? null,
|
||||||
Issuer: item.issuer ?? null,
|
Issuer: item.issuer ?? null,
|
||||||
CertificateNo: item.certificateNo ?? null,
|
CertificateNo: item.certificateNo ?? null,
|
||||||
|
|
@ -385,7 +385,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
select: ["startDate", "endDate", "place", "department"],
|
select: ["startDate", "endDate", "place", "department"],
|
||||||
where: { profileEmployeeId: id },
|
where: { profileEmployeeId: id },
|
||||||
});
|
});
|
||||||
const training = trainings.map((item) => ({
|
const Training = trainings.map((item) => ({
|
||||||
institute: item.department ?? null,
|
institute: item.department ?? null,
|
||||||
start: Extension.ToThaiShortDate(item.startDate) ?? null,
|
start: Extension.ToThaiShortDate(item.startDate) ?? null,
|
||||||
end: Extension.ToThaiShortDate(item.endDate) ?? null,
|
end: Extension.ToThaiShortDate(item.endDate) ?? null,
|
||||||
|
|
@ -398,7 +398,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
select: ["refCommandDate", "refCommandNo", "detail"],
|
select: ["refCommandDate", "refCommandNo", "detail"],
|
||||||
where: { profileEmployeeId: id },
|
where: { profileEmployeeId: id },
|
||||||
});
|
});
|
||||||
const discipline = disciplines.map((item) => ({
|
const Discipline = disciplines.map((item) => ({
|
||||||
DisciplineYear: new Date(item.refCommandDate).getFullYear() ?? null,
|
DisciplineYear: new Date(item.refCommandDate).getFullYear() ?? null,
|
||||||
DisciplineDetail: item.detail ?? null,
|
DisciplineDetail: item.detail ?? null,
|
||||||
RefNo: item.refCommandNo ?? null,
|
RefNo: item.refCommandNo ?? null,
|
||||||
|
|
@ -408,7 +408,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
select: ["startDate", "endDate", "educationLevel", "degree", "field", "institute"],
|
select: ["startDate", "endDate", "educationLevel", "degree", "field", "institute"],
|
||||||
where: { profileEmployeeId: id },
|
where: { profileEmployeeId: id },
|
||||||
});
|
});
|
||||||
const education = educations.map((item) => ({
|
const Education = educations.map((item) => ({
|
||||||
Institute: item.institute ?? null,
|
Institute: item.institute ?? null,
|
||||||
Start: new Date(item.startDate).getFullYear() ?? null,
|
Start: new Date(item.startDate).getFullYear() ?? null,
|
||||||
End: new Date(item.endDate).getFullYear() ?? null,
|
End: new Date(item.endDate).getFullYear() ?? null,
|
||||||
|
|
@ -429,7 +429,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
where: { profileEmployeeId: id },
|
where: { profileEmployeeId: id },
|
||||||
});
|
});
|
||||||
|
|
||||||
const salary = salarys.map((item) => ({
|
const Salary = salarys.map((item) => ({
|
||||||
SalaryDate: Extension.ToThaiShortDate(item.date) ?? null,
|
SalaryDate: Extension.ToThaiShortDate(item.date) ?? null,
|
||||||
Position: item.position ?? null,
|
Position: item.position ?? null,
|
||||||
PosNo: item.posNo ?? null,
|
PosNo: item.posNo ?? null,
|
||||||
|
|
@ -441,7 +441,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
FullName: `${profiles?.prefix} ${profiles?.firstName} ${profiles?.lastName}`,
|
FullName: `${profiles?.prefix} ${profiles?.firstName} ${profiles?.lastName}`,
|
||||||
OcFullPath: `${_child4}${_child3}${_child2}${_child1}${_root}`,
|
OcFullPath: `${_child4}${_child3}${_child2}${_child1}${_root}`,
|
||||||
}));
|
}));
|
||||||
return new HttpSuccess({ profile, cert, training, discipline, education, salary });
|
return new HttpSuccess({ Profile, Cert, Training, Discipline, Education, Salary });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue