diff --git a/logs/pickleball.log b/logs/pickleball.log index ebe98ed..0b31269 100644 --- a/logs/pickleball.log +++ b/logs/pickleball.log @@ -951,3 +951,68 @@ Starting Pickleball ELO Tracker Server on port 3000... ➕ Add Player: http://localhost:3000/players/new 🎾 Record Match: http://localhost:3000/matches/new +🏓 Pickleball ELO Tracker v3.0 +============================== + +Starting Pickleball ELO Tracker Server on port 3000... + +✅ Server running at http://localhost:3000 +📊 Leaderboard: http://localhost:3000/leaderboard +📜 Match History: http://localhost:3000/matches +👥 Players: http://localhost:3000/players +⚖️ Team Balancer: http://localhost:3000/balance +➕ Add Player: http://localhost:3000/players/new +🎾 Record Match: http://localhost:3000/matches/new + +🏓 Pickleball ELO Tracker v3.0 +============================== + +Starting Pickleball ELO Tracker Server on port 3000... + +✅ Server running at http://localhost:3000 +📊 Leaderboard: http://localhost:3000/leaderboard +📜 Match History: http://localhost:3000/matches +👥 Players: http://localhost:3000/players +⚖️ Team Balancer: http://localhost:3000/balance +➕ Add Player: http://localhost:3000/players/new +🎾 Record Match: http://localhost:3000/matches/new + +🏓 Pickleball ELO Tracker v3.0 +============================== + +Starting Pickleball ELO Tracker Server on port 3000... + +✅ Server running at http://localhost:3000 +📊 Leaderboard: http://localhost:3000/leaderboard +📜 Match History: http://localhost:3000/matches +👥 Players: http://localhost:3000/players +⚖️ Team Balancer: http://localhost:3000/balance +➕ Add Player: http://localhost:3000/players/new +🎾 Record Match: http://localhost:3000/matches/new + +🏓 Pickleball ELO Tracker v3.0 +============================== + +Starting Pickleball ELO Tracker Server on port 3000... + +✅ Server running at http://localhost:3000 +📊 Leaderboard: http://localhost:3000/leaderboard +📜 Match History: http://localhost:3000/matches +👥 Players: http://localhost:3000/players +⚖️ Team Balancer: http://localhost:3000/balance +➕ Add Player: http://localhost:3000/players/new +🎾 Record Match: http://localhost:3000/matches/new + +🏓 Pickleball ELO Tracker v3.0 +============================== + +Starting Pickleball ELO Tracker Server on port 3000... + +✅ Server running at http://localhost:3000 +📊 Leaderboard: http://localhost:3000/leaderboard +📜 Match History: http://localhost:3000/matches +👥 Players: http://localhost:3000/players +⚖️ Team Balancer: http://localhost:3000/balance +➕ Add Player: http://localhost:3000/players/new +🎾 Record Match: http://localhost:3000/matches/new + diff --git a/pickleball-elo b/pickleball-elo index 5affd8f..f3319db 100755 Binary files a/pickleball-elo and b/pickleball-elo differ diff --git a/src/main.rs b/src/main.rs index 33b7e95..08adbb1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -540,8 +540,8 @@ async fn player_profile_handler( if wins >= 1 { achievements.push("✨ First Win"); } if wins >= 10 { achievements.push("🔥 10 Wins"); } if win_rate >= 60 && total_matches >= 5 { achievements.push("💪 60% Win Rate"); } - if singles_rating >= 1700.0 || doubles_rating >= 1700.0 { achievements.push("⭐ Rising Star (1700+)"); } - if singles_rating >= 1900.0 || doubles_rating >= 1900.0 { achievements.push("👑 Elite (1900+)"); } + if singles_rating >= 1700.0 { achievements.push("⭐ Rising Star (1700+)"); } + if singles_rating >= 1900.0 { achievements.push("👑 Elite (1900+)"); } let achievements_html: String = achievements.iter() .map(|a| format!(r#"{}"#, a)) @@ -649,11 +649,7 @@ async fn player_profile_handler(
{:.0}
-
Singles Rating
-
-
-
{:.0}
-
Doubles Rating
+
ELO Rating
{}
@@ -727,7 +723,7 @@ async fn player_profile_handler( "#, name, COMMON_CSS, nav_html(), name, email.as_deref().unwrap_or("No email"), player_id, - singles_rating, doubles_rating, total_matches, wins, losses, win_rate, + singles_rating, total_matches, wins, losses, win_rate, achievements_html, h2h_rows, partners_rows, recent_rows, chart_data, chart_data); Ok(Html(html)) @@ -1518,20 +1514,20 @@ async fn create_match( /// /// **Returns:** HTML page with players table async fn players_list_handler(State(state): State) -> Html { - let players: Vec<(i64, String, Option, f64, f64)> = sqlx::query_as( - "SELECT id, name, email, singles_rating, doubles_rating FROM players ORDER BY name" + // UNIFIED RATING: just get singles_rating as the unified rating + let players: Vec<(i64, String, Option, f64)> = sqlx::query_as( + "SELECT id, name, email, singles_rating FROM players ORDER BY singles_rating DESC" ) .fetch_all(&state.pool) .await .unwrap_or_default(); let player_rows: String = players.iter() - .map(|(id, name, _email, sr, dr)| { + .map(|(id, name, _email, rating)| { format!(r#" {} {:.0} - {:.0} - "#, id, name, sr, dr) + "#, id, name, rating) }) .collect(); @@ -1555,7 +1551,7 @@ async fn players_list_handler(State(state): State) -> Html { - + {}
NameSinglesDoubles
NameRating