mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-07-27 14:43:19 +00:00
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
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:
@ -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>
|
||||
|
Reference in New Issue
Block a user