adding url params vaccine and symptom
This commit is contained in:
@@ -5,34 +5,25 @@ class PageInitializer {
|
||||
PageInitializer.#configureVaccine(vaccine);
|
||||
}
|
||||
|
||||
static #configureSymptom({ symptomSelectElement, prrByVaccineTableElement, downloadPrrByVaccineTableButton, keyColumnName }) {
|
||||
static #configureSymptom({ symptomSelectElement, selectSymptom, prrByVaccineTableElement, downloadPrrByVaccineTableButton, keyColumnName }) {
|
||||
const prrByVaccineTableView = new PrrByVaccineTableView(prrByVaccineTableElement, downloadPrrByVaccineTableButton, keyColumnName);
|
||||
PageInitializer.#initializeSelectElement(
|
||||
Select2.initializeSelectElement(
|
||||
{
|
||||
selectElement: symptomSelectElement,
|
||||
textOfOption2Select: selectSymptom,
|
||||
onValueSelected: (id, text) => prrByVaccineTableView.displayPrrByVaccineTable4Symptom(id, text),
|
||||
minimumInputLength: 0
|
||||
});
|
||||
}
|
||||
|
||||
static #configureVaccine({ vaccineSelectElement, prrBySymptomTableElement, downloadPrrBySymptomTableButton, valueName }) {
|
||||
static #configureVaccine({ vaccineSelectElement, selectVaccine, prrBySymptomTableElement, downloadPrrBySymptomTableButton, valueName }) {
|
||||
const prrBySymptomTableView = new PrrBySymptomTableView(prrBySymptomTableElement, downloadPrrBySymptomTableButton, valueName);
|
||||
PageInitializer.#initializeSelectElement(
|
||||
Select2.initializeSelectElement(
|
||||
{
|
||||
selectElement: vaccineSelectElement,
|
||||
onValueSelected: (id, text) => prrBySymptomTableView.displayPrrBySymptomTable4Vaccine(id ,text),
|
||||
textOfOption2Select: selectVaccine,
|
||||
onValueSelected: (id, text) => prrBySymptomTableView.displayPrrBySymptomTable4Vaccine(id, text),
|
||||
minimumInputLength: 0
|
||||
});
|
||||
}
|
||||
|
||||
static #initializeSelectElement({ selectElement, onValueSelected, minimumInputLength }) {
|
||||
selectElement.select2({ minimumInputLength: minimumInputLength });
|
||||
selectElement.on(
|
||||
'select2:select',
|
||||
function (event) {
|
||||
const id = event.params.data.id;
|
||||
const text = event.params.data.text;
|
||||
onValueSelected(id, text);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user