Added Backend Team Dropdown Selection and Restore Team Management Controls
This MR updates Team Leaderboard team handling to support backend-defined teams while retaining existing UI-based team management.
What changed
- Added backend-managed team definitions in team_leaderboard.py.
- Added helper functions:
- get_all_teams()
- get_team_by_name()
- internal combined-team helper for backend + custom teams.
- Added Select Team dropdown with:
- All Teams
- dynamically listed team names.
- Kept existing options and restored their flow:
- Create New Team
- Add All Teams Using JSON
- Unified controls so Select Team + Create + Upload appear in one row at the same level.
- Wired analytics to run based on dropdown selection:
- selected team only, or all teams.
- Added duplicate-name protection across backend teams and custom JSON/manual teams.
What stayed unchanged
- Scoring formula and leaderboard computation logic.
- Rendering logic for team results/ranking/export.
- Other app modes (Compliance, User Profile, Batch).
- Test files were not modified.
Validation
- team_leaderboard.py passed.