diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-09-09 10:32:34 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-09-09 10:32:34 +0000 |
| commit | c62ec046327fd388ebce04571b55910747e69a3b (patch) | |
| tree | 41ccdc4a8dea99808622f6d5d52014ac59a2d7ab /components/knox/approval/ApprovalList.tsx | |
| parent | ebcec3f296d1d27943caf8a3aed26efef117cdc5 (diff) | |
(정희성, 최겸, 대표님) formatDate 변경 등
Diffstat (limited to 'components/knox/approval/ApprovalList.tsx')
| -rw-r--r-- | components/knox/approval/ApprovalList.tsx | 16 |
1 files changed, 3 insertions, 13 deletions
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 || '-'} |
