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}
>