Skip to content

Commit

Permalink
Merge pull request #2 from EyeSeeTea/feat/stepper
Browse files Browse the repository at this point in the history
Feat: Stepper
  • Loading branch information
Ramon-Jimenez authored Feb 7, 2024
2 parents 699bb9b + 3071b42 commit c872268
Show file tree
Hide file tree
Showing 17 changed files with 943 additions and 4 deletions.
37 changes: 35 additions & 2 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand All @@ -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 ""

Expand Down
35 changes: 34 additions & 1 deletion i18n/es.po
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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}}"

Expand Down
7 changes: 6 additions & 1 deletion src/webapp/pages/Router.tsx
Original file line number Diff line number Diff line change
@@ -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 (
Expand All @@ -11,7 +13,10 @@ export function Router() {
path="/for/:name?"
render={({ match }) => <ExamplePage name={match.params.name ?? "Stranger"} />}
/>

<Route
path="/analysis"
render={() => <AnalysisPage name={i18n.t("Analysis Page")} />}
/>
{/* Default route */}
<Route render={() => <LandingPage />} />
</Switch>
Expand Down
19 changes: 19 additions & 0 deletions src/webapp/pages/analysis/AnalysisPage.tsx
Original file line number Diff line number Diff line change
@@ -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<PageProps> = React.memo(props => {
const { name } = props;
return (
<React.Fragment>
<PageHeader title={i18n.t(name)} />
<Wizard steps={steps} />
</React.Fragment>
);
});
15 changes: 15 additions & 0 deletions src/webapp/pages/analysis/__tests__/AnalysisPage.spec.tsx
Original file line number Diff line number Diff line change
@@ -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(<AnalysisPage name="Analysis" />);
}
Loading

0 comments on commit c872268

Please sign in to comment.