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}}" diff --git a/src/webapp/pages/Router.tsx b/src/webapp/pages/Router.tsx index e011f98..1fd4d7b 100644 --- a/src/webapp/pages/Router.tsx +++ b/src/webapp/pages/Router.tsx @@ -1,7 +1,9 @@ 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"; +import i18n from "../../utils/i18n"; export function Router() { return ( @@ -11,7 +13,10 @@ 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..1c8849e --- /dev/null +++ b/src/webapp/pages/analysis/AnalysisPage.tsx @@ -0,0 +1,19 @@ +import React from "react"; +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 = { + name: string; +}; + +export const AnalysisPage: React.FC = React.memo(props => { + const { name } = props; + return ( + + + + + ); +}); 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..3be3419 --- /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("AnalysisPage", () => { + it("renders the feedback component", async () => { + const view = getView(); + + expect(await view.findByText("Analysis")).toBeInTheDocument(); + expect(view.asFragment()).toMatchSnapshot(); + }); +}); + +function getView() { + return getReactComponent(); +} 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..9a11b19 --- /dev/null +++ b/src/webapp/pages/analysis/__tests__/__snapshots__/AnalysisPage.spec.tsx.snap @@ -0,0 +1,617 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`AnalysisPage > renders the feedback component 1`] = ` + + + + Analysis + + + + + + + + + + + + 1 + + + + + + Configuration + + + + + + + + + + + + + + + + + 2 + + + + + + Outliers + + + + + + + + + + + + + + + + 3 + + + + + + Trends + + + + + + + + + + + + + + + + 4 + + + + + + Disaggregates + + + + + + + + + + + + + + + + 5 + + + + + + Doctors + + + + + + + + + + + + + + + + 6 + + + + + + Nursing + + + + + + + + + + + + + + + + 7 + + + + + + Midwifery + + + + + + + + + + + + + + + + 8 + + + + + + Nursing/Midwifery + + + + + + + + + + + + + + + + 9 + + + + + + Density + + + + + + + + + + + + + + + + 10 + + + + + + Other + + + + + + + + + + Configuration + + + + + + ← Previous + + + + + Next → + + + + + + + +`; diff --git a/src/webapp/pages/analysis/steps.ts b/src/webapp/pages/analysis/steps.ts new file mode 100644 index 0000000..3419a2a --- /dev/null +++ b/src/webapp/pages/analysis/steps.ts @@ -0,0 +1,64 @@ +import i18n from "../../../utils/i18n"; +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: i18n.t("Configuration"), + component: ConfigurationStep, + }, + { + key: "outliers", + label: i18n.t("Outliers"), + component: OutliersStep, + }, + { + key: "trends", + label: i18n.t("Trends"), + component: TrendsStep, + }, + { + key: "disaggregates", + label: i18n.t("Disaggregates"), + component: DisaggregatesStep, + }, + { + key: "doctors", + label: i18n.t("Doctors"), + component: DoctorsStep, + }, + { + key: "nursing", + label: i18n.t("Nursing"), + component: NursingStep, + }, + { + key: "midwifery", + label: i18n.t("Midwifery"), + component: MidwiferyStep, + }, + { + key: "nursing-midwifery", + label: i18n.t("Nursing/Midwifery"), + component: NursingMidwiferyStep, + }, + { + key: "density", + label: i18n.t("Density"), + component: DensityStep, + }, + { + key: "other", + label: i18n.t("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..25399cf --- /dev/null +++ b/src/webapp/pages/analysis/steps/ConfigurationStep.tsx @@ -0,0 +1,15 @@ +import React from "react"; +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)} + + ); +}); diff --git a/src/webapp/pages/analysis/steps/DensityStep.tsx b/src/webapp/pages/analysis/steps/DensityStep.tsx new file mode 100644 index 0000000..3fb1446 --- /dev/null +++ b/src/webapp/pages/analysis/steps/DensityStep.tsx @@ -0,0 +1,15 @@ +import React from "react"; +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)} + + ); +}); diff --git a/src/webapp/pages/analysis/steps/DisaggregatesStep.tsx b/src/webapp/pages/analysis/steps/DisaggregatesStep.tsx new file mode 100644 index 0000000..0d4b98b --- /dev/null +++ b/src/webapp/pages/analysis/steps/DisaggregatesStep.tsx @@ -0,0 +1,15 @@ +import React from "react"; +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)} + + ); +}); diff --git a/src/webapp/pages/analysis/steps/DoctorsStep.tsx b/src/webapp/pages/analysis/steps/DoctorsStep.tsx new file mode 100644 index 0000000..c916d4e --- /dev/null +++ b/src/webapp/pages/analysis/steps/DoctorsStep.tsx @@ -0,0 +1,16 @@ +import React from "react"; +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)} + + ); +}); diff --git a/src/webapp/pages/analysis/steps/MidwiferyStep.tsx b/src/webapp/pages/analysis/steps/MidwiferyStep.tsx new file mode 100644 index 0000000..0c7d19d --- /dev/null +++ b/src/webapp/pages/analysis/steps/MidwiferyStep.tsx @@ -0,0 +1,15 @@ +import React from "react"; +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)} + + ); +}); diff --git a/src/webapp/pages/analysis/steps/NursingMidwiferyStep.tsx b/src/webapp/pages/analysis/steps/NursingMidwiferyStep.tsx new file mode 100644 index 0000000..e8ec62a --- /dev/null +++ b/src/webapp/pages/analysis/steps/NursingMidwiferyStep.tsx @@ -0,0 +1,15 @@ +import React from "react"; +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)} + + ); +}); + +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..73df0b9 --- /dev/null +++ b/src/webapp/pages/analysis/steps/NursingStep.tsx @@ -0,0 +1,15 @@ +import React from "react"; +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)} + + ); +}); diff --git a/src/webapp/pages/analysis/steps/OtherStep.tsx b/src/webapp/pages/analysis/steps/OtherStep.tsx new file mode 100644 index 0000000..3ca3f01 --- /dev/null +++ b/src/webapp/pages/analysis/steps/OtherStep.tsx @@ -0,0 +1,16 @@ +import React from "react"; +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)} + + ); +}); diff --git a/src/webapp/pages/analysis/steps/OutliersStep.tsx b/src/webapp/pages/analysis/steps/OutliersStep.tsx new file mode 100644 index 0000000..d5fdee1 --- /dev/null +++ b/src/webapp/pages/analysis/steps/OutliersStep.tsx @@ -0,0 +1,16 @@ +import React from "react"; +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)} + + ); +}); diff --git a/src/webapp/pages/analysis/steps/TrendsStep.tsx b/src/webapp/pages/analysis/steps/TrendsStep.tsx new file mode 100644 index 0000000..7c145d3 --- /dev/null +++ b/src/webapp/pages/analysis/steps/TrendsStep.tsx @@ -0,0 +1,15 @@ +import React from "react"; +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)} + + ); +});