feat: girls travel contract — Prep Hoops Girls circuit #32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "31-feat-girls-travel-contract-prep-hoops-gi"
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
Changes
src/routes/contract/[token]/+page.server.ts: passisGirlsflag derived from team name containing "Queens"src/routes/contract/[token]/+page.svelte: full girls travel contract section — Prep Hoops Girls circuit schedule (Utah Girls Invitational Apr 10-11, Denver May 7-10, Mesa May 28-31, Utah Summer Classic Jun 27-28, Nike Vegas Jul 9-13), roster flexibility clause, cost/schedule placeholders for Marcussrc/routes/contract/[token]/sign/+server.ts: stamp2026-spring-girls-travel-v1contract version for Queens playerssrc/app.css:.marcus-todobright yellow marker style (remove before go-live)Test Plan
2026-spring-girls-travel-v1Review Checklist
Related Notes
forgejo_admin/westside-contracts#31— girls travel contract featureproject-westside-basketball— Westside Kings & Queens projectCloses #31
PR #32 Review
DOMAIN REVIEW
Tech stack: SvelteKit (TypeScript, Svelte 5 runes, server-side rendering, direct Postgres via
pgpool, MinIO for signature uploads). 4 files changed, +214/-5.Server logic (
+page.server.ts)isGirlsflag derived fromplayer.team_name.includes('Queens')-- consistent with the existingisLocalpattern using.includes('Local'). Clean and readable.Sign endpoint (
+server.ts)isLocal ? local : isGirls ? girls-travel : boys-travel. Correct precedence -- a "Queens Local" team (if one ever existed) would get the local version, which is the right default sinceisLocalis checked first.isGirlsdetection is duplicated between+page.server.ts(line 44) and+server.ts(line 60) -- both doteamName.includes('Queens'). This is an existing pattern (same duplication exists forisLocal). Not a blocker since these are not auth/security paths, but worth noting as a DRY opportunity for a future refactor (extract agetContractType(teamName)helper into$lib/).Svelte template (
+page.svelte){#if !isLocal && !isGirls}...{:else if !isLocal && isGirls}...{:else}is correct and exhaustive. All three contract types (boys travel, girls travel, local) are properly routed.contract-content,cost-table,tournament-card,payment-schedule, etc.) -- no new structural CSS needed beyond.marcus-todo. Good reuse.CSS (
app.css).marcus-todouses#fbbf24(amber-400) -- high contrast against white/dark text. Intentionally temporary. Acceptable as a review marker.border-radius: 4pxis a magic number but consistent with other radius values in the file. Fine for a temporary style.Accessibility
Correctness observations
proratedFeecalculation (Math.round(monthlyFee * 25 / 30 / 5) * 5) is reused in the girls contract's payment schedule (line 524). This is correct -- same proration logic applies to both programs.BLOCKERS
None.
Test coverage: This PR adds template/view logic (which contract content to show based on
isGirlsflag) and a new contract version string. The existingtests/validation.test.tscovers the shared signing validation logic, which is untouched by this PR. The new functionality is:teamName.includes('Queens')) -- trivially correct, same pattern as existingisLocal.No new user input paths, no new API endpoints, no new validation logic. The test plan in the PR body covers the integration scenarios (Queens sees girls content, Kings still sees boys, signing stamps correct version). This is appropriate for template-level changes. Not a blocker.
NITS
DRY opportunity: The
isLocal/isGirlsdetection logic is duplicated between+page.server.tsand+server.ts. Consider extracting agetContractType(teamName: string): 'local' | 'girls-travel' | 'boys-travel'helper into$lib/contract.ts. This would also make the ternary chain in+server.ts(lines 61-65) cleaner. Not blocking because it follows the existing pattern, but worth a follow-up ticket as the number of contract types grows.Repeated section structure: The boys and girls contracts share identical sections (Jersey, Communication, Rules of Conduct, Commitment, Callout Box). These could be extracted into Svelte snippets or components to reduce template duplication. Not blocking for a 2-variant system, but would matter at 3+ variants.
style="display: block;"on contract-content divs: This inline style appears on all three contract branches (lines 203, 378, 569). If it is alwaysdisplay: block, it should be in the CSS class definition rather than repeated inline.SOP COMPLIANCE
31-feat-girls-travel-contract-prep-hoops-gireferences #31)project-westside-basketball)Closes #31links to parent issuePROCESS OBSERVATIONS
{:else if}branch alongside existing untouched branches. Boys and local contracts are structurally unchanged. The only shared code modification is addingisGirlsto the data return and adding a comma afterisLocalin destructuring.VERDICT: APPROVED