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

@ -189,7 +189,7 @@ export async function PaymentsTable({
);
}
function MobilePaymentDetails({ payment }: { payment: Payment }) {
export function MobilePaymentDetails({ payment, isAdmin = false }: { payment: Payment, isAdmin?: boolean }) {
return (
<div
className={cn(
@ -264,6 +264,12 @@ function MobilePaymentDetails({ payment }: { payment: Payment }) {
<Badge variant="secondary">{payment.status}</Badge>
)}
</span>
{isAdmin && (
<div className="my-2 text-primary flex flex-col items-start text-sm border rounded p-2 mt-2 w-full bg-white dark:bg-black">
{payment?.user?.name}
<span className="text-muted-foreground">{payment?.user?.id_card}</span>
</div>
)}
</div>
</div>
</div>