fix ระบบทะเบียนประวัติ (ทุกสถานภาพ) >> เงินเดือน (ข้อมูลประเภทคำสั่งไม่แสดง) #1433

This commit is contained in:
Bright 2025-04-24 18:15:19 +07:00
parent 38e1f62ca5
commit ea8d60fda0
3 changed files with 30 additions and 5 deletions

View file

@ -311,7 +311,11 @@ export class ProfileSalaryEmployeeController extends Controller {
createdAt: new Date(),
lastUpdatedAt: new Date(),
};
if (body.commandCode && !body.commandName) {
if (body.commandCode == "7") body.commandName = "เงินพิเศษอื่น ๆ"
else if (body.commandCode == "6") body.commandName = "เลื่อนเงินเดือนกรณีอื่น ๆ"
else if (body.commandCode == "5") body.commandName = "เลื่อนเงินเดือนตามปกติ"
}
Object.assign(data, { ...body, ...meta });
const history = new ProfileSalaryHistory();
Object.assign(history, { ...data, id: undefined });
@ -395,7 +399,11 @@ export class ProfileSalaryEmployeeController extends Controller {
);
const before = structuredClone(record);
const history = new ProfileSalaryHistory();
if (body.commandCode && !body.commandName) {
if (body.commandCode == "7") body.commandName = "เงินพิเศษอื่น ๆ"
else if (body.commandCode == "6") body.commandName = "เลื่อนเงินเดือนกรณีอื่น ๆ"
else if (body.commandCode == "5") body.commandName = "เลื่อนเงินเดือนตามปกติ"
}
Object.assign(record, body);
Object.assign(history, { ...record, id: undefined });