Volleyball Elite Academy development update
|
Volleyball Elite Academy
Exclude Athletes From Schedule
|
Exclude Athletes From ScheduleVolleyball Elite Academy — Development Update • June 14, 2026
Exclude Athletes From Schedule
What & Why Some entries in a league roster are not real, playable people — placeholder slots like "Player 28"/"Player 30" that pad the roster to the fixed size the scheduler needs, or real athletes who are injured and may not return. Today every roster entry is scheduled into games as if they will show up, forcing coordinators to manually mark them absent every game day.
Add a per-athlete toggle in the League Athlete Roster (admin page) that flags an athlete as "not scheduled." When set, that athlete is left out of the generated game line-ups, and the slot they would have filled is simply covered by the existing substitutes — i.e. it becomes an automatic sub, because no real person is expected there.
Done looks like
- In the League Athlete Roster table, each athlete has a clear on/off toggle (e.g. "In schedule" / "Not scheduled"). Toggling it saves immediately and the row visibly reflects the state.
- When a schedule is generated (Day 1 sorting, Day 2+ tiered, and the auto-generation that happens when a day is locked), flagged athletes are NOT placed into any game roster or assignment.
- The line-ups still generate successfully (no validation errors) and remain balanced — the spot the flagged athlete would have held is left to be covered by the substitutes already on that game.
- Flagged placeholder athletes no longer clutter game-day attendance/check-in, rankings, or leaderboard views.
- Existing leagues are unaffected unless an admin turns the toggle on; default is "in schedule".
Out of scope
- Automatically promoting a specific substitute into the exact vacated starter position (the game already runs with subs covering; we are not changing in-game promotion logic).
- Bulk import/auto-detection of placeholder rows — the admin sets the toggle manually.
- Deleting or merging placeholder athlete records.
- Any change to how real absences/RSVPs are handled on game day.
Steps 1. Data model — Add a boolean flag to the league players record (default false = scheduled). Add it via a hand-written migration following the project's migration convention; do not regenerate migrations. Surface the field in the league-players API response. 2. Toggle endpoint — Add a SuperAdmin-only endpoint, alongside the existing per-player name/link endpoints, to set the flag for a league player. 3. Roster UI — Add a toggle control to each row of the League Athlete Roster table that reads and updates the flag, with appropriate test ids and a clear label/visual treatment for "not scheduled" rows. 4. Schedule materialization — In every path that turns players into game assignments/rosters, skip flagged players when mapping schedule slots to real athletes. Critical constraint: the scheduling engine must still receive the full player COUNT (validation requires each game filled to the league's fixed capacity), so only the materialization to assignments/rosters is filtered — never the count passed to the generator. For tiered days, also remove flagged players from the ranked-player list passed to the generator. Roster-rebuild paths that read from existing assignments inherit the exclusion automatically. 5. Surface consistency — Omit flagged placeholder athletes from game-day attendance/check-in lists, RSVP lists, rankings, and leaderboard so they don't appear as expected participants. 6. Verify — Typecheck, then confirm: toggling a player off and generating a schedule leaves them out of all game rosters while the schedule still validates; toggling back on restores normal behavior.
Relevant files - - - - - -
|
Volleyball Elite Academy Reply to this email — we read every reply. You received this because you have an account with Volleyball Elite Academy. elitevolleyball.training |
|
No comments:
Post a Comment