From 8244efa09b12040f0094415547a4f5562b9077ba Mon Sep 17 00:00:00 2001 From: Jacob Levine Date: Fri, 22 Mar 2019 07:34:00 -0500 Subject: [PATCH] ok seriously what is going on? --- website/public/scout/scripts.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/website/public/scout/scripts.js b/website/public/scout/scripts.js index 99cc7dab..69971884 100644 --- a/website/public/scout/scripts.js +++ b/website/public/scout/scripts.js @@ -336,44 +336,44 @@ function subReport() { var matchNum = document.getElementById('mselect').value.toString(); var series = capitalizeFirstLetter(document.getElementById('sselect').value).toString(); var push = {} - push[`${series}-${user.uid.toString()}`.toString]={} + push[`${series}-${user.uid.toString()}`.toString()]={} var x = document.getElementById('repsec1').children; for (var i = 0; i < x.length; i++) { if (x[i].children[0].tagName == "INPUT") { - push[`${series}-${user.uid.toString()}`.toString][x[i].children[0].id] = x[i].children[0].tagName; + push[`${series}-${user.uid.toString()}`.toString()][x[i].children[0].id] = x[i].children[0].tagName; } else if (x[i].children[0].tagName == "SPAN") { - push[`${series}-${user.uid.toString()}`.toString][x[i].children[0].id] = x[i].children[0].innerText; + push[`${series}-${user.uid.toString()}`.toString()][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[`${series}-${user.uid.toString()}`.toString][name] = document.querySelector('input[name="' + name + '"]:checked').value; + push[`${series}-${user.uid.toString()}`.toString()][name] = document.querySelector('input[name="' + name + '"]:checked').value; }else if (x[i].children[1].tagName == "TEXTAREA") { - push[`${series}-${user.uid.toString()}`.toString][x[i].children[1].id] = x[i].children[1].innerHTML; + push[`${series}-${user.uid.toString()}`.toString()][x[i].children[1].id] = x[i].children[1].innerHTML; } } var x = document.getElementById('repsec2').children; for (var i = 0; i < x.length; i++) { if (x[i].children[0].tagName == "INPUT") { - push[`${series}-${user.uid.toString()}`.toString][x[i].children[0].id] = x[i].children[0].tagName; + push[`${series}-${user.uid.toString()}`.toString()][x[i].children[0].id] = x[i].children[0].tagName; } else if (x[i].children[0].tagName == "SPAN") { - push[`${series}-${user.uid.toString()}`.toString][x[i].children[0].id] = x[i].children[0].innerText; + push[`${series}-${user.uid.toString()}`.toString()][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[`${series}-${user.uid.toString()}`.toString][name] = document.querySelector('input[name="' + name + '"]:checked').value; + push[`${series}-${user.uid.toString()}`.toString()][name] = document.querySelector('input[name="' + name + '"]:checked').value; }else if (x[i].children[1].tagName == "TEXTAREA") { - push[`${series}-${user.uid.toString()}`.toString][x[i].children[1].id] = x[i].children[1].innerHTML; + push[`${series}-${user.uid.toString()}`.toString()][x[i].children[1].id] = x[i].children[1].innerHTML; } } var x = document.getElementById('repsec3').children; for (var i = 0; i < x.length; i++) { if (x[i].children[0].tagName == "INPUT") { - push[`${series}-${user.uid.toString()}`.toString][x[i].children[0].id] = x[i].children[0].tagName; + push[`${series}-${user.uid.toString()}`.toString()][x[i].children[0].id] = x[i].children[0].tagName; } else if (x[i].children[0].tagName == "SPAN") { - push[`${series}-${user.uid.toString()}`.toString][x[i].children[0].id] = x[i].children[0].innerText; + push[`${series}-${user.uid.toString()}`.toString()][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[`${series}-${user.uid.toString()}`.toString][name] = document.querySelector('input[name="' + name + '"]:checked').value; + push[`${series}-${user.uid.toString()}`.toString()][name] = document.querySelector('input[name="' + name + '"]:checked').value; }else if (x[i].children[1].tagName == "TEXTAREA") { - push[`${series}-${user.uid.toString()}`.toString][x[i].children[1].id] = x[i].children[1].innerHTML; + push[`${series}-${user.uid.toString()}`.toString()][x[i].children[1].id] = x[i].children[1].innerHTML; } } firebase.firestore().collection('webData').doc('test').set(push).then(function() {