feat(reports): expand reports dashboard with KYC, fleet, and user tabs, per-tab filters, table previews, and CSV exports#52
Merged
Obiajulu-gif merged 30 commits intoJun 20, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #51
Summary
Expands the admin reports dashboard from a single aggregation view into a full multi-tab reporting hub covering all six data categories called out in the issue.
What changed
app/api/admin/reports/export/route.tsExportTypeunion:"deposits" | "investments" | "repayments"→ adds"kyc" | "fleet" | "users"kycStatus ≠ "none", supports?status=pending|approved|rejectedfilter; CSV columns: Date Joined, Name, Email, Role, KYC Status, KYC Verified?vstatus=Available|Financed|…filter; CSV columns: Date Added, Name, Identifier, Type, Year, Price, Status, Funding Status, Total Funded?role=driver|investor|adminfilter; CSV columns: Date Joined, Name, Email, Role, KYC Verified (no sensitive fields)app/dashboard/admin/reports/page.tsxReportTabtype +?tab=overview|kyc|fleet|usersURL param drives which tab is activehrefForTab()helper — builds tab-switch URLs that preserve range/date params?status=filter form?vstatus=filter form?role=filter form with date range appliedprint:hidden); content renders cleanly for print/PDFapp/dashboard/admin/reports/loading.tsxAcceptance criteria
user.role !== "admin"check in routenpm run lintandnpm run buildpassSecurity
kycDocuments(file paths/URLs)password,availableBalance, wallet fieldsuser.role === "admin"before any DB query