Feature: custom_notes field on player — renders additional terms on contract page #19

Closed
opened 2026-03-24 22:28:32 +00:00 by forgejo_admin · 1 comment

Type

Feature

Lineage

plan-wkq → Phase 14 (Billing Tiers & Contracts) — discovered during contract send prep

Repo

forgejo_admin/westside-contracts + forgejo_admin/basketball-api (migration)

User Story

As admin (Marcus)
I want to add custom notes to specific players that appear on their contract
So that special arrangements (gas stipends, discounts, custom terms) are visible to the parent when they sign

Context

5 players have gas stipend arrangements that need to appear on their contracts:

  • Hunter Froebe (138) & Max Jordan (158): 17U Local, free program + $50/mo gas stipend
  • Carter Milbourn (100), Tristen Thorn (115), Austin Porter (110): carpool, $50/mo gas reimbursement

The contract page currently has no per-player custom content. Need a custom_notes text field on the player model that, when populated, renders as an additional section on the contract page.

File Targets

basketball-api (migration):

  • New alembic migration: ALTER TABLE players ADD COLUMN custom_notes TEXT NULL
  • src/basketball_api/models.py — add custom_notes: Mapped[str | None]

westside-contracts (rendering):

  • src/routes/contract/[token]/+page.server.ts — include custom_notes in the returned player data
  • src/lib/types.ts — add custom_notes: string | null to Player interface
  • src/routes/contract/[token]/+page.svelte — render a section before the signing area if player.custom_notes is present. Simple styled div, same card style as other sections.

Acceptance Criteria

  • custom_notes column exists on players table
  • Contract page shows custom notes section ONLY when field is populated
  • Section renders between contract body and signing section
  • Players without custom_notes see no difference
  • Build passes, tests pass on both repos

Test Expectations

  • Migration applies cleanly
  • Contract page with custom_notes populated shows the section
  • Contract page without custom_notes shows no extra section
  • Run commands: alembic upgrade head (basketball-api), npm run build && npm test (westside-contracts)

Constraints

  • Plain text field, not markdown — keep it simple
  • Render with same styling as other contract sections (h3 heading + paragraph)
  • Section heading: "Additional Terms" or similar
  • Do NOT add admin UI for this — we set it via direct DB update for now

Checklist

  • Migration PR on basketball-api
  • Rendering PR on westside-contracts
  • Tests pass on both
  • No unrelated changes
  • project-westside-basketball
  • Gas stipend players: 138, 158 (Hunter/Max), 100, 115, 110 (Carter/Tristen/Austin)
### Type Feature ### Lineage `plan-wkq` → Phase 14 (Billing Tiers & Contracts) — discovered during contract send prep ### Repo `forgejo_admin/westside-contracts` + `forgejo_admin/basketball-api` (migration) ### User Story As admin (Marcus) I want to add custom notes to specific players that appear on their contract So that special arrangements (gas stipends, discounts, custom terms) are visible to the parent when they sign ### Context 5 players have gas stipend arrangements that need to appear on their contracts: - Hunter Froebe (138) & Max Jordan (158): 17U Local, free program + $50/mo gas stipend - Carter Milbourn (100), Tristen Thorn (115), Austin Porter (110): carpool, $50/mo gas reimbursement The contract page currently has no per-player custom content. Need a `custom_notes` text field on the player model that, when populated, renders as an additional section on the contract page. ### File Targets **basketball-api** (migration): - New alembic migration: `ALTER TABLE players ADD COLUMN custom_notes TEXT NULL` - `src/basketball_api/models.py` — add `custom_notes: Mapped[str | None]` **westside-contracts** (rendering): - `src/routes/contract/[token]/+page.server.ts` — include `custom_notes` in the returned player data - `src/lib/types.ts` — add `custom_notes: string | null` to Player interface - `src/routes/contract/[token]/+page.svelte` — render a section before the signing area if `player.custom_notes` is present. Simple styled div, same card style as other sections. ### Acceptance Criteria - [ ] `custom_notes` column exists on players table - [ ] Contract page shows custom notes section ONLY when field is populated - [ ] Section renders between contract body and signing section - [ ] Players without custom_notes see no difference - [ ] Build passes, tests pass on both repos ### Test Expectations - [ ] Migration applies cleanly - [ ] Contract page with custom_notes populated shows the section - [ ] Contract page without custom_notes shows no extra section - Run commands: `alembic upgrade head` (basketball-api), `npm run build && npm test` (westside-contracts) ### Constraints - Plain text field, not markdown — keep it simple - Render with same styling as other contract sections (h3 heading + paragraph) - Section heading: "Additional Terms" or similar - Do NOT add admin UI for this — we set it via direct DB update for now ### Checklist - [ ] Migration PR on basketball-api - [ ] Rendering PR on westside-contracts - [ ] Tests pass on both - [ ] No unrelated changes ### Related - `project-westside-basketball` - Gas stipend players: 138, 158 (Hunter/Max), 100, 115, 110 (Carter/Tristen/Austin)
Author
Owner

Scope Review: READY

Review note: review-wc19-2026-03-24
Scope is solid — all template sections present, all 5 file targets verified against codebase, cross-repo placement correctly documented, acceptance criteria are agent-testable.

Important finding: All described work is already implemented and merged to main in both repos (migration 020, models.py, types.ts, page.server.ts, page.svelte rendering). Feature branches exist but are equal to main. This issue may be closeable as already-implemented, or can scope additional test coverage.

## Scope Review: READY Review note: `review-wc19-2026-03-24` Scope is solid — all template sections present, all 5 file targets verified against codebase, cross-repo placement correctly documented, acceptance criteria are agent-testable. **Important finding:** All described work is already implemented and merged to main in both repos (migration 020, models.py, types.ts, page.server.ts, page.svelte rendering). Feature branches exist but are equal to main. This issue may be closeable as already-implemented, or can scope additional test coverage.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/westside-contracts#19
No description provided.