From a717c3d2420b5f4d2a051a787457874113574471 Mon Sep 17 00:00:00 2001 From: i701 Date: Sun, 27 Jul 2025 22:13:49 +0500 Subject: [PATCH] feat(admin-topup): add description field to topup request payload fix(wallet-transactions-table): update badge colors for better visibility --- actions/user-actions.ts | 2 ++ components/wallet-transactions-table.tsx | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/actions/user-actions.ts b/actions/user-actions.ts index 596c3b0..6c41dfd 100644 --- a/actions/user-actions.ts +++ b/actions/user-actions.ts @@ -241,6 +241,7 @@ export async function adminUserTopup( ): Promise { const user_id = formData.get("user_id") as string; const amount = formData.get("amount") as string; + const description = formData.get("description") as string; const session = await getServerSession(authOptions); @@ -263,6 +264,7 @@ export async function adminUserTopup( body: JSON.stringify({ amount: Number.parseInt(amount), user_id: Number.parseInt(user_id), + description, }), }, ); diff --git a/components/wallet-transactions-table.tsx b/components/wallet-transactions-table.tsx index 5568fb3..57bf166 100644 --- a/components/wallet-transactions-table.tsx +++ b/components/wallet-transactions-table.tsx @@ -110,11 +110,11 @@ export async function WalletTransactionsTable({ {trx.transaction_type === "TOPUP" ? ( - + {trx.transaction_type} ) : ( - + {trx.transaction_type} )}