continuing to update UI

This commit is contained in:
frankknoll
2023-11-07 18:18:28 +01:00
parent 77e37685c4
commit 7ee238bd12
5 changed files with 10 additions and 9 deletions

View File

@@ -630,7 +630,8 @@
"updateHtmlFile(\n",
" symptoms = list(prrByLotAndSymptom.columns),\n",
" vaccines = list(prrByLotAndSymptom.index),\n",
" htmlFile = \"../docs/SymptomsCausedByCOVIDLots/index.html\")"
" htmlFile = \"../docs/SymptomsCausedByCOVIDLots/index.html\",\n",
" defaultSelectVaccineOptionText = 'Select Batch')"
]
},
{

View File

@@ -5,14 +5,14 @@ from SymptomsCausedByVaccines.HtmlUtils import getSymptomOptions, getVaccineOpti
from SymptomsCausedByVaccines.OptionsSetter import OptionsSetter
def updateHtmlFile(symptoms, vaccines, htmlFile):
def updateHtmlFile(symptoms, vaccines, htmlFile, defaultSelectVaccineOptionText = 'Select Vaccine'):
_saveOptions(
options = getSymptomOptions(symptoms),
htmlFile = htmlFile,
selectElementId = 'symptomSelect')
_saveOptions(
options = getVaccineOptions(vaccines),
options = getVaccineOptions(vaccines, defaultSelectVaccineOptionText),
htmlFile = htmlFile,
selectElementId = 'vaccineSelect')

View File

@@ -1,5 +1,5 @@
def getVaccineOptions(vaccines):
return _getOptionsWithDefaultOption(defaultOptionText = 'Select Vaccine', values = vaccines)
def getVaccineOptions(vaccines, defaultOptionText):
return _getOptionsWithDefaultOption(defaultOptionText = defaultOptionText, values = vaccines)
def getSymptomOptions(symptoms):