feat(go): M6.4 — Go-native /payments page (grouped-by-person ledger) #30

Merged
kacerr merged 1 commits from feat/go-m6-4-payments-page into main 2026-05-08 12:48:05 +02:00
Owner

Summary

  • Extracts AssemblePayments(ctx) from ServePayments in api/handler.go, following the M6.2/M6.3 AssembleAdults/AssembleJuniors pattern (shared between JSON API and HTML handler)
  • Adds PaymentsPageData wrapper in render.go
  • Replaces the payments.tmpl placeholder with a real grouped-by-person ledger: alphabetical member <h2> blocks, each with a txn-table showing Date / Amount / Purpose / Bank Message, newest-first; "Unmatched / Unknown" bucket included
  • Appends ledger CSS classes to app.css (.ledger-container, .member-block, .txn-table, .txn-{date,amount,purpose,message}, tr:hover) lifted from the Python templates/payments.html inline styles
  • Adds TestPaymentsPage markup test

No JS, no filters, no credits/debts — matches the Python page which is also a plain ledger.

Test plan

  • make go-build green
  • make go-test green (including new TestPaymentsPage)
  • make go-lint clean
  • curl -si localhost:8080/payments → HTTP 200, text/html, member blocks + active nav link rendered
  • Browser smoke: member blocks, green amounts, newest-first order, hover effect, sheet links in description

🤖 Generated with Claude Code

## Summary - Extracts `AssemblePayments(ctx)` from `ServePayments` in `api/handler.go`, following the M6.2/M6.3 `AssembleAdults`/`AssembleJuniors` pattern (shared between JSON API and HTML handler) - Adds `PaymentsPageData` wrapper in `render.go` - Replaces the `payments.tmpl` placeholder with a real grouped-by-person ledger: alphabetical member `<h2>` blocks, each with a `txn-table` showing Date / Amount / Purpose / Bank Message, newest-first; `"Unmatched / Unknown"` bucket included - Appends ledger CSS classes to `app.css` (`.ledger-container`, `.member-block`, `.txn-table`, `.txn-{date,amount,purpose,message}`, `tr:hover`) lifted from the Python `templates/payments.html` inline styles - Adds `TestPaymentsPage` markup test **No JS, no filters, no credits/debts** — matches the Python page which is also a plain ledger. ## Test plan - [x] `make go-build` green - [x] `make go-test` green (including new `TestPaymentsPage`) - [x] `make go-lint` clean - [x] `curl -si localhost:8080/payments` → HTTP 200, `text/html`, member blocks + active nav link rendered - [ ] Browser smoke: member blocks, green amounts, newest-first order, hover effect, sheet links in description 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kacerr added 1 commit 2026-05-08 12:29:45 +02:00
feat(go): M6.4 — Go-native /payments page (grouped-by-person ledger)
All checks were successful
Deploy to K8s / deploy (push) Successful in 6s
cb8a09b571
- Extract AssemblePayments(ctx) from ServePayments in api/handler.go,
  mirroring the AssembleAdults/AssembleJuniors pattern
- Add PaymentsPageData view-model wrapper in render.go
- Rewire html_handler.go ServePayments to call AssemblePayments and
  render with PaymentsPageData
- Replace payments.tmpl placeholder with real grouped-by-person ledger:
  alphabetical member blocks, txn-table (Date/Amount/Purpose/Message),
  newest-first rows, Unmatched/Unknown bucket
- Append ledger CSS classes to app.css (.ledger-container, .member-block,
  .txn-table, .txn-date/amount/purpose/message, tr:hover)
- Add TestPaymentsPage markup test

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
kacerr merged commit 689f1c01fd into main 2026-05-08 12:48:05 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kacerr/fuj-management#30