Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 51s

This commit is contained in:
Adisak 2025-11-03 10:11:23 +07:00
commit acf3cb9846

View file

@ -1159,6 +1159,9 @@ export class ReportController extends Controller {
relations: ["kpiPeriod"],
where: { id: In(profileEvaluationIds.map((evaluation) => evaluation.id)) },
});
if(!profileEvaluation || profileEvaluation.length === 0){
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลรายงานการประเมินผลฯ ระดับบุคคลของบุคคลนี้");
}
const combinedData: KPIData = profileEvaluation.reduce(
(acc: KPIData, x) => {
@ -1675,7 +1678,7 @@ export class ReportController extends Controller {
const date = new Date();
formattedData = {
root: data && data.rootName != null ? data.rootName : "-",
period: data?.durationKPI == "APR" ? "๑" : data?.durationKPI == "OCT" ? "" : "-",
period: data?.durationKPI == "APR" ? "๑ เมษายน" : data?.durationKPI == "OCT" ? "๑ ตุลาคม" : "-",
year: data.year ? Extension.ToThaiNumber((data.year + 543).toString()) : "-",
date: Extension.ToThaiNumber(Extension.ToThaiFullDate2(date).toString()),
userEvaluations: