[as] chore: 재원협의 코드 수정
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user