Merge branch 'main' into pages
This commit is contained in:
@@ -1,17 +1,21 @@
|
|||||||
class BatchCodeSelectInitializer {
|
class BatchCodeSelectInitializer {
|
||||||
|
|
||||||
static initialize({ batchCodeSelectElement, batchCodeDetailsElement, batchCodeHeadingElement }) {
|
static initialize({ batchCodeSelectElement, urlSearchParam, batchCodeDetailsElement, batchCodeHeadingElement }) {
|
||||||
const batchCodeDetailsView = new BatchCodeDetailsView(batchCodeDetailsElement);
|
const batchCodeDetailsView = new BatchCodeDetailsView(batchCodeDetailsElement);
|
||||||
batchCodeSelectElement.select2({ minimumInputLength: 4 });
|
Select2.initializeSelectElement(
|
||||||
batchCodeSelectElement.on(
|
{
|
||||||
'select2:select',
|
selectElement: batchCodeSelectElement,
|
||||||
function (event) {
|
minimumInputLength: 4,
|
||||||
BatchCodeSelectInitializer.#onBatchCodeSelected(
|
textOfOption2Select: urlSearchParam.get(),
|
||||||
{
|
onSelectOptionHavingValueAndText: (id, text) => {
|
||||||
batchcode: event.params.data.id,
|
BatchCodeSelectInitializer.#onBatchCodeSelected(
|
||||||
batchCodeHeadingElement: batchCodeHeadingElement,
|
{
|
||||||
batchCodeDetailsView: batchCodeDetailsView
|
batchcode: id,
|
||||||
});
|
batchCodeHeadingElement: batchCodeHeadingElement,
|
||||||
|
batchCodeDetailsView: batchCodeDetailsView
|
||||||
|
});
|
||||||
|
urlSearchParam.set(text);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
batchCodeSelectElement.select2('open');
|
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
@@ -5,29 +5,29 @@ class PageInitializer {
|
|||||||
PageInitializer.#configureVaccine(vaccine);
|
PageInitializer.#configureVaccine(vaccine);
|
||||||
}
|
}
|
||||||
|
|
||||||
static #configureSymptom({ symptomSelectElement, searchParam, prrByVaccineTableElement, downloadPrrByVaccineTableButton, keyColumnName }) {
|
static #configureSymptom({ symptomSelectElement, urlSearchParam, prrByVaccineTableElement, downloadPrrByVaccineTableButton, keyColumnName }) {
|
||||||
const prrByVaccineTableView = new PrrByVaccineTableView(prrByVaccineTableElement, downloadPrrByVaccineTableButton, keyColumnName);
|
const prrByVaccineTableView = new PrrByVaccineTableView(prrByVaccineTableElement, downloadPrrByVaccineTableButton, keyColumnName);
|
||||||
Select2.initializeSelectElement(
|
Select2.initializeSelectElement(
|
||||||
{
|
{
|
||||||
selectElement: symptomSelectElement,
|
selectElement: symptomSelectElement,
|
||||||
textOfOption2Select: searchParam.get(),
|
minimumInputLength: 0,
|
||||||
|
textOfOption2Select: urlSearchParam.get(),
|
||||||
onSelectOptionHavingValueAndText: (id, text) => {
|
onSelectOptionHavingValueAndText: (id, text) => {
|
||||||
prrByVaccineTableView.displayPrrByVaccineTable4Symptom(id, text);
|
prrByVaccineTableView.displayPrrByVaccineTable4Symptom(id, text);
|
||||||
searchParam.set(text);
|
urlSearchParam.set(text);
|
||||||
},
|
}
|
||||||
minimumInputLength: 0
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static #configureVaccine({ vaccineSelectElement, searchParam, prrBySymptomTableElement, downloadPrrBySymptomTableButton, valueName }) {
|
static #configureVaccine({ vaccineSelectElement, urlSearchParam, prrBySymptomTableElement, downloadPrrBySymptomTableButton, valueName }) {
|
||||||
const prrBySymptomTableView = new PrrBySymptomTableView(prrBySymptomTableElement, downloadPrrBySymptomTableButton, valueName);
|
const prrBySymptomTableView = new PrrBySymptomTableView(prrBySymptomTableElement, downloadPrrBySymptomTableButton, valueName);
|
||||||
Select2.initializeSelectElement(
|
Select2.initializeSelectElement(
|
||||||
{
|
{
|
||||||
selectElement: vaccineSelectElement,
|
selectElement: vaccineSelectElement,
|
||||||
textOfOption2Select: searchParam.get(),
|
textOfOption2Select: urlSearchParam.get(),
|
||||||
onSelectOptionHavingValueAndText: (id, text) => {
|
onSelectOptionHavingValueAndText: (id, text) => {
|
||||||
prrBySymptomTableView.displayPrrBySymptomTable4Vaccine(id, text);
|
prrBySymptomTableView.displayPrrBySymptomTable4Vaccine(id, text);
|
||||||
searchParam.set(text);
|
urlSearchParam.set(text);
|
||||||
},
|
},
|
||||||
minimumInputLength: 0
|
minimumInputLength: 0
|
||||||
});
|
});
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
|||||||
class SearchParam {
|
class URLSearchParam {
|
||||||
|
|
||||||
#name;
|
#name;
|
||||||
|
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
class UrlUtils {
|
class UrlUtils {
|
||||||
|
|
||||||
static isSearchParamYES(urlParams, searchParam) {
|
static isSearchParamYES(urlParams, urlSearchParam) {
|
||||||
return UrlUtils.#getSearchParam(urlParams, searchParam, 'NO').toUpperCase() == 'YES';
|
return UrlUtils.#getSearchParam(urlParams, urlSearchParam, 'NO').toUpperCase() == 'YES';
|
||||||
}
|
}
|
||||||
|
|
||||||
static getSearchParamOfCurrentUrl(searchParam) {
|
static getSearchParamOfCurrentUrl(urlSearchParam) {
|
||||||
return UrlUtils.#getSearchParam(
|
return UrlUtils.#getSearchParam(
|
||||||
new URLSearchParams(window.location.search),
|
new URLSearchParams(window.location.search),
|
||||||
searchParam,
|
urlSearchParam,
|
||||||
null)
|
null)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,9 +25,9 @@ class UrlUtils {
|
|||||||
a.click();
|
a.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
static #getSearchParam(urlParams, searchParam, defaultValue) {
|
static #getSearchParam(urlParams, urlSearchParam, defaultValue) {
|
||||||
return urlParams.has(searchParam) ?
|
return urlParams.has(urlSearchParam) ?
|
||||||
urlParams.get(searchParam) :
|
urlParams.get(urlSearchParam) :
|
||||||
defaultValue;
|
defaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ Local:
|
|||||||
- http://www.howbadismybatch.info/VaccineDistributionByZipcode.html
|
- http://www.howbadismybatch.info/VaccineDistributionByZipcode.html
|
||||||
- http://www.howbadismybatch.info/SymptomsCausedByVaccines/index.html
|
- http://www.howbadismybatch.info/SymptomsCausedByVaccines/index.html
|
||||||
http://www.howbadismybatch.info/SymptomsCausedByVaccines/test/index.test.html
|
http://www.howbadismybatch.info/SymptomsCausedByVaccines/test/index.test.html
|
||||||
- http://www.howbadismybatch.info/SymptomsCausedByCOVIDLots/index.html
|
- http://www.howbadismybatch.info/SymptomsCausedByDrugs/index.html
|
||||||
http://www.howbadismybatch.info/SymptomsCausedByCOVIDLots/test/index.test.html
|
|
||||||
|
|
||||||
Live:
|
Live:
|
||||||
- https://knollfrank.github.io/HowBadIsMyBatch/batchCodeTable.html
|
- https://knollfrank.github.io/HowBadIsMyBatch/batchCodeTable.html
|
||||||
@@ -13,8 +12,7 @@ Live:
|
|||||||
- https://knollfrank.github.io/HowBadIsMyBatch/VaccineDistributionByZipcode.html
|
- https://knollfrank.github.io/HowBadIsMyBatch/VaccineDistributionByZipcode.html
|
||||||
- https://knollfrank.github.io/HowBadIsMyBatch/SymptomsCausedByVaccines/index.html
|
- https://knollfrank.github.io/HowBadIsMyBatch/SymptomsCausedByVaccines/index.html
|
||||||
https://knollfrank.github.io/HowBadIsMyBatch/SymptomsCausedByVaccines/test/index.test.html
|
https://knollfrank.github.io/HowBadIsMyBatch/SymptomsCausedByVaccines/test/index.test.html
|
||||||
- https://knollfrank.github.io/HowBadIsMyBatch/SymptomsCausedByCOVIDLots/index.html
|
- https://knollfrank.github.io/HowBadIsMyBatch/SymptomsCausedByDrugs/index.html
|
||||||
https://knollfrank.github.io/HowBadIsMyBatch/SymptomsCausedByCOVIDLots/test/index.test.html
|
|
||||||
|
|
||||||
jupyter notebook
|
jupyter notebook
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user