test เผยแพร่

This commit is contained in:
Adisak 2026-06-15 10:58:56 +07:00
parent 3a6d359a06
commit 5c5fc08269
4 changed files with 22 additions and 22 deletions

View file

@ -477,10 +477,10 @@ export async function BatchSavePosMasterHistoryOfficer(
const profileChanged = existing && existing.profileId !== op.profileId;
const positionChanged =
existing &&
existing.position !== op.pm?.position &&
existing.posType !== op.pm?.posType &&
existing.posLevel !== op.pm?.posLevel &&
existing.posExecutive !== op.pm?.posExecutive;
(existing.position !== op.pm?.position ||
existing.posType !== op.pm?.posType ||
existing.posLevel !== op.pm?.posLevel ||
existing.posExecutive !== op.pm?.posExecutive);
// ถ้าไม่มี record เดิม หรือ profile เปลี่ยน หรือ position เปลี่ยน ให้สร้าง record ใหม่
if (shouldInsert || profileChanged || positionChanged) {