start scout

This commit is contained in:
Jacob Levine 2019-03-07 20:54:55 -06:00
parent 0e358a9a14
commit 1925943660
3 changed files with 17 additions and 3 deletions

View File

@ -15,8 +15,8 @@
<div id="mySidenav" class="sidenav"> <div id="mySidenav" class="sidenav">
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a> <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
<a href="../profile">Profile</a> <a href="../profile">Profile</a>
<a href="#">Team</a> <a href="../team">Team</a>
<a href="../scout">Scout Matches</a> <a href="#">Scout Matches</a>
<a href="../stats">Torunament Stats</a> <a href="../stats">Torunament Stats</a>
</div> </div>
<div id="main"> <div id="main">
@ -25,6 +25,9 @@
</span> </span>
<h1 id="mainhead">TitanScout- Scout Matches</h1> <h1 id="mainhead">TitanScout- Scout Matches</h1>
<p id="status">Loading...</p> <p id="status">Loading...</p>
<div>
Scouting For: <select id="tns"></select>
</div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -38,5 +38,16 @@ window.onload = function() {
} else { } else {
window.location.replace('../'); 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 += "<option value='" + teamNums[i] + "'>" + teamNums[i] + "</option>"
}
} else {}
})
}); });
} }

View File

@ -33,7 +33,7 @@ window.onload = function() {
if (user != null) { if (user != null) {
if (user.displayName != null) { if (user.displayName != null) {
document.getElementById('status').innerHTML = "You are signed in as: " + user.displayName; document.getElementById('status').innerHTML = "You are signed in as: " + user.displayName;
document.getElementById('newDN').innerHTML = user.displayName; //document.getElementById('newDN').innerHTML = user.displayName;
} else if (user.email != null) { } else if (user.email != null) {
document.getElementById('status').innerHTML = "You are signed in as: " + user.email; document.getElementById('status').innerHTML = "You are signed in as: " + user.email;
} else if (user.phoneNumber != null) { } else if (user.phoneNumber != null) {