diff options
Diffstat (limited to 'lib/approval-log/table')
| -rw-r--r-- | lib/approval-log/table/approval-log-table-column.tsx | 21 |
1 files changed, 18 insertions, 3 deletions
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> ) |
