diff --git a/data analysis/__pycache__/analysis.cpython-36.pyc b/data analysis/__pycache__/analysis.cpython-36.pyc
index bb37e549..a886300d 100644
Binary files a/data analysis/__pycache__/analysis.cpython-36.pyc and b/data analysis/__pycache__/analysis.cpython-36.pyc differ
diff --git a/data analysis/__pycache__/tbarequest.cpython-36.pyc b/data analysis/__pycache__/tbarequest.cpython-36.pyc
new file mode 100644
index 00000000..8796bf72
Binary files /dev/null and b/data analysis/__pycache__/tbarequest.cpython-36.pyc differ
diff --git a/data analysis/__pycache__/visualization.cpython-36.pyc b/data analysis/__pycache__/visualization.cpython-36.pyc
new file mode 100644
index 00000000..5f3fde12
Binary files /dev/null and b/data analysis/__pycache__/visualization.cpython-36.pyc differ
diff --git a/website/public/profile/index.html b/website/public/profile/index.html
index 6ca7824f..132579e2 100644
--- a/website/public/profile/index.html
+++ b/website/public/profile/index.html
@@ -17,9 +17,7 @@
×
Profile
Team
-
diff --git a/website/public/scout/rpts/index.html b/website/public/scout/index.html
similarity index 79%
rename from website/public/scout/rpts/index.html
rename to website/public/scout/index.html
index d8659c54..e42bd203 100644
--- a/website/public/scout/rpts/index.html
+++ b/website/public/scout/index.html
@@ -34,8 +34,14 @@
Scouting For:
diff --git a/website/public/scout/rpts/scripts.js b/website/public/scout/rpts/scripts.js
deleted file mode 100644
index 44111926..00000000
--- a/website/public/scout/rpts/scripts.js
+++ /dev/null
@@ -1,272 +0,0 @@
-/* Set the width of the side navigation to 250px and the left margin of the page content to 250px and add a black background color to body */
-function openNav() {
- document.getElementById("mySidenav").style.width = "250px";
- document.getElementById("main").style.marginLeft = "250px";
- document.body.style.backgroundColor = "rgba(0,0,0,0.4)";
-}
-
-/* Set the width of the side navigation to 0 and the left margin of the page content to 0, and the background color of body to white */
-function closeNav() {
- document.getElementById("mySidenav").style.width = "0";
- document.getElementById("main").style.marginLeft = "0";
- document.body.style.backgroundColor = "white";
-}
-
-window.onload = function() {
- document.getElementById('sideload').style.display = 'block';
- var config = {
- apiKey: "(insert the TitanScout Api Key Here)",
- authDomain: "titanscoutandroid.firebaseapp.com",
- databaseURL: "https://titanscoutandroid.firebaseio.com",
- projectId: "titanscoutandroid",
- storageBucket: "titanscoutandroid.appspot.com",
- messagingSenderId: "1097635313476"
- };
- //eventually find a less-jank way to do this tho
- firebase.initializeApp(config);
- firebase.auth().onAuthStateChanged(function(user) {
- if (user != null) {
- if (user.displayName != null) {
- document.getElementById('status').innerHTML = "You are signed in as: " + user.displayName;
- } else if (user.email != null) {
- document.getElementById('status').innerHTML = "You are signed in as: " + user.email;
- } else if (user.phoneNumber != null) {
- document.getElementById('status').innerHTML = "You are signed in as: " + user.phoneNumber;
- } else {
- document.getElementById('status').innerHTML = "You are signed in.";
- }
- } else {
- window.location.replace('../../');
- }
- teamAssoc = firebase.firestore().collection('UserAssociations').doc(user.uid);
- teamAssoc.get().then(function(doc) {
- if (doc.exists) {
- list = doc.data()
- teamNums = Object.keys(list)
- document.getElementById('tns').innerHTML = ""
- for (var i = 0; i < teamNums.length; i++) {
- document.getElementById('tns').innerHTML += "
" + teamNums[i] + " "
- }
- } else {}
- }).then(function() {
- changeTeam(document.getElementById('tns').value)
- })
- });
-}
-
-function changeTeam(teamNum) {
- //remove all event listeners for element by cloning it
- var old_element = document.getElementById("mSelect");
- var new_element = old_element.cloneNode(true);
- old_element.parentNode.replaceChild(new_element, old_element);
- //ok back to normal stuff
- var user = firebase.auth().currentUser;
- ti = firebase.firestore().collection('teamData').doc("team-" + teamNum);
- currentComp = null;
- ti.get().then(function(doc) {
- if (doc.exists) {
- info = doc.data();
- currentComp = info['currentCompetition'];
- } else {
- alert("Something's wrong with firebase.");
- throw ("Something's wrong with firebase.");
- }
- }).then(function() {
- if (currentComp != null) {
- comps = firebase.firestore().collection('matchSignupsIndividual').doc(user.uid).collection("team-" + teamNum).doc(currentComp);
- comps.get().then(function(doc) {
- if (doc.exists) {
- var matches = doc.data();
- document.getElementById('mSelect').innerHTML = "";
- for (var i = 0; i < Object.keys(matches).length; i++) {
- name = Object.keys(matches)[i];
- series = matches[Object.keys(matches)[i]]['series'];
- completed = matches[Object.keys(matches)[i]]['completed'];
- if (!completed) {
- document.getElementById('mSelect').innerHTML += "
" + name + " "
- }
- }
- document.getElementById('mSelect').addEventListener("change", function() {
- updateForm(document.getElementById('mSelect').value, teamNum, currentComp);
- });
- updateForm(document.getElementById('mSelect').value, teamNum, currentComp);
- }
- });
- }
- });
-}
-
-function lastWord(words) {
- var n = words.split(" ");
- return n[n.length - 1];
-}
-
-function firstWord(words) {
- var n = words.split(" ");
- return n[0];
-}
-
-function updateForm(locString, teamNum, competition) {
- seriesList = [];
- document.getElementById('FormData').innerHTML = ""
- loc = firebase.firestore().collection('appBuliding').doc("team-" + teamNum).collection('competitions').doc(competition).collection(lastWord(locString));
- loc.get().then(function(docs) {
- docs.forEach(function(doc) {
- seriesList.push(doc.data());
- });
- seriesList.sort(function(a, b) {
- return a.order - b.order;
- })
- for (var i = 0; i < seriesList.length; i++) {
- document.getElementById('FormData').innerHTML += "
"
- seriesList[i].id + " ";
- labels = Object.keys(seriesList[i].data());
- var index = labels.indexOf('order');
- if (index > -1) {
- labels.splice(index, 1);
- }
- var questions = [];
- for (var j = 0; j < labels.length; j++) {
- questions.push([labels[j], seriesList[i].data()[labels[j]]])
- }
- questions.sort(function(a, b) {
- return a[1].order - b[1].order;
- })
- for (var j = 0; j < questions.length; j++) {
- document.getElementById('FormData').innerHTML += "
";
- }
- }
- document.getElementById('FormData').innerHTML += "
"
- });
-}
-
-function dec(id) {
- document.getElementById(id).innerHTML = (parseInt(document.getElementById(id).innerHTML) - 1).toString()
-}
-
-function inc(id) {
- document.getElementById(id).innerHTML = (parseInt(document.getElementById(id).innerHTML) + 1).toString()
-}
-
-function subReport(team, comp, matchNum) {
- var push = {}
- var x = document.getElementById('FormData').children;
- for (var i = 0; i < x.length; i++) {
- if (x[i].children[0].tagName == "INPUT") {
- push[x[i].children[0].id] = x[i].children[0].tagName;
- } else if (x[i].children[0].tagName == "TEXTAREA") {
- push[x[i].children[0].id] = x[i].children[0].innerHTML;
- } else if (x[i].children[0].tagName == "SPAN") {
- push[x[i].children[0].id] = x[i].children[0].innerText;
- }else if (x[i].children[0].tagName == "DIV") {
- var name=x[i].children[0].id;
- push[name]=document.querySelector('input[name="'+name+'"]:checked').value;
- }
- }
- var user = firebase.auth().currentUser;
- firebase.firestore().collection("teamData").doc('team-' + team).collection('scouts').doc(user.uid).collection(comp).doc("team-" + scoutedTeamNumber + matchNum).set(push, {
- merge: true
- }).then(function () {
- firebase.firestore().collection("data").doc('team-' + team).collection(comp).doc("team-" + scoutedTeamNumber).collection('matches').doc('match-' + matchNum).set(push, {
- merge: true
- });
- });
-}
-
-/*
-
-function subRes() {
- firebase.firestore().collection('teamData').doc('team-' + document.getElementById('tns').value).get().then(function(doc) {
- if (doc.exists) {
- comp = doc.data()['currentCompetition'];
- }
- }).then(function() {
-
-
- var user = firebase.auth().currentUser;
- push = {}
- push['match'] = 'match-' + document.getElementById('mn').value
- push['teamDBRef'] = 'team-' + document.getElementById('tsn').value
- push['speed'] = document.getElementById('speed').value
- push['sandstormCross'] = document.getElementById('SCross').value
- push['strategy'] = document.getElementById('strat').value
- push['contrubution'] = document.getElementById('contrib').value
- push['startingHatch'] = document.getElementById('habs').value
- push['size'] = document.getElementById('egs').value
-
- push['fillChoice'] = document.getElementById('SFill').value
- push['functional'] = document.getElementById('DOA').value
- push['strongMedium'] = document.getElementById('SSO').value
- push['sandstormCrossBonus'] = document.getElementById('SCross').value
-
- push['fillChoiceTeleop'] = document.getElementById('TFill').value
- push['strongMediumTeleop'] = document.getElementById('TSO').value
-
- push['cargoSuccessTeleop'] = document.getElementById('CSSR').value
- push['hiRocketSuccessTeleop'] = document.getElementById('HRSR').value
- push['lowRocketSuccessTeleop'] = document.getElementById('LRSR').value
-
- push['endingHab'] = document.getElementById('HAB').value
-
- firebase.firestore().collection("teamData").doc('team-' + document.getElementById('tns').value).collection('scouts').doc(user.uid).collection(comp).doc("team-" + document.getElementById('tsn').value + "-match-" + document.getElementById('mn').value).set(push, {
- merge: true
- })
- }).then(function() {
- var user = firebase.auth().currentUser;
- push = {}
- push['match'] = 'match-' + document.getElementById('mn').value
- push['teamDBRef'] = 'team-' + document.getElementById('tsn').value
- push['speed'] = document.getElementById('speed').value
- push['sandstormCross'] = document.getElementById('SCross').value
- push['strategy'] = document.getElementById('strat').value
- push['contrubution'] = document.getElementById('contrib').value
- push['startingHatch'] = document.getElementById('habs').value
- push['size'] = document.getElementById('egs').value
-
- push['fillChoice'] = document.getElementById('SFill').value
- push['functional'] = document.getElementById('DOA').value
- push['strongMedium'] = document.getElementById('SSO').value
- push['sandstormCrossBonus'] = document.getElementById('SCross').value
-
- push['fillChoiceTeleop'] = document.getElementById('TFill').value
- push['strongMediumTeleop'] = document.getElementById('TSO').value
-
- push['cargoSuccessTeleop'] = document.getElementById('CSSR').value
- push['hiRocketSuccessTeleop'] = document.getElementById('HRSR').value
- push['lowRocketSuccessTeleop'] = document.getElementById('LRSR').value
-
- push['endingHab'] = document.getElementById('HAB').value
- firebase.firestore().collection("data").doc('team-' + document.getElementById('tns').value).collection(comp).doc("team-" + document.getElementById('tsn').value).collection('matches').doc('match-' + document.getElementById('mn').value).set(push, {
- merge: true
- })
- }
-
- ).then(function() {
- alert('Submitted!')
- setTimeout(function() {
- window.location.href = '../scout';
- }, 500);
-
- })
-}*/
diff --git a/website/public/scout/scripts.js b/website/public/scout/scripts.js
new file mode 100644
index 00000000..803495d5
--- /dev/null
+++ b/website/public/scout/scripts.js
@@ -0,0 +1,466 @@
+/* Set the width of the side navigation to 250px and the left margin of the page content to 250px and add a black background color to body */
+function openNav() {
+ document.getElementById("mySidenav").style.width = "250px";
+ document.getElementById("main").style.marginLeft = "250px";
+ document.body.style.backgroundColor = "rgba(0,0,0,0.4)";
+}
+
+/* Set the width of the side navigation to 0 and the left margin of the page content to 0, and the background color of body to white */
+function closeNav() {
+ document.getElementById("mySidenav").style.width = "0";
+ document.getElementById("main").style.marginLeft = "0";
+ document.body.style.backgroundColor = "white";
+}
+
+window.onload = function() {
+ document.getElementById('sideload').style.display = 'block';
+ var config = {
+ apiKey: "(insert the TitanScout Api Key Here)",
+ authDomain: "titanscoutandroid.firebaseapp.com",
+ databaseURL: "https://titanscoutandroid.firebaseio.com",
+ projectId: "titanscoutandroid",
+ storageBucket: "titanscoutandroid.appspot.com",
+ messagingSenderId: "1097635313476"
+ };
+ //eventually find a less-jank way to do this tho
+ firebase.initializeApp(config);
+ firebase.auth().onAuthStateChanged(function(user) {
+ if (user != null) {
+ if (user.displayName != null) {
+ document.getElementById('status').innerHTML = "You are signed in as: " + user.displayName;
+ } else if (user.email != null) {
+ document.getElementById('status').innerHTML = "You are signed in as: " + user.email;
+ } else if (user.phoneNumber != null) {
+ document.getElementById('status').innerHTML = "You are signed in as: " + user.phoneNumber;
+ } else {
+ document.getElementById('status').innerHTML = "You are signed in.";
+ }
+ } else {
+ window.location.replace('../../');
+ }
+ teamAssoc = firebase.firestore().collection('UserAssociations').doc(user.uid);
+ teamAssoc.get().then(function(doc) {
+ if (doc.exists) {
+ list = doc.data()
+ teamNums = Object.keys(list)
+ document.getElementById('tns').innerHTML = ""
+ for (var i = 0; i < teamNums.length; i++) {
+ document.getElementById('tns').innerHTML += "
" + teamNums[i] + " "
+ }
+ } else {}
+ }).then(function() {
+ changeTeam(document.getElementById('tns').value)
+ })
+ });
+}
+
+function changeTeam(teamNum) {
+ document.getElementById('mSelect').innerHTML = ""
+ var user = firebase.auth().currentUser;
+ ti = firebase.firestore().collection('teamData').doc("team-" + teamNum);
+ currentComp = null;
+ ti.get().then(function(doc) {
+ if (doc.exists) {
+ info = doc.data();
+ currentComp = info['currentCompetition'];
+ } else {
+ alert("Something's wrong with firebase.");
+ throw ("Something's wrong with firebase.");
+ }
+ }).then(function() {
+ if (currentComp != null) {
+ matches = firebase.firestore().collection('appBuliding').doc('team-' + teamNum).collection('competitions').doc(currentComp).collection('scoutsAndSchedule');
+ matches.get().then(function(qs) {
+ qs.forEach(function(dc) {
+ //regex search!
+ var pattern = /\d+/;
+ var name = dc.id;
+ document.getElementById('mSelect').innerHTML += "
" + name.match(pattern)[0].toString() + " ";
+ });
+ cmatch(document.getElementById('mselect').value);
+ });
+ }
+ });
+}
+
+function cmatch(matchName) {
+ document.getElementById('tselect').innerHTML = ""
+ var user = firebase.auth().currentUser;
+ ti = firebase.firestore().collection('teamData').doc("team-" + teamNum);
+ currentComp = null;
+ ti.get().then(function(doc) {
+ if (doc.exists) {
+ info = doc.data();
+ currentComp = info['currentCompetition'];
+ } else {
+ alert("Something's wrong with firebase.");
+ throw ("Something's wrong with firebase.");
+ }
+ }).then(function() {
+ if (currentComp != null) {
+ match = firebase.firestore().collection('appBuliding').doc('team-' + teamNum).collection('competitions').doc(currentComp).collection('scoutsAndSchedule').doc('match-' + matchName)
+ match.get().then(function(doc) {
+ if (doc.exists) {
+ data = doc.data()
+ for (var i = 0; i < Object.keys(data['BLUE']).length; i++) {
+ var pattern = /\d+/;
+ document.getElementById('tselect').innerHTML += "
" + Object.keys(data['BLUE'])[i].match(pattern)[0].toString() + " ";
+ }
+ for (var i = 0; i < Object.keys(data['RED']).length; i++) {
+ var pattern = /\d+/;
+ document.getElementById('tselect').innerHTML += "
" + Object.keys(data['RED'])[i].match(pattern)[0].toString() + " ";
+ }
+ cseries(document.getElementById('sselect').value);
+ }
+ })
+ }
+ });
+}
+
+function cseries(seriesName) {
+ document.getElementById('mSelect').innerHTML = ""
+ var user = firebase.auth().currentUser;
+ ti = firebase.firestore().collection('teamData').doc("team-" + teamNum);
+ currentComp = null;
+ ti.get().then(function(doc) {
+ if (doc.exists) {
+ info = doc.data();
+ currentComp = info['currentCompetition'];
+ } else {
+ alert("Something's wrong with firebase.");
+ throw ("Something's wrong with firebase.");
+ }
+ }).then(function() {
+ if (currentComp != null) {
+
+ if (seriesName == "quantitative") {
+ document.getElementById('FormData').innerHTML += "
" + 'Sandstorm' + " ";
+ document.getElementById('FormData').innerHTML += "
";
+ var ss = firebase.firestore().collection('appBuliding').doc('team-' + teamNum).collection('competitions').doc(currentComp).collection('appBuliding').doc('quantitativeSandstorm');
+ ss.get().then(function(doc) {
+ if (doc.exists) {
+ processAndAppendReturn(doc.data())
+ }
+ document.getElementById('FormData').innerHTML += "
";
+ }).then(function() {
+ document.getElementById('FormData').innerHTML += "
" + 'TeleOp' + " ";
+ document.getElementById('FormData').innerHTML += "
";
+ var to = firebase.firestore().collection('appBuliding').doc('team-' + teamNum).collection('competitions').doc(currentComp).collection('appBuliding').doc('quantitativeTeleop');
+ to.get().then(function(doc) {
+ if (doc.exists) {
+ processAndAppendReturn(doc.data())
+ }
+ document.getElementById('FormData').innerHTML += "
";
+ }).then(function() {
+ document.getElementById('FormData').innerHTML += "
" + 'Cycle Times' + " ";
+ document.getElementById('FormData').innerHTML += "
";
+ var cyc = firebase.firestore().collection('appBuliding').doc('team-' + teamNum).collection('competitions').doc(currentComp).collection('appBuliding').doc('quantitativeCycleTimes');
+ cyc.get().then(function(doc) {
+ if (doc.exists) {
+ processAndAppendReturn(doc.data())
+ }
+ document.getElementById('FormData').innerHTML += "
";
+ });
+ });
+ });
+ } else if (seriesName = "qualitative") {
+ document.getElementById('FormData').innerHTML += "
" + 'Sandstorm' + " ";
+ document.getElementById('FormData').innerHTML += "
";
+ var ss = firebase.firestore().collection('appBuliding').doc('team-' + teamNum).collection('competitions').doc(currentComp).collection('appBuliding').doc('qualitativeSandstorm');
+ ss.get().then(function(doc) {
+ if (doc.exists) {
+ processAndAppendReturn(doc.data())
+ }
+ document.getElementById('FormData').innerHTML += "
";
+ }).then(function() {
+ document.getElementById('FormData').innerHTML += "
" + 'TeleOp' + " ";
+ document.getElementById('FormData').innerHTML += "
";
+ var to = firebase.firestore().collection('appBuliding').doc('team-' + teamNum).collection('competitions').doc(currentComp).collection('appBuliding').doc('qualitativeTeleop');
+ to.get().then(function(doc) {
+ if (doc.exists) {
+ processAndAppendReturn(doc.data())
+ }
+ document.getElementById('FormData').innerHTML += "
";
+ }).then(function() {
+ document.getElementById('FormData').innerHTML += "
" + 'Strategy' + " ";
+ document.getElementById('FormData').innerHTML += "
";
+ var strat = firebase.firestore().collection('appBuliding').doc('team-' + teamNum).collection('competitions').doc(currentComp).collection('appBuliding').doc('qualitativeStrategy');
+ strat.get().then(function(doc) {
+ if (doc.exists) {
+ processAndAppendReturn(doc.data())
+ }
+ document.getElementById('FormData').innerHTML += "
";
+ });
+ });
+ });
+ }
+ document.getElementById('FormData').innerHTML += "
";
+ }
+ });
+}
+
+function processAndAppendReturn(data) {
+ labels = Object.keys(data);
+ var questions = [];
+ for (var j = 0; j < labels.length; j++) {
+ questions.push([labels[j], data[labels[j]]]);
+ }
+ questions.sort(function(a, b) {
+ return a[1].order - b[1].order;
+ })
+ for (var j = 0; j < questions.length; j++) {
+ document.getElementById('FormData').innerHTML += "
";
+ }
+
+}
+
+/*
+function updateForm(locString, teamNum, competition) {
+ seriesList = [];
+ document.getElementById('FormData').innerHTML = ""
+ loc = firebase.firestore().collection('appBuliding').doc("team-" + teamNum).collection('competitions').doc(competition).collection(lastWord(locString));
+ loc.get().then(function(docs) {
+ docs.forEach(function(doc) {
+ seriesList.push(doc.data());
+ });
+ seriesList.sort(function(a, b) {
+ return a.order - b.order;
+ })
+ for (var i = 0; i < seriesList.length; i++) {
+ document.getElementById('FormData').innerHTML += "
"
+ seriesList[i].id + " ";
+ labels = Object.keys(seriesList[i].data());
+ var index = labels.indexOf('order');
+ if (index > -1) {
+ labels.splice(index, 1);
+ }
+ var questions = [];
+ for (var j = 0; j < labels.length; j++) {
+ questions.push([labels[j], seriesList[i].data()[labels[j]]])
+ }
+ questions.sort(function(a, b) {
+ return a[1].order - b[1].order;
+ })
+ for (var j = 0; j < questions.length; j++) {
+ document.getElementById('FormData').innerHTML += "
";
+ }
+ }
+ document.getElementById('FormData').innerHTML += "
"
+ });
+}
+*/
+function dec(id) {
+ document.getElementById(id).innerHTML = (parseInt(document.getElementById(id).innerHTML) - 1).toString()
+}
+
+function inc(id) {
+ document.getElementById(id).innerHTML = (parseInt(document.getElementById(id).innerHTML) + 1).toString()
+}
+
+function subReport() {
+ document.getElementById('mSelect').innerHTML = ""
+ var user = firebase.auth().currentUser;
+ ti = firebase.firestore().collection('teamData').doc("team-" + teamNum);
+ currentComp = null;
+ ti.get().then(function(doc) {
+ if (doc.exists) {
+ info = doc.data();
+ currentComp = info['currentCompetition'];
+ } else {
+ alert("Something's wrong with firebase.");
+ throw ("Something's wrong with firebase.");
+ }
+ }).then(function() {
+ if (currentComp != null) {
+ var submitTo = document.getElementById('tns').value;
+ var teamNum = document.getElementById('tselect').value;
+ var matchNum = document.getElementById('mselect').value;
+ var series = document.getElementById('sselect').value;
+ var push = {}
+ var x = document.getElementById('repsec1').children;
+ for (var i = 0; i < x.length; i++) {
+ if (x[i].children[0].tagName == "INPUT") {
+ push[x[i].children[0].id] = x[i].children[0].tagName;
+ } else if (x[i].children[0].tagName == "TEXTAREA") {
+ push[x[i].children[0].id] = x[i].children[0].innerHTML;
+ } else if (x[i].children[0].tagName == "SPAN") {
+ push[x[i].children[0].id] = x[i].children[0].innerText;
+ } else if (x[i].children[0].tagName == "DIV") {
+ var name = x[i].children[0].id;
+ push[name] = document.querySelector('input[name="' + name + '"]:checked').value;
+ }
+ }
+ var x = document.getElementById('repsec2').children;
+ for (var i = 0; i < x.length; i++) {
+ if (x[i].children[0].tagName == "INPUT") {
+ push[x[i].children[0].id] = x[i].children[0].tagName;
+ } else if (x[i].children[0].tagName == "TEXTAREA") {
+ push[x[i].children[0].id] = x[i].children[0].innerHTML;
+ } else if (x[i].children[0].tagName == "SPAN") {
+ push[x[i].children[0].id] = x[i].children[0].innerText;
+ } else if (x[i].children[0].tagName == "DIV") {
+ var name = x[i].children[0].id;
+ push[name] = document.querySelector('input[name="' + name + '"]:checked').value;
+ }
+ }
+ var x = document.getElementById('repsec3').children;
+ for (var i = 0; i < x.length; i++) {
+ if (x[i].children[0].tagName == "INPUT") {
+ push[x[i].children[0].id] = x[i].children[0].tagName;
+ } else if (x[i].children[0].tagName == "TEXTAREA") {
+ push[x[i].children[0].id] = x[i].children[0].innerHTML;
+ } else if (x[i].children[0].tagName == "SPAN") {
+ push[x[i].children[0].id] = x[i].children[0].innerText;
+ } else if (x[i].children[0].tagName == "DIV") {
+ var name = x[i].children[0].id;
+ push[name] = document.querySelector('input[name="' + name + '"]:checked').value;
+ }
+ }
+ }
+ });
+}
+
+/*
+function subReport(team, comp, matchNum) {
+ var push = {}
+ var x = document.getElementById('FormData').children;
+ for (var i = 0; i < x.length; i++) {
+ if (x[i].children[0].tagName == "INPUT") {
+ push[x[i].children[0].id] = x[i].children[0].tagName;
+ } else if (x[i].children[0].tagName == "TEXTAREA") {
+ push[x[i].children[0].id] = x[i].children[0].innerHTML;
+ } else if (x[i].children[0].tagName == "SPAN") {
+ push[x[i].children[0].id] = x[i].children[0].innerText;
+ } else if (x[i].children[0].tagName == "DIV") {
+ var name = x[i].children[0].id;
+ push[name] = document.querySelector('input[name="' + name + '"]:checked').value;
+ }
+ }
+ var user = firebase.auth().currentUser;
+ firebase.firestore().collection("teamData").doc('team-' + team).collection('scouts').doc(user.uid).collection(comp).doc("team-" + scoutedTeamNumber + matchNum).set(push, {
+ merge: true
+ }).then(function() {
+ firebase.firestore().collection("data").doc('team-' + team).collection(comp).doc("team-" + scoutedTeamNumber).collection('matches').doc('match-' + matchNum).set(push, {
+ merge: true
+ });
+ });
+}
+
+
+
+function subRes() {
+ firebase.firestore().collection('teamData').doc('team-' + document.getElementById('tns').value).get().then(function(doc) {
+ if (doc.exists) {
+ comp = doc.data()['currentCompetition'];
+ }
+ }).then(function() {
+
+
+ var user = firebase.auth().currentUser;
+ push = {}
+ push['match'] = 'match-' + document.getElementById('mn').value
+ push['teamDBRef'] = 'team-' + document.getElementById('tsn').value
+ push['speed'] = document.getElementById('speed').value
+ push['sandstormCross'] = document.getElementById('SCross').value
+ push['strategy'] = document.getElementById('strat').value
+ push['contrubution'] = document.getElementById('contrib').value
+ push['startingHatch'] = document.getElementById('habs').value
+ push['size'] = document.getElementById('egs').value
+
+ push['fillChoice'] = document.getElementById('SFill').value
+ push['functional'] = document.getElementById('DOA').value
+ push['strongMedium'] = document.getElementById('SSO').value
+ push['sandstormCrossBonus'] = document.getElementById('SCross').value
+
+ push['fillChoiceTeleop'] = document.getElementById('TFill').value
+ push['strongMediumTeleop'] = document.getElementById('TSO').value
+
+ push['cargoSuccessTeleop'] = document.getElementById('CSSR').value
+ push['hiRocketSuccessTeleop'] = document.getElementById('HRSR').value
+ push['lowRocketSuccessTeleop'] = document.getElementById('LRSR').value
+
+ push['endingHab'] = document.getElementById('HAB').value
+
+ firebase.firestore().collection("teamData").doc('team-' + document.getElementById('tns').value).collection('scouts').doc(user.uid).collection(comp).doc("team-" + document.getElementById('tsn').value + "-match-" + document.getElementById('mn').value).set(push, {
+ merge: true
+ })
+ }).then(function() {
+ var user = firebase.auth().currentUser;
+ push = {}
+ push['match'] = 'match-' + document.getElementById('mn').value
+ push['teamDBRef'] = 'team-' + document.getElementById('tsn').value
+ push['speed'] = document.getElementById('speed').value
+ push['sandstormCross'] = document.getElementById('SCross').value
+ push['strategy'] = document.getElementById('strat').value
+ push['contrubution'] = document.getElementById('contrib').value
+ push['startingHatch'] = document.getElementById('habs').value
+ push['size'] = document.getElementById('egs').value
+
+ push['fillChoice'] = document.getElementById('SFill').value
+ push['functional'] = document.getElementById('DOA').value
+ push['strongMedium'] = document.getElementById('SSO').value
+ push['sandstormCrossBonus'] = document.getElementById('SCross').value
+
+ push['fillChoiceTeleop'] = document.getElementById('TFill').value
+ push['strongMediumTeleop'] = document.getElementById('TSO').value
+
+ push['cargoSuccessTeleop'] = document.getElementById('CSSR').value
+ push['hiRocketSuccessTeleop'] = document.getElementById('HRSR').value
+ push['lowRocketSuccessTeleop'] = document.getElementById('LRSR').value
+
+ push['endingHab'] = document.getElementById('HAB').value
+ firebase.firestore().collection("data").doc('team-' + document.getElementById('tns').value).collection(comp).doc("team-" + document.getElementById('tsn').value).collection('matches').doc('match-' + document.getElementById('mn').value).set(push, {
+ merge: true
+ })
+ }
+
+ ).then(function() {
+ alert('Submitted!')
+ setTimeout(function() {
+ window.location.href = '../scout';
+ }, 500);
+
+ })
+}*/
diff --git a/website/public/scout/signUps/index.html b/website/public/scout/signUps/index.html
deleted file mode 100644
index 2616b299..00000000
--- a/website/public/scout/signUps/index.html
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
-
-
- titanscout
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
TitanScout- Scout Matches
-
Loading...
-
- Scouting For:
-
-
Sign Up For Matches
-
-
- Match Number
- Series
- Far Blue
- Mid Blue
- Near Blue
- Far Red
- Mid Red
- Near Red
-
-
-
-
-
-
-
diff --git a/website/public/scout/signUps/scripts.js b/website/public/scout/signUps/scripts.js
deleted file mode 100644
index 908495f1..00000000
--- a/website/public/scout/signUps/scripts.js
+++ /dev/null
@@ -1,214 +0,0 @@
-/* Set the width of the side navigation to 250px and the left margin of the page content to 250px and add a black background color to body */
-function openNav() {
- document.getElementById("mySidenav").style.width = "250px";
- document.getElementById("main").style.marginLeft = "250px";
- document.body.style.backgroundColor = "rgba(0,0,0,0.4)";
-}
-
-/* Set the width of the side navigation to 0 and the left margin of the page content to 0, and the background color of body to white */
-function closeNav() {
- document.getElementById("mySidenav").style.width = "0";
- document.getElementById("main").style.marginLeft = "0";
- document.body.style.backgroundColor = "white";
-}
-
-window.onload = function() {
- document.getElementById('sideload').style.display = 'block';
- var config = {
- apiKey: "(insert the TitanScout Api Key Here)",
- authDomain: "titanscoutandroid.firebaseapp.com",
- databaseURL: "https://titanscoutandroid.firebaseio.com",
- projectId: "titanscoutandroid",
- storageBucket: "titanscoutandroid.appspot.com",
- messagingSenderId: "1097635313476"
- };
- //eventually find a less-jank way to do this tho
- firebase.initializeApp(config);
- firebase.auth().onAuthStateChanged(function(user) {
- if (user != null) {
- if (user.displayName != null) {
- document.getElementById('status').innerHTML = "You are signed in as: " + user.displayName;
- } else if (user.email != null) {
- document.getElementById('status').innerHTML = "You are signed in as: " + user.email;
- } else if (user.phoneNumber != null) {
- document.getElementById('status').innerHTML = "You are signed in as: " + user.phoneNumber;
- } else {
- document.getElementById('status').innerHTML = "You are signed in.";
- }
- } else {
- window.location.replace('../../');
- }
- teamAssoc = firebase.firestore().collection('UserAssociations').doc(user.uid);
- teamAssoc.get().then(function(doc) {
- if (doc.exists) {
- list = doc.data()
- teamNums = Object.keys(list)
- document.getElementById('tns').innerHTML = ""
- for (var i = 0; i < teamNums.length; i++) {
- document.getElementById('tns').innerHTML += "