mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-08-04 09:37:42 +00:00
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
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:
@ -241,6 +241,7 @@ export async function adminUserTopup(
|
|||||||
): Promise<AddTopupFormState> {
|
): Promise<AddTopupFormState> {
|
||||||
const user_id = formData.get("user_id") as string;
|
const user_id = formData.get("user_id") as string;
|
||||||
const amount = formData.get("amount") as string;
|
const amount = formData.get("amount") as string;
|
||||||
|
const description = formData.get("description") as string;
|
||||||
const session = await getServerSession(authOptions);
|
const session = await getServerSession(authOptions);
|
||||||
|
|
||||||
|
|
||||||
@ -263,6 +264,7 @@ export async function adminUserTopup(
|
|||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
amount: Number.parseInt(amount),
|
amount: Number.parseInt(amount),
|
||||||
user_id: Number.parseInt(user_id),
|
user_id: Number.parseInt(user_id),
|
||||||
|
description,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -110,11 +110,11 @@ export async function WalletTransactionsTable({
|
|||||||
<TableCell>
|
<TableCell>
|
||||||
<span className="font-semibold pr-2">
|
<span className="font-semibold pr-2">
|
||||||
{trx.transaction_type === "TOPUP" ? (
|
{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}
|
{trx.transaction_type}
|
||||||
</Badge>
|
</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}
|
{trx.transaction_type}
|
||||||
</Badge>
|
</Badge>
|
||||||
)}
|
)}
|
||||||
|
Reference in New Issue
Block a user