fixed add isGovernment & commandDateAffect
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m12s

This commit is contained in:
Warunee Tamkoo 2026-04-28 16:53:15 +07:00
parent 2a5fba2dfc
commit 190a5d665a
4 changed files with 68 additions and 32 deletions

View file

@ -7053,24 +7053,12 @@ export class ImportDataController extends Controller {
salaryTemp.lastUpdateFullName = req.user?.name || "System Administrator";
// 12,15,16 isGovernment = false & dateGovernment = salaryTemp.commandDateAffect
if (
salaryTemp.commandCode === "12" ||
salaryTemp.commandCode === "15" ||
salaryTemp.commandCode === "16"
) {
if (["12", "15", "16"].includes(salaryTemp.commandCode ?? "")) {
salaryTemp.isGovernment = false;
salaryTemp.dateGovernment = salaryTemp.commandDateAffect;
}
// 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = salaryTemp.commandDateAffect
else if (
salaryTemp.commandCode === "1" ||
salaryTemp.commandCode === "2" ||
salaryTemp.commandCode === "3" ||
salaryTemp.commandCode === "4" ||
salaryTemp.commandCode === "10" ||
salaryTemp.commandCode === "11" ||
salaryTemp.commandCode === "20"
) {
else if (["1", "2", "3", "4", "10", "11", "20"].includes(salaryTemp.commandCode ?? "")) {
salaryTemp.isGovernment = true;
salaryTemp.dateGovernment = salaryTemp.commandDateAffect;
}
@ -7325,24 +7313,12 @@ export class ImportDataController extends Controller {
salaryTemp.lastUpdateFullName = req.user?.name || "System Administrator";
// 12,15,16 isGovernment = false & dateGovernment = salaryTemp.commandDateAffect
if (
salaryTemp.commandCode === "12" ||
salaryTemp.commandCode === "15" ||
salaryTemp.commandCode === "16"
) {
if (["12", "15", "16"].includes(salaryTemp.commandCode ?? "")) {
salaryTemp.isGovernment = false;
salaryTemp.dateGovernment = salaryTemp.commandDateAffect;
}
// 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = salaryTemp.commandDateAffect
else if (
salaryTemp.commandCode === "1" ||
salaryTemp.commandCode === "2" ||
salaryTemp.commandCode === "3" ||
salaryTemp.commandCode === "4" ||
salaryTemp.commandCode === "10" ||
salaryTemp.commandCode === "11" ||
salaryTemp.commandCode === "20"
) {
else if (["1", "2", "3", "4", "10", "11", "20"].includes(salaryTemp.commandCode ?? "")) {
salaryTemp.isGovernment = true;
salaryTemp.dateGovernment = salaryTemp.commandDateAffect;
}