From 2e92d5f83ae5f0f39090552b46c519982e9279c9 Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Mon, 27 Oct 2025 12:31:52 +0900
Subject: (김준회) SWP 컬럼조정 및 그에 따른 로직 변경, 결재로그 오류수정
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../table/approval-log-table-column.tsx             | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

(limited to 'lib/approval-log/table/approval-log-table-column.tsx')

diff --git a/lib/approval-log/table/approval-log-table-column.tsx b/lib/approval-log/table/approval-log-table-column.tsx
index 8b466c69..a77ed0d3 100644
--- a/lib/approval-log/table/approval-log-table-column.tsx
+++ b/lib/approval-log/table/approval-log-table-column.tsx
@@ -8,7 +8,6 @@ import { Checkbox } from "@/components/ui/checkbox"
 import { DataTableColumnHeaderSimple } from "@/components/data-table/data-table-column-simple-header"
 import { type ApprovalLog } from "../service"
 import { formatDate } from "@/lib/utils"
-import { getApprovalStatusText } from "@/lib/knox-api/approval/approval"
 import { MoreHorizontal, Eye } from "lucide-react"
 import {
   DropdownMenu,
@@ -88,7 +87,23 @@ export function getColumns({ setRowAction }: GetColumnsProps): ColumnDef<Approva
       ),
       cell: ({ row }) => {
         const status = row.getValue("status") as string;
-        const statusText = getApprovalStatusText(status);
+        
+        // 클라이언트 측에서 상태 텍스트 변환
+        const getStatusText = (status: string) => {
+          const statusMap: Record<string, string> = {
+            '-3': '암호화실패',
+            '-2': '암호화중',
+            '-1': '예약상신',
+            '0': '보류',
+            '1': '진행중',
+            '2': '완결',
+            '3': '반려',
+            '4': '상신취소',
+            '5': '전결',
+            '6': '후완결'
+          };
+          return statusMap[status] || '알 수 없음';
+        };
 
         const getStatusVariant = (status: string) => {
           switch (status) {
@@ -105,7 +120,7 @@ export function getColumns({ setRowAction }: GetColumnsProps): ColumnDef<Approva
         return (
           <div className="flex space-x-2">
             <Badge variant={getStatusVariant(status)}>
-              {statusText}
+              {getStatusText(status)}
             </Badge>
           </div>
         )
-- 
cgit v1.2.3

