fix report kk1
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m11s

This commit is contained in:
harid 2026-03-25 17:55:02 +07:00
parent effc782460
commit e01a4f22c5
2 changed files with 18 additions and 18 deletions

View file

@ -1389,10 +1389,6 @@ export class ProfileController extends Controller {
}
});
// if (leaves.length === 0) {
// leaves.push({year:""});
// }
// Query มาสาย/ขาดราชการ และ merge ตามปี
const absentLate_raw = await this.profileAbsentLateRepo
.createQueryBuilder("absentLate")
@ -1438,11 +1434,15 @@ export class ProfileController extends Controller {
}
});
// เติมค่า "" ถ้าไม่มีข้อมูลมาสาย/ขาดราชการ
leaves.forEach((yearData) => {
if (!yearData.late) yearData.late = "";
if (!yearData.absent) yearData.absent = "";
});
// // เติมค่า "" ถ้าไม่มีข้อมูลมาสาย/ขาดราชการ
// leaves.forEach((yearData) => {
// if (!yearData.late) yearData.late = "";
// if (!yearData.absent) yearData.absent = "";
// });
if (leaves.length === 0) {
leaves.push({year:""});
}
const leave2_raw = await this.profileLeaveRepository
.createQueryBuilder("profileLeave")

View file

@ -1425,10 +1425,6 @@ export class ProfileEmployeeController extends Controller {
}
});
// if (leaves.length === 0) {
// leaves.push({year:""});
// }
// Query มาสาย/ขาดราชการ และ merge ตามปี
const absentLate_raw = await this.profileEmployeeAbsentLateRepo
.createQueryBuilder("absentLate")
@ -1474,11 +1470,15 @@ export class ProfileEmployeeController extends Controller {
}
});
// เติมค่า "" ถ้าไม่มีข้อมูลมาสาย/ขาดราชการ
leaves.forEach((yearData) => {
if (!yearData.lateAmount) yearData.lateAmount = "";
if (!yearData.absentAmount) yearData.absentAmount = "";
});
// // เติมค่า "" ถ้าไม่มีข้อมูลมาสาย/ขาดราชการ
// leaves.forEach((yearData) => {
// if (!yearData.lateAmount) yearData.lateAmount = "";
// if (!yearData.absentAmount) yearData.absentAmount = "";
// });
if (leaves.length === 0) {
leaves.push({year:""});
}
const leave2_raw = await this.profileLeaveRepository
.createQueryBuilder("profileLeave")