diff options
| author | joonhoekim <26rote@gmail.com> | 2025-11-12 11:07:00 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-11-12 11:07:00 +0900 |
| commit | bbb13a1ea700f3be7ac12459b63804b843e93dc4 (patch) | |
| tree | 872e4787b7467a7e66cae77ca0e1007b58b24dfb /lib/swp/table/swp-table-toolbar.tsx | |
| parent | 74d8f31dd5b23f458cb14742d4d23caa90bfd86f (diff) | |
(김준회) 업로드 파일명 파싱시 OWN_DOC_NO 로 검증하도록 변경
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]); /** |
