Add parent_phone, school, height to coach dashboard CoachPlayerBrief #283

Closed
opened 2026-04-03 16:57:35 +00:00 by forgejo_admin · 1 comment

Type

Feature

Lineage

Related to forgejo_admin/basketball-api#278 (spike: audit API response contract mismatches with westside-landing frontend)

Repo

forgejo_admin/basketball-api

User Story

As an admin/coach/parent, I want the app to display complete player, parent, and coach information so that I can manage the program without missing data.

Context

Spike Mismatch 4: The coach dashboard shows a roster but CoachPlayerBrief is missing parent_phone, school (mapped from current_school), and height. Coaches need parent contact info and player details to manage their team effectively.

File Targets

  • src/basketball_api/routes/coaches_api.pyCoachPlayerBrief model + endpoint logic

Acceptance Criteria

  • CoachPlayerBrief includes parent_phone: Optional[str]
  • CoachPlayerBrief includes school: Optional[str] (populated from current_school DB field)
  • CoachPlayerBrief includes height: Optional[str]
  • Fields populated from player's parent and profile relationships
  • All existing tests pass

Test Expectations

  • Unit test verifying new fields in coach roster response
  • Test with player missing parent/school/height (fields should be null)

Constraints

  • Field name mapping: frontend expects school, DB stores current_school
  • Priority: HIGH

Checklist

  • Implementation complete
  • Tests written and passing
  • ruff format and ruff check clean
  • PR submitted
### Type Feature ### Lineage Related to forgejo_admin/basketball-api#278 (spike: audit API response contract mismatches with westside-landing frontend) ### Repo forgejo_admin/basketball-api ### User Story As an admin/coach/parent, I want the app to display complete player, parent, and coach information so that I can manage the program without missing data. ### Context Spike Mismatch 4: The coach dashboard shows a roster but `CoachPlayerBrief` is missing `parent_phone`, `school` (mapped from `current_school`), and `height`. Coaches need parent contact info and player details to manage their team effectively. ### File Targets - `src/basketball_api/routes/coaches_api.py` — `CoachPlayerBrief` model + endpoint logic ### Acceptance Criteria - [ ] `CoachPlayerBrief` includes `parent_phone: Optional[str]` - [ ] `CoachPlayerBrief` includes `school: Optional[str]` (populated from `current_school` DB field) - [ ] `CoachPlayerBrief` includes `height: Optional[str]` - [ ] Fields populated from player's parent and profile relationships - [ ] All existing tests pass ### Test Expectations - Unit test verifying new fields in coach roster response - Test with player missing parent/school/height (fields should be null) ### Constraints - Field name mapping: frontend expects `school`, DB stores `current_school` - Priority: HIGH ### Checklist - [ ] Implementation complete - [ ] Tests written and passing - [ ] `ruff format` and `ruff check` clean - [ ] PR submitted ### Related - Spike: forgejo_admin/basketball-api#278 (Mismatch 4)
Author
Owner

Scope Review: READY

Review note: review-743-2026-04-03
Single-repo, single-file. CoachPlayerBrief (line 27) confirmed missing parent_phone, school, height. Field mapping (school from current_school) well documented.

  • [SCOPE] Create architecture note arch-basketball-api
## Scope Review: READY Review note: `review-743-2026-04-03` Single-repo, single-file. CoachPlayerBrief (line 27) confirmed missing parent_phone, school, height. Field mapping (school from current_school) well documented. - `[SCOPE]` Create architecture note arch-basketball-api
forgejo_admin 2026-04-03 22:42:31 +00:00
Sign in to join this conversation.
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/basketball-api#283
No description provided.