diff --git a/app/scout/routes.py b/app/scout/routes.py index 1a2db73..48bcc63 100644 --- a/app/scout/routes.py +++ b/app/scout/routes.py @@ -298,7 +298,7 @@ def compare_teams(): } except Exception as team_error: - print(f"Error processing team {team_num}: {str(team_error)}") + # print(f"Error processing team {team_num}: {str(team_error)}") teams_data[team_num] = { "team_number": int(team_num), "error": str(team_error) @@ -307,7 +307,7 @@ def compare_teams(): return json.loads(json_util.dumps(teams_data)) except Exception as e: - print(f"Error in compare_teams: {str(e)}") + # print(f"Error in compare_teams: {str(e)}") return jsonify({"error": "An error occurred while comparing teams"}), 500 @scouting_bp.route("/search") @@ -493,7 +493,7 @@ async def search_teams(): ) except Exception as e: - print(f"Error searching teams: {e}") + # print(f"Error searching teams: {e}") return jsonify({"error": "Failed to fetch team data"}), 500 @@ -691,8 +691,7 @@ def leaderboard(): teams = list(scouting_manager.db.team_data.aggregate(pipeline)) return render_template("scouting/leaderboard.html", teams=teams, current_sort=sort_type) except Exception as e: - print(f"Error in leaderboard: {str(e)}") - flash(f"Error loading leaderboard: {str(e)}", "error") + # print(f"Error in leaderboard: {str(e)}") return render_template("scouting/leaderboard.html", teams=[], current_sort='coral') diff --git a/app/static/js/compare.js b/app/static/js/compare.js index bf7dac6..fe0d598 100644 --- a/app/static/js/compare.js +++ b/app/static/js/compare.js @@ -30,12 +30,9 @@ async function compareTeams() { .map((team, index) => `team${index + 1}=${encodeURIComponent(team)}`) .join('&'); - console.log('Fetching data with query:', queryString); const response = await fetch(`${API_ENDPOINT}?${queryString}`); const data = await response.json(); - - console.log('Received data:', data); - + if (!response.ok) { throw new Error(data.error || 'Failed to fetch team data'); } @@ -53,7 +50,6 @@ async function compareTeams() { } function displayComparisonResults(teamsData) { - console.log('Starting displayComparisonResults with:', teamsData); comparisonResults.classList.remove('hidden'); // Display raw scouting data first @@ -458,13 +454,10 @@ window.addEventListener('resize', () => { }); function displayRawData(teamsData) { - console.log('Starting displayRawData with:', teamsData); const tbody = document.getElementById('raw-data-tbody'); tbody.innerHTML = ''; // Clear existing rows Object.entries(teamsData).forEach(([teamNum, teamData]) => { - console.log(`Processing team ${teamNum}:`, teamData); - // Check if matches data exists if (!teamData || !teamData.matches || !Array.isArray(teamData.matches)) { console.warn(`No matches data for team ${teamNum}`, teamData); @@ -473,7 +466,6 @@ function displayRawData(teamsData) { // Sort matches by match number (most recent first) const sortedMatches = [...teamData.matches].sort((a, b) => b.match_number - a.match_number); - console.log(`Sorted matches for team ${teamNum}:`, sortedMatches); sortedMatches.forEach(match => { const row = document.createElement('tr');