fixed: #2562
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m3s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m3s
This commit is contained in:
parent
1e69cf6bb7
commit
3a4ac309b9
1 changed files with 16 additions and 11 deletions
|
|
@ -9123,17 +9123,22 @@ export class OrganizationController extends Controller {
|
||||||
org: draftPosMaster ? getOrgFullName(draftPosMaster as PosMaster) ?? _null : _null,
|
org: draftPosMaster ? getOrgFullName(draftPosMaster as PosMaster) ?? _null : _null,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// ถ้าไม่ใช่ตำแหน่งนั่งทับ (isSit = false) ถึงจะอัพเดทตำแหน่งในทะเบียนประวัติ
|
|
||||||
if (nextHolderId != null && draftPos.positionIsSelected && !draftPosMaster?.isSit) {
|
if (nextHolderId != null && draftPos.positionIsSelected) {
|
||||||
const existing = profileUpdates.get(nextHolderId) || {};
|
// ถ้าไม่ใช่ตำแหน่งนั่งทับ (isSit = false) ถึงจะอัพเดทตำแหน่งในทะเบียนประวัติ
|
||||||
existing.position = draftPos.positionName;
|
if (!draftPosMaster?.isSit) {
|
||||||
existing.posTypeId = draftPos.posTypeId;
|
const existing = profileUpdates.get(nextHolderId) || {};
|
||||||
existing.posLevelId = draftPos.posLevelId;
|
existing.position = draftPos.positionName;
|
||||||
existing.positionField = draftPos.positionField ?? null;
|
existing.posTypeId = draftPos.posTypeId;
|
||||||
existing.posExecutive = (draftPos as any).posExecutive?.posExecutiveName ?? null;
|
existing.posLevelId = draftPos.posLevelId;
|
||||||
existing.positionArea = draftPos.positionArea ?? null;
|
existing.positionField = draftPos.positionField ?? null;
|
||||||
existing.positionExecutiveField = draftPos.positionExecutiveField ?? null;
|
existing.posExecutive = (draftPos as any).posExecutive?.posExecutiveName ?? null;
|
||||||
profileUpdates.set(nextHolderId, existing);
|
existing.positionArea = draftPos.positionArea ?? null;
|
||||||
|
existing.positionExecutiveField = draftPos.positionExecutiveField ?? null;
|
||||||
|
profileUpdates.set(nextHolderId, existing);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ยังบันทึกประวัติคนครอง
|
||||||
if (draftPosMaster && draftPosMaster.ancestorDNA) {
|
if (draftPosMaster && draftPosMaster.ancestorDNA) {
|
||||||
// Find the selected position from draft positions
|
// Find the selected position from draft positions
|
||||||
const selectedPos =
|
const selectedPos =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue