From 7be5e15e9a3accf4cbfef5fc1cddb00a60bea16f Mon Sep 17 00:00:00 2001 From: Jacob Levine Date: Fri, 22 Mar 2019 09:14:41 -0500 Subject: [PATCH] web3 --- website/public/scout/scripts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/public/scout/scripts.js b/website/public/scout/scripts.js index 0bfff4f9..5e4f5afe 100644 --- a/website/public/scout/scripts.js +++ b/website/public/scout/scripts.js @@ -243,7 +243,7 @@ function processAndAppendReturn(data, newloc) { } else if (questions[j][1]['type'] == 'stepper') { document.getElementById(newloc + j.toString()).innerHTML += "" + (questions[j][1]['defaultValue']).toString() + ""; } else if (questions[j][1]['type'] == 'label') { - document.getElementById(newloc + j.toString()).innerHTML += "" + (0).toString() + ""; + document.getElementById(newloc + j.toString()).innerHTML += "" + (questions[j][1]['defaultValue']).toString() + ""; } else if (questions[j][1]['type'] == 'slider') { document.getElementById(newloc + j.toString()).innerHTML += "  " + questions[j][1]['min'] + "  "; document.getElementById(newloc + j.toString()).innerHTML += ""; @@ -392,7 +392,7 @@ function subReport() { } catch (e) { } - firebase.firestore().collection("data").doc('team-' + document.getElementById('tns').value).collection(currentComp).doc("team-" + teamNum).collection('matches').doc('match-' + matchNum).set(push, { + firebase.firestore().collection("data").doc('team-' + document.getElementById('tns').value).collection(currentComp).doc("team-" + teamNum).collection('matches').doc('match-' + matchNum).set(push, {merge:true}).then(function() { alert('Submitted!') setTimeout(function() { window.location.href = '../scout';