update province

This commit is contained in:
kittapath 2025-01-17 17:52:13 +07:00
parent 668b05a511
commit 19598f1f81
9 changed files with 64 additions and 67 deletions

View file

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