diff options
| author | joonhoekim <26rote@gmail.com> | 2025-10-27 12:31:52 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-10-27 12:31:52 +0900 |
| commit | 2e92d5f83ae5f0f39090552b46c519982e9279c9 (patch) | |
| tree | 6c32b55bc765f2a8ca7da86572fe3f9ca48a8893 /lib/approval-log | |
| parent | 9f761849c2e98f650d089d00aed9df090497ada9 (diff) | |
(김준회) SWP 컬럼조정 및 그에 따른 로직 변경, 결재로그 오류수정
Diffstat (limited to 'lib/approval-log')
| -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> ) |
