From c72d0897f7b37843109c86f61d97eba05ba3ca0d Mon Sep 17 00:00:00 2001 From: dujinkim Date: Fri, 13 Jun 2025 07:08:01 +0000 Subject: (대표님) 20250613 16시 08분 b-rfq, document 등 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../table/bulk-upload-dialog.tsx | 884 +++++++++++---------- 1 file changed, 445 insertions(+), 439 deletions(-) (limited to 'lib/vendor-document-list/table/bulk-upload-dialog.tsx') diff --git a/lib/vendor-document-list/table/bulk-upload-dialog.tsx b/lib/vendor-document-list/table/bulk-upload-dialog.tsx index b7021985..b28d3b3d 100644 --- a/lib/vendor-document-list/table/bulk-upload-dialog.tsx +++ b/lib/vendor-document-list/table/bulk-upload-dialog.tsx @@ -666,8 +666,9 @@ const canProceedToUpload = matchResult && matchResult.matched.length > 0 && matc return ( - - + + {/* 고정 헤더 */} + 일괄 업로드 @@ -686,476 +687,481 @@ return ( - {/* 단계별 진행 상태 */} -
- {[ - { key: 'template', label: '템플릿' }, - { key: 'files', label: '파일 업로드' }, - { key: 'review', label: '검토' }, - { key: 'upload', label: '업로드' }, - ].map((step, index) => ( - -
['template', 'files', 'review'].indexOf(step.key) ? 'bg-green-100 text-green-700' : - 'bg-gray-100 text-gray-500' - }`}> - {step.label} -
- {index < 3 &&
} - - ))} -
+ {/* 스크롤 가능한 메인 컨텐츠 영역 */} +
+ {/* 단계별 진행 상태 */} +
+ {[ + { key: 'template', label: '템플릿' }, + { key: 'files', label: '파일 업로드' }, + { key: 'review', label: '검토' }, + { key: 'upload', label: '업로드' }, + ].map((step, index) => ( + +
['template', 'files', 'review'].indexOf(step.key) ? 'bg-green-100 text-green-700' : + 'bg-gray-100 text-gray-500' + }`}> + {step.label} +
+ {index < 3 &&
} + + ))} +
-
- - - {/* 1단계: 템플릿 다운로드 및 업로드 */} - {currentStep === 'template' && ( -
- - - - - 1단계: 템플릿 다운로드 - - - -

- 현재 문서 목록을 기반으로 업로드 템플릿을 생성합니다. - 마지막 "fileNames" 칼럼에 업로드할 파일명을 ';'로 구분하여 입력하세요. -

- -
-
- - - - - - 작성된 템플릿 업로드 - - - - - - - - -
- -
- 작성된 Excel 템플릿을 업로드하세요 - - .xlsx, .xls 파일을 지원합니다 - -
-
-
-
- - {templateFile && ( -
-
- - - 템플릿 업로드 완료: {templateFile.name} - -
-
- )} -
-
-
- )} - - {/* 2단계: 파일 업로드 */} - {currentStep === 'files' && ( -
- - - - - 2단계: 실제 파일들 업로드 - - - -
-

- 템플릿에서 {parsedData.length}개 항목, 총 {parsedData.reduce((sum, item) => sum + item.fileNames.length, 0)}개 파일이 필요합니다. + + + + {/* 1단계: 템플릿 다운로드 및 업로드 */} + {currentStep === 'template' && ( +

+ + + + + 1단계: 템플릿 다운로드 + + + +

+ 현재 문서 목록을 기반으로 업로드 템플릿을 생성합니다. + 마지막 "fileNames" 칼럼에 업로드할 파일명을 ';'로 구분하여 입력하세요.

-
- - - - - - -
- -
- 실제 파일들을 여기에 드롭하세요 - - 또는 클릭하여 파일들을 선택하세요 - + + + + + + + + + 작성된 템플릿 업로드 + + + + + + + + +
+ +
+ 작성된 Excel 템플릿을 업로드하세요 + + .xlsx, .xls 파일을 지원합니다 + +
+
+
+
+ + {templateFile && ( +
+
+ + + 템플릿 업로드 완료: {templateFile.name} +
- - - - {selectedFiles.length > 0 && ( -
-
- 업로드된 파일 ({selectedFiles.length}) -
- - - {selectedFiles.map((file, index) => ( - - - - - {file.name} - {prettyBytes(file.size)} - - removeFile(index)} - disabled={isUploading} - > - - - - - ))} - - -
- )} -
-
-
- )} - - {/* 3단계: 매칭 결과 검토 */} - {currentStep === 'review' && matchResult && ( -
- - - - - 3단계: 매칭 결과 검토 - - - - - {/* 통합된 매칭 결과 요약 */} -
-
-
{matchResult.matched.length}
-
매칭 성공
-
-
-
{matchResult.unmatched.length}
-
매칭 실패
-
-
-
{matchResult.missingFiles.length}
-
누락된 파일
+ )} + + +
+ )} + + {/* 2단계: 파일 업로드 */} + {currentStep === 'files' && ( +
+ + + + + 2단계: 실제 파일들 업로드 + + + +
+

+ 템플릿에서 {parsedData.length}개 항목, 총 {parsedData.reduce((sum, item) => sum + item.fileNames.length, 0)}개 파일이 필요합니다. +

-
- - {/* 통합된 상세 결과 */} -
- {/* 매칭 성공 섹션 */} - {matchResult.matched.length > 0 && ( -
-
-
- - 매칭 성공 ({matchResult.matched.length}개) -
- -
- - {/* 미리보기 */} -
-
- {matchResult.matched.slice(0, 5).map((match, index) => ( -
- - {match.file.name} - - - → {match.item.docNumber} Rev.{match.item.revision} - -
- ))} - {matchResult.matched.length > 5 && ( -
- ... 외 {matchResult.matched.length - 5}개 (상세보기로 확인) -
- )} -
- {/* 펼침 상세 내용 */} -
-
-
- {matchResult.matched.map((match, index) => ( -
- - {match.file.name} - - - → {match.item.docNumber} ({match.item.stage} Rev.{match.item.revision}) - -
- ))} -
-
+ + + + + +
+ +
+ 실제 파일들을 여기에 드롭하세요 + + 또는 클릭하여 파일들을 선택하세요 +
+
+
+ + {selectedFiles.length > 0 && ( +
+
+ 업로드된 파일 ({selectedFiles.length}) +
+ + + {selectedFiles.map((file, index) => ( + + + + + {file.name} + {prettyBytes(file.size)} + + removeFile(index)} + disabled={isUploading} + > + + + + + ))} + +
)} + + +
+ )} - {/* 매칭 실패 섹션 */} - {matchResult.unmatched.length > 0 && ( -
-
-
- - 매칭되지 않은 파일 ({matchResult.unmatched.length}개) -
- -
- -
-
- {matchResult.unmatched.slice(0, 3).map((file, index) => ( -
- {file.name} -
- ))} - {matchResult.unmatched.length > 3 && ( -
- ... 외 {matchResult.unmatched.length - 3}개 -
- )} + {/* 3단계: 매칭 결과 검토 */} + {currentStep === 'review' && matchResult && ( +
+ + + + + 3단계: 매칭 결과 검토 + + + + + {/* 통합된 매칭 결과 요약 */} +
+
+
{matchResult.matched.length}
+
매칭 성공
+
+
+
{matchResult.unmatched.length}
+
매칭 실패
+
+
+
{matchResult.missingFiles.length}
+
누락된 파일
+
+
+ + {/* 통합된 상세 결과 */} +
+ {/* 매칭 성공 섹션 */} + {matchResult.matched.length > 0 && ( +
+
+
+ + 매칭 성공 ({matchResult.matched.length}개) +
+
+ + {/* 미리보기 */} +
+
+ {matchResult.matched.slice(0, 5).map((match, index) => ( +
+ + {match.file.name} + + + → {match.item.docNumber} Rev.{match.item.revision} + +
+ ))} + {matchResult.matched.length > 5 && ( +
+ ... 외 {matchResult.matched.length - 5}개 (상세보기로 확인) +
+ )} +
-
-
-
- {matchResult.unmatched.map((file, index) => ( -
- {file.name} -
- ))} + {/* 펼침 상세 내용 */} +
+
+
+ {matchResult.matched.map((match, index) => ( +
+ + {match.file.name} + + + → {match.item.docNumber} ({match.item.stage} Rev.{match.item.revision}) + +
+ ))} +
-
- )} + )} + + {/* 매칭 실패 섹션 */} + {matchResult.unmatched.length > 0 && ( +
+
+
+ + 매칭되지 않은 파일 ({matchResult.unmatched.length}개) +
+ +
+ +
+
+ {matchResult.unmatched.slice(0, 3).map((file, index) => ( +
+ {file.name} +
+ ))} + {matchResult.unmatched.length > 3 && ( +
+ ... 외 {matchResult.unmatched.length - 3}개 +
+ )} +
- {/* 누락된 파일 섹션 */} - {matchResult.missingFiles.length > 0 && ( -
-
-
- - 누락된 파일 ({matchResult.missingFiles.length}개) -
- -
- -
-
- {matchResult.missingFiles.slice(0, 3).map((fileName, index) => ( -
- {fileName} -
- ))} - {matchResult.missingFiles.length > 3 && ( -
- ... 외 {matchResult.missingFiles.length - 3}개 +
+
+
+ {matchResult.unmatched.map((file, index) => ( +
+ {file.name} +
+ ))} +
- )} +
+
+
+ )} + + {/* 누락된 파일 섹션 */} + {matchResult.missingFiles.length > 0 && ( +
+
+
+ + 누락된 파일 ({matchResult.missingFiles.length}개) +
+
+ +
+
+ {matchResult.missingFiles.slice(0, 3).map((fileName, index) => ( +
+ {fileName} +
+ ))} + {matchResult.missingFiles.length > 3 && ( +
+ ... 외 {matchResult.missingFiles.length - 3}개 +
+ )} +
-
-
-
- {matchResult.missingFiles.map((fileName, index) => ( -
- {fileName} -
- ))} +
+
+
+ {matchResult.missingFiles.map((fileName, index) => ( +
+ {fileName} +
+ ))} +
+ )} +
+ + {/* 업로드 불가 경고 */} + {!canProceedToUpload && ( +
+
+ + + 누락된 파일이 있어 업로드를 진행할 수 없습니다. 누락된 파일들을 추가해주세요. + +
)} -
+ + + + {/* 추가 정보 입력 */} +
+ ( + + 업로더명 + + + + + + )} + /> + + ( + + 코멘트 (선택) + +