feat(go): M6.2 — adults page (table, filters, credits/debts/unmatched, Pay buttons) #27

Merged
kacerr merged 4 commits from feat/go-m6-2-adults-page into main 2026-05-08 10:35:21 +02:00
Owner

Summary

  • Full /adults HTML page on the Go frontend: reconcile table with per-cell status colours (cell-ok, cell-unpaid, cell-unpaid-current, cell-overridden), totals row, credits/debts/unmatched sections, Pay button hrefs to /qr.
  • AssembleAdults(ctx) extracted so /adults and /api/adults share one code path — make parity stays green.
  • static/js/filters.js: NFD-normalize name filter + month-range column hiding; future months hidden by default.
  • AdultsPageData view model + qrHref/qrHrefAll template funcs (URL-encode Czech SPD QR params).
  • TestAdultsPage mirrors Python's test_adults_route fixture assertions.

Test plan

  • make go-test green
  • make parity green (3/3 API routes unchanged)
  • Browser smoke on http://localhost:8080/adults against real data: table renders, cell colours correct, filters work (name + month range), Pay buttons present for past-month unpaid cells
  • Credits / Debts / Unmatched sections appear when data has them
## Summary - Full `/adults` HTML page on the Go frontend: reconcile table with per-cell status colours (`cell-ok`, `cell-unpaid`, `cell-unpaid-current`, `cell-overridden`), totals row, credits/debts/unmatched sections, Pay button hrefs to `/qr`. - `AssembleAdults(ctx)` extracted so `/adults` and `/api/adults` share one code path — `make parity` stays green. - `static/js/filters.js`: NFD-normalize name filter + month-range column hiding; future months hidden by default. - `AdultsPageData` view model + `qrHref`/`qrHrefAll` template funcs (URL-encode Czech SPD QR params). - `TestAdultsPage` mirrors Python's `test_adults_route` fixture assertions. ## Test plan - [ ] `make go-test` green - [ ] `make parity` green (3/3 API routes unchanged) - [ ] Browser smoke on `http://localhost:8080/adults` against real data: table renders, cell colours correct, filters work (name + month range), Pay buttons present for past-month unpaid cells - [ ] Credits / Debts / Unmatched sections appear when data has them
kacerr added 1 commit 2026-05-08 10:01:12 +02:00
feat(go): M6.2 — adults page (table, filters, credits/debts/unmatched, Pay buttons)
All checks were successful
Deploy to K8s / deploy (push) Successful in 8s
c85748b3aa
- Extract AssembleAdults(ctx) from ServeAdults so HTML and JSON API share one reconcile path.
- HTMLHandler gains *api.Handler; ServeAdults loads real data and renders adults.tmpl.
- AdultsPageData view model + qrHref/qrHrefAll funcMap (URL-encode /qr params, YYYY-MM→MM/YYYY).
- adults.tmpl: full reconcile table, per-cell status classes + cell-unpaid-current, Pay button hrefs,
  totals row, credits/debts/unmatched sections, filter controls, sheet links.
- static/js/filters.js: NFD-normalize name filter + month-range column hiding; future months hidden by default.
- TestAdultsPage asserts member name and cell text against fixture data.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
kacerr added 1 commit 2026-05-08 10:17:10 +02:00
fix(go): adults template — emit markup that the lifted CSS expects
All checks were successful
Deploy to K8s / deploy (push) Successful in 9s
daac5d7392
The lifted-from-Python app.css already styles .list-container/.list-item,
.unmatched-row, .balance-pos/.balance-neg, and cell-{status}; the M6.2
template invented .credits-list / .unmatched-table / .balance-cell that
had no rules, so those sections rendered unstyled.

- Credits / Debts: <ul><li> → <div class="list-container"><div class="list-item">
  <span class="list-item-name"> + <span class="list-item-val"> (debts red inline).
- Unmatched: <table> → <div class="list-container"> + <div class="unmatched-row">.
- Balance cell: balance-pos / balance-neg with style="position: relative;";
  Pay-All button now lives inside it (no separate trailing column).
- Total row: cell-{status} + caption span "received / expected" + bold/dark inline styles.
- Drop redundant .cell wrapper class; balance value drops trailing "CZK".
- Section headings: "Credits (Advance Payments / Surplus)" + "Debts (Missing Payments)".
- Source links: <div class="description"> block under h1 (was at page bottom).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
kacerr added 1 commit 2026-05-08 10:20:51 +02:00
fix(go): wrap adults table in <div class="table-container">
All checks were successful
Deploy to K8s / deploy (push) Successful in 9s
464eeeb2b1
The lifted CSS defines .table-container with border: 1px solid #333 and
max-width: 1200px — without the wrapper the table stretched to full
viewport width and showed no border. Mirrors templates/adults.html.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
kacerr added 1 commit 2026-05-08 10:33:34 +02:00
fix(go): align adults cell class names with Python; un-underline Pay buttons
All checks were successful
Deploy to K8s / deploy (push) Successful in 10s
aa0c17f521
- Map unpaid|partial → cell-unpaid (or cell-unpaid-current for current
  month) and surplus → cell-overridden, matching Python's Jinja logic;
  avoids emitting non-existent cell-partial/cell-surplus classes that
  caused Pay buttons to escape the table.
- Add text-decoration: none to .pay-btn so anchor-based Pay links don't
  show the default underline.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
kacerr merged commit 6a8aa37198 into main 2026-05-08 10:35:21 +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#27