feat(ledger): add wallet transaction ledger dashboard with reconcilia…#56
Merged
Obiajulu-gif merged 1 commit intoJun 21, 2026
Merged
Conversation
…tion views Add role-aware transaction ledger dashboards for admins, investors, and drivers covering wallet funding, repayments, payouts, internal credits/ debits, and provider references. - New ledger API (app/api/transactions/ledger) with search, date/type/ status/provider/reference filters, pagination, and balance summaries - Derived reconciliation status (reconciled/pending/failed/duplicate) to surface failed, pending, and duplicated provider references - CSV export endpoint honoring the active filters - Shared TransactionLedger component: summary cards, filters, detail drawer, pagination, and empty/loading/error states - Admin (global), investor, and driver ledger pages plus sidebar links - Access scoped by role: users see only their own records, admins see all
Collaborator
|
@Joycejay17 great work there |
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.
Build wallet transaction ledger dashboard with reconciliation views
Closes #47
Summary
What changed?
Adds a role-aware wallet transaction ledger dashboard that gives investors, drivers, and admins a transparent, ledger-style view of every balance movement — wallet funding, repayments, payouts, internal credits/debits, and provider references (e.g. Paystack / mock references) — plus an admin-facing reconciliation view to spot failed, pending, duplicated, and unreconciled transactions.
New API
GET /api/transactions/ledger— role-aware list with:page/pageSize)userId; admins can additionally scope byuserId/userTypeand see the global ledger.GET /api/transactions/ledger/export— CSV export that honors the same filters (admin CSV includes user columns).Reconciliation
Reconciliation status is derived from each transaction (no schema migration), classifying entries as
reconciled,pending,failed, orduplicate. Duplicate detection groups by provider reference within the filtered scope to flag potential double-postings. Admins get a banner when duplicates are present.UI
TransactionLedgerclient component: balance summary cards, filter bar, ledger table, transaction detail drawer, pagination, and explicit empty / loading / error states.dashboard/admin/ledger(global, server-guarded viarequireAdminAccess)dashboard/investor/ledgerdashboard/driver/ledgerArea changed
Check all that apply:
Contributor safety checklist
.env.localor real secrets.Testing
Commands run:
Screenshots / demo
Add screenshots of the admin/investor/driver ledger views before submitting.
Notes for maintainers
reconciliationStatusfield onTransactioncould back it.tscerrors in unrelated files (e.g.models/User.ts,src/server/admin/require-admin.ts,src/server/analytics/shared.ts) were left untouched per the contribution guidance to keep the PR focused.Acceptance criteria
npm run lintandnpm run buildpass.