[as fr] 병렬결재 2차 검토완료 시 문서상태 SL 역전 fr 해결
This commit is contained in:
@@ -75,10 +75,22 @@ function ElaprApprovalDialog({
|
||||
elaprCycl,
|
||||
structuralSharing: false,
|
||||
});
|
||||
const effectiveCycl = useMemo(() => {
|
||||
if (elaprCycl != null) return elaprCycl;
|
||||
if (!elaprDocPrgrsList?.length) return undefined;
|
||||
const myPending = elaprDocPrgrsList.find(
|
||||
(row) =>
|
||||
row.aprvrUuid?.toLowerCase() === currentUserUuid?.toLowerCase() &&
|
||||
row.atrzPrgrsSttsComCd === "ATRZ_PRGRS_002",
|
||||
);
|
||||
if (myPending?.elaprCycl != null) return Number(myPending.elaprCycl);
|
||||
return Math.max(...elaprDocPrgrsList.map((r) => Number(r.elaprCycl || 1)));
|
||||
}, [elaprCycl, elaprDocPrgrsList, currentUserUuid]);
|
||||
|
||||
const cyclDocPrgrsList = useMemo(() => {
|
||||
if (elaprCycl == null) return elaprDocPrgrsList;
|
||||
return elaprDocPrgrsList?.filter((row) => Number(row.elaprCycl) === elaprCycl);
|
||||
}, [elaprCycl, elaprDocPrgrsList]);
|
||||
if (effectiveCycl == null) return elaprDocPrgrsList;
|
||||
return elaprDocPrgrsList?.filter((row) => Number(row.elaprCycl) === effectiveCycl);
|
||||
}, [effectiveCycl, elaprDocPrgrsList]);
|
||||
|
||||
const elaprDmndId = cyclDocPrgrsList?.[0]?.elaprDmndId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user