This commit is contained in:
AdisakKanthawilang 2024-12-19 12:41:48 +07:00
parent a648fb3f24
commit 964e938bb2
5 changed files with 49 additions and 24 deletions

View file

@ -360,10 +360,18 @@ export class DevelopmentEmployeeHistoryController extends Controller {
relations: [
"development",
"development.developmentOthers",
"development.developmentOthers.province",
"employeePosLevel",
"employeePosType",
],
where: { id: id, type: type },
order: {
development:{
developmentOthers: {
createdAt: "ASC"
}
}
}
});
if (!getDevelopment) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลประวัติการฝึกอบรม/ดูงานนี้");
@ -408,6 +416,7 @@ export class DevelopmentEmployeeHistoryController extends Controller {
? getDevelopment.development.developmentOthers.map((dev) => ({
topicAcademic: dev.topicAcademic,
addressAcademic: dev.addressAcademic,
Province: dev.province.name
}))
: [],
};