From acbd0604f866c4067772e4ad48f5a23b73ec2fc8 Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Thu, 4 Sep 2025 09:54:53 +0700 Subject: [PATCH] fix test --- src/services/PositionService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/PositionService.ts b/src/services/PositionService.ts index cbf842bb..a2703c36 100644 --- a/src/services/PositionService.ts +++ b/src/services/PositionService.ts @@ -33,14 +33,14 @@ export async function CreatePosMasterHistoryOfficer( }); if (!pm) return false; - if (!pm.ancestorDNA) return false; + // if (!pm.ancestorDNA) return false; // ทำให้สร้างตำแหน่งใหม่โครงสร้างปัจจุบัน(ไม่มีancestorDNA)แล้วไม่ปั๊มประวัติ const _null: any = null; const h = new PosMasterHistory(); const selectedPosition = pm.positions.length > 0 - ? pm.positions.find((p) => p.positionIsSelected === true) ?? null + ? pm.positions.find((p) => p.positionIsSelected === true) ?? null : null; - h.ancestorDNA = pm.ancestorDNA; + h.ancestorDNA = pm.ancestorDNA? pm.ancestorDNA : _null; h.prefix = pm.current_holder?.prefix || _null; h.firstName = pm.current_holder?.firstName || _null; h.lastName = pm.current_holder?.lastName || _null;