feat(user-topups): add user topups page with dynamic filtering and admin table integration
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Has been cancelled

feat(admin-devices-table): update admin check to use is_admin and clean up device display logic 
feat(admin-topup-table): create admin topups table with pagination and detail view links 
fix(user-payments-table): correct user data access and display payment amount with currency 
feat(app-sidebar): add link for user topups in the admin sidebar 
fix(backend-types): enhance Payment interface to include user details for better data handling 
This commit is contained in:
2025-07-24 23:01:41 +05:00
parent d7b8e4ec64
commit 1f6fe7db38
11 changed files with 322 additions and 26 deletions

View File

@ -95,13 +95,13 @@ export async function UsersPaymentsTable({
<TableCell className="font-medium">
{/* {payment.user.id_card} */}
<div className="flex flex-col items-start">
{payment.devices[0]?.user?.name}
{payment?.user?.name}
<span className="text-muted-foreground">
{payment.devices[0]?.user?.id_card}
{payment?.user?.id_card}
</span>
</div>{" "}
</TableCell>
<TableCell>{payment.amount}</TableCell>
<TableCell>{payment.amount} MVR</TableCell>
<TableCell>{payment.number_of_months} Months</TableCell>
<TableCell>
@ -144,7 +144,7 @@ export async function UsersPaymentsTable({
</TableCell>
<TableCell>
<Link href={`/payments/${payment.id}/verify`}>
<Link href={`/payments/${payment.id}`}>
<Button>Details</Button>
</Link>
</TableCell>