diff --git a/.env b/.env index dd963c1..8759a76 100644 --- a/.env +++ b/.env @@ -2,4 +2,4 @@ BROWSER=false PORT=8081 SKIP_PREFLIGHT_CHECK=true REACT_APP_DHIS2_BASE_URL=https://dev.eyeseetea.com/who-dev-236/ -REACT_APP_DHIS2_AUTH=ignacio.foche:PASSWORD +REACT_APP_DHIS2_AUTH=USER:PASSWORD diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..bf79505 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v16.14.0 diff --git a/i18n/de.po b/i18n/de.po index a4fa394..5fd9110 100644 --- a/i18n/de.po +++ b/i18n/de.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2021-10-22T05:36:29.610Z\n" +"POT-Creation-Date: 2022-08-26T08:44:22.342Z\n" "PO-Revision-Date: 2019-08-07T14:26:49.235Z\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -11,7 +11,10 @@ msgstr "" msgid "National Health Workforce Accounts Online Data Platform" msgstr "" -msgid "NHWA Data Managers and NHWA Admins" +msgid "NHWA Admins" +msgstr "" + +msgid "NHWA Data Managers" msgstr "" msgid "NHWA Data Clerks" @@ -47,6 +50,15 @@ msgstr "" msgid "Landing Page for MoH Kenya" msgstr "" +msgid "International Projects" +msgstr "" + +msgid "Landing Page for International Projects" +msgstr "" + +msgid "Eastern Mediterranean regional malaria repository" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -73,6 +85,99 @@ msgstr "" msgid "Manage notifications" msgstr "" +msgid "" +"Malaria endemic countries in the region are invited to upload a subset of " +"their malaria related data (by district and month) into this DHIS2 instance." +msgstr "" + +msgid "" +"Some countries are already implementing DHIS2 for their routine HMIS and " +"have already adopted the malaria modules. These countries can ready link the " +"two systems. Others are using other HMIS systems and will need to use the " +"Bulk Load app to load the data." +msgstr "" + +msgid "Conducting surveillance workshops" +msgstr "" + +msgid "This will permit exercises based on real country data" +msgstr "" + +msgid "Peer Reviews" +msgstr "" + +msgid "Annual sub-national data submission" +msgstr "" + +msgid "" +"We could pre-generate the WMR sub-national data form with data aggregated " +"annually at the district level" +msgstr "" + +msgid "" +"You would then download the pre-filled form and complete the missing " +"variables" +msgstr "" + +msgid "World Malaria Report submission" +msgstr "" + +msgid "Pre-fill a subset of national WMR variables" +msgstr "" + +msgid "Data reviews" +msgstr "" + +msgid "Surveillance support and data validation throughout the yearn" +msgstr "" + +msgid "Validation checks against sub-national totals" +msgstr "" + +msgid "" +"The WHO Malaria Data Quality (DQ) dashboard is an addendum to the Burden " +"Reduction aggregate package." +msgstr "" + +msgid "Burden Reduction Dashboard" +msgstr "" + +msgid "Data Quality Dashboard" +msgstr "" + +msgid "WHO Data Quality App" +msgstr "" + +msgid "" +"WHO Data Quality Tool for DHIS2, based on the WHO Data Quality Framework." +msgstr "" + +msgid "Bulk Load" +msgstr "" + +msgid "" +"The Bulk Load is an application designed to ease the import of data using " +"Microsoft Excel. It generates templates (an Excel sheet) from datasets and " +"programs, and imports data directly from those templates." +msgstr "" + +msgid "Malaria Case Surveillance Tracker" +msgstr "" + +msgid "" +"As countries progress towards malaria elimination, the aim of surveillance " +"is to detect all malaria cases; investigate every confirmed malaria case; " +"identify the likely location of an infection in order to direct actions to " +"interrupt transmission and to ensure that each detected case is promptly " +"treated and monitored to prevent secondary infection. An ideal surveillance " +"information system for malaria elimination includes rapid and complete case " +"reporting, central data storage and management, automated data analysis, and " +"customized outputs and feedback that lead to timely and targeted responses. " +"The DHIS2 tracker package for malaria case surveillance and foci " +"investigation is an aid for malaria surveillance in burden reduction and " +"elimination settings." +msgstr "" + msgid "Data" msgstr "Daten" @@ -119,6 +224,15 @@ msgstr "Gehen Sie zurück zur Startseite" msgid "Programme" msgstr "Programm" +msgid "Data Monitoring Tool" +msgstr "" + +msgid "EFH" +msgstr "" + +msgid "Tracker Capture" +msgstr "" + msgid "NHWA maturity assessment" msgstr "" @@ -294,13 +408,16 @@ msgstr "" msgid "Enter data on the snakebite data entry" msgstr "" -msgid "User guide" +msgid "LOG OUT" msgstr "" -msgid "Logout" +msgid "Eastern Mediterranian Regional Malaria Repository" msgstr "" -msgid "LOG OUT" +msgid "User guide" +msgstr "" + +msgid "Logout" msgstr "" msgid "World Health Organization" diff --git a/i18n/en.pot b/i18n/en.pot index 411e953..a9d1509 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,13 +5,16 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2021-10-22T05:36:29.610Z\n" -"PO-Revision-Date: 2021-10-22T05:36:29.610Z\n" +"POT-Creation-Date: 2022-08-26T08:44:22.342Z\n" +"PO-Revision-Date: 2022-08-26T08:44:22.342Z\n" msgid "National Health Workforce Accounts Online Data Platform" msgstr "" -msgid "NHWA Data Managers and NHWA Admins" +msgid "NHWA Admins" +msgstr "" + +msgid "NHWA Data Managers" msgstr "" msgid "NHWA Data Clerks" @@ -47,6 +50,15 @@ msgstr "" msgid "Landing Page for MoH Kenya" msgstr "" +msgid "International Projects" +msgstr "" + +msgid "Landing Page for International Projects" +msgstr "" + +msgid "Eastern Mediterranean regional malaria repository" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -71,6 +83,98 @@ msgstr "" msgid "Manage notifications" msgstr "" +msgid "" +"Malaria endemic countries in the region are invited to upload a subset of " +"their malaria related data (by district and month) into this DHIS2 instance." +msgstr "" + +msgid "" +"Some countries are already implementing DHIS2 for their routine HMIS and " +"have already adopted the malaria modules. These countries can ready link " +"the two systems. Others are using other HMIS systems and will need to use " +"the Bulk Load app to load the data." +msgstr "" + +msgid "Conducting surveillance workshops" +msgstr "" + +msgid "This will permit exercises based on real country data" +msgstr "" + +msgid "Peer Reviews" +msgstr "" + +msgid "Annual sub-national data submission" +msgstr "" + +msgid "" +"We could pre-generate the WMR sub-national data form with data aggregated " +"annually at the district level" +msgstr "" + +msgid "" +"You would then download the pre-filled form and complete the missing " +"variables" +msgstr "" + +msgid "World Malaria Report submission" +msgstr "" + +msgid "Pre-fill a subset of national WMR variables" +msgstr "" + +msgid "Data reviews" +msgstr "" + +msgid "Surveillance support and data validation throughout the yearn" +msgstr "" + +msgid "Validation checks against sub-national totals" +msgstr "" + +msgid "" +"The WHO Malaria Data Quality (DQ) dashboard is an addendum to the Burden " +"Reduction aggregate package." +msgstr "" + +msgid "Burden Reduction Dashboard" +msgstr "" + +msgid "Data Quality Dashboard" +msgstr "" + +msgid "WHO Data Quality App" +msgstr "" + +msgid "WHO Data Quality Tool for DHIS2, based on the WHO Data Quality Framework." +msgstr "" + +msgid "Bulk Load" +msgstr "" + +msgid "" +"The Bulk Load is an application designed to ease the import of data using " +"Microsoft Excel. It generates templates (an Excel sheet) from datasets and " +"programs, and imports data directly from those templates." +msgstr "" + +msgid "Malaria Case Surveillance Tracker" +msgstr "" + +msgid "" +"As countries progress towards malaria elimination, the aim of surveillance " +"is to detect all malaria cases; investigate every confirmed malaria case; " +"identify the likely location of an infection in order to direct actions to " +"interrupt transmission and to ensure that each detected case is promptly " +"treated and monitored to prevent secondary infection. An ideal surveillance " +"information system for malaria elimination includes rapid and complete case " +"reporting, central data storage and management, automated data analysis, " +"and customized outputs and feedback that lead to timely and targeted " +"responses. The DHIS2 tracker package for malaria case surveillance and foci " +"investigation is an aid for malaria surveillance in burden reduction and " +"elimination settings." +msgstr "" + msgid "Data" msgstr "" @@ -113,6 +217,15 @@ msgstr "" msgid "Programme" msgstr "" +msgid "Data Monitoring Tool" +msgstr "" + +msgid "EFH" +msgstr "" + +msgid "Tracker Capture" +msgstr "" + msgid "NHWA maturity assessment" msgstr "" @@ -288,13 +401,16 @@ msgstr "" msgid "Enter data on the snakebite data entry" msgstr "" -msgid "User guide" +msgid "LOG OUT" msgstr "" -msgid "Logout" +msgid "Eastern Mediterranian Regional Malaria Repository" msgstr "" -msgid "LOG OUT" +msgid "User guide" +msgstr "" + +msgid "Logout" msgstr "" msgid "World Health Organization" diff --git a/i18n/es.po b/i18n/es.po index c011be2..bdcbb69 100644 --- a/i18n/es.po +++ b/i18n/es.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2021-10-22T05:36:29.610Z\n" +"POT-Creation-Date: 2022-08-26T08:44:22.342Z\n" "PO-Revision-Date: 2019-08-07T14:26:49.235Z\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -11,7 +11,10 @@ msgstr "" msgid "National Health Workforce Accounts Online Data Platform" msgstr "" -msgid "NHWA Data Managers and NHWA Admins" +msgid "NHWA Admins" +msgstr "" + +msgid "NHWA Data Managers" msgstr "" msgid "NHWA Data Clerks" @@ -47,6 +50,15 @@ msgstr "" msgid "Landing Page for MoH Kenya" msgstr "" +msgid "International Projects" +msgstr "" + +msgid "Landing Page for International Projects" +msgstr "" + +msgid "Eastern Mediterranean regional malaria repository" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -72,6 +84,99 @@ msgstr "" msgid "Manage notifications" msgstr "" +msgid "" +"Malaria endemic countries in the region are invited to upload a subset of " +"their malaria related data (by district and month) into this DHIS2 instance." +msgstr "" + +msgid "" +"Some countries are already implementing DHIS2 for their routine HMIS and " +"have already adopted the malaria modules. These countries can ready link the " +"two systems. Others are using other HMIS systems and will need to use the " +"Bulk Load app to load the data." +msgstr "" + +msgid "Conducting surveillance workshops" +msgstr "" + +msgid "This will permit exercises based on real country data" +msgstr "" + +msgid "Peer Reviews" +msgstr "" + +msgid "Annual sub-national data submission" +msgstr "" + +msgid "" +"We could pre-generate the WMR sub-national data form with data aggregated " +"annually at the district level" +msgstr "" + +msgid "" +"You would then download the pre-filled form and complete the missing " +"variables" +msgstr "" + +msgid "World Malaria Report submission" +msgstr "" + +msgid "Pre-fill a subset of national WMR variables" +msgstr "" + +msgid "Data reviews" +msgstr "" + +msgid "Surveillance support and data validation throughout the yearn" +msgstr "" + +msgid "Validation checks against sub-national totals" +msgstr "" + +msgid "" +"The WHO Malaria Data Quality (DQ) dashboard is an addendum to the Burden " +"Reduction aggregate package." +msgstr "" + +msgid "Burden Reduction Dashboard" +msgstr "" + +msgid "Data Quality Dashboard" +msgstr "" + +msgid "WHO Data Quality App" +msgstr "" + +msgid "" +"WHO Data Quality Tool for DHIS2, based on the WHO Data Quality Framework." +msgstr "" + +msgid "Bulk Load" +msgstr "" + +msgid "" +"The Bulk Load is an application designed to ease the import of data using " +"Microsoft Excel. It generates templates (an Excel sheet) from datasets and " +"programs, and imports data directly from those templates." +msgstr "" + +msgid "Malaria Case Surveillance Tracker" +msgstr "" + +msgid "" +"As countries progress towards malaria elimination, the aim of surveillance " +"is to detect all malaria cases; investigate every confirmed malaria case; " +"identify the likely location of an infection in order to direct actions to " +"interrupt transmission and to ensure that each detected case is promptly " +"treated and monitored to prevent secondary infection. An ideal surveillance " +"information system for malaria elimination includes rapid and complete case " +"reporting, central data storage and management, automated data analysis, and " +"customized outputs and feedback that lead to timely and targeted responses. " +"The DHIS2 tracker package for malaria case surveillance and foci " +"investigation is an aid for malaria surveillance in burden reduction and " +"elimination settings." +msgstr "" + msgid "Data" msgstr "Datos" @@ -114,6 +219,15 @@ msgstr "Volver a la página principal" msgid "Programme" msgstr "Programa" +msgid "Data Monitoring Tool" +msgstr "" + +msgid "EFH" +msgstr "" + +msgid "Tracker Capture" +msgstr "" + msgid "NHWA maturity assessment" msgstr "" @@ -289,13 +403,16 @@ msgstr "" msgid "Enter data on the snakebite data entry" msgstr "" -msgid "User guide" +msgid "LOG OUT" msgstr "" -msgid "Logout" +msgid "Eastern Mediterranian Regional Malaria Repository" msgstr "" -msgid "LOG OUT" +msgid "User guide" +msgstr "" + +msgid "Logout" msgstr "" msgid "World Health Organization" diff --git a/i18n/fr.po b/i18n/fr.po index 91214d0..5d1b5b2 100644 --- a/i18n/fr.po +++ b/i18n/fr.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2021-10-22T05:36:29.610Z\n" +"POT-Creation-Date: 2022-08-26T08:44:22.342Z\n" "PO-Revision-Date: 2019-08-07T14:26:49.235Z\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -11,7 +11,10 @@ msgstr "" msgid "National Health Workforce Accounts Online Data Platform" msgstr "" -msgid "NHWA Data Managers and NHWA Admins" +msgid "NHWA Admins" +msgstr "" + +msgid "NHWA Data Managers" msgstr "" msgid "NHWA Data Clerks" @@ -47,6 +50,15 @@ msgstr "" msgid "Landing Page for MoH Kenya" msgstr "" +msgid "International Projects" +msgstr "" + +msgid "Landing Page for International Projects" +msgstr "" + +msgid "Eastern Mediterranean regional malaria repository" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -72,6 +84,99 @@ msgstr "" msgid "Manage notifications" msgstr "" +msgid "" +"Malaria endemic countries in the region are invited to upload a subset of " +"their malaria related data (by district and month) into this DHIS2 instance." +msgstr "" + +msgid "" +"Some countries are already implementing DHIS2 for their routine HMIS and " +"have already adopted the malaria modules. These countries can ready link the " +"two systems. Others are using other HMIS systems and will need to use the " +"Bulk Load app to load the data." +msgstr "" + +msgid "Conducting surveillance workshops" +msgstr "" + +msgid "This will permit exercises based on real country data" +msgstr "" + +msgid "Peer Reviews" +msgstr "" + +msgid "Annual sub-national data submission" +msgstr "" + +msgid "" +"We could pre-generate the WMR sub-national data form with data aggregated " +"annually at the district level" +msgstr "" + +msgid "" +"You would then download the pre-filled form and complete the missing " +"variables" +msgstr "" + +msgid "World Malaria Report submission" +msgstr "" + +msgid "Pre-fill a subset of national WMR variables" +msgstr "" + +msgid "Data reviews" +msgstr "" + +msgid "Surveillance support and data validation throughout the yearn" +msgstr "" + +msgid "Validation checks against sub-national totals" +msgstr "" + +msgid "" +"The WHO Malaria Data Quality (DQ) dashboard is an addendum to the Burden " +"Reduction aggregate package." +msgstr "" + +msgid "Burden Reduction Dashboard" +msgstr "" + +msgid "Data Quality Dashboard" +msgstr "" + +msgid "WHO Data Quality App" +msgstr "" + +msgid "" +"WHO Data Quality Tool for DHIS2, based on the WHO Data Quality Framework." +msgstr "" + +msgid "Bulk Load" +msgstr "" + +msgid "" +"The Bulk Load is an application designed to ease the import of data using " +"Microsoft Excel. It generates templates (an Excel sheet) from datasets and " +"programs, and imports data directly from those templates." +msgstr "" + +msgid "Malaria Case Surveillance Tracker" +msgstr "" + +msgid "" +"As countries progress towards malaria elimination, the aim of surveillance " +"is to detect all malaria cases; investigate every confirmed malaria case; " +"identify the likely location of an infection in order to direct actions to " +"interrupt transmission and to ensure that each detected case is promptly " +"treated and monitored to prevent secondary infection. An ideal surveillance " +"information system for malaria elimination includes rapid and complete case " +"reporting, central data storage and management, automated data analysis, and " +"customized outputs and feedback that lead to timely and targeted responses. " +"The DHIS2 tracker package for malaria case surveillance and foci " +"investigation is an aid for malaria surveillance in burden reduction and " +"elimination settings." +msgstr "" + msgid "Data" msgstr "Données" @@ -115,6 +220,15 @@ msgstr "Retournez à la page d'accueil" msgid "Programme" msgstr "Programme" +msgid "Data Monitoring Tool" +msgstr "" + +msgid "EFH" +msgstr "" + +msgid "Tracker Capture" +msgstr "" + msgid "NHWA maturity assessment" msgstr "" @@ -290,13 +404,16 @@ msgstr "" msgid "Enter data on the snakebite data entry" msgstr "" -msgid "User guide" +msgid "LOG OUT" msgstr "" -msgid "Logout" +msgid "Eastern Mediterranian Regional Malaria Repository" msgstr "" -msgid "LOG OUT" +msgid "User guide" +msgstr "" + +msgid "Logout" msgstr "" msgid "World Health Organization" diff --git a/i18n/it.po b/i18n/it.po index 34ffc61..d522c33 100644 --- a/i18n/it.po +++ b/i18n/it.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2021-10-22T05:36:29.610Z\n" +"POT-Creation-Date: 2022-08-26T08:44:22.342Z\n" "PO-Revision-Date: 2019-08-07T14:26:49.235Z\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -11,7 +11,10 @@ msgstr "" msgid "National Health Workforce Accounts Online Data Platform" msgstr "" -msgid "NHWA Data Managers and NHWA Admins" +msgid "NHWA Admins" +msgstr "" + +msgid "NHWA Data Managers" msgstr "" msgid "NHWA Data Clerks" @@ -47,6 +50,15 @@ msgstr "" msgid "Landing Page for MoH Kenya" msgstr "" +msgid "International Projects" +msgstr "" + +msgid "Landing Page for International Projects" +msgstr "" + +msgid "Eastern Mediterranean regional malaria repository" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -73,6 +85,99 @@ msgstr "" msgid "Manage notifications" msgstr "" +msgid "" +"Malaria endemic countries in the region are invited to upload a subset of " +"their malaria related data (by district and month) into this DHIS2 instance." +msgstr "" + +msgid "" +"Some countries are already implementing DHIS2 for their routine HMIS and " +"have already adopted the malaria modules. These countries can ready link the " +"two systems. Others are using other HMIS systems and will need to use the " +"Bulk Load app to load the data." +msgstr "" + +msgid "Conducting surveillance workshops" +msgstr "" + +msgid "This will permit exercises based on real country data" +msgstr "" + +msgid "Peer Reviews" +msgstr "" + +msgid "Annual sub-national data submission" +msgstr "" + +msgid "" +"We could pre-generate the WMR sub-national data form with data aggregated " +"annually at the district level" +msgstr "" + +msgid "" +"You would then download the pre-filled form and complete the missing " +"variables" +msgstr "" + +msgid "World Malaria Report submission" +msgstr "" + +msgid "Pre-fill a subset of national WMR variables" +msgstr "" + +msgid "Data reviews" +msgstr "" + +msgid "Surveillance support and data validation throughout the yearn" +msgstr "" + +msgid "Validation checks against sub-national totals" +msgstr "" + +msgid "" +"The WHO Malaria Data Quality (DQ) dashboard is an addendum to the Burden " +"Reduction aggregate package." +msgstr "" + +msgid "Burden Reduction Dashboard" +msgstr "" + +msgid "Data Quality Dashboard" +msgstr "" + +msgid "WHO Data Quality App" +msgstr "" + +msgid "" +"WHO Data Quality Tool for DHIS2, based on the WHO Data Quality Framework." +msgstr "" + +msgid "Bulk Load" +msgstr "" + +msgid "" +"The Bulk Load is an application designed to ease the import of data using " +"Microsoft Excel. It generates templates (an Excel sheet) from datasets and " +"programs, and imports data directly from those templates." +msgstr "" + +msgid "Malaria Case Surveillance Tracker" +msgstr "" + +msgid "" +"As countries progress towards malaria elimination, the aim of surveillance " +"is to detect all malaria cases; investigate every confirmed malaria case; " +"identify the likely location of an infection in order to direct actions to " +"interrupt transmission and to ensure that each detected case is promptly " +"treated and monitored to prevent secondary infection. An ideal surveillance " +"information system for malaria elimination includes rapid and complete case " +"reporting, central data storage and management, automated data analysis, and " +"customized outputs and feedback that lead to timely and targeted responses. " +"The DHIS2 tracker package for malaria case surveillance and foci " +"investigation is an aid for malaria surveillance in burden reduction and " +"elimination settings." +msgstr "" + msgid "Data" msgstr "Dati" @@ -116,6 +221,15 @@ msgstr "Torna alla home page" msgid "Programme" msgstr "Programma" +msgid "Data Monitoring Tool" +msgstr "" + +msgid "EFH" +msgstr "" + +msgid "Tracker Capture" +msgstr "" + msgid "NHWA maturity assessment" msgstr "" @@ -291,13 +405,16 @@ msgstr "" msgid "Enter data on the snakebite data entry" msgstr "" -msgid "User guide" +msgid "LOG OUT" msgstr "" -msgid "Logout" +msgid "Eastern Mediterranian Regional Malaria Repository" msgstr "" -msgid "LOG OUT" +msgid "User guide" +msgstr "" + +msgid "Logout" msgstr "" msgid "World Health Organization" diff --git a/i18n/pt.po b/i18n/pt.po index 559d94e..2db7e16 100644 --- a/i18n/pt.po +++ b/i18n/pt.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2021-10-22T05:36:29.610Z\n" +"POT-Creation-Date: 2022-08-26T08:44:22.342Z\n" "PO-Revision-Date: 2019-08-07T14:26:49.235Z\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -11,7 +11,10 @@ msgstr "" msgid "National Health Workforce Accounts Online Data Platform" msgstr "" -msgid "NHWA Data Managers and NHWA Admins" +msgid "NHWA Admins" +msgstr "" + +msgid "NHWA Data Managers" msgstr "" msgid "NHWA Data Clerks" @@ -47,6 +50,15 @@ msgstr "" msgid "Landing Page for MoH Kenya" msgstr "" +msgid "International Projects" +msgstr "" + +msgid "Landing Page for International Projects" +msgstr "" + +msgid "Eastern Mediterranean regional malaria repository" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -71,6 +83,99 @@ msgstr "Permite que os usuários editem credenciais da conta e perfil público" msgid "Manage notifications" msgstr "" +msgid "" +"Malaria endemic countries in the region are invited to upload a subset of " +"their malaria related data (by district and month) into this DHIS2 instance." +msgstr "" + +msgid "" +"Some countries are already implementing DHIS2 for their routine HMIS and " +"have already adopted the malaria modules. These countries can ready link the " +"two systems. Others are using other HMIS systems and will need to use the " +"Bulk Load app to load the data." +msgstr "" + +msgid "Conducting surveillance workshops" +msgstr "" + +msgid "This will permit exercises based on real country data" +msgstr "" + +msgid "Peer Reviews" +msgstr "" + +msgid "Annual sub-national data submission" +msgstr "" + +msgid "" +"We could pre-generate the WMR sub-national data form with data aggregated " +"annually at the district level" +msgstr "" + +msgid "" +"You would then download the pre-filled form and complete the missing " +"variables" +msgstr "" + +msgid "World Malaria Report submission" +msgstr "" + +msgid "Pre-fill a subset of national WMR variables" +msgstr "" + +msgid "Data reviews" +msgstr "" + +msgid "Surveillance support and data validation throughout the yearn" +msgstr "" + +msgid "Validation checks against sub-national totals" +msgstr "" + +msgid "" +"The WHO Malaria Data Quality (DQ) dashboard is an addendum to the Burden " +"Reduction aggregate package." +msgstr "" + +msgid "Burden Reduction Dashboard" +msgstr "" + +msgid "Data Quality Dashboard" +msgstr "" + +msgid "WHO Data Quality App" +msgstr "" + +msgid "" +"WHO Data Quality Tool for DHIS2, based on the WHO Data Quality Framework." +msgstr "" + +msgid "Bulk Load" +msgstr "" + +msgid "" +"The Bulk Load is an application designed to ease the import of data using " +"Microsoft Excel. It generates templates (an Excel sheet) from datasets and " +"programs, and imports data directly from those templates." +msgstr "" + +msgid "Malaria Case Surveillance Tracker" +msgstr "" + +msgid "" +"As countries progress towards malaria elimination, the aim of surveillance " +"is to detect all malaria cases; investigate every confirmed malaria case; " +"identify the likely location of an infection in order to direct actions to " +"interrupt transmission and to ensure that each detected case is promptly " +"treated and monitored to prevent secondary infection. An ideal surveillance " +"information system for malaria elimination includes rapid and complete case " +"reporting, central data storage and management, automated data analysis, and " +"customized outputs and feedback that lead to timely and targeted responses. " +"The DHIS2 tracker package for malaria case surveillance and foci " +"investigation is an aid for malaria surveillance in burden reduction and " +"elimination settings." +msgstr "" + msgid "Data" msgstr "Dados" @@ -113,6 +218,15 @@ msgstr "Voltar à página inicial" msgid "Programme" msgstr "Programa" +msgid "Data Monitoring Tool" +msgstr "" + +msgid "EFH" +msgstr "" + +msgid "Tracker Capture" +msgstr "" + msgid "NHWA maturity assessment" msgstr "" @@ -288,13 +402,16 @@ msgstr "" msgid "Enter data on the snakebite data entry" msgstr "" -msgid "User guide" +msgid "LOG OUT" msgstr "" -msgid "Logout" +msgid "Eastern Mediterranian Regional Malaria Repository" msgstr "" -msgid "LOG OUT" +msgid "User guide" +msgstr "" + +msgid "Logout" msgstr "" msgid "World Health Organization" diff --git a/i18n/ru.po b/i18n/ru.po index a9b234e..aa62991 100644 --- a/i18n/ru.po +++ b/i18n/ru.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2021-10-22T05:36:29.610Z\n" +"POT-Creation-Date: 2022-08-26T08:44:22.342Z\n" "PO-Revision-Date: 2019-08-07T14:26:49.235Z\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -11,7 +11,10 @@ msgstr "" msgid "National Health Workforce Accounts Online Data Platform" msgstr "" -msgid "NHWA Data Managers and NHWA Admins" +msgid "NHWA Admins" +msgstr "" + +msgid "NHWA Data Managers" msgstr "" msgid "NHWA Data Clerks" @@ -47,6 +50,15 @@ msgstr "" msgid "Landing Page for MoH Kenya" msgstr "" +msgid "International Projects" +msgstr "" + +msgid "Landing Page for International Projects" +msgstr "" + +msgid "Eastern Mediterranean regional malaria repository" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -72,6 +84,99 @@ msgstr "" msgid "Manage notifications" msgstr "" +msgid "" +"Malaria endemic countries in the region are invited to upload a subset of " +"their malaria related data (by district and month) into this DHIS2 instance." +msgstr "" + +msgid "" +"Some countries are already implementing DHIS2 for their routine HMIS and " +"have already adopted the malaria modules. These countries can ready link the " +"two systems. Others are using other HMIS systems and will need to use the " +"Bulk Load app to load the data." +msgstr "" + +msgid "Conducting surveillance workshops" +msgstr "" + +msgid "This will permit exercises based on real country data" +msgstr "" + +msgid "Peer Reviews" +msgstr "" + +msgid "Annual sub-national data submission" +msgstr "" + +msgid "" +"We could pre-generate the WMR sub-national data form with data aggregated " +"annually at the district level" +msgstr "" + +msgid "" +"You would then download the pre-filled form and complete the missing " +"variables" +msgstr "" + +msgid "World Malaria Report submission" +msgstr "" + +msgid "Pre-fill a subset of national WMR variables" +msgstr "" + +msgid "Data reviews" +msgstr "" + +msgid "Surveillance support and data validation throughout the yearn" +msgstr "" + +msgid "Validation checks against sub-national totals" +msgstr "" + +msgid "" +"The WHO Malaria Data Quality (DQ) dashboard is an addendum to the Burden " +"Reduction aggregate package." +msgstr "" + +msgid "Burden Reduction Dashboard" +msgstr "" + +msgid "Data Quality Dashboard" +msgstr "" + +msgid "WHO Data Quality App" +msgstr "" + +msgid "" +"WHO Data Quality Tool for DHIS2, based on the WHO Data Quality Framework." +msgstr "" + +msgid "Bulk Load" +msgstr "" + +msgid "" +"The Bulk Load is an application designed to ease the import of data using " +"Microsoft Excel. It generates templates (an Excel sheet) from datasets and " +"programs, and imports data directly from those templates." +msgstr "" + +msgid "Malaria Case Surveillance Tracker" +msgstr "" + +msgid "" +"As countries progress towards malaria elimination, the aim of surveillance " +"is to detect all malaria cases; investigate every confirmed malaria case; " +"identify the likely location of an infection in order to direct actions to " +"interrupt transmission and to ensure that each detected case is promptly " +"treated and monitored to prevent secondary infection. An ideal surveillance " +"information system for malaria elimination includes rapid and complete case " +"reporting, central data storage and management, automated data analysis, and " +"customized outputs and feedback that lead to timely and targeted responses. " +"The DHIS2 tracker package for malaria case surveillance and foci " +"investigation is an aid for malaria surveillance in burden reduction and " +"elimination settings." +msgstr "" + msgid "Data" msgstr "Данные" @@ -116,6 +221,15 @@ msgstr "" msgid "Programme" msgstr "" +msgid "Data Monitoring Tool" +msgstr "" + +msgid "EFH" +msgstr "" + +msgid "Tracker Capture" +msgstr "" + msgid "NHWA maturity assessment" msgstr "" @@ -291,13 +405,16 @@ msgstr "" msgid "Enter data on the snakebite data entry" msgstr "" -msgid "User guide" +msgid "LOG OUT" msgstr "" -msgid "Logout" +msgid "Eastern Mediterranian Regional Malaria Repository" msgstr "" -msgid "LOG OUT" +msgid "User guide" +msgstr "" + +msgid "Logout" msgstr "" msgid "World Health Organization" diff --git a/public/img/dhis-web-capture.png b/public/img/dhis-web-capture.png new file mode 100644 index 0000000..3b4929b Binary files /dev/null and b/public/img/dhis-web-capture.png differ diff --git a/public/img/international-logo.svg b/public/img/international-logo.svg new file mode 100644 index 0000000..53a7225 --- /dev/null +++ b/public/img/international-logo.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/src/compositionRoot.ts b/src/compositionRoot.ts index 8ff5b50..e9721a1 100644 --- a/src/compositionRoot.ts +++ b/src/compositionRoot.ts @@ -1,7 +1,9 @@ +import { ConfigD2ApiRepository } from "./data/repositories/ConfigD2ApiRepository"; import { InstanceD2ApiRepository } from "./data/repositories/InstanceD2ApiRepository"; import { NotificationsD2ApiRepository } from "./data/repositories/NotificationsD2ApiRepository"; import { Instance } from "./domain/entities/Instance"; import { DeleteNotificationsUseCase } from "./domain/usecases/DeleteNotificationsUseCase"; +import { GetConfigUseCase } from "./domain/usecases/GetConfigUseCase"; import { GetCurrentUserUseCase } from "./domain/usecases/GetCurrentUserUseCase"; import { GetInstanceVersionUseCase } from "./domain/usecases/GetInstanceVersionUseCase"; import { ListAllNotificationsUseCase } from "./domain/usecases/ListAllNotificationsUseCase"; @@ -12,6 +14,7 @@ import { SearchUsersUseCase } from "./domain/usecases/SearchUsersUseCase"; export function getCompositionRoot(instance: Instance) { const instanceRepository = new InstanceD2ApiRepository(instance); const notificationsRepository = new NotificationsD2ApiRepository(instance, instanceRepository); + const configRepository = new ConfigD2ApiRepository(instance); return { usecases: { @@ -26,6 +29,9 @@ export function getCompositionRoot(instance: Instance) { searchUsers: new SearchUsersUseCase(instanceRepository), getVersion: new GetInstanceVersionUseCase(instanceRepository), }), + config: getExecute({ + get: new GetConfigUseCase(configRepository), + }), }, }; } diff --git a/src/data/logic/redirection.ts b/src/data/logic/redirection.ts index 76b701e..028351c 100644 --- a/src/data/logic/redirection.ts +++ b/src/data/logic/redirection.ts @@ -1,11 +1,13 @@ import _ from "lodash"; -import { isSuperAdmin, User } from "../../domain/entities/User"; + +import { User } from "../../domain/entities/User"; import { buildHepatitisData, nhwaAdminData } from "../../domain/models"; import { nhwaClerkData, nhwaManagerData, nhwaViewerData } from "../../domain/models/nhwa/NHWA"; import { MalariaData } from "../../domain/models/east_mediterranian_mal/Malaria.jsx"; import { ntdLeishKenyaData } from "../../domain/models/ntd_leish_kenya/NTDLeishKenya"; import { rabiesData, simpleRabiesData } from "../../domain/models/rabies/Rabies"; import { snakebiteData } from "../../domain/models/snakebite/Snakebite"; +import { internationalData } from "../../domain/models/international/International"; import i18n from "../../locales"; import { goToDhis2Url } from "../../utils/utils"; import eastMalRepoHeader from "../../webapp/components/headers/east-mal-repo-header"; @@ -17,8 +19,11 @@ import { NTDLeishKenyaLandingPage, RabiesLandingPage, SnakebiteLandingPage, + InternationalLandingPage, MalariaLandingPage, } from "../../webapp/pages"; +import internationalHeader from "../../webapp/components/headers/international-header"; +import { Config } from "../../domain/entities/Config"; //TODO: Ask if we need a simple snakebite data or not const HEP_CASCADE_CURE_DATA_ENTRY = "OSHcVu6XSUL"; @@ -41,6 +46,11 @@ export const NTD_RAB_WHO_RO = "pjwgXz3y70w"; export const SS_NTD_RAB_AggData_Entry = "Mg0TXhvvXJ4"; export const SS_NTD_RAB_AggData_View = "B6oADCiiW8v"; +export const EFH_USER = "IdneucbQYRb"; +export const DATA_MANAGEMENT_USER = "mh5Tx6MS9jn"; + +const WIDP_IT_TEAM = "UfhhwZK73Lg"; + const MAL_EMRO = "FpQ7a5OylZH"; export interface Configuration { @@ -151,6 +161,16 @@ export const buildAvailableConfigurations = (version: number): Configuration[] = data: ntdLeishKenyaData, icon: "img/kenya.png", }, + { + programme: "international-projects", + title: i18n.t("International Projects"), + description: i18n.t("Landing Page for International Projects"), + userGroupIds: [EFH_USER, DATA_MANAGEMENT_USER], + page: InternationalLandingPage, + header: internationalHeader, + data: internationalData, + icon: "img/icon.png", + }, { programme: "east-mediterranian-mal-repo", title: i18n.t("Eastern Mediterranean regional malaria repository"), @@ -166,18 +186,29 @@ export const buildAvailableConfigurations = (version: number): Configuration[] = const shouldRedirect = (actualIds: string[], expectedIds: string[]): boolean => _.intersection(actualIds, expectedIds).length > 0; -export const handleRedirection = async (baseUrl: string, version: number, user: User) => { - const isAdmin = isSuperAdmin(user); - +export const handleRedirection = async (baseUrl: string, version: number, user: User, config: Config) => { const userGroupIds = user.userGroups.map(userGroup => userGroup.id); - const configurations = buildAvailableConfigurations(version).filter( - config => isAdmin || shouldRedirect(userGroupIds, config.userGroupIds) + const isAdminUserGroup = shouldRedirect(userGroupIds, [WIDP_IT_TEAM]); + const availableConfiguration = buildAvailableConfigurations(version); + const configurations = availableConfiguration.filter( + config => isAdminUserGroup || shouldRedirect(userGroupIds, config.userGroupIds) ); + const username = user.name; if (configurations.length > 0) { - return { username: user.name, configurations }; + return { username, userGroupIds, configurations }; } else { - goToDhis2Url(baseUrl, "/dhis-web-dashboard/index.action"); - return null; + const { defaultProgramme, fallbackUrl } = config; + + const fallbackConfig = defaultProgramme + ? availableConfiguration.find(config => config.programme === defaultProgramme) + : undefined; + + if (fallbackConfig) { + return { username, userGroupIds, configurations: [fallbackConfig] }; + } else { + goToDhis2Url(baseUrl, fallbackUrl); + return null; + } } }; diff --git a/src/data/repositories/ConfigD2ApiRepository.ts b/src/data/repositories/ConfigD2ApiRepository.ts new file mode 100644 index 0000000..31696a9 --- /dev/null +++ b/src/data/repositories/ConfigD2ApiRepository.ts @@ -0,0 +1,35 @@ +import _ from "lodash"; +import { Codec, optional, string } from "purify-ts"; +import { Config } from "../../domain/entities/Config"; +import { Instance } from "../../domain/entities/Instance"; +import { ConfigRepository } from "../../domain/repositories/ConfigRepository"; +import { DataStoreStorageClient } from "../clients/storage/DataStoreStorageClient"; + +export class ConfigD2ApiRepository implements ConfigRepository { + constructor(private instance: Instance) {} + + async get(): Promise { + const storageClient = new DataStoreStorageClient("global", this.instance); + const configValue = await storageClient.getObject("config"); + + return ConfigCodec.decode(configValue).caseOf({ + Left: err => { + console.error(`Error decoding config: ${err}`); + return defaultConfig; + }, + Right: config => { + return { ...defaultConfig, ..._.pickBy(config) }; + }, + }); + } +} + +const ConfigCodec = Codec.interface({ + fallbackUrl: optional(string), + defaultProgramme: optional(string), +}); + +const defaultConfig: Config = { + fallbackUrl: "/dhis-web-dashboard/index.action", + defaultProgramme: undefined, +}; diff --git a/src/domain/entities/Config.ts b/src/domain/entities/Config.ts new file mode 100644 index 0000000..0c9c470 --- /dev/null +++ b/src/domain/entities/Config.ts @@ -0,0 +1,6 @@ +import { Maybe } from "../../types/utils"; + +export interface Config { + fallbackUrl: string; + defaultProgramme: Maybe; +} diff --git a/src/domain/models/east_mediterranian_mal/Malaria.jsx b/src/domain/models/east_mediterranian_mal/Malaria.jsx index d4152ec..0e1a438 100644 --- a/src/domain/models/east_mediterranian_mal/Malaria.jsx +++ b/src/domain/models/east_mediterranian_mal/Malaria.jsx @@ -1,4 +1,3 @@ -import _ from "lodash"; import i18n from "../../../locales"; import { withStyles } from "@material-ui/core"; import { styles } from "./styles"; diff --git a/src/domain/models/international/International.ts b/src/domain/models/international/International.ts new file mode 100644 index 0000000..c063aa8 --- /dev/null +++ b/src/domain/models/international/International.ts @@ -0,0 +1,60 @@ +import i18n from "@dhis2/d2-i18n"; + +export const internationalData = [ + { + key: "data-monitoring", + title: i18n.t("Data Monitoring Tool"), + rowLength: 2, + icon: "img/dhis-web-dataentry.png", + action: { + type: "dhisRedirect", + value: "/api/apps/Data-Management-App/index.html", + }, + }, + { + key: "efh", + title: i18n.t("EFH"), + rowLength: 2, + icon: "img/dhis-web-capture.png", + action: { + type: "dhisRedirect", + value: "/api/apps/Emergency-Field-Hospital-App/index.html", + }, + }, + { + key: "utilities", + title: i18n.t("DHIS2 Utilities"), + rowLength: 1, + enableBottomLine: true, + }, + { + key: "cache-cleaner", + title: i18n.t("Browser cache cleaner"), + rowLength: 3, + icon: "img/dhis-web-cache-cleaner.png", + action: { + type: "dhisRedirect", + value: "/dhis-web-cache-cleaner/index.action", + }, + }, + { + key: "tracker-capture", + title: i18n.t("Tracker Capture"), + rowLength: 3, + icon: "img/dhis-web-event-capture.png", + action: { + type: "dhisRedirect", + value: "/dhis-web-tracker-capture/index.html", + }, + }, + { + key: "profile", + title: i18n.t("User profile"), + rowLength: 3, + icon: "img/dhis-web-profile.png", + action: { + type: "dhisRedirect", + value: "/dhis-web-user-profile/#/profile", + }, + }, +]; diff --git a/src/domain/repositories/ConfigRepository.ts b/src/domain/repositories/ConfigRepository.ts index c57a89b..e4c3479 100644 --- a/src/domain/repositories/ConfigRepository.ts +++ b/src/domain/repositories/ConfigRepository.ts @@ -1,5 +1,5 @@ -import { User } from "../entities/User"; +import { Config } from "../entities/Config"; export interface ConfigRepository { - getUser(): Promise; + get(): Promise; } diff --git a/src/domain/usecases/GetConfigUseCase.ts b/src/domain/usecases/GetConfigUseCase.ts new file mode 100644 index 0000000..b021393 --- /dev/null +++ b/src/domain/usecases/GetConfigUseCase.ts @@ -0,0 +1,11 @@ +import { UseCase } from "../../compositionRoot"; +import { Config } from "../entities/Config"; +import { ConfigRepository } from "../repositories/ConfigRepository"; + +export class GetConfigUseCase implements UseCase { + constructor(private configRepository: ConfigRepository) {} + + public async execute(): Promise { + return this.configRepository.get(); + } +} diff --git a/src/webapp/components/headers/international-header/index.jsx b/src/webapp/components/headers/international-header/index.jsx new file mode 100644 index 0000000..685350b --- /dev/null +++ b/src/webapp/components/headers/international-header/index.jsx @@ -0,0 +1,45 @@ +import { Chip, Typography, withStyles } from "@material-ui/core"; +import { ExitToApp, Home } from "@material-ui/icons"; +import PropTypes from "prop-types"; +import React from "react"; +import { withRouter } from "react-router-dom"; +import i18n from "../../../../locales"; +import { goToDhis2Url, goToExternalUrl } from "../../../../utils/utils"; +import { styles } from "./styles"; + +const InternationalHeader = ({ classes, history, baseUrl, title, backUrl }) => { + const actionSamaritan = () => goToExternalUrl("https://www.samaritanspurse.org"); + const actionBack = () => history.push(backUrl); + const actionLogout = () => goToDhis2Url(baseUrl, "/dhis-web-commons-security/logout.action"); + + return ( +
+ + {title} + +
+ + + {title} + +
+ + } label={i18n.t("LOG OUT")} className={classes.logout} onClick={actionLogout} /> +
+ ); +}; + +InternationalHeader.propTypes = { + classes: PropTypes.object.isRequired, + history: PropTypes.object.isRequired, + baseUrl: PropTypes.string.isRequired, + title: PropTypes.string, + backUrl: PropTypes.string, +}; + +InternationalHeader.defaultProps = { + title: i18n.t("International Projects"), + backUrl: "/", +}; + +export default withRouter(withStyles(styles)(InternationalHeader)); diff --git a/src/webapp/components/headers/international-header/styles.jsx b/src/webapp/components/headers/international-header/styles.jsx new file mode 100644 index 0000000..b69ee40 --- /dev/null +++ b/src/webapp/components/headers/international-header/styles.jsx @@ -0,0 +1,33 @@ +export const styles = _theme => ({ + container: { + backgroundColor: "#0072bb", + transition: "all 0.3s", + display: "flex", + justifyContent: "space-between", + padding: "25px", + marginBottom: "50px", + }, + logo: { + verticalAlign: "middle", + filter: "brightness(0) invert(1)", + height: "50px", + cursor: "pointer", + margin: "auto", + }, + titleContainer: { + display: "flex", + }, + title: { + color: "white", + lineHeight: "1.5", + cursor: "pointer", + textAlign: "center", + margin: "auto", + marginLeft: "15px", + marginRight: "15px", + }, + logout: { + margin: "auto", + padding: "15px", + }, +}); diff --git a/src/webapp/pages/app/App.tsx b/src/webapp/pages/app/App.tsx index e5e8f12..385578b 100644 --- a/src/webapp/pages/app/App.tsx +++ b/src/webapp/pages/app/App.tsx @@ -37,8 +37,9 @@ const App = ({ api }: { api: D2Api }) => { const continueLoading = async () => { const user = await compositionRoot.usecases.instance.getCurrentUser(); const version = await compositionRoot.usecases.instance.getVersion(); + const config = await compositionRoot.usecases.config.get(); const apiVersion = getMajorVersion(version); - const options = await handleRedirection(baseUrl, apiVersion, user); + const options = await handleRedirection(baseUrl, apiVersion, user, config); if (options) setRouterProps({ ...options, baseUrl }); }; diff --git a/src/webapp/pages/app/Router.tsx b/src/webapp/pages/app/Router.tsx index 859ebf4..8d27a7a 100644 --- a/src/webapp/pages/app/Router.tsx +++ b/src/webapp/pages/app/Router.tsx @@ -5,7 +5,7 @@ import { CacheCleanerPage, EntryCapturePage, GenericLandingPage, NotificationsPa import { Configuration } from "../../../data/logic/redirection"; import { defaultData } from "../../../domain/models"; -export const Router: React.FC = ({ baseUrl, username, configurations }) => { +export const Router: React.FC = ({ baseUrl, username, userGroupIds, configurations }) => { return ( @@ -35,6 +35,7 @@ export const Router: React.FC = ({ baseUrl, username, configuration header={header} baseUrl={baseUrl} username={username} + userGroupIds={userGroupIds} items={data} /> )} @@ -61,5 +62,6 @@ export const Router: React.FC = ({ baseUrl, username, configuration export interface RouterProps { baseUrl: string; username: string; + userGroupIds: string[]; configurations: Configuration[]; } diff --git a/src/webapp/pages/index.ts b/src/webapp/pages/index.ts index aaea87c..9a9bdce 100644 --- a/src/webapp/pages/index.ts +++ b/src/webapp/pages/index.ts @@ -6,6 +6,7 @@ import NHWALandingPage from "./landing-page/nhwa"; import NTDLeishKenyaLandingPage from "./landing-page/ntd-leish-kenya"; import RabiesLandingPage from "./landing-page/rabies"; import SnakebiteLandingPage from "./landing-page/snakebite"; +import InternationalLandingPage from "./landing-page/international" import MalariaLandingPage from "./landing-page/eastern-mediterranian-mal-repo"; import { NotificationsPage } from "./notifications-page/NotificationsPage"; @@ -19,5 +20,6 @@ export { RabiesLandingPage, SnakebiteLandingPage, NTDLeishKenyaLandingPage, + InternationalLandingPage, MalariaLandingPage, }; diff --git a/src/webapp/pages/landing-page/international.jsx b/src/webapp/pages/landing-page/international.jsx new file mode 100644 index 0000000..b8c0e0d --- /dev/null +++ b/src/webapp/pages/landing-page/international.jsx @@ -0,0 +1,31 @@ +import { LinearProgress, withStyles } from "@material-ui/core"; +import React, { useEffect } from "react"; +import _ from "lodash"; +import { styles } from "../../../domain/models/hepatitis/styles"; +import { goToDhis2Url } from "../../../utils/utils"; +import LandingPage from "./generic"; +import { DATA_MANAGEMENT_USER, EFH_USER } from "../../../data/logic/redirection"; + +const InternationalLandingPage = props => { + const [renderPage, setRenderPage] = React.useState(false); + + useEffect(() => { + if (_.intersection(props.userGroupIds, [DATA_MANAGEMENT_USER, EFH_USER]).length < 2) { + if (_.intersection(props.userGroupIds, [DATA_MANAGEMENT_USER]).length > 0) { + goToDhis2Url(props.baseUrl, "/api/apps/Data-Management-App/index.html"); + } else if (_.intersection(props.userGroupIds, [EFH_USER]).length > 0) { + goToDhis2Url(props.baseUrl, "/api/apps/Emergency-Field-Hospital-App/index.html"); + } else { + setRenderPage(true); + } + } else { + setRenderPage(true); + } + }, [props]); + + if (!renderPage) return ; + + return ; +}; + +export default withStyles(styles)(InternationalLandingPage);