feat(admin-topup): add description field to topup request payload
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 8m2s

fix(wallet-transactions-table): update badge colors for better visibility
This commit is contained in:
2025-07-27 22:13:49 +05:00
parent 171b1d4d7c
commit a717c3d242
2 changed files with 4 additions and 2 deletions

View File

@ -241,6 +241,7 @@ export async function adminUserTopup(
): Promise<AddTopupFormState> {
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,
}),
},
);

View File

@ -110,11 +110,11 @@ export async function WalletTransactionsTable({
<TableCell>
<span className="font-semibold pr-2">
{trx.transaction_type === "TOPUP" ? (
<Badge className="bg-green-100 dark:bg-green-700">
<Badge className="bg-green-100 text-green-950 dark:bg-green-700">
{trx.transaction_type}
</Badge>
) : (
<Badge className="bg-red-500 dark:bg-red-700">
<Badge className="bg-red-500 text-red-950 dark:bg-red-700">
{trx.transaction_type}
</Badge>
)}