diff --git a/app/static/js/pit-scouting/list.js b/app/static/js/pit-scouting/list.js index f68ca46..1b8efe2 100644 --- a/app/static/js/pit-scouting/list.js +++ b/app/static/js/pit-scouting/list.js @@ -147,4 +147,21 @@ document.addEventListener('DOMContentLoaded', function() { if (exportButton) { exportButton.addEventListener('click', exportToCSV); } + + const searchInput = document.getElementById('teamSearchInput'); + const tableRows = document.querySelectorAll('tbody tr'); + + searchInput.addEventListener('input', function() { + const searchTerm = searchInput.value.trim(); + + tableRows.forEach(row => { + const teamNumberCell = row.querySelector('td:first-child'); + if (teamNumberCell) { + const teamNumberText = teamNumberCell.textContent.trim(); + + // Show/hide the row based on whether the team number contains the search term + row.style.display = searchTerm === '' || teamNumberText.includes(searchTerm) ? '' : 'none'; + } + }); + }); }); \ No newline at end of file diff --git a/app/templates/scouting/matches.html b/app/templates/scouting/matches.html index 79d885d..d010c93 100644 --- a/app/templates/scouting/matches.html +++ b/app/templates/scouting/matches.html @@ -7,6 +7,19 @@

Match List

View all recorded matches and alliance performance data

+ +
+
+
+ + + +
+ +
+

Enter a team number to filter matches

+
+
@@ -200,4 +213,29 @@
Algae
{% endfor %}
+ + + {% endblock %} \ No newline at end of file diff --git a/app/templates/scouting/pit-scouting.html b/app/templates/scouting/pit-scouting.html index d6b2e50..75bab0d 100644 --- a/app/templates/scouting/pit-scouting.html +++ b/app/templates/scouting/pit-scouting.html @@ -64,6 +64,19 @@

Pit Scouting Data

+ +
+
+
+ + + +
+ +
+

Enter a team number to filter pit scouting data

+
+