From c62ec046327fd388ebce04571b55910747e69a3b Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Tue, 9 Sep 2025 10:32:34 +0000
Subject: (정희성, 최겸, 대표님) formatDate 변경 등
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/knox/approval/ApprovalList.tsx | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

(limited to 'components/knox/approval/ApprovalList.tsx')

diff --git a/components/knox/approval/ApprovalList.tsx b/components/knox/approval/ApprovalList.tsx
index 13a13936..25b9618d 100644
--- a/components/knox/approval/ApprovalList.tsx
+++ b/components/knox/approval/ApprovalList.tsx
@@ -11,6 +11,7 @@ import { Loader2, List, Eye, RefreshCw, AlertCircle } from 'lucide-react';
 // API 함수 및 타입
 import { getSubmissionList, getApprovalHistory } from '@/lib/knox-api/approval/approval';
 import type { SubmissionListResponse, ApprovalHistoryResponse } from '@/lib/knox-api/approval/approval';
+import { formatDate } from '@/lib/utils';
 
 // 상태 텍스트 매핑 (mock util 대체)
 const getStatusText = (status: string) => {
@@ -82,17 +83,6 @@ export default function ApprovalList({
     }
   };
 
-  const formatDate = (dateString: string) => {
-    if (!dateString || dateString.length < 14) return dateString;
-    const year = dateString.substring(0, 4);
-    const month = dateString.substring(4, 6);
-    const day = dateString.substring(6, 8);
-    const hour = dateString.substring(8, 10);
-    const minute = dateString.substring(10, 12);
-    
-    return `${year}-${month}-${day} ${hour}:${minute}`;
-  };
-
   const getStatusBadgeVariant = (status: string) => {
     switch (status) {
       case '2': // 완결
@@ -247,7 +237,7 @@ export default function ApprovalList({
                       {item.subject}
                     </TableCell>
                     <TableCell>
-                      {formatDate(item.sbmDt)}
+                      {formatDate(item.sbmDt, "kr")}
                     </TableCell>
                     <TableCell>
                       <Badge variant={getStatusBadgeVariant(item.status)}>
@@ -282,7 +272,7 @@ export default function ApprovalList({
                     {type === 'history' && (
                       <>
                         <TableCell>
-                          {item.actionDt ? formatDate(item.actionDt) : '-'}
+                          {item.actionDt ? formatDate(item.actionDt, "kr") : '-'}
                         </TableCell>
                         <TableCell>
                           {item.userId || '-'}
-- 
cgit v1.2.3

