mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-11-10 06:54:44 +00:00
fix structure
This commit is contained in:
parent
b5d8851c44
commit
0684f982b7
@ -106,17 +106,20 @@ function reqjt(tn,tc){
|
|||||||
push[tn]='scout';
|
push[tn]='scout';
|
||||||
firebase.firestore().collection("UserAssociations").doc(user.uid).set(push, {
|
firebase.firestore().collection("UserAssociations").doc(user.uid).set(push, {
|
||||||
merge: true
|
merge: true
|
||||||
}).then(function(doc) {
|
}).then(function() {
|
||||||
if (doc.exists) {
|
teamAssoc = firebase.firestore().collection('UserAssociations').doc(user.uid)
|
||||||
list = doc.data()
|
teamAssoc.get().then(function(doc) {
|
||||||
teamNums = Object.keys(list)
|
if (doc.exists) {
|
||||||
document.getElementById('teammem').innerHTML = ""
|
list = doc.data()
|
||||||
for (var i = 0; i < teamNums.length; i++) {
|
teamNums = Object.keys(list)
|
||||||
document.getElementById('teammem').innerHTML += "<tr><td>" + teamNums[i] + "</td><td>" + list[teamNums[i]] + "</td></tr>"
|
document.getElementById('teammem').innerHTML = ""
|
||||||
|
for (var i = 0; i < teamNums.length; i++) {
|
||||||
|
document.getElementById('teammem').innerHTML += "<tr><td>" + teamNums[i] + "</td><td>" + list[teamNums[i]] + "</td></tr>"
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
document.getElementById('teammem').innerHTML = "<tr><td>You are not part of any teams</td></tr>"
|
||||||
}
|
}
|
||||||
} else {
|
})
|
||||||
document.getElementById('teammem').innerHTML = "<tr><td>You are not part of any teams</td></tr>"
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
alert("You don't have a correct join key. Please check it and try again.")
|
alert("You don't have a correct join key. Please check it and try again.")
|
||||||
|
Loading…
Reference in New Issue
Block a user