final fixes

This commit is contained in:
Jacob Levine 2019-03-22 08:36:33 -05:00
parent 6f1cf1828a
commit aa86a2af7b
2 changed files with 5 additions and 3 deletions

View File

@ -5,8 +5,8 @@ Created on Wed Mar 20 12:21:31 2019
@author: creek
"""
from firebase_admin import credentials
from firebase_admin import firestore
from google.oauth2 import service_account
import pprint
from pylatex import Document, Section, Subsection, Command
from pylatex.utils import italic, NoEscape
@ -49,7 +49,7 @@ def generate_team_report(team):
doc.generate_pdf(filepath= str(team.id), clean_tex=False)
credentials = service_account.Credentials.from_service_account_file('keys/firebasekey.json')
credential = credentials.Certificate('keys/firebasekey.json')
db = firestore.Client(project="titanscoutandroid", credentials=credentials)
teams_ref = db.collection(u'data').document(u'team-2022').collection(u'Central 2019')

View File

@ -240,7 +240,9 @@ function processAndAppendReturn(data, newloc) {
} else if (questions[j][1]['type'] == 'stepper') {
document.getElementById(newloc + j.toString()).innerHTML += "<span id='" + questions[j][0] + "'><input type='button' onclick=\"dec('" + questions[j][0] + "')\" value='-'></input>" + (questions[j][1]['defaultValue']).toString() + "<input type='button' onclick=\"inc('" + questions[j][0] + "')\" value='+'></input></span>";
} else if (questions[j][1]['type'] == 'label') {
document.getElementById(newloc + j.toString()).innerHTML += "<span id='" + questions[j][0] + "'><input type='button' onclick=\"dec('" + questions[j][0] + "')\" value='-'></input>" + '0' + "<input type='button' onclick=\"inc('" + questions[j][0] + "')\" value='+'></input></span>";
document.getElementById(newloc + j.toString()).innerHTML += "&nbsp;&nbsp;" + questions[j][1]['min'] + "&nbsp;&nbsp;";
document.getElementById(newloc + j.toString()).innerHTML += "<input type='range' min='" + questions[j][1]['min'] + "' max='" + questions[j][1]['max'] + "'>";
document.getElementById(newloc + j.toString()).innerHTML += "&nbsp;&nbsp;" + questions[j][1]['max'];
} else if (questions[j][1]['type'] == 'slider') {
document.getElementById(newloc + j.toString()).innerHTML += "&nbsp;&nbsp;" + questions[j][1]['min'] + "&nbsp;&nbsp;";
document.getElementById(newloc + j.toString()).innerHTML += "<input type='range' min='" + questions[j][1]['min'] + "' max='" + questions[j][1]['max'] + "'>";