Audit admin panel#308
Open
github-actions[bot] wants to merge 2 commits intomasterfrom
Open
Conversation
- Badge: add status-aware variant mapping so variant="status" renders correct colors for active/pending/rejected/etc across all pages - Button: add danger and primary variant aliases used by KYC review, loan approval, and customer detail pages - Header: fix profile button route (/settings/profile → /settings), remove hardcoded notification count from dead bell button - Customer edit: fix 404 links (/dashboard/customers/ → /customers/) - Customer detail: add Edit button to reach the edit page - CollectionsQueue: fix 404 links and badge variant type errors - ReconciliationTable: pass adminId to reconcilePayment for audit trail - KYC document viewer: render actual <img> elements instead of placeholder icons so reviewers can see submitted ID documents - Pending loans: fix field name mismatches (principal → loan_amount_usd, term_months → loan_term_months, monthly_payment → monthly_installment_usd, brand → manufacturer) - Loans API: fix column name mismatches (loan_status → status) in getLoans, approveLoan, rejectLoan queries; fix device field names (device_brand → manufacturer, device_model → model) in select queries https://claude.ai/code/session_01WKDXWGCznnbpgxLSCEm3WL
The types/index.ts type definitions use different field names than the
actual database columns. Since Supabase select('*') returns raw DB column
names, all renders that accessed the type-defined names showed undefined.
Loans (DB: status, not loan_status):
- loans/_client.tsx: status badge, .replace now uses global regex
- loans/[id]/_client.tsx: status badge, approve condition, monthly
payment calculated from total_amount_due_usd / loan_term_months
- customers/[id]/_client.tsx: loan table status column
Payments (DB: amount_usd + status, not payment_amount_usd + payment_status):
- payments/_client.tsx: amount, status badge, reference columns
- payments/[id]/_client.tsx: status badge, amount, conditions for
reconcile/retry/refund actions, loan status display
- payments API: filter uses status not payment_status, retry/refund
update status not payment_status, stats query uses amount_usd,
search uses transaction_id not transaction_reference
Devices (DB: manufacturer + model + imei, not device_brand + device_model + device_imei):
- devices/_client.tsx: device column render
- devices/handovers/_client.tsx: device brand display
- devices API: search filter and handover select query
https://claude.ai/code/session_01WKDXWGCznnbpgxLSCEm3WL
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.
Auto-generated PR from Claude branch
Branch:
claude/audit-admin-panel-QlQ4QCommits ahead of master: 2
Changes: 72 files changed, 624 insertions(+), 1232 deletions(-)
Commits included
Merge policy
This PR will auto-merge after CI checks pass (lint + tests).
Automatically created by the Claude automation workflow.