player points displayed now.

This commit is contained in:
efigueroa 2025-09-07 13:00:39 -07:00
parent 727b5bf83c
commit 7fa013f713
3 changed files with 16 additions and 0 deletions

4
app.py
View file

@ -221,6 +221,7 @@ def dashboard(username, week):
if user_roster and user_roster.get('players') and user_matchup: if user_roster and user_roster.get('players') and user_matchup:
players_list = user_roster['players'] players_list = user_roster['players']
starters_list = user_matchup.get('starters', []) starters_list = user_matchup.get('starters', [])
players_points = user_matchup.get('players_points', {})
print(f"DEBUG: Processing {len(players_list)} total players, {len(starters_list)} starters", flush=True) print(f"DEBUG: Processing {len(players_list)} total players, {len(starters_list)} starters", flush=True)
for player_id in players_list: for player_id in players_list:
@ -231,6 +232,9 @@ def dashboard(username, week):
# Add starter status to player data # Add starter status to player data
player['is_starter'] = player_id in starters_list player['is_starter'] = player_id in starters_list
# Add player points for this week
player['points'] = players_points.get(player_id, 0.0)
# Check multiple possible injury status fields # Check multiple possible injury status fields
injury_status = ( injury_status = (
player.get('injury_status') or player.get('injury_status') or

View file

@ -469,6 +469,16 @@
color: var(--player-name-color); color: var(--player-name-color);
} }
.player-pill .points {
font-weight: bold;
font-size: 9px;
opacity: 0.9;
background: rgba(255, 255, 255, 0.1);
padding: 1px 4px;
border-radius: 4px;
margin-left: auto;
}
.player-pill .league-dot { .player-pill .league-dot {
display: none; display: none;
} }

View file

@ -139,6 +139,7 @@
<span class="injury-status">{{ player.injury_status }}</span> <span class="injury-status">{{ player.injury_status }}</span>
{% endif %} {% endif %}
</span> </span>
<span class="points">{{ player.points|round(1) }}pts</span>
</div> </div>
</a> </a>
{% endfor %} {% endfor %}
@ -157,6 +158,7 @@
<span class="injury-status">{{ player.injury_status }}</span> <span class="injury-status">{{ player.injury_status }}</span>
{% endif %} {% endif %}
</span> </span>
<span class="points">{{ player.points|round(1) }}pts</span>
</div> </div>
</a> </a>
{% endfor %} {% endfor %}