no message

This commit is contained in:
Bright 2024-02-19 15:31:07 +07:00
parent a778912218
commit ecf9b144d1

View file

@ -93,20 +93,21 @@ export class ReportController extends Controller {
salaryFullHalfSpecial: item.salaryFullHalfSpecial == null || 0 ? "" : item.salaryFullHalfSpecial.toLocaleString(),
}));
const mapData = {
nameType: salarys.salaryType == "OFFICER" ? "ผังข้าราชการกรุงเทพมหานครสามัญ" :
salarys.salaryType == "EMPLOYEE" ? "ผังลูกจ้างประจำกรุงเทพมหานคร" : "",
level: posLevel?.posLevelName == null ? "" : posLevel?.posLevelName,
type: posType?.posTypeName == null ? "" : posType?.posTypeName,
date: salarys.date == null ? "" :
salarys.date.getDate() + " " + Extension.ToThaiMonth(salarys.date.getMonth()+1) + " " + Extension.ToThaiYear(salarys.date.getFullYear()),
startDate: salarys.startDate == null ? "" :
salarys.startDate.getDate() + " " + Extension.ToThaiMonth(salarys.startDate.getMonth()+1) + " " + Extension.ToThaiYear(salarys.startDate.getFullYear()),
endDate: salarys.endDate == null ? "" :
salarys.endDate.getDate() + " " + Extension.ToThaiMonth(salarys.endDate.getMonth()+1) + " " + Extension.ToThaiYear(salarys.endDate.getFullYear()),
details: salarys.details == null ? "" : salarys.details,
salaryRanks: mapSalaryRank
}
return new HttpSuccess(mapData);
return new HttpSuccess({ template: "salaryReport", reportName: "salaryReport",
data: {
nameType: salarys.salaryType == "OFFICER" ? "ผังข้าราชการกรุงเทพมหานครสามัญ" :
salarys.salaryType == "EMPLOYEE" ? "ผังลูกจ้างประจำกรุงเทพมหานคร" : "",
level: posLevel?.posLevelName == null ? "" : posLevel?.posLevelName,
type: posType?.posTypeName == null ? "" : posType?.posTypeName,
date: salarys.date == null ? "" :
salarys.date.getDate() + " " + Extension.ToThaiMonth(salarys.date.getMonth()+1) + " " + Extension.ToThaiYear(salarys.date.getFullYear()),
startDate: salarys.startDate == null ? "" :
salarys.startDate.getDate() + " " + Extension.ToThaiMonth(salarys.startDate.getMonth()+1) + " " + Extension.ToThaiYear(salarys.startDate.getFullYear()),
endDate: salarys.endDate == null ? "" :
salarys.endDate.getDate() + " " + Extension.ToThaiMonth(salarys.endDate.getMonth()+1) + " " + Extension.ToThaiYear(salarys.endDate.getFullYear()),
details: salarys.details == null ? "" : salarys.details,
salaryRanks: mapSalaryRank
}
});
}
}