Bug: player profile page doesn't display parent phone number #203
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#203
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
Bug
Lineage
Standalone — discovered during admin CRM audit (2026-04-03). Companion to basketball-api#276.
Repo
forgejo_admin/westside-landingWhat Broke
The player profile page (
/players/[id]) has template code to display parent phone, email, and name. However the API returns these nested asparent.phone,parent.email,parent.namewhile the template accesses flatplayer.parent_phone,player.parent_email,player.parent_name.Line 56 in
src/routes/(app)/players/[id]/+page.svelteassigns raw API response directly toplayerwith no field mapping. All three parent fields areundefinedwith real data:player.parent_phone(line 540) — never rendersplayer.parent_email(line 546) — never rendersplayer.parent_name(line 76 fallback) — never rendersThe mock data (line 45) uses flat shape which is why demo mode works.
Repro Steps
3852329501and emailapaisasandra@gmail.comScreenshot evidence:
apaisa-profile-no-phone.pngExpected Behavior
Admin Actions card should show "Parent Contact" with clickable
tel:link and "Parent Email" when parent data exists in the API response.Environment
File Targets
Files to modify:
src/routes/(app)/players/[id]/+page.svelte— after theapiFetchat line 56, add mapping:Files NOT to touch:
src/routes/(app)/admin/players/+page.svelte— CRM list uses different endpoint (separate ticket basketball-api#276)src/routes/(app)/coach/+page.svelte— coach roster uses its own data shape, already worksAcceptance Criteria
3852329501/coach) still works (uses its own data shape)Related
project-westside-basketballforgejo_admin/basketball-api#276(addsparent_phoneto admin list endpoint — independent fix, different code path)Scope Review: READY
Review note:
review-737-2026-04-03Scope is solid. File targets verified, traceability complete, single-agent pass.
Blast radius finding:
parent_email(line 546) andparent_name(line 76 fallback) have the same nested-vs-flat mismatch asparent_phone. Fix should map all three parent fields fromplayer.parent.{name,email,phone}to flat references. The issue body should be updated to reflect this expanded scope before dispatch.