From bbb13a1ea700f3be7ac12459b63804b843e93dc4 Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Wed, 12 Nov 2025 11:07:00 +0900 Subject: (김준회) 업로드 파일명 파싱시 OWN_DOC_NO 로 검증하도록 변경 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/swp/table/swp-table-toolbar.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/swp/table/swp-table-toolbar.tsx') 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]); /** -- cgit v1.2.3