Parent dashboard: show player's team schedule from practice_schedules via player_teams FK #214
Labels
No labels
domain:backend
domain:devops
domain:frontend
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/westside-app#214
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Type
Feature
User Story
story:WS-S28As a parent, I want to see my child's team practice schedule so I know when and where to take them.Lineage
story:WS-S28arch:landing-siteteam_idsto account response) is merged as PR #334Repo
forgejo_admin/westside-landing(local checkout:~/westside-app)Context
The parent dashboard (
/my-players) currently shows placeholder text: "Schedule data will appear here once practice times are confirmed." But 17 practice records and 8 events already exist in the database. The API surface is now complete:GET /account/playersreturnsteam_ids: list[int]per player (basketball-api#334, merged 2026-04-04)GET /public/schedulereturns all practices withteam_idand all events withteam_id/divisionplayer_teamsM2M — a player can be on multiple teamsData flow (decided):
/account/playerson mount → get each player'steam_ids/public/schedule→ get all practices and eventspractices.filter(p => playerTeamIds.includes(p.team_id))events.filter(e => e.team_id && playerTeamIds.includes(e.team_id))plus division fallbackEdge case: Sandra Apaisa has 3 players across 2 teams. Display should group schedules by player, showing each player's team schedule.
File Targets
src/routes/(app)/my-players/+page.svelte— replace placeholder text with functional schedule displayAcceptance Criteria
team_idmatch first, thendivisionfallback/public/scheduleTest Expectations
svelte-checkpasses with 0 errorsConstraints
/account/players(withteam_ids) +/public/schedule/account/playersresponse already includesteam_ids(basketball-api#334 merged)Checklist
/account/playersto get each player's team_ids on mount/public/schedulefor all practices + eventsRelated
team_idstoAccountPlayerResponse— merged)Alignment update (2026-04-04)
Story relabel: This ticket should be
story:WS-S28(new), notstory:WS-S13.API strategy decided: Fetch
/public/scheduleand filter client-side by team IDs from/account/players.Dependency: basketball-api needs
team_idsin AccountPlayerResponse./account/playersreturnsteam_namebut noteam_idteam_idsis available:practices.filter(p => myPlayerTeamIds.includes(p.team_id))Auth architecture updated: Player/parent role now includes "view team schedule" in arch-auth-westside-basketball.
Edge case confirmed: Sandra Apaisa (3 players, 2 teams) should see both team schedules grouped by player.
Scope Review: NEEDS_REFINEMENT
Review note:
review-809-2026-04-04Cross-repo backend dependency not scoped —
/account/playersreturnsteam_namebut notteam_id, which the frontend needs to filter/public/scheduleby team.basketball-api/src/basketball_api/routes/account.py— addteam_idtoAccountPlayerResponseteam_idaddition, adddepends:labelarch-landing-siteScope refinement (2026-04-04)
Updated issue body to address review-809 findings:
/account/playersnow returnsteam_ids: list[int]. No cross-repo work needed./account/players(get team_ids) →/public/schedule(filter client-side). Explicit in body.westside-landing, local checkout is~/westside-app.arch-landing-sitenote: Flagged for future creation (not blocking this ticket).Scope Review: APPROVED
Review note:
review-809-2026-04-04Re-review passes. All prior NEEDS_REFINEMENT findings resolved:
team_idsgap: basketball-api PR #334 merged (verified on origin/main, commit2853efd)One non-blocking [SCOPE] recommendation carried forward:
arch-landing-sitefor the westside-landing frontend componentTicket is ready for dispatch.
Validation: PASS
Tiers executed: Tier 1 (Playwright browser validation), Tier 3 (prod deployment + route smoke tests)
Validation note:
validation-214-2026-04-04Checks: 6 PASS, 0 FAIL
Deployment:
westside-landing-858b9788-pq57l: Running, 0 restarts282741ec7a...matches merge commit282741ePlaywright (5/5):
No regressions. No discovered issues.