diff options
Diffstat (limited to 'lib/swp/table/swp-table-toolbar.tsx')
| -rw-r--r-- | lib/swp/table/swp-table-toolbar.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/swp/table/swp-table-toolbar.tsx b/lib/swp/table/swp-table-toolbar.tsx index 0fd29fd3..add69666 100644 --- a/lib/swp/table/swp-table-toolbar.tsx +++ b/lib/swp/table/swp-table-toolbar.tsx @@ -38,7 +38,7 @@ interface SwpTableToolbarProps { vendorCode?: string; droppedFiles?: File[]; onFilesProcessed?: () => void; - documents?: Array<{ DOC_NO: string }>; // 업로드 권한 검증용 문서 목록 + documents?: Array<{ OWN_DOC_NO: string | null }>; // 업로드 권한 검증용 문서 목록 (OWN_DOC_NO 기준) userId?: string; // 파일 취소 시 필요 } @@ -81,10 +81,12 @@ export function SwpTableToolbar({ const [showValidationDialog, setShowValidationDialog] = useState(false); /** - * 업로드 가능한 문서번호 목록 추출 + * 업로드 가능한 문서번호 목록 추출 (OWN_DOC_NO 기준) */ const availableDocNos = useMemo(() => { - return documents.map(doc => doc.DOC_NO); + return documents + .map(doc => doc.OWN_DOC_NO) + .filter((ownDocNo): ownDocNo is string => ownDocNo !== null && ownDocNo !== undefined); }, [documents]); /** |
