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

@@ -9,14 +9,14 @@
<meta content="width=device-width, initial-scale=1.0" name="viewport" /> <meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>Safety Signals for COVID Batches</title> <title>Safety Signals for COVID Batches</title>
<!-- Google tag (gtag.js) --> <!-- Google tag (gtag.js) -->
<!-- <script async="" src="https://www.googletagmanager.com/gtag/js?id=G-ERHYDH4P64"></script> <script async="" src="https://www.googletagmanager.com/gtag/js?id=G-ERHYDH4P64"></script>
<script> <script>
window.dataLayer = window.dataLayer || []; window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); } function gtag() { dataLayer.push(arguments); }
gtag('js', new Date()); gtag('js', new Date());
gtag('config', 'G-ERHYDH4P64'); gtag('config', 'G-ERHYDH4P64');
</script> --> </script>
<!-- Bootstrap --> <!-- Bootstrap -->
<link href="../gentelella/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" /> <link href="../gentelella/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://cdn.datatables.net/1.13.1/css/jquery.dataTables.css" rel="stylesheet" type="text/css" /> <link href="https://cdn.datatables.net/1.13.1/css/jquery.dataTables.css" rel="stylesheet" type="text/css" />
@@ -13286,7 +13286,7 @@
<div style="margin-bottom: 20px;"> <div style="margin-bottom: 20px;">
<label>Select Batch:</label> <label>Select Batch:</label>
<select id="vaccineSelect" name="vaccine"> <select id="vaccineSelect" name="vaccine">
<option disabled="" hidden="" selected="" value="">Select Vaccine</option> <option disabled="" hidden="" selected="" value="">Select Batch</option>
<option value="001A21A">001A21A</option> <option value="001A21A">001A21A</option>
<option value="001B21A">001B21A</option> <option value="001B21A">001B21A</option>
<option value="001C21A">001C21A</option> <option value="001C21A">001C21A</option>

View File

@@ -6,7 +6,7 @@ class PrrBySymptomTableView {
this.#delegate = new PrrByKeyTableView( this.#delegate = new PrrByKeyTableView(
this.#createPrrBySymptomTable(prrBySymptomTableElement), this.#createPrrBySymptomTable(prrBySymptomTableElement),
downloadPrrBySymptomTableButton, downloadPrrBySymptomTableButton,
'Vaccine', 'Batch',
PrrByVaccineProvider.getPrrBySymptom); PrrByVaccineProvider.getPrrBySymptom);
} }

View File

@@ -630,7 +630,8 @@
"updateHtmlFile(\n", "updateHtmlFile(\n",
" symptoms = list(prrByLotAndSymptom.columns),\n", " symptoms = list(prrByLotAndSymptom.columns),\n",
" vaccines = list(prrByLotAndSymptom.index),\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 from SymptomsCausedByVaccines.OptionsSetter import OptionsSetter
def updateHtmlFile(symptoms, vaccines, htmlFile): def updateHtmlFile(symptoms, vaccines, htmlFile, defaultSelectVaccineOptionText = 'Select Vaccine'):
_saveOptions( _saveOptions(
options = getSymptomOptions(symptoms), options = getSymptomOptions(symptoms),
htmlFile = htmlFile, htmlFile = htmlFile,
selectElementId = 'symptomSelect') selectElementId = 'symptomSelect')
_saveOptions( _saveOptions(
options = getVaccineOptions(vaccines), options = getVaccineOptions(vaccines, defaultSelectVaccineOptionText),
htmlFile = htmlFile, htmlFile = htmlFile,
selectElementId = 'vaccineSelect') selectElementId = 'vaccineSelect')

View File

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