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';
|
||||
firebase.firestore().collection("UserAssociations").doc(user.uid).set(push, {
|
||||
merge: true
|
||||
}).then(function(doc) {
|
||||
if (doc.exists) {
|
||||
list = doc.data()
|
||||
teamNums = Object.keys(list)
|
||||
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>"
|
||||
}).then(function() {
|
||||
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('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{
|
||||
alert("You don't have a correct join key. Please check it and try again.")
|
||||
|
Loading…
Reference in New Issue
Block a user