From ee57cc221ff2edafd3c0f12a181214c602ed257e Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Tue, 22 Jul 2025 02:57:00 +0000
Subject: (대표님, 최겸) 이메일 템플릿, 벤더데이터 변경사항 대응, 기술영업
 변경요구사항 구현
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../user-vendor-document-table-container.tsx       | 76 +++++++++++-----------
 1 file changed, 38 insertions(+), 38 deletions(-)

(limited to 'components/ship-vendor-document/user-vendor-document-table-container.tsx')

diff --git a/components/ship-vendor-document/user-vendor-document-table-container.tsx b/components/ship-vendor-document/user-vendor-document-table-container.tsx
index 17af5436..4e133696 100644
--- a/components/ship-vendor-document/user-vendor-document-table-container.tsx
+++ b/components/ship-vendor-document/user-vendor-document-table-container.tsx
@@ -168,7 +168,7 @@ function RevisionTable({
       <CardHeader>
         <div className="flex items-center justify-between">
           <div>
-            <CardTitle className="text-lg">리비전</CardTitle>
+            <CardTitle className="text-lg">Revisions</CardTitle>
           </div>
           <Button
             onClick={onNewRevision}
@@ -176,7 +176,7 @@ function RevisionTable({
             className="flex items-center gap-2"
           >
             <Plus className="h-4 w-4" />
-            새 리비전
+            New Revision
           </Button>
         </div>
       </CardHeader>
@@ -185,17 +185,17 @@ function RevisionTable({
           <Table  className="tbl-compact">
             <TableHeader>
               <TableRow>
-                <TableHead className="w-12">선택</TableHead>
-                <TableHead>리비전</TableHead>
-                <TableHead>카테고리</TableHead>
-                <TableHead>용도</TableHead>
-                <TableHead>타입</TableHead> {/* ✅ usageType 컬럼 */}
-                <TableHead>상태</TableHead>
-                <TableHead>업로더</TableHead>
-                <TableHead>코멘트</TableHead>
-                <TableHead>업로드일</TableHead>
-                <TableHead className="text-center">파일 수</TableHead>
-                <TableHead>액션</TableHead>
+                <TableHead className="w-12">Select</TableHead>
+                <TableHead>Revision</TableHead>
+                <TableHead>Category</TableHead>
+                <TableHead>Usage</TableHead>
+                <TableHead>Type</TableHead> {/* ✅ usageType 컬럼 */}
+                <TableHead>Status</TableHead>
+                <TableHead>Uploader</TableHead>
+                <TableHead>Comment</TableHead>
+                <TableHead>Upload Date</TableHead>
+                <TableHead className="text-center">Files</TableHead>
+                <TableHead>Actions</TableHead>
               </TableRow>
             </TableHeader>
             <TableBody>
@@ -331,7 +331,7 @@ function AttachmentTable({
   // ✅ 첨부파일 업로드 성공 핸들러
   const handleAttachmentUploadSuccess = React.useCallback((uploadResult?: any) => {
     if (!selectedRevisionId || !allData || !uploadResult?.data) {
-      console.log('🔄 전체 새로고침')
+      console.log('🔄 Full refresh')
       router.refresh()
       return
     }
@@ -374,7 +374,7 @@ function AttachmentTable({
       })
 
       setAllData(updatedData)
-      console.log('✅ AttachmentTable 업데이트 완료')
+      console.log('✅ AttachmentTable update complete')
 
       // 메인 테이블도 업데이트 (약간의 지연 후)
       setTimeout(() => {
@@ -382,7 +382,7 @@ function AttachmentTable({
       }, 1500)
 
     } catch (error) {
-      console.error('❌ AttachmentTable 업데이트 실패:', error)
+      console.error('❌ AttachmentTable update failed:', error)
       router.refresh()
     }
   }, [selectedRevisionId, allData, setAllData, router])
@@ -392,7 +392,7 @@ function AttachmentTable({
       <Card className="w-96 flex-shrink-0">
         <CardHeader>
           <div className="flex items-center justify-between">
-            <CardTitle className="text-lg">첨부파일</CardTitle>
+            <CardTitle className="text-lg">Attachments</CardTitle>
             {/* ✅ + 버튼 추가 */}
             {selectedRevisionId && selectedRevisionInfo && (
               <Button
@@ -402,7 +402,7 @@ function AttachmentTable({
                 className="flex items-center gap-2"
               >
                 <Plus className="h-4 w-4" />
-                추가
+                Add
               </Button>
             )}
           </div>
@@ -411,8 +411,8 @@ function AttachmentTable({
         <Table  className="tbl-compact">
             <TableHeader>
               <TableRow>
-                <TableHead>파일명</TableHead>
-                <TableHead>액션</TableHead>
+                <TableHead>File Name</TableHead>
+                <TableHead>Actions</TableHead>
               </TableRow>
             </TableHeader>
             <TableBody>
@@ -423,8 +423,8 @@ function AttachmentTable({
                       <FileText className="h-8 w-8" />
                       <span>
                         {!selectedRevisionId
-                          ? '리비전을 선택해주세요'
-                          : '첨부된 파일이 없습니다'}
+                          ? 'Please select a revision'
+                          : 'No attached files'}
                       </span>
                       {/* ✅ 리비전이 선택된 경우 추가 버튼 표시 */}
                       {selectedRevisionId && selectedRevisionInfo && (
@@ -435,7 +435,7 @@ function AttachmentTable({
                           className="mt-2"
                         >
                           <Plus className="h-4 w-4 mr-2" />
-                          첫 번째 파일 추가
+                          Add First File
                         </Button>
                       )}
                     </div>
@@ -599,10 +599,10 @@ function SubTables() {
       // State 업데이트
       setAllData(updatedData)
       
-      console.log('✅ RevisionTable 데이터 업데이트 완료')
+      console.log('✅ RevisionTable data update complete')
       
     } catch (error) {
-      console.error('❌ RevisionTable 업데이트 실패:', error)
+      console.error('❌ RevisionTable update failed:', error)
       // 실패 시 전체 새로고침
       window.location.reload()
     }
@@ -679,7 +679,7 @@ function SubTables() {
 
       if (!response.ok) {
         const errorData = await response.json()
-        throw new Error(errorData.error || '파일 다운로드에 실패했습니다.')
+        throw new Error(errorData.error || 'Failed to download file.')
       }
 
       const blob = await response.blob()
@@ -692,8 +692,8 @@ function SubTables() {
       window.document.body.removeChild(link)
       window.URL.revokeObjectURL(url)
     } catch (error) {
-      console.error('파일 다운로드 오류:', error)
-      alert(`파일 다운로드 실패: ${error instanceof Error ? error.message : '알 수 없는 오류'}`)
+      console.error('File download error:', error)
+      alert(`File download failed: ${error instanceof Error ? error.message : 'Unknown error'}`)
     }
   }, [])
 
@@ -707,7 +707,7 @@ function SubTables() {
         if (viewer.current && !isCancelled.current) {
           import("@pdftron/webviewer").then(({ default: WebViewer }) => {
             if (isCancelled.current) {
-              console.log("WebViewer 초기화 취소됨 (Dialog 닫힘)")
+              console.log("WebViewer initialization cancelled (Dialog closed)")
               return
             }
 
@@ -764,7 +764,7 @@ function SubTables() {
             const tab = await UI.TabManager.addTab(blob, options)
             tabIds.push(tab)
           } catch (error) {
-            console.error("파일 로드 실패:", attachment.filePath, error)
+            console.error("File load failed:", attachment.filePath, error)
           }
         }
 
@@ -818,9 +818,9 @@ function SubTables() {
       <Dialog open={viewerOpen} onOpenChange={handleCloseViewer}>
         <DialogContent className="w-[90vw] h-[90vh]" style={{ maxWidth: "none" }}>
           <DialogHeader className="h-[38px]">
-            <DialogTitle>문서 미리보기</DialogTitle>
+            <DialogTitle>Document Preview</DialogTitle>
             <DialogDescription>
-              리비전 {selectedRevision?.revision} 첨부파일
+              Revision {selectedRevision?.revision} attachments
             </DialogDescription>
           </DialogHeader>
           <div
@@ -831,7 +831,7 @@ function SubTables() {
               <div className="flex flex-col items-center justify-center py-12">
                 <Loader2 className="h-8 w-8 text-blue-500 animate-spin mb-4" />
                 <p className="text-sm text-muted-foreground">
-                  문서 뷰어 로딩 중...
+                  Loading document viewer...
                 </p>
               </div>
             )}
@@ -885,7 +885,7 @@ function SelectedDocumentInfo() {
     <div className="flex flex-wrap items-center gap-3 rounded-lg bg-gray-50 p-4">
       <div className="flex items-center gap-2">
         <Badge variant="secondary" className="text-sm">
-          문서: {doc.docNumber}
+          Document: {doc.docNumber}
         </Badge>
         <span className="max-w-[300px] truncate text-sm font-medium text-gray-700">
           {doc.title}
@@ -893,14 +893,14 @@ function SelectedDocumentInfo() {
       </div>
       <div className="flex items-center gap-2 text-sm text-gray-600">
         <span>•</span>
-        <span>총 {totalRevisions}개 리비전</span>
+        <span>Total {totalRevisions} revisions</span>
         {selectedRevision && (
           <>
             <span>•</span>
             <Badge variant="outline" className="text-sm">
-              선택된 리비전: {selectedRevision.revision}
+              Selected revision: {selectedRevision.revision}
             </Badge>
-            <span>({selectedRevision.attachments.length}개 파일)</span>
+            <span>({selectedRevision.attachments.length} files)</span>
           </>
         )}
       </div>
@@ -960,7 +960,7 @@ export function UserVendorDocumentDisplay({
         <CardContent className="flex items-center justify-center py-8">
           <div className="text-center">
             <AlertCircle className="mx-auto mb-2 h-8 w-8 text-gray-400" />
-            <p className="text-gray-600">데이터를 불러올 수 없습니다.</p>
+            <p className="text-gray-600">Unable to load data.</p>
           </div>
         </CardContent>
       </Card>
-- 
cgit v1.2.3

