Migrate + API ดึงรายชื่อลูกจ้างประจำตามประวัติตำแหน่ง
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m2s

This commit is contained in:
harid 2026-05-20 10:57:18 +07:00
parent 458c9b1042
commit e04d1ad7d3
4 changed files with 280 additions and 260 deletions

View file

@ -230,6 +230,7 @@ export async function CreatePosMasterHistoryEmployee(
: null;
h.ancestorDNA = pm.ancestorDNA;
if (!type || type != "DELETE") {
h.profileEmployeeId = pm.current_holder?.id || _null;
h.prefix = pm.current_holder?.prefix || _null;
h.firstName = pm.current_holder?.firstName || _null;
h.lastName = pm.current_holder?.lastName || _null;
@ -237,6 +238,11 @@ export async function CreatePosMasterHistoryEmployee(
h.posType = selectedPosition?.posType?.posTypeName ?? _null;
h.posLevel = selectedPosition?.posLevel?.posLevelName ?? _null;
}
h.rootDnaId = pm.orgRoot?.ancestorDNA || _null;
h.child1DnaId = pm.orgChild1?.ancestorDNA || _null;
h.child2DnaId = pm.orgChild2?.ancestorDNA || _null;
h.child3DnaId = pm.orgChild3?.ancestorDNA || _null;
h.child4DnaId = pm.orgChild4?.ancestorDNA || _null;
h.posMasterNoPrefix = pm.posMasterNoPrefix ?? _null;
h.posMasterNo = pm.posMasterNo ?? _null;
h.posMasterNoSuffix = pm.posMasterNoSuffix ?? _null;