diff --git a/docs/GoogleAnalytics.js b/docs/GoogleAnalytics.js index a7ea83c1d53..f4d2aee8eef 100644 --- a/docs/GoogleAnalytics.js +++ b/docs/GoogleAnalytics.js @@ -1,35 +1,22 @@ class GoogleAnalytics { static click_batchcode(batchcode) { - gtag( - 'event', - 'click_batchcode', - { - 'batchcode': batchcode - }); + // FK-TODO: uncomment + // gtag( + // 'event', + // 'click_batchcode', + // { + // 'batchcode': batchcode + // }); } static view_search_results(search_term) { - gtag( - 'event', - 'view_search_results', - { - 'search_term': search_term - }); - } - - static countrySelected(country) { - gtag( - "event", - "select_item", - { - item_list_id: "countrySelect", - items: - [ - { - item_id: country, - } - ] - }); + // FK-TODO: uncomment + // gtag( + // 'event', + // 'view_search_results', + // { + // 'search_term': search_term + // }); } } diff --git a/docs/HistoDescrsProvider.js b/docs/HistoDescrsProvider.js index eda30dcd04d..55fa7469014 100644 --- a/docs/HistoDescrsProvider.js +++ b/docs/HistoDescrsProvider.js @@ -1,5 +1,6 @@ class HistoDescrsProvider { + // FK-TODO: remove country static getHistoDescrs(country, batchcode) { return fetch(`data/histograms/${country}/${batchcode}.json`) .then(response => response.json()) diff --git a/docs/HistogramView.js b/docs/HistogramView.js index 79863b44eb0..d928df0d7fa 100644 --- a/docs/HistogramView.js +++ b/docs/HistogramView.js @@ -6,6 +6,7 @@ class HistogramView { this.#uiContainer = uiContainer } + // FK-TODO: remove country displayHistogramView(country, batchcode) { this .#loadHistoDescrs(country, batchcode) diff --git a/docs/batchCodeTable.html b/docs/batchCodeTable.html index 4617b875e23..757278ddbee 100644 --- a/docs/batchCodeTable.html +++ b/docs/batchCodeTable.html @@ -1,100 +1,98 @@ + - - -Batch Codes of Coronavirus 2019 Vaccines - - - + + + + + + + + + + + + + + + -Fork me on GitHub -

Batch Codes of Coronavirus 2019 Vaccines

-

- -

-

-

-Check out your batch code (Last updated: March 31, 2023) + Fork me on GitHub +

Batch Codes of Coronavirus 2019 Vaccines

+

Global Batch Codes

+

+ Check out your batch code (Last updated: March 31, 2023)

- - - - - - - - - - - - - - - -
BatchAdverse Reaction ReportsDeathsDisabilitiesLife Threatening IllnessesCompanyCountriesSevere reportsLethality
-

Data Source: -Vaccine Adverse Event Reporting System + + + + + + + + + + + + + + +
BatchAdverse Reaction ReportsDeathsDisabilitiesLife Threatening IllnessesCompanySevere reportsLethality
+

Data Source: + Vaccine Adverse Event Reporting System (VAERS) -

- - + + \ No newline at end of file diff --git a/docs/batchCodeTable.js b/docs/batchCodeTable.js index aafbc5eaae6..2b2547cf9e1 100644 --- a/docs/batchCodeTable.js +++ b/docs/batchCodeTable.js @@ -1,30 +1,21 @@ class BatchCodeTableInitializer { - #heading; - #countrySelect; #batchCodeTableElement; #batchCodeTable; #columnSearch; - constructor({ heading, countrySelect, batchCodeTableElement }) { - this.#heading = heading; - this.#countrySelect = countrySelect; + constructor(batchCodeTableElement) { this.#batchCodeTableElement = batchCodeTableElement; } initialize() { this.#batchCodeTable = this.#createEmptyBatchCodeTable(); this.#columnSearch = new ColumnSearch(this.#batchCodeTable.column(this.#getColumnIndex('Company'))); - this.#countrySelect.addEventListener('change', event => this.#displayCountry()); - this.#displayCountry(); + this.#display(); this.#initializeHistogramView(); this.#trackSearchWithGoogleAnalytics(); } - #getCountry() { - return UIUtils.getSelectedOption(this.#countrySelect).value; - } - #createEmptyBatchCodeTable() { return this.#batchCodeTableElement.DataTable( { @@ -58,14 +49,13 @@ class BatchCodeTableInitializer { this.#getColumnIndex('Deaths'), this.#getColumnIndex('Disabilities'), this.#getColumnIndex('Life Threatening Illnesses'), - this.#getColumnIndex('Countries'), this.#getColumnIndex('Severe reports'), this.#getColumnIndex('Lethality') ] }, { orderable: false, - targets: [this.#getColumnIndex('Countries'), this.#getColumnIndex('Company')] + targets: [this.#getColumnIndex('Company')] }, { render: (data, type, row) => { @@ -94,19 +84,16 @@ class BatchCodeTableInitializer { return 5; case 'Company': return 6; - case 'Countries': - return 7; case 'Severe reports': - return 8; + return 7; case 'Lethality': - return 9; + return 8; } } - #displayCountry() { - this.#heading.textContent = this.#getCountry() == 'Global' ? 'Global Batch Codes' : `Batch Codes for ${this.#getCountry()}`; + #display() { // FK-TODO: show "Loading.." message or spinning wheel. - fetch(`data/batchCodeTables/${this.#getCountry()}.json`) + fetch(`data/batchCodeTables/Global.json`) .then(response => response.json()) .then(json => { this.#_addEmptyControlColumn(json); @@ -117,7 +104,6 @@ class BatchCodeTableInitializer { this.#columnSearch.columnContentUpdated(); this.#selectInput(); }); - GoogleAnalytics.countrySelected(this.#getCountry()); } #_addEmptyControlColumn(json) { @@ -155,7 +141,7 @@ class BatchCodeTableInitializer { row.child(uiContainer).show(); tr.addClass('shown'); const batchcode = row.data()[thisClassInstance.#getColumnIndex('Batch')]; - new HistogramView(uiContainer).displayHistogramView(thisClassInstance.#getCountry(), batchcode); + new HistogramView(uiContainer).displayHistogramView('Global', batchcode); GoogleAnalytics.click_batchcode(batchcode); } });