player points displayed now.
This commit is contained in:
parent
727b5bf83c
commit
7fa013f713
3 changed files with 16 additions and 0 deletions
4
app.py
4
app.py
|
|
@ -221,6 +221,7 @@ def dashboard(username, week):
|
|||
if user_roster and user_roster.get('players') and user_matchup:
|
||||
players_list = user_roster['players']
|
||||
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)
|
||||
|
||||
for player_id in players_list:
|
||||
|
|
@ -231,6 +232,9 @@ def dashboard(username, week):
|
|||
# Add starter status to player data
|
||||
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
|
||||
injury_status = (
|
||||
player.get('injury_status') or
|
||||
|
|
|
|||
|
|
@ -469,6 +469,16 @@
|
|||
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 {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@
|
|||
<span class="injury-status">{{ player.injury_status }}</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
<span class="points">{{ player.points|round(1) }}pts</span>
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
|
@ -157,6 +158,7 @@
|
|||
<span class="injury-status">{{ player.injury_status }}</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
<span class="points">{{ player.points|round(1) }}pts</span>
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue