Apply payment method normalization consistently across user-facing views
Audited every place Payment.method reaches the UI. The main user dashboard's per-registration payment list (fed by GET /api/payments/registration/:id) was still showing the raw gateway string, since that endpoint is shared with the staff-facing supervisor payments page and wasn't touched by the earlier /mypayments fix. Extracted the cash/card/eft/voucher/other normalization (matching normalizeUserMethod on the backend) into frontend/src/lib/paymentMethod.ts and applied it to both user-facing payment displays. Staff-facing views (supervisor payments, at-the-door, reports, cashup) intentionally keep showing the raw method for reconciliation and were left unchanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ and this project follows [Semantic Versioning](https://semver.org/).
|
||||
|
||||
- Cashup/reports: payments tagged with a digital wallet method (e.g. `apple_pay`, `google_pay` from online checkouts) are now bucketed as "card" for reconciliation instead of silently falling into "other".
|
||||
- User dashboard payment history: `GET /api/payments/mypayments` now normalizes `method` to the fixed set cash/card/eft/voucher/other. Card-network wallet payments (`apple_pay`, `google_pay`) are reported and filterable as "card"; any other gateway-reported value falls under "other" — instead of exposing raw, inconsistent gateway strings the filter dropdown didn't know about.
|
||||
- User dashboard: the registration payment list (shown on the main dashboard when viewing a registration's bill) applies the same cash/card/eft/voucher/other normalization client-side, so it no longer shows a raw `apple_pay`/`google_pay` string. Staff-facing payment views (supervisor payments, reports, cashup) are unaffected — they still show the raw method, which is what reconciliation needs.
|
||||
|
||||
## [1.0.1] - 2026-07-23
|
||||
|
||||
|
||||
Reference in New Issue
Block a user