Merge branch 'main' into pages

This commit is contained in:
Frank Knoll
2024-07-14 21:51:24 +02:00
9 changed files with 28217 additions and 361 deletions

View File

@@ -1,17 +1,21 @@
class BatchCodeSelectInitializer {
static initialize({ batchCodeSelectElement, batchCodeDetailsElement, batchCodeHeadingElement }) {
static initialize({ batchCodeSelectElement, urlSearchParam, batchCodeDetailsElement, batchCodeHeadingElement }) {
const batchCodeDetailsView = new BatchCodeDetailsView(batchCodeDetailsElement);
batchCodeSelectElement.select2({ minimumInputLength: 4 });
batchCodeSelectElement.on(
'select2:select',
function (event) {
BatchCodeSelectInitializer.#onBatchCodeSelected(
{
batchcode: event.params.data.id,
batchCodeHeadingElement: batchCodeHeadingElement,
batchCodeDetailsView: batchCodeDetailsView
});
Select2.initializeSelectElement(
{
selectElement: batchCodeSelectElement,
minimumInputLength: 4,
textOfOption2Select: urlSearchParam.get(),
onSelectOptionHavingValueAndText: (id, text) => {
BatchCodeSelectInitializer.#onBatchCodeSelected(
{
batchcode: id,
batchCodeHeadingElement: batchCodeHeadingElement,
batchCodeDetailsView: batchCodeDetailsView
});
urlSearchParam.set(text);
}
});
batchCodeSelectElement.select2('open');
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -5,29 +5,29 @@ class PageInitializer {
PageInitializer.#configureVaccine(vaccine);
}
static #configureSymptom({ symptomSelectElement, searchParam, prrByVaccineTableElement, downloadPrrByVaccineTableButton, keyColumnName }) {
static #configureSymptom({ symptomSelectElement, urlSearchParam, prrByVaccineTableElement, downloadPrrByVaccineTableButton, keyColumnName }) {
const prrByVaccineTableView = new PrrByVaccineTableView(prrByVaccineTableElement, downloadPrrByVaccineTableButton, keyColumnName);
Select2.initializeSelectElement(
{
selectElement: symptomSelectElement,
textOfOption2Select: searchParam.get(),
minimumInputLength: 0,
textOfOption2Select: urlSearchParam.get(),
onSelectOptionHavingValueAndText: (id, text) => {
prrByVaccineTableView.displayPrrByVaccineTable4Symptom(id, text);
searchParam.set(text);
},
minimumInputLength: 0
urlSearchParam.set(text);
}
});
}
static #configureVaccine({ vaccineSelectElement, searchParam, prrBySymptomTableElement, downloadPrrBySymptomTableButton, valueName }) {
static #configureVaccine({ vaccineSelectElement, urlSearchParam, prrBySymptomTableElement, downloadPrrBySymptomTableButton, valueName }) {
const prrBySymptomTableView = new PrrBySymptomTableView(prrBySymptomTableElement, downloadPrrBySymptomTableButton, valueName);
Select2.initializeSelectElement(
{
selectElement: vaccineSelectElement,
textOfOption2Select: searchParam.get(),
textOfOption2Select: urlSearchParam.get(),
onSelectOptionHavingValueAndText: (id, text) => {
prrBySymptomTableView.displayPrrBySymptomTable4Vaccine(id, text);
searchParam.set(text);
urlSearchParam.set(text);
},
minimumInputLength: 0
});

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
class SearchParam {
class URLSearchParam {
#name;

View File

@@ -1,13 +1,13 @@
class UrlUtils {
static isSearchParamYES(urlParams, searchParam) {
return UrlUtils.#getSearchParam(urlParams, searchParam, 'NO').toUpperCase() == 'YES';
static isSearchParamYES(urlParams, urlSearchParam) {
return UrlUtils.#getSearchParam(urlParams, urlSearchParam, 'NO').toUpperCase() == 'YES';
}
static getSearchParamOfCurrentUrl(searchParam) {
static getSearchParamOfCurrentUrl(urlSearchParam) {
return UrlUtils.#getSearchParam(
new URLSearchParams(window.location.search),
searchParam,
urlSearchParam,
null)
}
@@ -25,9 +25,9 @@ class UrlUtils {
a.click();
}
static #getSearchParam(urlParams, searchParam, defaultValue) {
return urlParams.has(searchParam) ?
urlParams.get(searchParam) :
static #getSearchParam(urlParams, urlSearchParam, defaultValue) {
return urlParams.has(urlSearchParam) ?
urlParams.get(urlSearchParam) :
defaultValue;
}

View File

@@ -4,8 +4,7 @@ Local:
- http://www.howbadismybatch.info/VaccineDistributionByZipcode.html
- http://www.howbadismybatch.info/SymptomsCausedByVaccines/index.html
http://www.howbadismybatch.info/SymptomsCausedByVaccines/test/index.test.html
- http://www.howbadismybatch.info/SymptomsCausedByCOVIDLots/index.html
http://www.howbadismybatch.info/SymptomsCausedByCOVIDLots/test/index.test.html
- http://www.howbadismybatch.info/SymptomsCausedByDrugs/index.html
Live:
- https://knollfrank.github.io/HowBadIsMyBatch/batchCodeTable.html
@@ -13,8 +12,7 @@ Live:
- https://knollfrank.github.io/HowBadIsMyBatch/VaccineDistributionByZipcode.html
- https://knollfrank.github.io/HowBadIsMyBatch/SymptomsCausedByVaccines/index.html
https://knollfrank.github.io/HowBadIsMyBatch/SymptomsCausedByVaccines/test/index.test.html
- https://knollfrank.github.io/HowBadIsMyBatch/SymptomsCausedByCOVIDLots/index.html
https://knollfrank.github.io/HowBadIsMyBatch/SymptomsCausedByCOVIDLots/test/index.test.html
- https://knollfrank.github.io/HowBadIsMyBatch/SymptomsCausedByDrugs/index.html
jupyter notebook