From 2a800845baf53a074996becd91ca274762583b3b Mon Sep 17 00:00:00 2001 From: Wikzyy Date: Tue, 27 May 2025 10:25:56 +0700 Subject: [PATCH] define type O on status disbursement --- .../history-transaction/hooks/TransactionContext.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pages/disbursement/history-transaction/hooks/TransactionContext.tsx b/src/pages/disbursement/history-transaction/hooks/TransactionContext.tsx index 861dcea..7766169 100644 --- a/src/pages/disbursement/history-transaction/hooks/TransactionContext.tsx +++ b/src/pages/disbursement/history-transaction/hooks/TransactionContext.tsx @@ -54,7 +54,7 @@ const initialProps: ContextProps = { detailLogData: null }; -type StatusCode = 'W' | 'P' | 'F' | 'D' | 'Y'; +type StatusCode = 'W' | 'P' | 'F' | 'D' | 'Y' | 'O'; interface StatusInfo { label: string; @@ -64,10 +64,11 @@ interface StatusInfo { const statusMap: Record = { W: { label: 'Waiting', bg: 'bg-yellow-100', text: 'text-yellow-600' }, - P: { label: 'Pending', bg: 'bg-blue-100', text: 'text-blue-600' }, + P: { label: 'Pending', bg: 'bg-yellow-100', text: 'text-blue-600' }, F: { label: 'Fail', bg: 'bg-red-100', text: 'text-red-600' }, D: { label: 'Done', bg: 'bg-green-100', text: 'text-green-600' }, - Y: { label: 'Active', bg: 'bg-green-100', text: 'text-green-600' } + Y: { label: 'Active', bg: 'bg-green-100', text: 'text-green-600' }, + O: { label: 'On Process', bg: 'bg-blue-100', text: 'text-blue-600' } }; const ManageTransactionContext = createContext(initialProps); @@ -172,7 +173,7 @@ const TransactionProvider = ({ children }: { children: React.ReactNode }) => { ); }, meta: { - headerClassName: 'w-[100px]', + headerClassName: 'w-[200px] text-center', cellClassName: 'text-center' } },