Changes โ AT Dashboard (2026-05-06)
Fix 1: Repurpose "New Entry" nav tab โ "Messages"
- Changed
#nav-entrybutton text from "New Entry" to "Messages" with chat SVG icon - Changed
switchTab('entry')โswitchTab('messages') - Added
#messages-sectiondiv with placeholder "Messages coming soon" stub (matching Coach dashboard pattern) - Removed old
switchTab('entry')handler that opened sideline entry (FAB still opens sideline entry) - FAB (
#sideline-fab) unchanged โ still callsopenSidelineEntry() - Nav bar: Home ยท Roster ยท Messages ยท Cases
Fix 2: Rich case detail view (editable + milestone logging)
- Editable fields in
renderAthleteDetail(): - Title (text input, default: current injury name)
- Attention Level (dropdown: stable|warning|urgent)
- Status (dropdown: active|resolved)
- Save button โ calls
PATCH /api/v1/cases/{case_id}with{title, attention_level, status} -
Success/fail message shown inline
-
Milestone logging:
- Kept existing milestone progress bar
-
Added "Mark Phase N Achieved" buttons for pending/current milestones (UI-side placeholder โ PATCH endpoint not yet available)
-
Log Note:
- Textarea + "Log Note" button calls
POST /api/v1/events/generalwith{case_id, event_type: "note", note, visibility: ["at", "coach"]} -
After successful log, textarea clears and timeline refreshes
-
Timeline refresh: After logging a note, calls
GET /api/v1/cases/{case_id}/timelineand updates the timeline card in-place - Kept existing athlete header (avatar, name, sport/team, attention indicator) and milestone progress bar
Fix 3: Athlete rows not clickable in sideline entry
openSidelineEntry(): Changed fromnew Function(scriptContent)()to appending a<script>tag to the DOM โ functions now land in global scope- Event delegation: Added click listener on
#athlete-listthat usesdata-athlete-idand callswindow.selectAthlete(id) renderAthleteList(): Changed from inlineonclick="selectAthlete('${a.id}')"todata-athlete-id="${a.id}"- All existing functionality preserved (Home stats, Roster, Cases list, sideline entry flow)