This commit is contained in:
AdisakKanthawilang 2025-05-13 16:46:06 +07:00
parent eaaf085472
commit be2238d5d5

View file

@ -2557,13 +2557,20 @@ export class SalaryPeriodController extends Controller {
let orgs = await new CallAPI().GetData(request, "/org/unauthorize/active/root/id");
//snap บางสำนัก
// const targetRootIds = [
// "d7e98989-b5ce-47d6-93c3-ab63ed486348",
// "e0545eca-5d0a-4a1c-8bbd-e3e25c2521db",
// "26989ffa-d5ab-4bbd-ac97-130646cd1da6",
// "6f9b30e1-757a-40d5-b053-61eb1b91c0f0",
// "eaf65f33-25e9-4956-9dba-5d909f5eb595",
// "a3efed2c-3f4b-476d-95e6-9f7e0585ae25",
// ];
const targetRootIds = [
"d7e98989-b5ce-47d6-93c3-ab63ed486348",
"e0545eca-5d0a-4a1c-8bbd-e3e25c2521db",
"26989ffa-d5ab-4bbd-ac97-130646cd1da6",
"6f9b30e1-757a-40d5-b053-61eb1b91c0f0",
"eaf65f33-25e9-4956-9dba-5d909f5eb595",
"a3efed2c-3f4b-476d-95e6-9f7e0585ae25",
"b89a4467-7ee3-4706-8db7-f366555f826c",
"585648a9-e634-43fc-9360-5fd4189136ab",
"d6e3daa0-284a-428f-aa43-0750fa74e974",
"ed3ddcfb-f882-4499-817b-aff73e5be87c",
"f8ce98ca-a691-4c89-abde-875f559afb3a",
];
orgs = orgs.filter((x: any) => targetRootIds.includes(x.rootId));
@ -2770,6 +2777,7 @@ export class SalaryPeriodController extends Controller {
salaryProfileNew.isSpecial = salaryOld == null ? false : salaryOld.isSpecial;
salaryProfileNew.isReserve = salaryOld == null ? false : salaryOld.isReserve;
salaryProfileNew.isRetired = salaryOld == null ? false : salaryOld.isRetired;
salaryProfileNew.isGood = salaryOld == null ? false : salaryOld.isGood;
} catch (err) {
console.error(`❌ error processing employee:`, err);
}
@ -2844,6 +2852,7 @@ export class SalaryPeriodController extends Controller {
salaryProfileNew.isSpecial = salaryOld == null ? false : salaryOld.isSpecial;
salaryProfileNew.isReserve = salaryOld == null ? false : salaryOld.isReserve;
salaryProfileNew.isRetired = salaryOld == null ? false : salaryOld.isRetired;
salaryProfileNew.isGood = salaryOld == null ? false : salaryOld.isGood;
}
console.log(`step10`);
await this.salaryProfileEmployeeRepository.save(salaryProfileNew, { data: request });