feat(go): M6.3 — Go-native /juniors page #29
Reference in New Issue
Block a user
Delete Branch "feat/go-m6-3-juniors-page"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
AssembleJuniors(ctx)from the JSON handler (api/handler.go) so HTML and JSON share one assembly path — mirrors theAssembleAdultspattern from M6.2.JuniorsPageDatawrapper type added torender.go.HTMLHandler.ServeJuniorswired to callAssembleJuniorsand render the new template (parallel toServeAdults).juniors.tmplreplaced: member table, name filter, month-range filter, totals row, Credits + Debts sections, Pay / Pay All buttons (links to/qr). No Unmatched section — parity with Pythonjuniors.html.3/500 CZK (4:2J,1A)) and"?"sentinel rendered viaMonthCell.Textproduced bybuildJuniorMemberRow— no extra template logic.Test plan
go build ./...— cleango test ./...— all passmake parity— 3/3 routes OK (wire output unchanged):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
- 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>