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

---
 .../ship/import-from-dolce-button.tsx              | 86 +++++++++++-----------
 1 file changed, 43 insertions(+), 43 deletions(-)

(limited to 'lib/vendor-document-list/ship/import-from-dolce-button.tsx')

diff --git a/lib/vendor-document-list/ship/import-from-dolce-button.tsx b/lib/vendor-document-list/ship/import-from-dolce-button.tsx
index d4728d22..de9e63bc 100644
--- a/lib/vendor-document-list/ship/import-from-dolce-button.tsx
+++ b/lib/vendor-document-list/ship/import-from-dolce-button.tsx
@@ -72,7 +72,7 @@ export function ImportFromDOLCEButton({
           setVendorContractIds(contractIds)
         } catch (error) {
           console.error('Failed to fetch vendor contracts:', error)
-          toast.error('계약 정보를 가져오는데 실패했습니다.')
+          toast.error('Failed to fetch contract information.')
         } finally {
           setLoadingVendorContracts(false)
         }
@@ -142,7 +142,7 @@ export function ImportFromDOLCEButton({
       
     } catch (error) {
       console.error('Failed to fetch import statuses:', error)
-      toast.error('상태를 확인할 수 없습니다. 프로젝트 설정을 확인해주세요.')
+      toast.error('Unable to check status. Please verify project settings.')
     } finally {
       setStatusLoading(false)
     }
@@ -230,16 +230,16 @@ export function ImportFromDOLCEButton({
         
         if (totalResult.success) {
           toast.success(
-            `DOLCE 가져오기 완료`,
+            `DOLCE import completed`,
             {
-              description: `신규 ${totalResult.newCount}건, 업데이트 ${totalResult.updatedCount}건, 건너뜀 ${totalResult.skippedCount}건 (${contractIds.length}개 계약)`
+              description: `New ${totalResult.newCount}, Updated ${totalResult.updatedCount}, Skipped ${totalResult.skippedCount} (${contractIds.length} contracts)`
             }
           )
         } else {
           toast.error(
-            `DOLCE 가져오기 부분 실패`,
+            `DOLCE import partially failed`,
             {
-              description: '일부 계약에서 가져오기에 실패했습니다.'
+              description: 'Some contracts failed to import.'
             }
           )
         }
@@ -252,34 +252,34 @@ export function ImportFromDOLCEButton({
       setImportProgress(0)
       setIsImporting(false)
       
-      toast.error('DOLCE 가져오기 실패', {
-        description: error instanceof Error ? error.message : '알 수 없는 오류가 발생했습니다.'
+      toast.error('DOLCE import failed', {
+        description: error instanceof Error ? error.message : 'An unknown error occurred.'
       })
     }
   }
 
   const getStatusBadge = () => {
     if (loadingVendorContracts) {
-      return <Badge variant="secondary">계약 정보 로딩 중...</Badge>
+      return <Badge variant="secondary">Loading contract information...</Badge>
     }
 
     if (statusLoading) {
-      return <Badge variant="secondary">DOLCE 연결 확인 중...</Badge>
+      return <Badge variant="secondary">Checking DOLCE connection...</Badge>
     }
 
     if (importStatusMap.size === 0) {
-      return <Badge variant="destructive">DOLCE 연결 오류</Badge>
+      return <Badge variant="destructive">DOLCE Connection Error</Badge>
     }
 
     if (!totalStats.importEnabled) {
-      return <Badge variant="secondary">DOLCE 가져오기 비활성화</Badge>
+      return <Badge variant="secondary">DOLCE Import Disabled</Badge>
     }
 
     if (totalStats.newDocuments > 0 || totalStats.updatedDocuments > 0) {
       return (
         <Badge variant="samsung" className="gap-1">
           <AlertTriangle className="w-3 h-3" />
-          업데이트 가능 ({contractIds.length}개 계약)
+          Updates Available ({contractIds.length} contracts)
         </Badge>
       )
     }
@@ -287,7 +287,7 @@ export function ImportFromDOLCEButton({
     return (
       <Badge variant="default" className="gap-1 bg-green-500 hover:bg-green-600">
         <CheckCircle className="w-3 h-3" />
-        DOLCE와 동기화됨
+        Synchronized with DOLCE
       </Badge>
     )
   }
@@ -316,7 +316,7 @@ export function ImportFromDOLCEButton({
               ) : (
                 <Download className="w-4 h-4" />
               )}
-              <span className="hidden sm:inline">DOLCE에서 가져오기</span>
+              <span className="hidden sm:inline">Import from DOLCE</span>
               {totalStats.newDocuments + totalStats.updatedDocuments > 0 && (
                 <Badge 
                   variant="samsung" 
@@ -332,9 +332,9 @@ export function ImportFromDOLCEButton({
         <PopoverContent className="w-96">
           <div className="space-y-4">
             <div className="space-y-2">
-              <h4 className="font-medium">DOLCE 가져오기 상태</h4>
+              <h4 className="font-medium">DOLCE Import Status</h4>
               <div className="flex items-center justify-between">
-                <span className="text-sm text-muted-foreground">현재 상태</span>
+                <span className="text-sm text-muted-foreground">Current Status</span>
                 {getStatusBadge()}
               </div>
             </div>
@@ -342,15 +342,15 @@ export function ImportFromDOLCEButton({
             {/* 계약 소스 표시 */}
             {allDocuments.length === 0 && vendorContractIds.length > 0 && (
               <div className="text-xs text-blue-600 bg-blue-50 p-2 rounded">
-                문서가 없어서 전체 계약에서 가져오기를 진행합니다.
+                No documents found, importing from all contracts.
               </div>
             )}
 
             {/* 다중 계약 정보 표시 */}
             {contractIds.length > 1 && (
               <div className="text-sm">
-                <div className="text-muted-foreground">대상 계약</div>
-                <div className="font-medium">{contractIds.length}개 계약</div>
+                <div className="text-muted-foreground">Target Contracts</div>
+                <div className="font-medium">{contractIds.length} contracts</div>
                 <div className="text-xs text-muted-foreground">
                   Contract IDs: {contractIds.join(', ')}
                 </div>
@@ -363,25 +363,25 @@ export function ImportFromDOLCEButton({
                 
                 <div className="grid grid-cols-2 gap-4 text-sm">
                   <div>
-                    <div className="text-muted-foreground">신규 문서</div>
-                    <div className="font-medium">{totalStats.newDocuments || 0}건</div>
+                    <div className="text-muted-foreground">New Documents</div>
+                    <div className="font-medium">{totalStats.newDocuments || 0}</div>
                   </div>
                   <div>
-                    <div className="text-muted-foreground">업데이트</div>
-                    <div className="font-medium">{totalStats.updatedDocuments || 0}건</div>
+                    <div className="text-muted-foreground">Updates</div>
+                    <div className="font-medium">{totalStats.updatedDocuments || 0}</div>
                   </div>
                 </div>
 
                 <div className="text-sm">
-                  <div className="text-muted-foreground">DOLCE 전체 문서 (B3/B4/B5)</div>
-                  <div className="font-medium">{totalStats.availableDocuments || 0}건</div>
+                  <div className="text-muted-foreground">Total DOLCE Documents (B3/B4/B5)</div>
+                  <div className="font-medium">{totalStats.availableDocuments || 0}</div>
                 </div>
 
                 {/* 각 계약별 세부 정보 (펼치기/접기 가능) */}
                 {contractIds.length > 1 && (
                   <details className="text-sm">
                     <summary className="cursor-pointer text-muted-foreground hover:text-foreground">
-                      계약별 세부 정보
+                      Details by Contract
                     </summary>
                     <div className="mt-2 space-y-2 pl-2 border-l-2 border-muted">
                       {contractIds.map(contractId => {
@@ -391,10 +391,10 @@ export function ImportFromDOLCEButton({
                             <div className="font-medium">Contract {contractId}</div>
                             {status ? (
                               <div className="text-muted-foreground">
-                                신규 {status.newDocuments}건, 업데이트 {status.updatedDocuments}건
+                                New {status.newDocuments}, Updates {status.updatedDocuments}
                               </div>
                             ) : (
-                              <div className="text-destructive">상태 확인 실패</div>
+                              <div className="text-destructive">Status check failed</div>
                             )}
                           </div>
                         )
@@ -417,12 +417,12 @@ export function ImportFromDOLCEButton({
                 {isImporting ? (
                   <>
                     <Loader2 className="w-4 h-4 mr-2 animate-spin" />
-                    가져오는 중...
+                    Importing...
                   </>
                 ) : (
                   <>
                     <Download className="w-4 h-4 mr-2" />
-                    지금 가져오기
+                    Import Now
                   </>
                 )}
               </Button>
@@ -448,10 +448,10 @@ export function ImportFromDOLCEButton({
       <Dialog open={isDialogOpen} onOpenChange={setIsDialogOpen}>
         <DialogContent className="sm:max-w-md">
           <DialogHeader>
-            <DialogTitle>DOLCE에서 문서 목록 가져오기</DialogTitle>
+            <DialogTitle>Import Document List from DOLCE</DialogTitle>
             <DialogDescription>
-              삼성중공업 DOLCE 시스템에서 최신 문서 목록을 가져옵니다.
-              {contractIds.length > 1 && ` (${contractIds.length}개 계약 대상)`}
+              Import the latest document list from Samsung Heavy Industries DOLCE system.
+              {contractIds.length > 1 && ` (${contractIds.length} contracts targeted)`}
             </DialogDescription>
           </DialogHeader>
 
@@ -459,20 +459,20 @@ export function ImportFromDOLCEButton({
             {totalStats && (
               <div className="rounded-lg border p-4 space-y-3">
                 <div className="flex items-center justify-between text-sm">
-                  <span>가져올 항목</span>
+                  <span>Items to Import</span>
                   <span className="font-medium">
-                    {totalStats.newDocuments + totalStats.updatedDocuments}건
+                    {totalStats.newDocuments + totalStats.updatedDocuments}
                   </span>
                 </div>
                 
                 <div className="text-xs text-muted-foreground">
-                  신규 문서와 업데이트된 문서가 포함됩니다. (B3, B4, B5)
+                  Includes new and updated documents (B3, B4, B5).
                   <br />
-                  B4 문서의 경우 GTTPreDwg, GTTWorkingDwg 이슈 스테이지가 자동 생성됩니다.
+                  For B4 documents, GTTPreDwg and GTTWorkingDwg issue stages will be auto-generated.
                   {contractIds.length > 1 && (
                     <>
                       <br />
-                      {contractIds.length}개 계약에서 순차적으로 가져옵니다.
+                      Will import sequentially from {contractIds.length} contracts.
                     </>
                   )}
                 </div>
@@ -480,7 +480,7 @@ export function ImportFromDOLCEButton({
                 {isImporting && (
                   <div className="space-y-2">
                     <div className="flex items-center justify-between text-sm">
-                      <span>진행률</span>
+                      <span>Progress</span>
                       <span>{importProgress}%</span>
                     </div>
                     <Progress value={importProgress} className="h-2" />
@@ -495,7 +495,7 @@ export function ImportFromDOLCEButton({
                 onClick={() => setIsDialogOpen(false)}
                 disabled={isImporting}
               >
-                취소
+                Cancel
               </Button>
               <Button
                 onClick={handleImport}
@@ -504,12 +504,12 @@ export function ImportFromDOLCEButton({
                 {isImporting ? (
                   <>
                     <Loader2 className="w-4 h-4 mr-2 animate-spin" />
-                    가져오는 중...
+                    Importing...
                   </>
                 ) : (
                   <>
                     <Download className="w-4 h-4 mr-2" />
-                    가져오기 시작
+                    Start Import
                   </>
                 )}
               </Button>
-- 
cgit v1.2.3

