This commit is contained in:
parent
f026ffde89
commit
e706475d81
1 changed files with 4 additions and 1 deletions
|
|
@ -1159,6 +1159,9 @@ export class ReportController extends Controller {
|
||||||
relations: ["kpiPeriod"],
|
relations: ["kpiPeriod"],
|
||||||
where: { id: In(profileEvaluationIds.map((evaluation) => evaluation.id)) },
|
where: { id: In(profileEvaluationIds.map((evaluation) => evaluation.id)) },
|
||||||
});
|
});
|
||||||
|
if(!profileEvaluation || profileEvaluation.length === 0){
|
||||||
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลรายงานการประเมินผลฯ ระดับบุคคลของบุคคลนี้");
|
||||||
|
}
|
||||||
|
|
||||||
const combinedData: KPIData = profileEvaluation.reduce(
|
const combinedData: KPIData = profileEvaluation.reduce(
|
||||||
(acc: KPIData, x) => {
|
(acc: KPIData, x) => {
|
||||||
|
|
@ -1675,7 +1678,7 @@ export class ReportController extends Controller {
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
formattedData = {
|
formattedData = {
|
||||||
root: data && data.rootName != null ? data.rootName : "-",
|
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()) : "-",
|
year: data.year ? Extension.ToThaiNumber((data.year + 543).toString()) : "-",
|
||||||
date: Extension.ToThaiNumber(Extension.ToThaiFullDate2(date).toString()),
|
date: Extension.ToThaiNumber(Extension.ToThaiFullDate2(date).toString()),
|
||||||
userEvaluations:
|
userEvaluations:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue