fixed
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m10s

This commit is contained in:
Warunee Tamkoo 2026-04-28 17:12:54 +07:00
parent 190a5d665a
commit 5caa7db75a
4 changed files with 77 additions and 77 deletions

View file

@ -403,16 +403,16 @@ export class ProfileSalaryEmployeeController extends Controller {
else if (body.commandCode == "19") body.commandName = "ไม่ได้เลื่อนเงินเดือน/ค่าจ้าง";
}
Object.assign(data, { ...body, ...meta });
// 12,15,16 isGovernment = false & dateGovernment = commandDateAffect
if (["12", "15", "16"].includes(body.commandCode ?? "")) {
data.isGovernment = false;
if (body.commandDateAffect) data.dateGovernment = body.commandDateAffect;
}
// 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = commandDateAffect
else if (["1", "2", "3", "4", "10", "11", "20"].includes(body.commandCode ?? "")) {
data.isGovernment = true;
if (body.commandDateAffect) data.dateGovernment = body.commandDateAffect;
}
// // 12,15,16 isGovernment = false & dateGovernment = commandDateAffect
// if (["12", "15", "16"].includes(body.commandCode ?? "")) {
// data.isGovernment = false;
// if (body.commandDateAffect) data.dateGovernment = body.commandDateAffect;
// }
// // 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = commandDateAffect
// else if (["1", "2", "3", "4", "10", "11", "20"].includes(body.commandCode ?? "")) {
// data.isGovernment = true;
// if (body.commandDateAffect) data.dateGovernment = body.commandDateAffect;
// }
const history = new ProfileSalaryHistory();
Object.assign(history, { ...data, id: undefined });
@ -548,16 +548,16 @@ export class ProfileSalaryEmployeeController extends Controller {
else if (body.commandCode == "19") body.commandName = "ไม่ได้เลื่อนเงินเดือน/ค่าจ้าง";
}
Object.assign(record, body);
// 12,15,16 isGovernment = false & dateGovernment = commandDateAffect
if (["12", "15", "16"].includes(body.commandCode ?? "")) {
record.isGovernment = false;
if (body.commandDateAffect) record.dateGovernment = body.commandDateAffect ?? null;
}
// 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = commandDateAffect
else if (["1", "2", "3", "4", "10", "11", "20"].includes(body.commandCode ?? "")) {
record.isGovernment = true;
if (body.commandDateAffect) record.dateGovernment = body.commandDateAffect ?? null;
}
// // 12,15,16 isGovernment = false & dateGovernment = commandDateAffect
// if (["12", "15", "16"].includes(body.commandCode ?? "")) {
// record.isGovernment = false;
// if (body.commandDateAffect) record.dateGovernment = body.commandDateAffect ?? null;
// }
// // 1,2,3,4,10,11,20 isGovernment = true & dateGovernment = commandDateAffect
// else if (["1", "2", "3", "4", "10", "11", "20"].includes(body.commandCode ?? "")) {
// record.isGovernment = true;
// if (body.commandDateAffect) record.dateGovernment = body.commandDateAffect ?? null;
// }
Object.assign(history, { ...record, id: undefined });
history.profileSalaryId = salaryId;