diff --git a/static/favorites.js b/static/favorites.js index eb1b6ce..85bb616 100644 --- a/static/favorites.js +++ b/static/favorites.js @@ -145,24 +145,22 @@ class FavoritesManager { const picker = document.getElementById('games-picker'); if (!picker) return; - if (this.allTeams.size === 0) { - picker.innerHTML = '
No teams available
'; - return; - } - picker.innerHTML = ''; + // Use all teams from TEAM_NAMES instead of only teams with games this week + const allTeamAbbrevs = Object.keys(TEAM_NAMES); + // Sort teams alphabetically by common name - const sortedTeams = Array.from(this.allTeams).sort((a, b) => { - const nameA = this.getTeamName(a); - const nameB = this.getTeamName(b); + const sortedTeams = allTeamAbbrevs.sort((a, b) => { + const nameA = TEAM_NAMES[a]; + const nameB = TEAM_NAMES[b]; return nameA.localeCompare(nameB); }); sortedTeams.forEach(team => { const isSelected = this.favorites.includes(team); const isDisabled = !isSelected && this.favorites.length >= MAX_FAVORITES; - const teamName = this.getTeamName(team); + const teamName = TEAM_NAMES[team]; const item = document.createElement('div'); item.className = 'game-picker-item';