[as] chore: 재원협의 코드 수정

This commit is contained in:
2026-09-17 16:48:13 +09:00
parent 41643563f8
commit 086d5a18e8
12 changed files with 81 additions and 94 deletions
+2 -1
View File
@@ -187,13 +187,14 @@ export function useElaprDmnd(elaprDmndId: string | null | undefined) {
export function useElaprDocPrgrsByDocNo(
elaprDocNo: string | null | undefined,
options?: { elaprCycl?: number; enabled?: boolean },
options?: { elaprCycl?: number; enabled?: boolean; structuralSharing?: boolean },
) {
const elaprCycl = options?.elaprCycl;
return useQuery({
queryKey: [...elaprDmndBaseKey, "findDocPrgrsByDocNo", elaprDocNo, elaprCycl],
queryFn: () => elaprDmndService.findDocPrgrsByDocNo(elaprDocNo!, elaprCycl),
enabled: Boolean(elaprDocNo) && (options?.enabled ?? true),
structuralSharing: options?.structuralSharing ?? true,
});
}
@@ -71,6 +71,7 @@ function ElaprApprovalDialog({
const { data: elaprDocPrgrsList, isLoading } = useElaprDocPrgrsByDocNo(open ? elaprDocNo : null, {
elaprCycl,
structuralSharing: false,
});
const cyclDocPrgrsList = useMemo(() => {
if (elaprCycl == null) return elaprDocPrgrsList;
@@ -100,10 +101,7 @@ function ElaprApprovalDialog({
const savePrgrsSttsMutation = useSaveElaprPrgrsStts();
const sensors = useDndSensors();
const currentUserPrgrs = findCurrentUserPendingApprovalRequest(
cyclDocPrgrsList,
currentUserUuid,
);
const currentUserPrgrs = findCurrentUserPendingApprovalRequest(cyclDocPrgrsList, currentUserUuid);
const canApprove = Boolean(currentUserPrgrs?.elaprPrgrsId);
const pickingRow = pickingRowKey ? rows.find((r) => r.rowKey === pickingRowKey) : undefined;