From 2000d2626d9752c213096db51cce8c41d09facfe Mon Sep 17 00:00:00 2001 From: mariaozamiz Date: Mon, 29 Jan 2024 09:43:45 +0100 Subject: [PATCH 01/10] feat: create AnalysisPage --- src/webapp/pages/Router.tsx | 3 +- src/webapp/pages/analysis/AnalysisPage.tsx | 30 +++++++++++++++++++ .../analysis/__tests__/AnalysisPage.spec.tsx | 15 ++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 src/webapp/pages/analysis/AnalysisPage.tsx create mode 100644 src/webapp/pages/analysis/__tests__/AnalysisPage.spec.tsx diff --git a/src/webapp/pages/Router.tsx b/src/webapp/pages/Router.tsx index e011f98..49d5434 100644 --- a/src/webapp/pages/Router.tsx +++ b/src/webapp/pages/Router.tsx @@ -1,6 +1,7 @@ import React from "react"; import { HashRouter, Route, Switch } from "react-router-dom"; import { ExamplePage } from "./example/ExamplePage"; +import { AnalysisPage } from "./analysis/AnalysisPage"; import { LandingPage } from "./landing/LandingPage"; export function Router() { @@ -11,7 +12,7 @@ export function Router() { path="/for/:name?" render={({ match }) => } /> - + } /> {/* Default route */} } /> diff --git a/src/webapp/pages/analysis/AnalysisPage.tsx b/src/webapp/pages/analysis/AnalysisPage.tsx new file mode 100644 index 0000000..8bc8621 --- /dev/null +++ b/src/webapp/pages/analysis/AnalysisPage.tsx @@ -0,0 +1,30 @@ +import React from "react"; +import { useHistory } from "react-router-dom"; +import styled from "styled-components"; +import i18n from "../../../utils/i18n"; +import { PageHeader } from "../../components/page-header/PageHeader"; + +export const AnalysisPage: React.FC = React.memo(props => { + const { name = "Analysis" } = props; + const title = i18n.t("Hello {{name}}", { name }); + const history = useHistory(); + + const goBack = React.useCallback(() => { + history.goBack(); + }, [history]); + + return ( + + + {title} + + ); +}); + +const Title = styled.h2` + color: blue; +`; + +interface PageProps { + name: string; +} diff --git a/src/webapp/pages/analysis/__tests__/AnalysisPage.spec.tsx b/src/webapp/pages/analysis/__tests__/AnalysisPage.spec.tsx new file mode 100644 index 0000000..f609bf6 --- /dev/null +++ b/src/webapp/pages/analysis/__tests__/AnalysisPage.spec.tsx @@ -0,0 +1,15 @@ +import { getReactComponent } from "../../../../utils/tests"; +import { AnalysisPage } from "../../analysis/AnalysisPage"; + +describe("ExamplePage", () => { + it("renders the feedback component", async () => { + const view = getView(); + + expect(await view.findByText("Analysis page")).toBeInTheDocument(); + expect(view.asFragment()).toMatchSnapshot(); + }); +}); + +function getView() { + return getReactComponent(); +} From 7edfe4a3893bbf51fcbbe1a6a797a2e50a5aa2f1 Mon Sep 17 00:00:00 2001 From: mariaozamiz Date: Mon, 29 Jan 2024 14:00:01 +0100 Subject: [PATCH 02/10] feat: add stepper at AnalysisPage --- src/webapp/pages/analysis/AnalysisPage.tsx | 29 +++------ .../analysis/__tests__/AnalysisPage.spec.tsx | 4 +- src/webapp/pages/analysis/steps.ts | 63 +++++++++++++++++++ .../analysis/steps/ConfigurationStep.tsx | 24 +++++++ .../pages/analysis/steps/DensityStep.tsx | 24 +++++++ .../analysis/steps/DisaggregatesStep.tsx | 24 +++++++ .../pages/analysis/steps/DoctorsStep.tsx | 25 ++++++++ .../pages/analysis/steps/MidwiferyStep.tsx | 24 +++++++ .../analysis/steps/NursingMidwiferyStep.tsx | 24 +++++++ .../pages/analysis/steps/NursingStep.tsx | 24 +++++++ src/webapp/pages/analysis/steps/OtherStep.tsx | 25 ++++++++ .../pages/analysis/steps/OutliersStep.tsx | 25 ++++++++ .../pages/analysis/steps/TrendsStep.tsx | 24 +++++++ 13 files changed, 317 insertions(+), 22 deletions(-) create mode 100644 src/webapp/pages/analysis/steps.ts create mode 100644 src/webapp/pages/analysis/steps/ConfigurationStep.tsx create mode 100644 src/webapp/pages/analysis/steps/DensityStep.tsx create mode 100644 src/webapp/pages/analysis/steps/DisaggregatesStep.tsx create mode 100644 src/webapp/pages/analysis/steps/DoctorsStep.tsx create mode 100644 src/webapp/pages/analysis/steps/MidwiferyStep.tsx create mode 100644 src/webapp/pages/analysis/steps/NursingMidwiferyStep.tsx create mode 100644 src/webapp/pages/analysis/steps/NursingStep.tsx create mode 100644 src/webapp/pages/analysis/steps/OtherStep.tsx create mode 100644 src/webapp/pages/analysis/steps/OutliersStep.tsx create mode 100644 src/webapp/pages/analysis/steps/TrendsStep.tsx diff --git a/src/webapp/pages/analysis/AnalysisPage.tsx b/src/webapp/pages/analysis/AnalysisPage.tsx index 8bc8621..4d7838a 100644 --- a/src/webapp/pages/analysis/AnalysisPage.tsx +++ b/src/webapp/pages/analysis/AnalysisPage.tsx @@ -1,30 +1,19 @@ import React from "react"; -import { useHistory } from "react-router-dom"; -import styled from "styled-components"; import i18n from "../../../utils/i18n"; import { PageHeader } from "../../components/page-header/PageHeader"; +import { Wizard } from "@eyeseetea/d2-ui-components"; +import { steps } from "./steps"; -export const AnalysisPage: React.FC = React.memo(props => { - const { name = "Analysis" } = props; - const title = i18n.t("Hello {{name}}", { name }); - const history = useHistory(); - - const goBack = React.useCallback(() => { - history.goBack(); - }, [history]); +type PageProps = { + name: string; +}; +export const AnalysisPage: React.FC = React.memo(props => { + const { name = "Analysis Page" } = props; return ( - - {title} + + ); }); - -const Title = styled.h2` - color: blue; -`; - -interface PageProps { - name: string; -} diff --git a/src/webapp/pages/analysis/__tests__/AnalysisPage.spec.tsx b/src/webapp/pages/analysis/__tests__/AnalysisPage.spec.tsx index f609bf6..3be3419 100644 --- a/src/webapp/pages/analysis/__tests__/AnalysisPage.spec.tsx +++ b/src/webapp/pages/analysis/__tests__/AnalysisPage.spec.tsx @@ -1,11 +1,11 @@ import { getReactComponent } from "../../../../utils/tests"; import { AnalysisPage } from "../../analysis/AnalysisPage"; -describe("ExamplePage", () => { +describe("AnalysisPage", () => { it("renders the feedback component", async () => { const view = getView(); - expect(await view.findByText("Analysis page")).toBeInTheDocument(); + expect(await view.findByText("Analysis")).toBeInTheDocument(); expect(view.asFragment()).toMatchSnapshot(); }); }); diff --git a/src/webapp/pages/analysis/steps.ts b/src/webapp/pages/analysis/steps.ts new file mode 100644 index 0000000..0a512d4 --- /dev/null +++ b/src/webapp/pages/analysis/steps.ts @@ -0,0 +1,63 @@ +import { ConfigurationStep } from "./steps/ConfigurationStep"; +import { DensityStep } from "./steps/DensityStep"; +import { DisaggregatesStep } from "./steps/DisaggregatesStep"; +import { DoctorsStep } from "./steps/DoctorsStep"; +import { MidwiferyStep } from "./steps/MidwiferyStep"; +import { NursingMidwiferyStep } from "./steps/NursingMidwiferyStep"; +import { NursingStep } from "./steps/NursingStep"; +import { OtherStep } from "./steps/OtherStep"; +import { OutliersStep } from "./steps/OutliersStep"; +import { TrendsStep } from "./steps/TrendsStep"; + +export const steps = [ + { + key: "configuration", + label: "Configuration", + component: ConfigurationStep, + }, + { + key: "outliers", + label: "Outliers", + component: OutliersStep, + }, + { + key: "trends", + label: "Trends", + component: TrendsStep, + }, + { + key: "disaggregates", + label: "Disaggregates", + component: DisaggregatesStep, + }, + { + key: "doctors", + label: "Doctors", + component: DoctorsStep, + }, + { + key: "nursing", + label: "Nursing", + component: NursingStep, + }, + { + key: "midwifery", + label: "Midwifery", + component: MidwiferyStep, + }, + { + key: "nursing-midwifery", + label: "Nursing/Midwifery", + component: NursingMidwiferyStep, + }, + { + key: "density", + label: "Density", + component: DensityStep, + }, + { + key: "other", + label: "Other", + component: OtherStep, + }, +]; diff --git a/src/webapp/pages/analysis/steps/ConfigurationStep.tsx b/src/webapp/pages/analysis/steps/ConfigurationStep.tsx new file mode 100644 index 0000000..7e74225 --- /dev/null +++ b/src/webapp/pages/analysis/steps/ConfigurationStep.tsx @@ -0,0 +1,24 @@ +import React from "react"; +import styled from "styled-components"; +import i18n from "../../../../utils/i18n"; + +export const ConfigurationStep: React.FC = React.memo(props => { + const { name = "Configuration" } = props; + return ( + + {i18n.t(name)} + + ); +}); + +const Container = styled.section` + height: 39.125rem; +`; + +const Title = styled.h2` + color: blue; +`; + +interface PageProps { + name: string; +} diff --git a/src/webapp/pages/analysis/steps/DensityStep.tsx b/src/webapp/pages/analysis/steps/DensityStep.tsx new file mode 100644 index 0000000..ac503d9 --- /dev/null +++ b/src/webapp/pages/analysis/steps/DensityStep.tsx @@ -0,0 +1,24 @@ +import React from "react"; +import styled from "styled-components"; +import i18n from "../../../../utils/i18n"; + +export const DensityStep: React.FC = React.memo(props => { + const { name = "Absolute values and density checks" } = props; + return ( + + {i18n.t(name)} + + ); +}); + +const Container = styled.section` + height: 39.125rem; +`; + +const Title = styled.h2` + color: blue; +`; + +interface PageProps { + name: string; +} diff --git a/src/webapp/pages/analysis/steps/DisaggregatesStep.tsx b/src/webapp/pages/analysis/steps/DisaggregatesStep.tsx new file mode 100644 index 0000000..d02aff8 --- /dev/null +++ b/src/webapp/pages/analysis/steps/DisaggregatesStep.tsx @@ -0,0 +1,24 @@ +import React from "react"; +import styled from "styled-components"; +import i18n from "../../../../utils/i18n"; + +export const DisaggregatesStep: React.FC = React.memo(props => { + const { name = "Missing disaggregates in selected catcombos" } = props; + return ( + + {i18n.t(name)} + + ); +}); + +const Container = styled.section` + height: 39.125rem; +`; + +const Title = styled.h2` + color: blue; +`; + +interface PageProps { + name: string; +} diff --git a/src/webapp/pages/analysis/steps/DoctorsStep.tsx b/src/webapp/pages/analysis/steps/DoctorsStep.tsx new file mode 100644 index 0000000..a5bcae8 --- /dev/null +++ b/src/webapp/pages/analysis/steps/DoctorsStep.tsx @@ -0,0 +1,25 @@ +import React from "react"; +import styled from "styled-components"; +import i18n from "../../../../utils/i18n"; + +export const DoctorsStep: React.FC = React.memo(props => { + const { name = "Medical doctors analysis: General Practicioners missing and double counts" } = + props; + return ( + + {i18n.t(name)} + + ); +}); + +const Container = styled.section` + height: 39.125rem; +`; + +const Title = styled.h2` + color: blue; +`; + +interface PageProps { + name: string; +} diff --git a/src/webapp/pages/analysis/steps/MidwiferyStep.tsx b/src/webapp/pages/analysis/steps/MidwiferyStep.tsx new file mode 100644 index 0000000..e84d29c --- /dev/null +++ b/src/webapp/pages/analysis/steps/MidwiferyStep.tsx @@ -0,0 +1,24 @@ +import React from "react"; +import styled from "styled-components"; +import i18n from "../../../../utils/i18n"; + +export const MidwiferyStep: React.FC = React.memo(props => { + const { name = "Midwifery personnel analysis" } = props; + return ( + + {i18n.t(name)} + + ); +}); + +const Container = styled.section` + height: 39.125rem; +`; + +const Title = styled.h2` + color: blue; +`; + +interface PageProps { + name: string; +} diff --git a/src/webapp/pages/analysis/steps/NursingMidwiferyStep.tsx b/src/webapp/pages/analysis/steps/NursingMidwiferyStep.tsx new file mode 100644 index 0000000..6f96d67 --- /dev/null +++ b/src/webapp/pages/analysis/steps/NursingMidwiferyStep.tsx @@ -0,0 +1,24 @@ +import React from "react"; +import styled from "styled-components"; +import i18n from "../../../../utils/i18n"; + +export const NursingMidwiferyStep: React.FC = React.memo(props => { + const { name = "Missing nursing personnel when midwifery personnel is present" } = props; + return ( + + {i18n.t(name)} + + ); +}); + +const Container = styled.section` + height: 39.125rem; +`; + +const Title = styled.h2` + color: blue; +`; + +interface PageProps { + name: string; +} diff --git a/src/webapp/pages/analysis/steps/NursingStep.tsx b/src/webapp/pages/analysis/steps/NursingStep.tsx new file mode 100644 index 0000000..e2685e4 --- /dev/null +++ b/src/webapp/pages/analysis/steps/NursingStep.tsx @@ -0,0 +1,24 @@ +import React from "react"; +import styled from "styled-components"; +import i18n from "../../../../utils/i18n"; + +export const NursingStep: React.FC = React.memo(props => { + const { name = "Nursing personnel analysis" } = props; + return ( + + {i18n.t(name)} + + ); +}); + +const Container = styled.section` + height: 39.125rem; +`; + +const Title = styled.h2` + color: blue; +`; + +interface PageProps { + name: string; +} diff --git a/src/webapp/pages/analysis/steps/OtherStep.tsx b/src/webapp/pages/analysis/steps/OtherStep.tsx new file mode 100644 index 0000000..4f4c3ef --- /dev/null +++ b/src/webapp/pages/analysis/steps/OtherStep.tsx @@ -0,0 +1,25 @@ +import React from "react"; +import styled from "styled-components"; +import i18n from "../../../../utils/i18n"; + +export const OtherStep: React.FC = React.memo(props => { + const { name = "Custom step with some filtering in order to allow some specific checks" } = + props; + return ( + + {i18n.t(name)} + + ); +}); + +const Container = styled.section` + height: 39.125rem; +`; + +const Title = styled.h2` + color: blue; +`; + +interface PageProps { + name: string; +} diff --git a/src/webapp/pages/analysis/steps/OutliersStep.tsx b/src/webapp/pages/analysis/steps/OutliersStep.tsx new file mode 100644 index 0000000..d0c7d98 --- /dev/null +++ b/src/webapp/pages/analysis/steps/OutliersStep.tsx @@ -0,0 +1,25 @@ +import React from "react"; +import styled from "styled-components"; +import i18n from "../../../../utils/i18n"; + +export const OutliersStep: React.FC = React.memo(props => { + const { name = "Outliers detection analysis based on DHIS2 min-max standard functionality" } = + props; + return ( + + {i18n.t(name)} + + ); +}); + +const Container = styled.section` + height: 39.125rem; +`; + +const Title = styled.h2` + color: blue; +`; + +interface PageProps { + name: string; +} diff --git a/src/webapp/pages/analysis/steps/TrendsStep.tsx b/src/webapp/pages/analysis/steps/TrendsStep.tsx new file mode 100644 index 0000000..af7e0a2 --- /dev/null +++ b/src/webapp/pages/analysis/steps/TrendsStep.tsx @@ -0,0 +1,24 @@ +import React from "react"; +import styled from "styled-components"; +import i18n from "../../../../utils/i18n"; + +export const TrendsStep: React.FC = React.memo(props => { + const { name = "Temporal trend to detect drastic trends modification" } = props; + return ( + + {i18n.t(name)} + + ); +}); + +const Container = styled.section` + height: 39.125rem; +`; + +const Title = styled.h2` + color: blue; +`; + +interface PageProps { + name: string; +} From ae12033c9ddf4af7f12a288da60e90a213c81a17 Mon Sep 17 00:00:00 2001 From: mariaozamiz Date: Mon, 29 Jan 2024 14:14:39 +0100 Subject: [PATCH 03/10] chore: update snapshot --- .../__snapshots__/AnalysisPage.spec.tsx.snap | 621 ++++++++++++++++++ 1 file changed, 621 insertions(+) create mode 100644 src/webapp/pages/analysis/__tests__/__snapshots__/AnalysisPage.spec.tsx.snap diff --git a/src/webapp/pages/analysis/__tests__/__snapshots__/AnalysisPage.spec.tsx.snap b/src/webapp/pages/analysis/__tests__/__snapshots__/AnalysisPage.spec.tsx.snap new file mode 100644 index 0000000..a8970ba --- /dev/null +++ b/src/webapp/pages/analysis/__tests__/__snapshots__/AnalysisPage.spec.tsx.snap @@ -0,0 +1,621 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`AnalysisPage > renders the feedback component 1`] = ` + +
+
+ Analysis +
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+

+ Configuration +

+
+
+ + +
+
+
+
+`; From f0a11b39be21d190bd1293b9494c7d2c44606650 Mon Sep 17 00:00:00 2001 From: mariaozamiz Date: Tue, 30 Jan 2024 10:58:22 +0100 Subject: [PATCH 04/10] chore: remove 'name' reference as it's being passed from Route component --- src/webapp/pages/analysis/AnalysisPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webapp/pages/analysis/AnalysisPage.tsx b/src/webapp/pages/analysis/AnalysisPage.tsx index 4d7838a..42ea0ef 100644 --- a/src/webapp/pages/analysis/AnalysisPage.tsx +++ b/src/webapp/pages/analysis/AnalysisPage.tsx @@ -9,7 +9,7 @@ type PageProps = { }; export const AnalysisPage: React.FC = React.memo(props => { - const { name = "Analysis Page" } = props; + const { name } = props; return ( From 35de2687fed2cd6334a930f249b67ee2af63fa43 Mon Sep 17 00:00:00 2001 From: mariaozamiz Date: Tue, 30 Jan 2024 11:06:03 +0100 Subject: [PATCH 05/10] chore: add translations --- src/webapp/pages/Router.tsx | 6 +++++- src/webapp/pages/analysis/steps.ts | 21 +++++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/webapp/pages/Router.tsx b/src/webapp/pages/Router.tsx index 49d5434..1fd4d7b 100644 --- a/src/webapp/pages/Router.tsx +++ b/src/webapp/pages/Router.tsx @@ -3,6 +3,7 @@ import { HashRouter, Route, Switch } from "react-router-dom"; import { ExamplePage } from "./example/ExamplePage"; import { AnalysisPage } from "./analysis/AnalysisPage"; import { LandingPage } from "./landing/LandingPage"; +import i18n from "../../utils/i18n"; export function Router() { return ( @@ -12,7 +13,10 @@ export function Router() { path="/for/:name?" render={({ match }) => } /> - } /> + } + /> {/* Default route */} } /> diff --git a/src/webapp/pages/analysis/steps.ts b/src/webapp/pages/analysis/steps.ts index 0a512d4..3419a2a 100644 --- a/src/webapp/pages/analysis/steps.ts +++ b/src/webapp/pages/analysis/steps.ts @@ -1,3 +1,4 @@ +import i18n from "../../../utils/i18n"; import { ConfigurationStep } from "./steps/ConfigurationStep"; import { DensityStep } from "./steps/DensityStep"; import { DisaggregatesStep } from "./steps/DisaggregatesStep"; @@ -12,52 +13,52 @@ import { TrendsStep } from "./steps/TrendsStep"; export const steps = [ { key: "configuration", - label: "Configuration", + label: i18n.t("Configuration"), component: ConfigurationStep, }, { key: "outliers", - label: "Outliers", + label: i18n.t("Outliers"), component: OutliersStep, }, { key: "trends", - label: "Trends", + label: i18n.t("Trends"), component: TrendsStep, }, { key: "disaggregates", - label: "Disaggregates", + label: i18n.t("Disaggregates"), component: DisaggregatesStep, }, { key: "doctors", - label: "Doctors", + label: i18n.t("Doctors"), component: DoctorsStep, }, { key: "nursing", - label: "Nursing", + label: i18n.t("Nursing"), component: NursingStep, }, { key: "midwifery", - label: "Midwifery", + label: i18n.t("Midwifery"), component: MidwiferyStep, }, { key: "nursing-midwifery", - label: "Nursing/Midwifery", + label: i18n.t("Nursing/Midwifery"), component: NursingMidwiferyStep, }, { key: "density", - label: "Density", + label: i18n.t("Density"), component: DensityStep, }, { key: "other", - label: "Other", + label: i18n.t("Other"), component: OtherStep, }, ]; From d04a6d2617979921875f97e7f1b31c6d12e4276c Mon Sep 17 00:00:00 2001 From: mariaozamiz Date: Tue, 30 Jan 2024 11:15:11 +0100 Subject: [PATCH 06/10] chore: update i18n files --- i18n/en.pot | 37 +++++++++++++++++++++++++++++++++++-- i18n/es.po | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 69 insertions(+), 3 deletions(-) diff --git a/i18n/en.pot b/i18n/en.pot index 1ad98c3..4ed31d1 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: 2023-09-18T13:40:05.079Z\n" -"PO-Revision-Date: 2023-09-18T13:40:05.079Z\n" +"POT-Creation-Date: 2024-01-30T10:14:16.375Z\n" +"PO-Revision-Date: 2024-01-30T10:14:16.375Z\n" msgid "Add" msgstr "" @@ -20,6 +20,39 @@ msgstr "" msgid "Help" msgstr "" +msgid "Analysis Page" +msgstr "" + +msgid "Configuration" +msgstr "" + +msgid "Outliers" +msgstr "" + +msgid "Trends" +msgstr "" + +msgid "Disaggregates" +msgstr "" + +msgid "Doctors" +msgstr "" + +msgid "Nursing" +msgstr "" + +msgid "Midwifery" +msgstr "" + +msgid "Nursing/Midwifery" +msgstr "" + +msgid "Density" +msgstr "" + +msgid "Other" +msgstr "" + msgid "Hello {{name}}" msgstr "" diff --git a/i18n/es.po b/i18n/es.po index 0250fb5..a43bda2 100644 --- a/i18n/es.po +++ b/i18n/es.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2023-09-18T10:19:02.458Z\n" +"POT-Creation-Date: 2024-01-30T10:14:16.375Z\n" "PO-Revision-Date: 2018-10-25T09:02:35.143Z\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -20,6 +20,39 @@ msgstr "Volver" msgid "Help" msgstr "Ayuda" +msgid "Analysis Page" +msgstr "" + +msgid "Configuration" +msgstr "" + +msgid "Outliers" +msgstr "" + +msgid "Trends" +msgstr "" + +msgid "Disaggregates" +msgstr "" + +msgid "Doctors" +msgstr "" + +msgid "Nursing" +msgstr "" + +msgid "Midwifery" +msgstr "" + +msgid "Nursing/Midwifery" +msgstr "" + +msgid "Density" +msgstr "" + +msgid "Other" +msgstr "" + msgid "Hello {{name}}" msgstr "Hola {{name}}" From 8745c8f70b31f10bdee0bcc5d90a3457949d88bb Mon Sep 17 00:00:00 2001 From: mariaozamiz Date: Wed, 31 Jan 2024 09:21:00 +0100 Subject: [PATCH 07/10] chore: trim styles --- .../analysis/steps/ConfigurationStep.tsx | 21 ++++++----------- .../pages/analysis/steps/DensityStep.tsx | 23 ++++++------------- .../analysis/steps/DisaggregatesStep.tsx | 23 ++++++------------- .../pages/analysis/steps/DoctorsStep.tsx | 23 ++++++------------- .../pages/analysis/steps/MidwiferyStep.tsx | 23 ++++++------------- .../analysis/steps/NursingMidwiferyStep.tsx | 15 +++--------- .../pages/analysis/steps/NursingStep.tsx | 23 ++++++------------- src/webapp/pages/analysis/steps/OtherStep.tsx | 23 ++++++------------- .../pages/analysis/steps/OutliersStep.tsx | 23 ++++++------------- .../pages/analysis/steps/TrendsStep.tsx | 23 ++++++------------- 10 files changed, 66 insertions(+), 154 deletions(-) diff --git a/src/webapp/pages/analysis/steps/ConfigurationStep.tsx b/src/webapp/pages/analysis/steps/ConfigurationStep.tsx index 7e74225..32df4a9 100644 --- a/src/webapp/pages/analysis/steps/ConfigurationStep.tsx +++ b/src/webapp/pages/analysis/steps/ConfigurationStep.tsx @@ -1,24 +1,17 @@ import React from "react"; -import styled from "styled-components"; import i18n from "../../../../utils/i18n"; +interface PageProps { + name: string; +} + export const ConfigurationStep: React.FC = React.memo(props => { const { name = "Configuration" } = props; return ( - - {i18n.t(name)} - +
+

{i18n.t(name)}

+
); }); -const Container = styled.section` - height: 39.125rem; -`; -const Title = styled.h2` - color: blue; -`; - -interface PageProps { - name: string; -} diff --git a/src/webapp/pages/analysis/steps/DensityStep.tsx b/src/webapp/pages/analysis/steps/DensityStep.tsx index ac503d9..564d5ed 100644 --- a/src/webapp/pages/analysis/steps/DensityStep.tsx +++ b/src/webapp/pages/analysis/steps/DensityStep.tsx @@ -1,24 +1,15 @@ import React from "react"; -import styled from "styled-components"; import i18n from "../../../../utils/i18n"; +interface PageProps { + name: string; +} + export const DensityStep: React.FC = React.memo(props => { const { name = "Absolute values and density checks" } = props; return ( - - {i18n.t(name)} - +
+

{i18n.t(name)}

+
); }); - -const Container = styled.section` - height: 39.125rem; -`; - -const Title = styled.h2` - color: blue; -`; - -interface PageProps { - name: string; -} diff --git a/src/webapp/pages/analysis/steps/DisaggregatesStep.tsx b/src/webapp/pages/analysis/steps/DisaggregatesStep.tsx index d02aff8..a4054fd 100644 --- a/src/webapp/pages/analysis/steps/DisaggregatesStep.tsx +++ b/src/webapp/pages/analysis/steps/DisaggregatesStep.tsx @@ -1,24 +1,15 @@ import React from "react"; -import styled from "styled-components"; import i18n from "../../../../utils/i18n"; +interface PageProps { + name: string; +} + export const DisaggregatesStep: React.FC = React.memo(props => { const { name = "Missing disaggregates in selected catcombos" } = props; return ( - - {i18n.t(name)} - +
+

{i18n.t(name)}

+
); }); - -const Container = styled.section` - height: 39.125rem; -`; - -const Title = styled.h2` - color: blue; -`; - -interface PageProps { - name: string; -} diff --git a/src/webapp/pages/analysis/steps/DoctorsStep.tsx b/src/webapp/pages/analysis/steps/DoctorsStep.tsx index a5bcae8..9ec6020 100644 --- a/src/webapp/pages/analysis/steps/DoctorsStep.tsx +++ b/src/webapp/pages/analysis/steps/DoctorsStep.tsx @@ -1,25 +1,16 @@ import React from "react"; -import styled from "styled-components"; import i18n from "../../../../utils/i18n"; +interface PageProps { + name: string; +} + export const DoctorsStep: React.FC = React.memo(props => { const { name = "Medical doctors analysis: General Practicioners missing and double counts" } = props; return ( - - {i18n.t(name)} - +
+

{i18n.t(name)}

+
); }); - -const Container = styled.section` - height: 39.125rem; -`; - -const Title = styled.h2` - color: blue; -`; - -interface PageProps { - name: string; -} diff --git a/src/webapp/pages/analysis/steps/MidwiferyStep.tsx b/src/webapp/pages/analysis/steps/MidwiferyStep.tsx index e84d29c..41301ca 100644 --- a/src/webapp/pages/analysis/steps/MidwiferyStep.tsx +++ b/src/webapp/pages/analysis/steps/MidwiferyStep.tsx @@ -1,24 +1,15 @@ import React from "react"; -import styled from "styled-components"; import i18n from "../../../../utils/i18n"; +interface PageProps { + name: string; +} + export const MidwiferyStep: React.FC = React.memo(props => { const { name = "Midwifery personnel analysis" } = props; return ( - - {i18n.t(name)} - +
+

{i18n.t(name)}

+
); }); - -const Container = styled.section` - height: 39.125rem; -`; - -const Title = styled.h2` - color: blue; -`; - -interface PageProps { - name: string; -} diff --git a/src/webapp/pages/analysis/steps/NursingMidwiferyStep.tsx b/src/webapp/pages/analysis/steps/NursingMidwiferyStep.tsx index 6f96d67..b17f414 100644 --- a/src/webapp/pages/analysis/steps/NursingMidwiferyStep.tsx +++ b/src/webapp/pages/analysis/steps/NursingMidwiferyStep.tsx @@ -1,24 +1,15 @@ import React from "react"; -import styled from "styled-components"; import i18n from "../../../../utils/i18n"; export const NursingMidwiferyStep: React.FC = React.memo(props => { const { name = "Missing nursing personnel when midwifery personnel is present" } = props; return ( - - {i18n.t(name)} - +
+

{i18n.t(name)}

+
); }); -const Container = styled.section` - height: 39.125rem; -`; - -const Title = styled.h2` - color: blue; -`; - interface PageProps { name: string; } diff --git a/src/webapp/pages/analysis/steps/NursingStep.tsx b/src/webapp/pages/analysis/steps/NursingStep.tsx index e2685e4..913cc06 100644 --- a/src/webapp/pages/analysis/steps/NursingStep.tsx +++ b/src/webapp/pages/analysis/steps/NursingStep.tsx @@ -1,24 +1,15 @@ import React from "react"; -import styled from "styled-components"; import i18n from "../../../../utils/i18n"; +interface PageProps { + name: string; +} + export const NursingStep: React.FC = React.memo(props => { const { name = "Nursing personnel analysis" } = props; return ( - - {i18n.t(name)} - +
+

{i18n.t(name)}

+
); }); - -const Container = styled.section` - height: 39.125rem; -`; - -const Title = styled.h2` - color: blue; -`; - -interface PageProps { - name: string; -} diff --git a/src/webapp/pages/analysis/steps/OtherStep.tsx b/src/webapp/pages/analysis/steps/OtherStep.tsx index 4f4c3ef..854eb48 100644 --- a/src/webapp/pages/analysis/steps/OtherStep.tsx +++ b/src/webapp/pages/analysis/steps/OtherStep.tsx @@ -1,25 +1,16 @@ import React from "react"; -import styled from "styled-components"; import i18n from "../../../../utils/i18n"; +interface PageProps { + name: string; +} + export const OtherStep: React.FC = React.memo(props => { const { name = "Custom step with some filtering in order to allow some specific checks" } = props; return ( - - {i18n.t(name)} - +
+

{i18n.t(name)}

+
); }); - -const Container = styled.section` - height: 39.125rem; -`; - -const Title = styled.h2` - color: blue; -`; - -interface PageProps { - name: string; -} diff --git a/src/webapp/pages/analysis/steps/OutliersStep.tsx b/src/webapp/pages/analysis/steps/OutliersStep.tsx index d0c7d98..afc20bb 100644 --- a/src/webapp/pages/analysis/steps/OutliersStep.tsx +++ b/src/webapp/pages/analysis/steps/OutliersStep.tsx @@ -1,25 +1,16 @@ import React from "react"; -import styled from "styled-components"; import i18n from "../../../../utils/i18n"; +interface PageProps { + name: string; +} + export const OutliersStep: React.FC = React.memo(props => { const { name = "Outliers detection analysis based on DHIS2 min-max standard functionality" } = props; return ( - - {i18n.t(name)} - +
+

{i18n.t(name)}

+
); }); - -const Container = styled.section` - height: 39.125rem; -`; - -const Title = styled.h2` - color: blue; -`; - -interface PageProps { - name: string; -} diff --git a/src/webapp/pages/analysis/steps/TrendsStep.tsx b/src/webapp/pages/analysis/steps/TrendsStep.tsx index af7e0a2..23a7820 100644 --- a/src/webapp/pages/analysis/steps/TrendsStep.tsx +++ b/src/webapp/pages/analysis/steps/TrendsStep.tsx @@ -1,24 +1,15 @@ import React from "react"; -import styled from "styled-components"; import i18n from "../../../../utils/i18n"; +interface PageProps { + name: string; +} + export const TrendsStep: React.FC = React.memo(props => { const { name = "Temporal trend to detect drastic trends modification" } = props; return ( - - {i18n.t(name)} - +
+

{i18n.t(name)}

+
); }); - -const Container = styled.section` - height: 39.125rem; -`; - -const Title = styled.h2` - color: blue; -`; - -interface PageProps { - name: string; -} From 823a9c26d116cc98176f9d1b22ec5664ef5e54bd Mon Sep 17 00:00:00 2001 From: mariaozamiz Date: Wed, 31 Jan 2024 09:21:43 +0100 Subject: [PATCH 08/10] chore: trim styles --- src/webapp/pages/analysis/steps/ConfigurationStep.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/webapp/pages/analysis/steps/ConfigurationStep.tsx b/src/webapp/pages/analysis/steps/ConfigurationStep.tsx index 32df4a9..fb13a98 100644 --- a/src/webapp/pages/analysis/steps/ConfigurationStep.tsx +++ b/src/webapp/pages/analysis/steps/ConfigurationStep.tsx @@ -13,5 +13,3 @@ export const ConfigurationStep: React.FC = React.memo(props => { ); }); - - From db0cb71181cfd0dcc01820d2588bb8ff4c604ef1 Mon Sep 17 00:00:00 2001 From: mariaozamiz Date: Wed, 31 Jan 2024 09:24:57 +0100 Subject: [PATCH 09/10] chore: update snapshot --- .../__tests__/__snapshots__/AnalysisPage.spec.tsx.snap | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/webapp/pages/analysis/__tests__/__snapshots__/AnalysisPage.spec.tsx.snap b/src/webapp/pages/analysis/__tests__/__snapshots__/AnalysisPage.spec.tsx.snap index a8970ba..9a11b19 100644 --- a/src/webapp/pages/analysis/__tests__/__snapshots__/AnalysisPage.spec.tsx.snap +++ b/src/webapp/pages/analysis/__tests__/__snapshots__/AnalysisPage.spec.tsx.snap @@ -576,15 +576,11 @@ exports[`AnalysisPage > renders the feedback component 1`] = ` class="MuiPaper-root makeStyles-contents-13 MuiPaper-elevation1 MuiPaper-rounded" data-wizard-contents="true" > -
-

+
+

Configuration

-

+
From 3071b42de4770851ac3f3f4a2a0b3d2ef0e0a13c Mon Sep 17 00:00:00 2001 From: mariaozamiz Date: Wed, 31 Jan 2024 09:43:32 +0100 Subject: [PATCH 10/10] chore: update files with absolute paths --- src/webapp/pages/analysis/AnalysisPage.tsx | 4 ++-- src/webapp/pages/analysis/steps/ConfigurationStep.tsx | 2 +- src/webapp/pages/analysis/steps/DensityStep.tsx | 2 +- src/webapp/pages/analysis/steps/DisaggregatesStep.tsx | 2 +- src/webapp/pages/analysis/steps/DoctorsStep.tsx | 2 +- src/webapp/pages/analysis/steps/MidwiferyStep.tsx | 2 +- src/webapp/pages/analysis/steps/NursingMidwiferyStep.tsx | 2 +- src/webapp/pages/analysis/steps/NursingStep.tsx | 2 +- src/webapp/pages/analysis/steps/OtherStep.tsx | 2 +- src/webapp/pages/analysis/steps/OutliersStep.tsx | 2 +- src/webapp/pages/analysis/steps/TrendsStep.tsx | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/webapp/pages/analysis/AnalysisPage.tsx b/src/webapp/pages/analysis/AnalysisPage.tsx index 42ea0ef..1c8849e 100644 --- a/src/webapp/pages/analysis/AnalysisPage.tsx +++ b/src/webapp/pages/analysis/AnalysisPage.tsx @@ -1,7 +1,7 @@ import React from "react"; -import i18n from "../../../utils/i18n"; -import { PageHeader } from "../../components/page-header/PageHeader"; import { Wizard } from "@eyeseetea/d2-ui-components"; +import { PageHeader } from "$/webapp/components/page-header/PageHeader"; +import i18n from "$/utils/i18n"; import { steps } from "./steps"; type PageProps = { diff --git a/src/webapp/pages/analysis/steps/ConfigurationStep.tsx b/src/webapp/pages/analysis/steps/ConfigurationStep.tsx index fb13a98..25399cf 100644 --- a/src/webapp/pages/analysis/steps/ConfigurationStep.tsx +++ b/src/webapp/pages/analysis/steps/ConfigurationStep.tsx @@ -1,5 +1,5 @@ import React from "react"; -import i18n from "../../../../utils/i18n"; +import i18n from "$/utils/i18n"; interface PageProps { name: string; diff --git a/src/webapp/pages/analysis/steps/DensityStep.tsx b/src/webapp/pages/analysis/steps/DensityStep.tsx index 564d5ed..3fb1446 100644 --- a/src/webapp/pages/analysis/steps/DensityStep.tsx +++ b/src/webapp/pages/analysis/steps/DensityStep.tsx @@ -1,5 +1,5 @@ import React from "react"; -import i18n from "../../../../utils/i18n"; +import i18n from "$/utils/i18n"; interface PageProps { name: string; diff --git a/src/webapp/pages/analysis/steps/DisaggregatesStep.tsx b/src/webapp/pages/analysis/steps/DisaggregatesStep.tsx index a4054fd..0d4b98b 100644 --- a/src/webapp/pages/analysis/steps/DisaggregatesStep.tsx +++ b/src/webapp/pages/analysis/steps/DisaggregatesStep.tsx @@ -1,5 +1,5 @@ import React from "react"; -import i18n from "../../../../utils/i18n"; +import i18n from "$/utils/i18n"; interface PageProps { name: string; diff --git a/src/webapp/pages/analysis/steps/DoctorsStep.tsx b/src/webapp/pages/analysis/steps/DoctorsStep.tsx index 9ec6020..c916d4e 100644 --- a/src/webapp/pages/analysis/steps/DoctorsStep.tsx +++ b/src/webapp/pages/analysis/steps/DoctorsStep.tsx @@ -1,5 +1,5 @@ import React from "react"; -import i18n from "../../../../utils/i18n"; +import i18n from "$/utils/i18n"; interface PageProps { name: string; diff --git a/src/webapp/pages/analysis/steps/MidwiferyStep.tsx b/src/webapp/pages/analysis/steps/MidwiferyStep.tsx index 41301ca..0c7d19d 100644 --- a/src/webapp/pages/analysis/steps/MidwiferyStep.tsx +++ b/src/webapp/pages/analysis/steps/MidwiferyStep.tsx @@ -1,5 +1,5 @@ import React from "react"; -import i18n from "../../../../utils/i18n"; +import i18n from "$/utils/i18n"; interface PageProps { name: string; diff --git a/src/webapp/pages/analysis/steps/NursingMidwiferyStep.tsx b/src/webapp/pages/analysis/steps/NursingMidwiferyStep.tsx index b17f414..e8ec62a 100644 --- a/src/webapp/pages/analysis/steps/NursingMidwiferyStep.tsx +++ b/src/webapp/pages/analysis/steps/NursingMidwiferyStep.tsx @@ -1,5 +1,5 @@ import React from "react"; -import i18n from "../../../../utils/i18n"; +import i18n from "$/utils/i18n"; export const NursingMidwiferyStep: React.FC = React.memo(props => { const { name = "Missing nursing personnel when midwifery personnel is present" } = props; diff --git a/src/webapp/pages/analysis/steps/NursingStep.tsx b/src/webapp/pages/analysis/steps/NursingStep.tsx index 913cc06..73df0b9 100644 --- a/src/webapp/pages/analysis/steps/NursingStep.tsx +++ b/src/webapp/pages/analysis/steps/NursingStep.tsx @@ -1,5 +1,5 @@ import React from "react"; -import i18n from "../../../../utils/i18n"; +import i18n from "$/utils/i18n"; interface PageProps { name: string; diff --git a/src/webapp/pages/analysis/steps/OtherStep.tsx b/src/webapp/pages/analysis/steps/OtherStep.tsx index 854eb48..3ca3f01 100644 --- a/src/webapp/pages/analysis/steps/OtherStep.tsx +++ b/src/webapp/pages/analysis/steps/OtherStep.tsx @@ -1,5 +1,5 @@ import React from "react"; -import i18n from "../../../../utils/i18n"; +import i18n from "$/utils/i18n"; interface PageProps { name: string; diff --git a/src/webapp/pages/analysis/steps/OutliersStep.tsx b/src/webapp/pages/analysis/steps/OutliersStep.tsx index afc20bb..d5fdee1 100644 --- a/src/webapp/pages/analysis/steps/OutliersStep.tsx +++ b/src/webapp/pages/analysis/steps/OutliersStep.tsx @@ -1,5 +1,5 @@ import React from "react"; -import i18n from "../../../../utils/i18n"; +import i18n from "$/utils/i18n"; interface PageProps { name: string; diff --git a/src/webapp/pages/analysis/steps/TrendsStep.tsx b/src/webapp/pages/analysis/steps/TrendsStep.tsx index 23a7820..7c145d3 100644 --- a/src/webapp/pages/analysis/steps/TrendsStep.tsx +++ b/src/webapp/pages/analysis/steps/TrendsStep.tsx @@ -1,5 +1,5 @@ import React from "react"; -import i18n from "../../../../utils/i18n"; +import i18n from "$/utils/i18n"; interface PageProps { name: string;