From 95984e67b8d57fbe1431fcfedf3bb682f28416b3 Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Thu, 27 Nov 2025 17:48:28 +0900
Subject: (김준회) swp 영문 처리
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/swp/table/swp-table-toolbar.tsx | 90 ++++++++++++++++++-------------------
 1 file changed, 45 insertions(+), 45 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 276eca14..ab01a87d 100644
--- a/lib/swp/table/swp-table-toolbar.tsx
+++ b/lib/swp/table/swp-table-toolbar.tsx
@@ -140,7 +140,7 @@ export function SwpTableToolbar({
 
     const loadDocumentClassInfo = async () => {
       try {
-        console.log(`[SwpTableToolbar] 프로젝트 ${projNo} 문서 정보 로드 시작`);
+        console.log(`[SwpTableToolbar] Start loading document info for project ${projNo}`);
 
         // 서버 액션 호출
         const result = await getDocumentClassInfoByProjectCode(projNo);
@@ -150,32 +150,32 @@ export function SwpTableToolbar({
             setVendorDocNumberToDocClassMap(result.vendorDocNumberToDocClassMap);
             setDocumentClassStages(result.documentClassStages);
             
-            console.log(`[SwpTableToolbar] 문서 정보 로드 완료:`, {
+            console.log(`[SwpTableToolbar] Document info load complete:`, {
               vendorDocNumbers: Object.keys(result.vendorDocNumberToDocClassMap).length,
               documentClassStages: result.documentClassStages,
             });
           } else {
-            console.warn(`[SwpTableToolbar] 문서 정보 로드 실패:`, result.error);
+            console.warn(`[SwpTableToolbar] Document info load failed:`, result.error);
             setVendorDocNumberToDocClassMap({});
             setDocumentClassStages({});
             
             toast({
               variant: "destructive",
-              title: "문서 정보 로드 실패",
-              description: result.error || "문서 정보를 가져올 수 없습니다.",
+              title: "Failed to load document info",
+              description: result.error || "Cannot retrieve document info.",
             });
           }
         }
       } catch (error) {
         if (!isCancelled) {
-          console.error('[SwpTableToolbar] 문서 정보 로드 실패:', error);
+          console.error('[SwpTableToolbar] Failed to load document info:', error);
           setVendorDocNumberToDocClassMap({});
           setDocumentClassStages({});
           
           toast({
             variant: "destructive",
-            title: "문서 정보 로드 실패",
-            description: "문서 정보를 가져올 수 없습니다. 페이지를 새로고침해주세요.",
+            title: "Failed to load document info",
+            description: "Cannot retrieve document info. Please refresh the page.",
           });
         }
       }
@@ -197,8 +197,8 @@ export function SwpTableToolbar({
       if (!projNo) {
         toast({
           variant: "destructive",
-          title: "프로젝트 선택 필요",
-          description: "파일을 업로드할 프로젝트를 먼저 선택해주세요.",
+          title: "Project selection required",
+          description: "Please select a project to upload files to first.",
         });
         onFilesProcessed?.();
         return;
@@ -207,8 +207,8 @@ export function SwpTableToolbar({
       if (!vendorCode) {
         toast({
           variant: "destructive",
-          title: "업체 코드 오류",
-          description: "벤더 정보를 가져올 수 없습니다.",
+          title: "Vendor code error",
+          description: "Cannot retrieve vendor info.",
         });
         onFilesProcessed?.();
         return;
@@ -244,8 +244,8 @@ export function SwpTableToolbar({
     if (!projNo) {
       toast({
         variant: "destructive",
-        title: "프로젝트 선택 필요",
-        description: "파일을 업로드할 프로젝트를 먼저 선택해주세요.",
+        title: "Project selection required",
+        description: "Please select a project to upload files to first.",
       });
       return;
     }
@@ -253,8 +253,8 @@ export function SwpTableToolbar({
     if (!vendorCode) {
       toast({
         variant: "destructive",
-        title: "업체 코드 오류",
-        description: "벤더 정보를 가져올 수 없습니다.",
+        title: "Vendor code error",
+        description: "Cannot retrieve vendor info.",
       });
       return;
     }
@@ -304,8 +304,8 @@ export function SwpTableToolbar({
     startUpload(async () => {
       try {
         toast({
-          title: "파일 업로드 시작",
-          description: `${validFiles.length}개 파일을 업로드합니다...`,
+          title: "File upload started",
+          description: `Uploading ${validFiles.length} files...`,
         });
 
         const formData = new FormData();
@@ -322,7 +322,7 @@ export function SwpTableToolbar({
         });
 
         if (!response.ok) {
-          throw new Error(`업로드 실패: ${response.statusText}`);
+          throw new Error(`Upload failed: ${response.statusText}`);
         }
 
         const result = await response.json();
@@ -335,7 +335,7 @@ export function SwpTableToolbar({
         setShowResultDialog(true);
 
         toast({
-          title: result.success ? "업로드 완료" : "일부 업로드 실패",
+          title: result.success ? "Upload complete" : "Some uploads failed",
           description: result.message,
         });
 
@@ -345,21 +345,21 @@ export function SwpTableToolbar({
           onUploadComplete?.();
           
           toast({
-            title: "문서 목록 갱신 중",
-            description: "외부 시스템 처리를 기다리는 중입니다...",
+            title: "Refreshing document list",
+            description: "Waiting for external system processing...",
           });
           
           // 2초 딜레이 후 새로고침
           setTimeout(() => {
             onRefresh();
             toast({
-              title: "갱신 완료",
-              description: "업로드된 파일이 문서 목록에 반영되었습니다.",
+              title: "Refresh complete",
+              description: "Uploaded files have been reflected in the document list.",
             });
           }, 2000);
         }
       } catch (error) {
-        console.error("파일 업로드 실패:", error);
+        console.error("File upload failed:", error);
 
         // 검증 다이얼로그 닫기
         setShowValidationDialog(false);
@@ -367,7 +367,7 @@ export function SwpTableToolbar({
         const errorResults = validFiles.map((file) => ({
           fileName: file.name,
           success: false,
-          error: error instanceof Error ? error.message : "알 수 없는 오류",
+          error: error instanceof Error ? error.message : "Unknown error",
         }));
 
         setUploadResults(errorResults);
@@ -444,7 +444,7 @@ export function SwpTableToolbar({
               disabled={isRefreshing || !projNo}
             >
               <RefreshCw className={`h-4 w-4 mr-2 ${isRefreshing ? "animate-spin" : ""}`} />
-              새로고침
+              Refresh
             </Button>
             <Button
               variant="outline"
@@ -453,7 +453,7 @@ export function SwpTableToolbar({
               disabled={isUploading || !projNo}
             >
               <Upload className={`h-4 w-4 mr-2 ${isUploading ? "animate-pulse" : ""}`} />
-              {isUploading ? "업로드 중..." : "파일 업로드"}
+              {isUploading ? "Uploading..." : "Upload File"}
             </Button>
 
             {/* 별도 탭으로 분리하고 메인 테이블로 변경하였음. */}
@@ -472,7 +472,7 @@ export function SwpTableToolbar({
         {/* 검색 필터 */}
         <div className="rounded-lg border p-4 space-y-4">
           <div className="flex items-center justify-between">
-            <h3 className="text-sm font-semibold">검색 필터</h3>
+            <h3 className="text-sm font-semibold">Search Filter</h3>
             <Button
               variant="ghost"
               size="sm"
@@ -481,14 +481,14 @@ export function SwpTableToolbar({
               disabled={isRefreshing}
             >
               <X className="h-4 w-4 mr-1" />
-              초기화
+              Reset
             </Button>
           </div>
 
           <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
             {/* 프로젝트 번호 */}
             <div className="space-y-2">
-              <Label htmlFor="projNo">프로젝트 번호</Label>
+              <Label htmlFor="projNo">Project Number</Label>
               {projects.length > 0 ? (
                 <Popover open={projectSearchOpen} onOpenChange={setProjectSearchOpen}>
                   <PopoverTrigger asChild>
@@ -507,7 +507,7 @@ export function SwpTableToolbar({
                           {"]"}
                         </span>
                       ) : (
-                        <span className="text-muted-foreground">프로젝트 선택</span>
+                        <span className="text-muted-foreground">Select Project</span>
                       )}
                       <ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
                     </Button>
@@ -517,7 +517,7 @@ export function SwpTableToolbar({
                       <div className="flex items-center border rounded-md px-3">
                         <Search className="h-4 w-4 mr-2 opacity-50" />
                         <Input
-                          placeholder="프로젝트 번호 또는 이름으로 검색..."
+                          placeholder="Search by project number or name..."
                           value={projectSearch}
                           onChange={(e) => setProjectSearch(e.target.value)}
                           className="border-0 focus-visible:ring-0 focus-visible:ring-offset-0"
@@ -548,7 +548,7 @@ export function SwpTableToolbar({
                         ))}
                         {filteredProjects.length === 0 && (
                           <div className="py-6 text-center text-sm text-muted-foreground">
-                            검색 결과가 없습니다.
+                            No search results.
                           </div>
                         )}
                       </div>
@@ -558,7 +558,7 @@ export function SwpTableToolbar({
               ) : (
                 <Input
                   id="projNo"
-                  placeholder="계약된 프로젝트가 없습니다"
+                  placeholder="No contracted projects"
                   value={projNo}
                   disabled
                   className="bg-muted"
@@ -568,10 +568,10 @@ export function SwpTableToolbar({
 
             {/* 문서 번호 */}
             <div className="space-y-2">
-              <Label htmlFor="docNo">문서 번호</Label>
+              <Label htmlFor="docNo">Document Number</Label>
               <Input
                 id="docNo"
-                placeholder="문서 번호 검색"
+                placeholder="Search Document Number"
                 value={localFilters.docNo || ""}
                 onChange={(e) =>
                   setLocalFilters({ ...localFilters, docNo: e.target.value })
@@ -582,10 +582,10 @@ export function SwpTableToolbar({
 
             {/* 문서 제목 */}
             <div className="space-y-2">
-              <Label htmlFor="docTitle">문서 제목</Label>
+              <Label htmlFor="docTitle">Document Title</Label>
               <Input
                 id="docTitle"
-                placeholder="제목 검색"
+                placeholder="Search Title"
                 value={localFilters.docTitle || ""}
                 onChange={(e) =>
                   setLocalFilters({ ...localFilters, docTitle: e.target.value })
@@ -596,10 +596,10 @@ export function SwpTableToolbar({
 
             {/* 패키지 번호 */}
             <div className="space-y-2">
-              <Label htmlFor="pkgNo">패키지</Label>
+              <Label htmlFor="pkgNo">Package</Label>
               <Input
                 id="pkgNo"
-                placeholder="패키지 번호"
+                placeholder="Package Number"
                 value={localFilters.pkgNo || ""}
                 onChange={(e) =>
                   setLocalFilters({ ...localFilters, pkgNo: e.target.value })
@@ -610,10 +610,10 @@ export function SwpTableToolbar({
 
             {/* 스테이지 */}
             <div className="space-y-2">
-              <Label htmlFor="stage">스테이지</Label>
+              <Label htmlFor="stage">Stage</Label>
               <Input
                 id="stage"
-                placeholder="스테이지 입력 (예: IFC, IFA)"
+                placeholder="Enter Stage (e.g. IFC, IFA)"
                 value={localFilters.stage || ""}
                 onChange={(e) =>
                   setLocalFilters({ ...localFilters, stage: e.target.value })
@@ -624,7 +624,7 @@ export function SwpTableToolbar({
 
             {/* 상태 */}
             <div className="space-y-2">
-              <Label htmlFor="status">상태</Label>
+              <Label htmlFor="status">Status</Label>
               <Input
                 id="status"
                 placeholder="ex. standby.."
@@ -644,7 +644,7 @@ export function SwpTableToolbar({
               disabled={isRefreshing}
             >
               <Search className={`h-4 w-4 mr-2 ${isRefreshing ? "animate-spin" : ""}`} />
-              {isRefreshing ? "로딩 중..." : "검색"}
+              {isRefreshing ? "Loading..." : "Search"}
             </Button>
           </div>
         </div>
-- 
cgit v1.2.3

