feat(go): M6.3 — Go-native /juniors page #29

Merged
kacerr merged 2 commits from feat/go-m6-3-juniors-page into main 2026-05-08 12:18:40 +02:00
Owner

Summary

  • Extract AssembleJuniors(ctx) from the JSON handler (api/handler.go) so HTML and JSON share one assembly path — mirrors the AssembleAdults pattern from M6.2.
  • JuniorsPageData wrapper type added to render.go.
  • HTMLHandler.ServeJuniors wired to call AssembleJuniors and render the new template (parallel to ServeAdults).
  • juniors.tmpl replaced: member table, name filter, month-range filter, totals row, Credits + Debts sections, Pay / Pay All buttons (links to /qr). No Unmatched section — parity with Python juniors.html.
  • J/A attendance breakdown (3/500 CZK (4:2J,1A)) and "?" sentinel rendered via MonthCell.Text produced by buildJuniorMemberRow — no extra template logic.

Test plan

  • go build ./... — clean
  • go test ./... — all pass
  • make parity — 3/3 routes OK (wire output unchanged)
  • Browser smoke on :8080/juniors: table renders, name filter works, month-range filter hides columns, Pay/Pay All links present on unpaid past-month cells, Credits + Debts sections visible

🤖 Generated with Claude Code

## Summary - **Extract `AssembleJuniors(ctx)`** from the JSON handler (`api/handler.go`) so HTML and JSON share one assembly path — mirrors the `AssembleAdults` pattern from M6.2. - **`JuniorsPageData`** wrapper type added to `render.go`. - **`HTMLHandler.ServeJuniors`** wired to call `AssembleJuniors` and render the new template (parallel to `ServeAdults`). - **`juniors.tmpl`** replaced: member table, name filter, month-range filter, totals row, Credits + Debts sections, Pay / Pay All buttons (links to `/qr`). No Unmatched section — parity with Python `juniors.html`. - J/A attendance breakdown (`3/500 CZK (4:2J,1A)`) and `"?"` sentinel rendered via `MonthCell.Text` produced by `buildJuniorMemberRow` — no extra template logic. ## Test plan - [ ] `go build ./...` — clean - [ ] `go test ./...` — all pass - [ ] `make parity` — 3/3 routes OK (wire output unchanged) - [ ] Browser smoke on `:8080/juniors`: table renders, name filter works, month-range filter hides columns, Pay/Pay All links present on unpaid past-month cells, Credits + Debts sections visible 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kacerr added 2 commits 2026-05-08 12:17:35 +02:00
- Extract AssembleJuniors(ctx) from ServeJuniors JSON handler so HTML
  and JSON share the same view-model path (mirrors AssembleAdults pattern)
- Add JuniorsPageData wrapper in render.go
- Wire HTMLHandler.ServeJuniors to AssembleJuniors + render template
- Replace 4-line placeholder juniors.tmpl with full template:
  member table, name filter, month-range filter, totals row,
  Credits + Debts sections, Pay / Pay All buttons via /qr links
  (no Unmatched section — matches Python juniors.html parity)
- J/A attendance breakdown ("3/500 CZK (4:2J,1A)") and "?" sentinel
  rendered via MonthCell.Text from buildJuniorMemberRow, no extra
  template logic needed
- All tests pass; make parity reports 3/3 routes OK

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
chore: CHANGELOG entry for M6.3 Go juniors page
Some checks failed
Deploy to K8s / deploy (push) Failing after 11s
505d635c66
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
kacerr merged commit 95641036cc into main 2026-05-08 12:18:40 +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#29