From a033a28b5ae1e413d351bdd864f1d1b3536f5ec1 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Sat, 28 Feb 2026 11:58:14 -0600 Subject: [PATCH] Count all eligible positions in dashboard position coverage Previously only counted pos_1; now uses Player::positions() to tally all position fields (pos_1-pos_8) so multi-position players are counted at each eligible position. Co-Authored-By: Claude Opus 4.6 --- rust/src/screens/dashboard.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/src/screens/dashboard.rs b/rust/src/screens/dashboard.rs index 169d5f7..8352b3f 100644 --- a/rust/src/screens/dashboard.rs +++ b/rust/src/screens/dashboard.rs @@ -221,11 +221,11 @@ impl DashboardState { self.il_count = roster.il.len(); self.swar_total = roster.majors.iter().filter_map(|p| p.swar).sum(); - // Compute position counts from majors roster + // Compute position counts from majors roster (all eligible positions) let mut counts: HashMap = HashMap::new(); for player in &roster.majors { - if let Some(pos) = &player.pos_1 { - *counts.entry(pos.clone()).or_insert(0) += 1; + for pos in player.positions() { + *counts.entry(pos.to_string()).or_insert(0) += 1; } } self.position_counts = counts;