From 2dd7fd502c7ea0bfb828ac05f37f4a22e940eaf3 Mon Sep 17 00:00:00 2001 From: deeonwuli Date: Fri, 19 Aug 2022 13:40:40 +0100 Subject: [PATCH 01/17] landing page for efh and m&e --- public/img/international-logo.svg | 15 +++++ src/data/logic/redirection.ts | 19 ++++++ .../models/international/International.ts | 60 +++++++++++++++++++ .../headers/international-header/index.jsx | 43 +++++++++++++ .../headers/international-header/styles.jsx | 33 ++++++++++ src/webapp/pages/index.ts | 2 + .../pages/landing-page/international.jsx | 10 ++++ 7 files changed, 182 insertions(+) create mode 100644 public/img/international-logo.svg create mode 100644 src/domain/models/international/International.ts create mode 100644 src/webapp/components/headers/international-header/index.jsx create mode 100644 src/webapp/components/headers/international-header/styles.jsx create mode 100644 src/webapp/pages/landing-page/international.jsx 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/data/logic/redirection.ts b/src/data/logic/redirection.ts index aadf2e8..55d458e 100644 --- a/src/data/logic/redirection.ts +++ b/src/data/logic/redirection.ts @@ -5,6 +5,7 @@ import { nhwaClerkData, nhwaViewerData } from "../../domain/models/nhwa/NHWA"; 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 nhwaHeader from "../../webapp/components/headers/nhwa-header"; @@ -15,7 +16,9 @@ import { NTDLeishKenyaLandingPage, RabiesLandingPage, SnakebiteLandingPage, + InternationalLandingPage, } from "../../webapp/pages"; +import internationalHeader from "../../webapp/components/headers/international-header"; //TODO: Ask if we need a simple snakebite data or not const HEP_CASCADE_CURE_DATA_ENTRY = "OSHcVu6XSUL"; @@ -38,6 +41,12 @@ export const NTD_RAB_WHO_RO = "pjwgXz3y70w"; export const SS_NTD_RAB_AggData_Entry = "Mg0TXhvvXJ4"; export const SS_NTD_RAB_AggData_View = "B6oADCiiW8v"; +const EFH_ADMIN = "e8u0kJa8HM5"; +const EFH_DATA_ENTRY = "wjoMlqXjabf"; +const EFH_MIO = "eKTwo5C7h5N"; +const EFH_DASHBOARD = ""; +const DATA_MONITORING = ""; + export interface Configuration { programme: string; title: string; @@ -136,6 +145,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_ADMIN, EFH_DASHBOARD, EFH_DATA_ENTRY, EFH_MIO, DATA_MONITORING], + page: InternationalLandingPage, + header: internationalHeader, + data: internationalData, + icon: "img/icon.png", + }, ]; const shouldRedirect = (actualIds: string[], expectedIds: string[]): boolean => diff --git a/src/domain/models/international/International.ts b/src/domain/models/international/International.ts new file mode 100644 index 0000000..1903671 --- /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-event-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/webapp/components/headers/international-header/index.jsx b/src/webapp/components/headers/international-header/index.jsx new file mode 100644 index 0000000..6d07750 --- /dev/null +++ b/src/webapp/components/headers/international-header/index.jsx @@ -0,0 +1,43 @@ +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 actionWHO = () => goToExternalUrl("https://who.int"); + 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("World Health Organization"), + 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/index.ts b/src/webapp/pages/index.ts index f07b33b..57fb9da 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 { NotificationsPage } from "./notifications-page/NotificationsPage"; export { @@ -18,4 +19,5 @@ export { RabiesLandingPage, SnakebiteLandingPage, NTDLeishKenyaLandingPage, + InternationalLandingPage, }; diff --git a/src/webapp/pages/landing-page/international.jsx b/src/webapp/pages/landing-page/international.jsx new file mode 100644 index 0000000..098432c --- /dev/null +++ b/src/webapp/pages/landing-page/international.jsx @@ -0,0 +1,10 @@ +import { withStyles } from "@material-ui/core"; +import React from "react"; +import { styles } from "../../../domain/models/hepatitis/styles"; +import LandingPage from "./generic"; + +const InternationalLandingPage = props => { + return ; +}; + +export default withStyles(styles)(InternationalLandingPage); From 7fbcf19cde871d2354bc7c1d0fe1476fa76167f6 Mon Sep 17 00:00:00 2001 From: deeonwuli Date: Mon, 22 Aug 2022 13:24:13 +0100 Subject: [PATCH 02/17] replace WHO with samaritan purse --- .../components/headers/international-header/index.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/webapp/components/headers/international-header/index.jsx b/src/webapp/components/headers/international-header/index.jsx index 6d07750..685350b 100644 --- a/src/webapp/components/headers/international-header/index.jsx +++ b/src/webapp/components/headers/international-header/index.jsx @@ -8,13 +8,15 @@ import { goToDhis2Url, goToExternalUrl } from "../../../../utils/utils"; import { styles } from "./styles"; const InternationalHeader = ({ classes, history, baseUrl, title, backUrl }) => { - const actionWHO = () => goToExternalUrl("https://who.int"); + 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} +
@@ -36,7 +38,7 @@ InternationalHeader.propTypes = { }; InternationalHeader.defaultProps = { - title: i18n.t("World Health Organization"), + title: i18n.t("International Projects"), backUrl: "/", }; From c33ecf05d88d0ea7fde58fe372fb56379b445204 Mon Sep 17 00:00:00 2001 From: Adrian Quintana Date: Tue, 23 Aug 2022 10:44:33 +0100 Subject: [PATCH 03/17] check Admin User group instead of superuser --- i18n/de.po | 23 +++++++++++++++++++---- i18n/en.pot | 25 ++++++++++++++++++++----- i18n/es.po | 23 +++++++++++++++++++---- i18n/fr.po | 23 +++++++++++++++++++---- i18n/it.po | 23 +++++++++++++++++++---- i18n/pt.po | 23 +++++++++++++++++++---- i18n/ru.po | 23 +++++++++++++++++++---- src/data/logic/redirection.ts | 12 +++++++----- 8 files changed, 141 insertions(+), 34 deletions(-) diff --git a/i18n/de.po b/i18n/de.po index a4fa394..58b0a8c 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-23T08:44:09.107Z\n" "PO-Revision-Date: 2019-08-07T14:26:49.235Z\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -47,6 +47,12 @@ msgstr "" msgid "Landing Page for MoH Kenya" msgstr "" +msgid "International Projects" +msgstr "" + +msgid "Landing Page for International Projects" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -119,6 +125,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 +309,13 @@ msgstr "" msgid "Enter data on the snakebite data entry" msgstr "" -msgid "User guide" +msgid "LOG OUT" msgstr "" -msgid "Logout" +msgid "User guide" msgstr "" -msgid "LOG OUT" +msgid "Logout" msgstr "" msgid "World Health Organization" diff --git a/i18n/en.pot b/i18n/en.pot index 411e953..f2dc35a 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ 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-23T08:44:09.107Z\n" +"PO-Revision-Date: 2022-08-23T08:44:09.107Z\n" msgid "National Health Workforce Accounts Online Data Platform" msgstr "" @@ -47,6 +47,12 @@ msgstr "" msgid "Landing Page for MoH Kenya" msgstr "" +msgid "International Projects" +msgstr "" + +msgid "Landing Page for International Projects" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -113,6 +119,15 @@ msgstr "" msgid "Programme" msgstr "" +msgid "Data Monitoring Tool" +msgstr "" + +msgid "EFH" +msgstr "" + +msgid "Tracker Capture" +msgstr "" + msgid "NHWA maturity assessment" msgstr "" @@ -288,13 +303,13 @@ msgstr "" msgid "Enter data on the snakebite data entry" msgstr "" -msgid "User guide" +msgid "LOG OUT" msgstr "" -msgid "Logout" +msgid "User guide" msgstr "" -msgid "LOG OUT" +msgid "Logout" msgstr "" msgid "World Health Organization" diff --git a/i18n/es.po b/i18n/es.po index c011be2..27717f2 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-23T08:44:09.107Z\n" "PO-Revision-Date: 2019-08-07T14:26:49.235Z\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -47,6 +47,12 @@ msgstr "" msgid "Landing Page for MoH Kenya" msgstr "" +msgid "International Projects" +msgstr "" + +msgid "Landing Page for International Projects" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -114,6 +120,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 +304,13 @@ msgstr "" msgid "Enter data on the snakebite data entry" msgstr "" -msgid "User guide" +msgid "LOG OUT" msgstr "" -msgid "Logout" +msgid "User guide" msgstr "" -msgid "LOG OUT" +msgid "Logout" msgstr "" msgid "World Health Organization" diff --git a/i18n/fr.po b/i18n/fr.po index 91214d0..ab7ac18 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-23T08:44:09.107Z\n" "PO-Revision-Date: 2019-08-07T14:26:49.235Z\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -47,6 +47,12 @@ msgstr "" msgid "Landing Page for MoH Kenya" msgstr "" +msgid "International Projects" +msgstr "" + +msgid "Landing Page for International Projects" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -115,6 +121,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 +305,13 @@ msgstr "" msgid "Enter data on the snakebite data entry" msgstr "" -msgid "User guide" +msgid "LOG OUT" msgstr "" -msgid "Logout" +msgid "User guide" msgstr "" -msgid "LOG OUT" +msgid "Logout" msgstr "" msgid "World Health Organization" diff --git a/i18n/it.po b/i18n/it.po index 34ffc61..a8b7e73 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-23T08:44:09.107Z\n" "PO-Revision-Date: 2019-08-07T14:26:49.235Z\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -47,6 +47,12 @@ msgstr "" msgid "Landing Page for MoH Kenya" msgstr "" +msgid "International Projects" +msgstr "" + +msgid "Landing Page for International Projects" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -116,6 +122,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 +306,13 @@ msgstr "" msgid "Enter data on the snakebite data entry" msgstr "" -msgid "User guide" +msgid "LOG OUT" msgstr "" -msgid "Logout" +msgid "User guide" msgstr "" -msgid "LOG OUT" +msgid "Logout" msgstr "" msgid "World Health Organization" diff --git a/i18n/pt.po b/i18n/pt.po index 559d94e..1e4837d 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-23T08:44:09.107Z\n" "PO-Revision-Date: 2019-08-07T14:26:49.235Z\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -47,6 +47,12 @@ msgstr "" msgid "Landing Page for MoH Kenya" msgstr "" +msgid "International Projects" +msgstr "" + +msgid "Landing Page for International Projects" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -113,6 +119,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 +303,13 @@ msgstr "" msgid "Enter data on the snakebite data entry" msgstr "" -msgid "User guide" +msgid "LOG OUT" msgstr "" -msgid "Logout" +msgid "User guide" msgstr "" -msgid "LOG OUT" +msgid "Logout" msgstr "" msgid "World Health Organization" diff --git a/i18n/ru.po b/i18n/ru.po index a9b234e..8de8b29 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-23T08:44:09.107Z\n" "PO-Revision-Date: 2019-08-07T14:26:49.235Z\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -47,6 +47,12 @@ msgstr "" msgid "Landing Page for MoH Kenya" msgstr "" +msgid "International Projects" +msgstr "" + +msgid "Landing Page for International Projects" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -116,6 +122,15 @@ msgstr "" msgid "Programme" msgstr "" +msgid "Data Monitoring Tool" +msgstr "" + +msgid "EFH" +msgstr "" + +msgid "Tracker Capture" +msgstr "" + msgid "NHWA maturity assessment" msgstr "" @@ -291,13 +306,13 @@ msgstr "" msgid "Enter data on the snakebite data entry" msgstr "" -msgid "User guide" +msgid "LOG OUT" msgstr "" -msgid "Logout" +msgid "User guide" msgstr "" -msgid "LOG OUT" +msgid "Logout" msgstr "" msgid "World Health Organization" diff --git a/src/data/logic/redirection.ts b/src/data/logic/redirection.ts index 55d458e..846a29b 100644 --- a/src/data/logic/redirection.ts +++ b/src/data/logic/redirection.ts @@ -1,5 +1,5 @@ import _ from "lodash"; -import { isSuperAdmin, User } from "../../domain/entities/User"; +import { User } from "../../domain/entities/User"; import { buildHepatitisData, nhwaData } from "../../domain/models"; import { nhwaClerkData, nhwaViewerData } from "../../domain/models/nhwa/NHWA"; import { ntdLeishKenyaData } from "../../domain/models/ntd_leish_kenya/NTDLeishKenya"; @@ -44,9 +44,11 @@ export const SS_NTD_RAB_AggData_View = "B6oADCiiW8v"; const EFH_ADMIN = "e8u0kJa8HM5"; const EFH_DATA_ENTRY = "wjoMlqXjabf"; const EFH_MIO = "eKTwo5C7h5N"; -const EFH_DASHBOARD = ""; +const EFH_DASHBOARD = "cW5vzBo63yj"; const DATA_MONITORING = ""; +const IT_MAINTENANCE_TEAM = "BwyMfDBLih9"; + export interface Configuration { programme: string; title: string; @@ -161,11 +163,11 @@ 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); - + const userGroupIds = user.userGroups.map(userGroup => userGroup.id); + const isAdminUserGroup = shouldRedirect(userGroupIds, [IT_MAINTENANCE_TEAM]); const configurations = buildAvailableConfigurations(version).filter( - config => isAdmin || shouldRedirect(userGroupIds, config.userGroupIds) + config => isAdminUserGroup || shouldRedirect(userGroupIds, config.userGroupIds) ); if (configurations.length > 0) { From 17042f30454475ba306b61c8bb1ba1abb0777219 Mon Sep 17 00:00:00 2001 From: deeonwuli Date: Tue, 23 Aug 2022 13:50:25 +0100 Subject: [PATCH 04/17] redirect based on userGroups --- src/data/logic/redirection.ts | 1 - .../headers/international-header/index.jsx | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/data/logic/redirection.ts b/src/data/logic/redirection.ts index 846a29b..cab8806 100644 --- a/src/data/logic/redirection.ts +++ b/src/data/logic/redirection.ts @@ -163,7 +163,6 @@ const shouldRedirect = (actualIds: string[], expectedIds: string[]): boolean => _.intersection(actualIds, expectedIds).length > 0; export const handleRedirection = async (baseUrl: string, version: number, user: User) => { - const userGroupIds = user.userGroups.map(userGroup => userGroup.id); const isAdminUserGroup = shouldRedirect(userGroupIds, [IT_MAINTENANCE_TEAM]); const configurations = buildAvailableConfigurations(version).filter( diff --git a/src/webapp/components/headers/international-header/index.jsx b/src/webapp/components/headers/international-header/index.jsx index 685350b..e22406f 100644 --- a/src/webapp/components/headers/international-header/index.jsx +++ b/src/webapp/components/headers/international-header/index.jsx @@ -1,17 +1,26 @@ 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 React, { useEffect } 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 InternationalHeader = ({ classes, history, baseUrl, title, backUrl, user }) => { const actionSamaritan = () => goToExternalUrl("https://www.samaritanspurse.org"); const actionBack = () => history.push(backUrl); const actionLogout = () => goToDhis2Url(baseUrl, "/dhis-web-commons-security/logout.action"); + useEffect(() => { + const userGroupIds = user.userGroups.map(userGroup => userGroup.id); + if (userGroupIds === [""]) { + return goToDhis2Url("/api/apps/Data-Management-App/index.html"); + } else if (userGroupIds === ["e8u0kJa8HM5, wjoMlqXjabf, eKTwo5C7h5N, cW5vzBo63yj"]) { + return goToDhis2Url("/api/apps/Emergency-Field-Hospital-App/index.html"); + } else return; + }, []); + return (
@@ -33,6 +42,7 @@ InternationalHeader.propTypes = { classes: PropTypes.object.isRequired, history: PropTypes.object.isRequired, baseUrl: PropTypes.string.isRequired, + user: PropTypes.object.isRequired, title: PropTypes.string, backUrl: PropTypes.string, }; From 16bc59d7f9138e1a9bc3c9d4ebfce84d23b16aa9 Mon Sep 17 00:00:00 2001 From: deeonwuli Date: Thu, 25 Aug 2022 12:19:27 +0100 Subject: [PATCH 05/17] passing userGroup attempt 1 --- .env | 2 +- src/data/logic/redirection.ts | 12 +++++------ .../headers/international-header/index.jsx | 20 ++++++++++--------- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.env b/.env index 34f8789..ae67840 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ BROWSER=false PORT=8081 SKIP_PREFLIGHT_CHECK=true -REACT_APP_DHIS2_BASE_URL=https://dev.eyeseetea.com/who-dev-234/ +REACT_APP_DHIS2_BASE_URL=https://dev.eyeseetea.com/who-dev-236/ diff --git a/src/data/logic/redirection.ts b/src/data/logic/redirection.ts index cab8806..a6977a9 100644 --- a/src/data/logic/redirection.ts +++ b/src/data/logic/redirection.ts @@ -41,11 +41,11 @@ export const NTD_RAB_WHO_RO = "pjwgXz3y70w"; export const SS_NTD_RAB_AggData_Entry = "Mg0TXhvvXJ4"; export const SS_NTD_RAB_AggData_View = "B6oADCiiW8v"; -const EFH_ADMIN = "e8u0kJa8HM5"; -const EFH_DATA_ENTRY = "wjoMlqXjabf"; -const EFH_MIO = "eKTwo5C7h5N"; -const EFH_DASHBOARD = "cW5vzBo63yj"; -const DATA_MONITORING = ""; +export const EFH_ADMIN = "e8u0kJa8HM5"; +export const EFH_DATA_ENTRY = "wjoMlqXjabf"; +export const EFH_MIO = "eKTwo5C7h5N"; +export const EFH_DASHBOARD = "cW5vzBo63yj"; +export const DATA_MONITORING = ""; const IT_MAINTENANCE_TEAM = "BwyMfDBLih9"; @@ -170,7 +170,7 @@ export const handleRedirection = async (baseUrl: string, version: number, user: ); if (configurations.length > 0) { - return { username: user.name, configurations }; + return { username: user.name, userGroupIds, configurations }; } else { goToDhis2Url(baseUrl, "/dhis-web-dashboard/index.action"); return null; diff --git a/src/webapp/components/headers/international-header/index.jsx b/src/webapp/components/headers/international-header/index.jsx index e22406f..75844bd 100644 --- a/src/webapp/components/headers/international-header/index.jsx +++ b/src/webapp/components/headers/international-header/index.jsx @@ -7,19 +7,21 @@ import i18n from "../../../../locales"; import { goToDhis2Url, goToExternalUrl } from "../../../../utils/utils"; import { styles } from "./styles"; -const InternationalHeader = ({ classes, history, baseUrl, title, backUrl, user }) => { +const InternationalHeader = ({ classes, history, baseUrl, title, backUrl, username, userGroupIds }) => { const actionSamaritan = () => goToExternalUrl("https://www.samaritanspurse.org"); const actionBack = () => history.push(backUrl); const actionLogout = () => goToDhis2Url(baseUrl, "/dhis-web-commons-security/logout.action"); + + // useEffect(() => { + // const userGroupIds = user.userGroups.map(userGroup => userGroup.id); + // if (userGroupIds === [""]) { + // return goToDhis2Url("/api/apps/Data-Management-App/index.html"); + // } else if (userGroupIds === ["e8u0kJa8HM5, wjoMlqXjabf, eKTwo5C7h5N, cW5vzBo63yj"]) { + // return goToDhis2Url("/api/apps/Emergency-Field-Hospital-App/index.html"); + // } else return; + // }, []); - useEffect(() => { - const userGroupIds = user.userGroups.map(userGroup => userGroup.id); - if (userGroupIds === [""]) { - return goToDhis2Url("/api/apps/Data-Management-App/index.html"); - } else if (userGroupIds === ["e8u0kJa8HM5, wjoMlqXjabf, eKTwo5C7h5N, cW5vzBo63yj"]) { - return goToDhis2Url("/api/apps/Emergency-Field-Hospital-App/index.html"); - } else return; - }, []); + console.log(userGroupIds, username); return (
From 8451f64cbea9d017420c228068ba46deea413425 Mon Sep 17 00:00:00 2001 From: deeonwuli Date: Thu, 25 Aug 2022 13:41:47 +0100 Subject: [PATCH 06/17] redirect based on userGroups --- src/data/logic/redirection.ts | 2 +- .../headers/international-header/index.jsx | 16 ++-------------- src/webapp/pages/app/Router.tsx | 4 +++- src/webapp/pages/landing-page/international.jsx | 13 ++++++++++++- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/data/logic/redirection.ts b/src/data/logic/redirection.ts index a6977a9..d965100 100644 --- a/src/data/logic/redirection.ts +++ b/src/data/logic/redirection.ts @@ -170,7 +170,7 @@ export const handleRedirection = async (baseUrl: string, version: number, user: ); if (configurations.length > 0) { - return { username: user.name, userGroupIds, configurations }; + return { username: user.name, userGroupIds: userGroupIds, configurations }; } else { goToDhis2Url(baseUrl, "/dhis-web-dashboard/index.action"); return null; diff --git a/src/webapp/components/headers/international-header/index.jsx b/src/webapp/components/headers/international-header/index.jsx index 75844bd..685350b 100644 --- a/src/webapp/components/headers/international-header/index.jsx +++ b/src/webapp/components/headers/international-header/index.jsx @@ -1,27 +1,16 @@ import { Chip, Typography, withStyles } from "@material-ui/core"; import { ExitToApp, Home } from "@material-ui/icons"; import PropTypes from "prop-types"; -import React, { useEffect } from "react"; +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, username, userGroupIds }) => { +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"); - - // useEffect(() => { - // const userGroupIds = user.userGroups.map(userGroup => userGroup.id); - // if (userGroupIds === [""]) { - // return goToDhis2Url("/api/apps/Data-Management-App/index.html"); - // } else if (userGroupIds === ["e8u0kJa8HM5, wjoMlqXjabf, eKTwo5C7h5N, cW5vzBo63yj"]) { - // return goToDhis2Url("/api/apps/Emergency-Field-Hospital-App/index.html"); - // } else return; - // }, []); - - console.log(userGroupIds, username); return (
@@ -44,7 +33,6 @@ InternationalHeader.propTypes = { classes: PropTypes.object.isRequired, history: PropTypes.object.isRequired, baseUrl: PropTypes.string.isRequired, - user: PropTypes.object.isRequired, title: PropTypes.string, backUrl: PropTypes.string, }; 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/landing-page/international.jsx b/src/webapp/pages/landing-page/international.jsx index 098432c..866f9ab 100644 --- a/src/webapp/pages/landing-page/international.jsx +++ b/src/webapp/pages/landing-page/international.jsx @@ -1,9 +1,20 @@ import { withStyles } from "@material-ui/core"; -import React from "react"; +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_MONITORING, EFH_ADMIN, EFH_DASHBOARD, EFH_DATA_ENTRY, EFH_MIO } from "../../../data/logic/redirection"; const InternationalLandingPage = props => { + useEffect(() => { + if (_.isEqual(props.userGroupIds, [DATA_MONITORING])) { + return goToDhis2Url(props.baseUrl, "/api/apps/Data-Management-App/index.html"); + } else if (_.isEqual(props.userGroupIds, [EFH_ADMIN, EFH_DASHBOARD, EFH_DATA_ENTRY, EFH_MIO])) { + return goToDhis2Url(props.baseUrl, "/api/apps/Emergency-Field-Hospital-App/index.html"); + } + }, [props]); + return ; }; From ba482f420af589de9316ef3d3b6d2e104af21a5a Mon Sep 17 00:00:00 2001 From: deeonwuli Date: Thu, 25 Aug 2022 13:46:47 +0100 Subject: [PATCH 07/17] use intersection instead of isEqual --- src/webapp/pages/landing-page/international.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webapp/pages/landing-page/international.jsx b/src/webapp/pages/landing-page/international.jsx index 866f9ab..7858116 100644 --- a/src/webapp/pages/landing-page/international.jsx +++ b/src/webapp/pages/landing-page/international.jsx @@ -8,9 +8,9 @@ import { DATA_MONITORING, EFH_ADMIN, EFH_DASHBOARD, EFH_DATA_ENTRY, EFH_MIO } fr const InternationalLandingPage = props => { useEffect(() => { - if (_.isEqual(props.userGroupIds, [DATA_MONITORING])) { + if (_.intersection(props.userGroupIds, [DATA_MONITORING])) { return goToDhis2Url(props.baseUrl, "/api/apps/Data-Management-App/index.html"); - } else if (_.isEqual(props.userGroupIds, [EFH_ADMIN, EFH_DASHBOARD, EFH_DATA_ENTRY, EFH_MIO])) { + } else if (_.intersection(props.userGroupIds, [EFH_ADMIN, EFH_DASHBOARD, EFH_DATA_ENTRY, EFH_MIO])) { return goToDhis2Url(props.baseUrl, "/api/apps/Emergency-Field-Hospital-App/index.html"); } }, [props]); From a291847a9d58fac28d0b37e13984706492c761fc Mon Sep 17 00:00:00 2001 From: Adrian Quintana Date: Thu, 25 Aug 2022 20:18:03 +0100 Subject: [PATCH 08/17] add missing conditions. update users --- src/data/logic/redirection.ts | 9 +++------ src/webapp/pages/landing-page/international.jsx | 12 +++++++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/data/logic/redirection.ts b/src/data/logic/redirection.ts index d965100..23e4032 100644 --- a/src/data/logic/redirection.ts +++ b/src/data/logic/redirection.ts @@ -41,11 +41,8 @@ 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_ADMIN = "e8u0kJa8HM5"; -export const EFH_DATA_ENTRY = "wjoMlqXjabf"; -export const EFH_MIO = "eKTwo5C7h5N"; -export const EFH_DASHBOARD = "cW5vzBo63yj"; -export const DATA_MONITORING = ""; +export const EFH_USER = "xMIXMg7vMH3"; +export const DATA_MANAGEMENT_USER = "gn7m6dZ7gxb"; const IT_MAINTENANCE_TEAM = "BwyMfDBLih9"; @@ -151,7 +148,7 @@ export const buildAvailableConfigurations = (version: number): Configuration[] = programme: "international-projects", title: i18n.t("International Projects"), description: i18n.t("Landing Page for International Projects"), - userGroupIds: [EFH_ADMIN, EFH_DASHBOARD, EFH_DATA_ENTRY, EFH_MIO, DATA_MONITORING], + userGroupIds: [EFH_USER, DATA_MANAGEMENT_USER], page: InternationalLandingPage, header: internationalHeader, data: internationalData, diff --git a/src/webapp/pages/landing-page/international.jsx b/src/webapp/pages/landing-page/international.jsx index 7858116..b71ca92 100644 --- a/src/webapp/pages/landing-page/international.jsx +++ b/src/webapp/pages/landing-page/international.jsx @@ -4,14 +4,16 @@ import _ from "lodash"; import { styles } from "../../../domain/models/hepatitis/styles"; import { goToDhis2Url } from "../../../utils/utils"; import LandingPage from "./generic"; -import { DATA_MONITORING, EFH_ADMIN, EFH_DASHBOARD, EFH_DATA_ENTRY, EFH_MIO } from "../../../data/logic/redirection"; +import { DATA_MANAGEMENT_USER, EFH_USER } from "../../../data/logic/redirection"; const InternationalLandingPage = props => { useEffect(() => { - if (_.intersection(props.userGroupIds, [DATA_MONITORING])) { - return goToDhis2Url(props.baseUrl, "/api/apps/Data-Management-App/index.html"); - } else if (_.intersection(props.userGroupIds, [EFH_ADMIN, EFH_DASHBOARD, EFH_DATA_ENTRY, EFH_MIO])) { - return goToDhis2Url(props.baseUrl, "/api/apps/Emergency-Field-Hospital-App/index.html"); + if (_.intersection(props.userGroupIds, [DATA_MANAGEMENT_USER, EFH_USER]).length < 2) { + if (_.intersection(props.userGroupIds, [DATA_MANAGEMENT_USER]).length > 0) { + return goToDhis2Url(props.baseUrl, "/api/apps/Data-Management-App/index.html"); + } else if (_.intersection(props.userGroupIds, [EFH_USER]).length > 0) { + return goToDhis2Url(props.baseUrl, "/api/apps/Emergency-Field-Hospital-App/index.html"); + } } }, [props]); From da34f0792b7fe7560c7dce751f5edfa5f5836dd7 Mon Sep 17 00:00:00 2001 From: Adrian Quintana Date: Fri, 26 Aug 2022 10:36:30 +0100 Subject: [PATCH 09/17] update icon --- i18n/de.po | 106 ++++++++++++++++- i18n/en.pot | 107 +++++++++++++++++- i18n/es.po | 106 ++++++++++++++++- i18n/fr.po | 106 ++++++++++++++++- i18n/it.po | 106 ++++++++++++++++- i18n/pt.po | 106 ++++++++++++++++- i18n/ru.po | 106 ++++++++++++++++- public/img/dhis-web-capture.png | Bin 0 -> 12104 bytes .../models/international/International.ts | 2 +- 9 files changed, 729 insertions(+), 16 deletions(-) create mode 100644 public/img/dhis-web-capture.png diff --git a/i18n/de.po b/i18n/de.po index 58b0a8c..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: 2022-08-23T08:44:09.107Z\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" @@ -53,6 +56,9 @@ msgstr "" msgid "Landing Page for International Projects" msgstr "" +msgid "Eastern Mediterranean regional malaria repository" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -79,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" @@ -312,6 +411,9 @@ msgstr "" msgid "LOG OUT" msgstr "" +msgid "Eastern Mediterranian Regional Malaria Repository" +msgstr "" + msgid "User guide" msgstr "" diff --git a/i18n/en.pot b/i18n/en.pot index f2dc35a..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: 2022-08-23T08:44:09.107Z\n" -"PO-Revision-Date: 2022-08-23T08:44:09.107Z\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" @@ -53,6 +56,9 @@ msgstr "" msgid "Landing Page for International Projects" msgstr "" +msgid "Eastern Mediterranean regional malaria repository" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -77,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 "" @@ -306,6 +404,9 @@ msgstr "" msgid "LOG OUT" msgstr "" +msgid "Eastern Mediterranian Regional Malaria Repository" +msgstr "" + msgid "User guide" msgstr "" diff --git a/i18n/es.po b/i18n/es.po index 27717f2..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: 2022-08-23T08:44:09.107Z\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" @@ -53,6 +56,9 @@ msgstr "" msgid "Landing Page for International Projects" msgstr "" +msgid "Eastern Mediterranean regional malaria repository" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -78,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" @@ -307,6 +406,9 @@ msgstr "" msgid "LOG OUT" msgstr "" +msgid "Eastern Mediterranian Regional Malaria Repository" +msgstr "" + msgid "User guide" msgstr "" diff --git a/i18n/fr.po b/i18n/fr.po index ab7ac18..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: 2022-08-23T08:44:09.107Z\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" @@ -53,6 +56,9 @@ msgstr "" msgid "Landing Page for International Projects" msgstr "" +msgid "Eastern Mediterranean regional malaria repository" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -78,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" @@ -308,6 +407,9 @@ msgstr "" msgid "LOG OUT" msgstr "" +msgid "Eastern Mediterranian Regional Malaria Repository" +msgstr "" + msgid "User guide" msgstr "" diff --git a/i18n/it.po b/i18n/it.po index a8b7e73..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: 2022-08-23T08:44:09.107Z\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" @@ -53,6 +56,9 @@ msgstr "" msgid "Landing Page for International Projects" msgstr "" +msgid "Eastern Mediterranean regional malaria repository" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -79,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" @@ -309,6 +408,9 @@ msgstr "" msgid "LOG OUT" msgstr "" +msgid "Eastern Mediterranian Regional Malaria Repository" +msgstr "" + msgid "User guide" msgstr "" diff --git a/i18n/pt.po b/i18n/pt.po index 1e4837d..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: 2022-08-23T08:44:09.107Z\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" @@ -53,6 +56,9 @@ msgstr "" msgid "Landing Page for International Projects" msgstr "" +msgid "Eastern Mediterranean regional malaria repository" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -77,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" @@ -306,6 +405,9 @@ msgstr "" msgid "LOG OUT" msgstr "" +msgid "Eastern Mediterranian Regional Malaria Repository" +msgstr "" + msgid "User guide" msgstr "" diff --git a/i18n/ru.po b/i18n/ru.po index 8de8b29..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: 2022-08-23T08:44:09.107Z\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" @@ -53,6 +56,9 @@ msgstr "" msgid "Landing Page for International Projects" msgstr "" +msgid "Eastern Mediterranean regional malaria repository" +msgstr "" + msgid "Available landing pages" msgstr "" @@ -78,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 "Данные" @@ -309,6 +408,9 @@ msgstr "" msgid "LOG OUT" msgstr "" +msgid "Eastern Mediterranian Regional Malaria Repository" +msgstr "" + msgid "User guide" msgstr "" diff --git a/public/img/dhis-web-capture.png b/public/img/dhis-web-capture.png new file mode 100644 index 0000000000000000000000000000000000000000..3b4929bdaa245b523dc418691dae3d45b91f03d7 GIT binary patch literal 12104 zcmV-OFSpQ%P)GP2HK@>;is2a}I|jGq=C@?S;UmC*BpIcfwr?^mV8n%?RjAdV&Z- z5dgpgfKJ#Qp#UYyLp(3*1Ss8VTRzr~!fs0L1GMm{dUr@*ySYN+?35w_I%q_MY7=ZLp@LH!B#$_{wyX<-QaH zN#RDcy|uH)CwdCpB|2=@>-7te8h#0gXBb2FQ9hNjgFWyl=QRS|ctU9XhK=~ZbpY4(9yu=tn`~Fd&03a7B!RPSF+pL5QH!0y(0WRhbW#u*Jr;z3Ytct`x4asD?FH&F5XEg00h0~tD`RC05S-m z-T*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c>BQHikyRicXE z<>t(DrwYfQu__&`CZLr%Kz3a)cGFp&-@A8HIq#o851z*#d#>WbjVxB!kq1ZG=da1% z!EQYT|28~F{s6+=H!&$nBt?yhvAkz09>-Pp5MQ0~#(omFhVU zq4e}@+)qhITG}Jrx%&{;6H;*fMjFmt&2UP+9@{rcjpwz!M>SQj-EzEjIrSOJ!HnAK z08cj^++1~BdG{yz6uJ2%2m^pI^#Xx8tLf%RWX2e6f6&WFWMK*T+8;) zc5}4lEY$Yj001n4LSC2YP+j`7pmAy&@c;ci^b7!4wF6;nl1lwu`P=Sz`eZvrd(pzC z9Uvr|kf44^gd)tKS5|t|T-@Jl0SkXL58BiZYXm7ySzYYYI!E%mAPV!5n=`*l5FF0^hGoh;9p^D5)I) zI40^jIv_dJ{4D0jzlG0YeEtc_k5371QR>nKsf&&pW?MGSLzk8_69fZ6;UX^)2s#$g zCA;a+|6s$X!G{!L+X!J{(F^tdo+EK(Uap0x1oo{&pxZzIVYOp!tQT_rzfsP&fQh9Z z0j2aD1?h&=C4ZX)VdHo4Is_$mBb3Z1paBN4(3+eqE4IjRta7NCZ=Zg4a3P@T&h6u5td2lLX!P^Wym898{6)0q%5o)B8uA{_{% zfkKLb&Q60Shl2S$i9IMS`>k5hz0Ocu*3bR0t1<|-b#pykR_D@UB=f<&peFS<6a+eTn*6T4JsU`n0 zF?@2nsExjJ%wbM-9YGIDNh?BV833M!a=2DjeO^F^a>48W>5CBS9?sXef$^TXi;7Af^HwM&$kX%af yKnMLzsw01q0^QyMcXAweLX&`aehz-C@cDnX$YPzbSvK+j0000K literal 0 HcmV?d00001 diff --git a/src/domain/models/international/International.ts b/src/domain/models/international/International.ts index 1903671..c063aa8 100644 --- a/src/domain/models/international/International.ts +++ b/src/domain/models/international/International.ts @@ -15,7 +15,7 @@ export const internationalData = [ key: "efh", title: i18n.t("EFH"), rowLength: 2, - icon: "img/dhis-web-event-capture.png", + icon: "img/dhis-web-capture.png", action: { type: "dhisRedirect", value: "/api/apps/Emergency-Field-Hospital-App/index.html", From 5304e885904848bdccb44b2f2ceefb497066e1bf Mon Sep 17 00:00:00 2001 From: Adrian Quintana Date: Mon, 29 Aug 2022 12:25:04 +0100 Subject: [PATCH 10/17] update UG ids --- src/data/logic/redirection.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/logic/redirection.ts b/src/data/logic/redirection.ts index 5bef6e4..ed9a71e 100644 --- a/src/data/logic/redirection.ts +++ b/src/data/logic/redirection.ts @@ -45,8 +45,8 @@ 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 = "xMIXMg7vMH3"; -export const DATA_MANAGEMENT_USER = "gn7m6dZ7gxb"; +export const EFH_USER = "IdneucbQYRb"; +export const DATA_MANAGEMENT_USER = "mh5Tx6MS9jn"; const IT_MAINTENANCE_TEAM = "BwyMfDBLih9"; From 5cd76403f22fcf819d12252d40c71fa7e5207153 Mon Sep 17 00:00:00 2001 From: Arnau Sanchez Date: Mon, 29 Aug 2022 13:31:48 +0200 Subject: [PATCH 11/17] Clean lint warnings in Malaria --- src/domain/models/east_mediterranian_mal/Malaria.jsx | 1 - 1 file changed, 1 deletion(-) 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"; From 836dfebd0244ecea96beef0a03952e5e76acc893 Mon Sep 17 00:00:00 2001 From: Arnau Sanchez Date: Mon, 29 Aug 2022 13:33:23 +0200 Subject: [PATCH 12/17] International projects: only render after checking redirects --- src/webapp/pages/landing-page/international.jsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/webapp/pages/landing-page/international.jsx b/src/webapp/pages/landing-page/international.jsx index b71ca92..b8c0e0d 100644 --- a/src/webapp/pages/landing-page/international.jsx +++ b/src/webapp/pages/landing-page/international.jsx @@ -1,4 +1,4 @@ -import { withStyles } from "@material-ui/core"; +import { LinearProgress, withStyles } from "@material-ui/core"; import React, { useEffect } from "react"; import _ from "lodash"; import { styles } from "../../../domain/models/hepatitis/styles"; @@ -7,16 +7,24 @@ 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) { - return goToDhis2Url(props.baseUrl, "/api/apps/Data-Management-App/index.html"); + goToDhis2Url(props.baseUrl, "/api/apps/Data-Management-App/index.html"); } else if (_.intersection(props.userGroupIds, [EFH_USER]).length > 0) { - return goToDhis2Url(props.baseUrl, "/api/apps/Emergency-Field-Hospital-App/index.html"); + goToDhis2Url(props.baseUrl, "/api/apps/Emergency-Field-Hospital-App/index.html"); + } else { + setRenderPage(true); } + } else { + setRenderPage(true); } }, [props]); + if (!renderPage) return ; + return ; }; From b51e08bf401e7b24ccb513f5112009c0f8daa89d Mon Sep 17 00:00:00 2001 From: Arnau Sanchez Date: Mon, 29 Aug 2022 13:59:46 +0200 Subject: [PATCH 13/17] [temporal] Set international-projects as default programme --- src/data/logic/redirection.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/data/logic/redirection.ts b/src/data/logic/redirection.ts index ed9a71e..51b8957 100644 --- a/src/data/logic/redirection.ts +++ b/src/data/logic/redirection.ts @@ -52,7 +52,6 @@ const IT_MAINTENANCE_TEAM = "BwyMfDBLih9"; const MAL_EMRO = "FpQ7a5OylZH"; - export interface Configuration { programme: string; title: string; @@ -183,20 +182,29 @@ export const buildAvailableConfigurations = (version: number): Configuration[] = }, ]; +const defaultProgramme: string | undefined = "international-projects"; + const shouldRedirect = (actualIds: string[], expectedIds: string[]): boolean => _.intersection(actualIds, expectedIds).length > 0; export const handleRedirection = async (baseUrl: string, version: number, user: User) => { const userGroupIds = user.userGroups.map(userGroup => userGroup.id); const isAdminUserGroup = shouldRedirect(userGroupIds, [IT_MAINTENANCE_TEAM]); - const configurations = buildAvailableConfigurations(version).filter( + const availableConfiguration = buildAvailableConfigurations(version); + const configurations = availableConfiguration.filter( config => isAdminUserGroup || shouldRedirect(userGroupIds, config.userGroupIds) ); if (configurations.length > 0) { return { username: user.name, userGroupIds: userGroupIds, configurations }; } else { - goToDhis2Url(baseUrl, "/dhis-web-dashboard/index.action"); - return null; + const fallbackConfig = availableConfiguration.find(config => config.programme === defaultProgramme); + + if (fallbackConfig) { + return { username: user.name, userGroupIds: userGroupIds, configurations: [fallbackConfig] }; + } else { + goToDhis2Url(baseUrl, "/"); + return null; + } } }; From 5b5831bc7decc1b92542b3924267b50c706f4791 Mon Sep 17 00:00:00 2001 From: Arnau Sanchez Date: Tue, 30 Aug 2022 12:06:53 +0200 Subject: [PATCH 14/17] Add config entity with fallback info persisted in the dataStore --- src/compositionRoot.ts | 6 ++++ src/data/logic/redirection.ts | 18 ++++++---- .../repositories/ConfigD2ApiRepository.ts | 35 +++++++++++++++++++ src/domain/entities/Config.ts | 6 ++++ src/domain/repositories/ConfigRepository.ts | 5 +-- src/domain/usecases/GetConfigUseCase.ts | 11 ++++++ src/webapp/pages/app/App.tsx | 3 +- 7 files changed, 74 insertions(+), 10 deletions(-) create mode 100644 src/data/repositories/ConfigD2ApiRepository.ts create mode 100644 src/domain/entities/Config.ts create mode 100644 src/domain/usecases/GetConfigUseCase.ts 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 51b8957..d485322 100644 --- a/src/data/logic/redirection.ts +++ b/src/data/logic/redirection.ts @@ -23,6 +23,7 @@ import { 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"; @@ -182,28 +183,31 @@ export const buildAvailableConfigurations = (version: number): Configuration[] = }, ]; -const defaultProgramme: string | undefined = "international-projects"; - const shouldRedirect = (actualIds: string[], expectedIds: string[]): boolean => _.intersection(actualIds, expectedIds).length > 0; -export const handleRedirection = async (baseUrl: string, version: number, user: User) => { +export const handleRedirection = async (baseUrl: string, version: number, user: User, config: Config) => { const userGroupIds = user.userGroups.map(userGroup => userGroup.id); const isAdminUserGroup = shouldRedirect(userGroupIds, [IT_MAINTENANCE_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, userGroupIds: userGroupIds, configurations }; + return { username, userGroupIds, configurations }; } else { - const fallbackConfig = availableConfiguration.find(config => config.programme === defaultProgramme); + const { defaultProgramme, fallbackUrl } = config; + + const fallbackConfig = defaultProgramme + ? availableConfiguration.find(config => config.programme === defaultProgramme) + : undefined; if (fallbackConfig) { - return { username: user.name, userGroupIds: userGroupIds, configurations: [fallbackConfig] }; + return { username, userGroupIds, configurations: [fallbackConfig] }; } else { - goToDhis2Url(baseUrl, "/"); + 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..4b25a87 --- /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: 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/repositories/ConfigRepository.ts b/src/domain/repositories/ConfigRepository.ts index c57a89b..8b97d1e 100644 --- a/src/domain/repositories/ConfigRepository.ts +++ b/src/domain/repositories/ConfigRepository.ts @@ -1,5 +1,6 @@ -import { User } from "../entities/User"; +import { Config } from "../entities/Config"; +import { Instance } from "../entities/Instance"; 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/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 }); }; From 9d327087ecfd5c0096c6b1082d6b9683eb599b9b Mon Sep 17 00:00:00 2001 From: Arnau Sanchez Date: Tue, 30 Aug 2022 12:07:11 +0200 Subject: [PATCH 15/17] Add .nvmrc file --- .nvmrc | 1 + 1 file changed, 1 insertion(+) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..bf79505 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v16.14.0 From af1a366e43677711b5b8ee8988e916d03abda8e5 Mon Sep 17 00:00:00 2001 From: Arnau Sanchez Date: Tue, 30 Aug 2022 12:13:46 +0200 Subject: [PATCH 16/17] Make defaultProgramme optional --- src/data/repositories/ConfigD2ApiRepository.ts | 2 +- src/domain/repositories/ConfigRepository.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/data/repositories/ConfigD2ApiRepository.ts b/src/data/repositories/ConfigD2ApiRepository.ts index 4b25a87..31696a9 100644 --- a/src/data/repositories/ConfigD2ApiRepository.ts +++ b/src/data/repositories/ConfigD2ApiRepository.ts @@ -26,7 +26,7 @@ export class ConfigD2ApiRepository implements ConfigRepository { const ConfigCodec = Codec.interface({ fallbackUrl: optional(string), - defaultProgramme: string, + defaultProgramme: optional(string), }); const defaultConfig: Config = { diff --git a/src/domain/repositories/ConfigRepository.ts b/src/domain/repositories/ConfigRepository.ts index 8b97d1e..e4c3479 100644 --- a/src/domain/repositories/ConfigRepository.ts +++ b/src/domain/repositories/ConfigRepository.ts @@ -1,5 +1,4 @@ import { Config } from "../entities/Config"; -import { Instance } from "../entities/Instance"; export interface ConfigRepository { get(): Promise; From bcd7951984cb7aed93d018478f57529b325c5566 Mon Sep 17 00:00:00 2001 From: Adrian Quintana Date: Thu, 1 Sep 2022 13:23:25 +0200 Subject: [PATCH 17/17] update id for widp maintenance user group --- src/data/logic/redirection.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/logic/redirection.ts b/src/data/logic/redirection.ts index d485322..028351c 100644 --- a/src/data/logic/redirection.ts +++ b/src/data/logic/redirection.ts @@ -49,7 +49,7 @@ export const SS_NTD_RAB_AggData_View = "B6oADCiiW8v"; export const EFH_USER = "IdneucbQYRb"; export const DATA_MANAGEMENT_USER = "mh5Tx6MS9jn"; -const IT_MAINTENANCE_TEAM = "BwyMfDBLih9"; +const WIDP_IT_TEAM = "UfhhwZK73Lg"; const MAL_EMRO = "FpQ7a5OylZH"; @@ -188,7 +188,7 @@ const shouldRedirect = (actualIds: string[], expectedIds: string[]): boolean => export const handleRedirection = async (baseUrl: string, version: number, user: User, config: Config) => { const userGroupIds = user.userGroups.map(userGroup => userGroup.id); - const isAdminUserGroup = shouldRedirect(userGroupIds, [IT_MAINTENANCE_TEAM]); + const isAdminUserGroup = shouldRedirect(userGroupIds, [WIDP_IT_TEAM]); const availableConfiguration = buildAvailableConfigurations(version); const configurations = availableConfiguration.filter( config => isAdminUserGroup || shouldRedirect(userGroupIds, config.userGroupIds)