Skip to content

Commit

Permalink
Remove examples and add a TODO for adding sections
Browse files Browse the repository at this point in the history
  • Loading branch information
anagperal committed Jul 4, 2024
1 parent 3031a13 commit 809838e
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 142 deletions.
7 changes: 2 additions & 5 deletions src/webapp/pages/dashboard/DashboardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ import i18n from "../../../utils/i18n";
import { Layout } from "../../components/layout/Layout";
import { Section } from "../../components/section/Section";

// TODO: Add every section here, first it's just an example

export const DashboardPage: React.FC = React.memo(() => {
return (
<Layout title={i18n.t("Dashboard")} showCreateEvent>
<Section title={i18n.t("Respond, alert, watch")}>Respond, alert, watch content</Section>
<Section title={i18n.t("All public health events")}>
All public health events content
</Section>
<Section title={i18n.t("7-1-7 performance")}>7-1-7 performance content</Section>
<Section title={i18n.t("Performance overview")}>Performance overview content</Section>
</Layout>
);
});
41 changes: 3 additions & 38 deletions src/webapp/pages/event-tracker/EventTrackerPage.tsx
Original file line number Diff line number Diff line change
@@ -1,45 +1,10 @@
import React from "react";
import { IconEdit24 } from "@dhis2/ui";

import i18n from "../../../utils/i18n";
import { Layout } from "../../components/layout/Layout";
import { Section } from "../../components/section/Section";
import { Button } from "../../components/button/Button";
import { RiskAssessmentSection } from "./RiskAssessmentSection";

// TODO: Add every section here

export const EventTrackerPage: React.FC = React.memo(() => {
return (
<Layout title={i18n.t("Event Tracker")}>
<Section
title={"Event details, event date"}
titleVariant="secondary"
headerButtom={
<Button
onClick={function (): void {
throw new Error("Function not implemented.");
}}
variant="outlined"
color="secondary"
startIcon={<IconEdit24 />}
>
{i18n.t("Edit Details")}
</Button>
}
hasSeparator
>
Event details
</Section>
<Section title={i18n.t("Districts affected")} hasSeparator>
Districts affected content
</Section>
<RiskAssessmentSection />
<Section title={i18n.t("Overview")} lastUpdated="last updated date" hasSeparator>
Overview content
</Section>
<Section hasSeparator>Cases content</Section>
<Section title={i18n.t("7-1-7 performance")} hasSeparator>
7-1-7 performance content
</Section>
</Layout>
);
return <Layout title={i18n.t("Event Tracker")}></Layout>;
});
30 changes: 0 additions & 30 deletions src/webapp/pages/event-tracker/RiskAssessmentSection.tsx

This file was deleted.

9 changes: 1 addition & 8 deletions src/webapp/pages/form/FormPage.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import React from "react";

import { Layout } from "../../components/layout/Layout";
import { FormLayout } from "../../components/form/FormLayout";

export const FormPage: React.FC = React.memo(() => {
return (
<Layout title="Form Title" subtitle="Form Subtitle" hideSideBarOptions>
<FormLayout title="title" subtitle="subtitle" onSave={() => {}}>
<div>FormPage</div>
</FormLayout>
</Layout>
);
return <Layout title="Form Title" subtitle="Form Subtitle" hideSideBarOptions></Layout>;
});
60 changes: 3 additions & 57 deletions src/webapp/pages/incident-action-plan/IncidentActionPlanPage.tsx
Original file line number Diff line number Diff line change
@@ -1,69 +1,15 @@
import React from "react";
import { IconEdit24 } from "@dhis2/ui";

import i18n from "../../../utils/i18n";
import { Layout } from "../../components/layout/Layout";
import { Section } from "../../components/section/Section";
import { Button } from "../../components/button/Button";

// TODO: Add every section here, first it's just an example

export const IncidentActionPlanPage: React.FC = React.memo(() => {
return (
<Layout
title={i18n.t("Incident Action Plan")}
subtitle={i18n.t("Cholera in NW Province, June 2023")}
>
<Section>IAP details</Section>
<Section
title={i18n.t("Response actions")}
headerButtom={
<Button
onClick={function (): void {
throw new Error("Function not implemented.");
}}
variant="outlined"
color="secondary"
startIcon={<IconEdit24 />}
>
{i18n.t("Edit Response Actions")}
</Button>
}
>
Response actions content
</Section>
<Section
title={i18n.t("Action plan")}
headerButtom={
<Button
onClick={function (): void {
throw new Error("Function not implemented.");
}}
variant="outlined"
color="secondary"
startIcon={<IconEdit24 />}
>
{i18n.t("Edit Action Plan")}
</Button>
}
>
Action plan content
</Section>
<Section
title={i18n.t("Team")}
headerButtom={
<Button
onClick={function (): void {
throw new Error("Function not implemented.");
}}
variant="outlined"
color="secondary"
startIcon={<IconEdit24 />}
>
{i18n.t("Edit Team")}
</Button>
}
>
Team content
</Section>
</Layout>
></Layout>
);
});
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ export const IMTeamBuilderPage: React.FC = React.memo(() => {
<Layout
title={i18n.t("Incident Management Team Builder")}
subtitle={i18n.t("Cholera in NW Province, June 2023")}
>
IMTeamBuilderPage
</Layout>
></Layout>
);
});
2 changes: 1 addition & 1 deletion src/webapp/pages/resources/ResourcesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import { Layout } from "../../components/layout/Layout";
import i18n from "../../../utils/i18n";

export const ResourcesPage: React.FC = React.memo(() => {
return <Layout title={i18n.t("Resources")}>ResourcesPage</Layout>;
return <Layout title={i18n.t("Resources")}></Layout>;
});

0 comments on commit 809838e

Please sign in to comment.