fix
This commit is contained in:
parent
ae1a382dd0
commit
39de288f5b
2 changed files with 55 additions and 51 deletions
|
|
@ -2085,7 +2085,7 @@ export class ProfileController extends Controller {
|
|||
|
||||
const latestProfileEducation = await this.profileEducationRepository.findOne({
|
||||
where: { profileId: item.id },
|
||||
order: { createdAt: "DESC" },
|
||||
order: { endDate: "DESC" },
|
||||
});
|
||||
|
||||
return {
|
||||
|
|
@ -2127,29 +2127,29 @@ export class ProfileController extends Controller {
|
|||
posTypeName: item.posType?.posTypeName,
|
||||
posLevelId: item.posLevelId,
|
||||
posLevelName: item.posLevel?.posLevelName,
|
||||
profileEducation: latestProfileEducation?.degree ?? null,
|
||||
// ? {
|
||||
// id: latestProfileEducation.id,
|
||||
// degree: latestProfileEducation.degree,
|
||||
// country: latestProfileEducation.country,
|
||||
// duration: latestProfileEducation.duration,
|
||||
// durationYear: latestProfileEducation.durationYear,
|
||||
// field: latestProfileEducation.field,
|
||||
// finishDate: latestProfileEducation.finishDate,
|
||||
// fundName: latestProfileEducation.fundName,
|
||||
// gpa: latestProfileEducation.gpa,
|
||||
// institute: latestProfileEducation.institute,
|
||||
// other: latestProfileEducation.other,
|
||||
// startDate: latestProfileEducation.startDate,
|
||||
// endDate: latestProfileEducation.endDate,
|
||||
// educationLevel: latestProfileEducation.educationLevel,
|
||||
// positionPath: latestProfileEducation.positionPath,
|
||||
// positionPathId: latestProfileEducation.positionPathId,
|
||||
// isDate: latestProfileEducation.isDate,
|
||||
// isEducation: latestProfileEducation.isEducation,
|
||||
// note: latestProfileEducation.note,
|
||||
// }
|
||||
// : null,
|
||||
educationDegree: latestProfileEducation != null && latestProfileEducation.educationLevel != null ? latestProfileEducation.educationLevel : null,
|
||||
// ? {
|
||||
// id: latestProfileEducation.id,
|
||||
// degree: latestProfileEducation.degree,
|
||||
// country: latestProfileEducation.country,
|
||||
// duration: latestProfileEducation.duration,
|
||||
// durationYear: latestProfileEducation.durationYear,
|
||||
// field: latestProfileEducation.field,
|
||||
// finishDate: latestProfileEducation.finishDate,
|
||||
// fundName: latestProfileEducation.fundName,
|
||||
// gpa: latestProfileEducation.gpa,
|
||||
// institute: latestProfileEducation.institute,
|
||||
// other: latestProfileEducation.other,
|
||||
// startDate: latestProfileEducation.startDate,
|
||||
// endDate: latestProfileEducation.endDate,
|
||||
// educationLevel: latestProfileEducation.educationLevel,
|
||||
// positionPath: latestProfileEducation.positionPath,
|
||||
// positionPathId: latestProfileEducation.positionPathId,
|
||||
// isDate: latestProfileEducation.isDate,
|
||||
// isEducation: latestProfileEducation.isEducation,
|
||||
// note: latestProfileEducation.note,
|
||||
// }
|
||||
// : null,
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1504,10 +1504,11 @@ export class ProfileEmployeeController extends Controller {
|
|||
(x) => x.orgRevisionId == findRevision.id,
|
||||
)?.posMasterNo;
|
||||
|
||||
const latestProfileEducation = await this.profileEducationRepository.findOne({
|
||||
where: { profileEmployeeId: item.id },
|
||||
order: { createdAt: "DESC" },
|
||||
});
|
||||
const latestProfileEducation = await this.profileEducationRepository.findOne({
|
||||
where: { profileEmployeeId: item.id },
|
||||
order: { endDate: "DESC" },
|
||||
});
|
||||
|
||||
|
||||
return {
|
||||
id: item.id,
|
||||
|
|
@ -1548,29 +1549,32 @@ export class ProfileEmployeeController extends Controller {
|
|||
posTypeName: item.posType?.posTypeName,
|
||||
posLevelId: item.posLevelId,
|
||||
posLevelName: item.posLevel?.posLevelName,
|
||||
profileEducation: latestProfileEducation?.degree ?? null,
|
||||
// ? {
|
||||
// id: latestProfileEducation.id,
|
||||
// degree: latestProfileEducation.degree,
|
||||
// country: latestProfileEducation.country,
|
||||
// duration: latestProfileEducation.duration,
|
||||
// durationYear: latestProfileEducation.durationYear,
|
||||
// field: latestProfileEducation.field,
|
||||
// finishDate: latestProfileEducation.finishDate,
|
||||
// fundName: latestProfileEducation.fundName,
|
||||
// gpa: latestProfileEducation.gpa,
|
||||
// institute: latestProfileEducation.institute,
|
||||
// other: latestProfileEducation.other,
|
||||
// startDate: latestProfileEducation.startDate,
|
||||
// endDate: latestProfileEducation.endDate,
|
||||
// educationLevel: latestProfileEducation.educationLevel,
|
||||
// positionPath: latestProfileEducation.positionPath,
|
||||
// positionPathId: latestProfileEducation.positionPathId,
|
||||
// isDate: latestProfileEducation.isDate,
|
||||
// isEducation: latestProfileEducation.isEducation,
|
||||
// note: latestProfileEducation.note,
|
||||
// }
|
||||
// : null,
|
||||
educationDegree:
|
||||
latestProfileEducation != null && latestProfileEducation.educationLevel != null
|
||||
? latestProfileEducation.educationLevel
|
||||
: null,
|
||||
// ? {
|
||||
// id: latestProfileEducation.id,
|
||||
// degree: latestProfileEducation.degree,
|
||||
// country: latestProfileEducation.country,
|
||||
// duration: latestProfileEducation.duration,
|
||||
// durationYear: latestProfileEducation.durationYear,
|
||||
// field: latestProfileEducation.field,
|
||||
// finishDate: latestProfileEducation.finishDate,
|
||||
// fundName: latestProfileEducation.fundName,
|
||||
// gpa: latestProfileEducation.gpa,
|
||||
// institute: latestProfileEducation.institute,
|
||||
// other: latestProfileEducation.other,
|
||||
// startDate: latestProfileEducation.startDate,
|
||||
// endDate: latestProfileEducation.endDate,
|
||||
// educationLevel: latestProfileEducation.educationLevel,
|
||||
// positionPath: latestProfileEducation.positionPath,
|
||||
// positionPathId: latestProfileEducation.positionPathId,
|
||||
// isDate: latestProfileEducation.isDate,
|
||||
// isEducation: latestProfileEducation.isEducation,
|
||||
// note: latestProfileEducation.note,
|
||||
// }
|
||||
// : null,
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue