generated from EyeSeeTea/dhis2-app-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
fdelemarre
committed
Jul 10, 2024
1 parent
215ba2b
commit affce40
Showing
1 changed file
with
1 addition
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,183 +2,12 @@ import React from "react"; | |
|
||
import i18n from "../../../utils/i18n"; | ||
import { Layout } from "../../components/layout/Layout"; | ||
import { Section } from "../../components/section/Section"; | ||
import { Button } from "../../components/button/Button"; | ||
import { BasicTable, TableColumn } from "../../components/table/BasicTable"; | ||
import { IconEdit24 } from "@dhis2/ui"; | ||
|
||
export const IncidentActionPlanPage: React.FC = React.memo(() => { | ||
// TODO remove hard coding | ||
const columnsTeam: TableColumn[] = [ | ||
{ value: "role", label: "Role", type: "text" }, | ||
{ value: "name", label: "Name", type: "link" }, | ||
{ value: "email", label: "Email", type: "link" }, | ||
{ value: "phone", label: "Phone", type: "text" }, | ||
]; | ||
const dataTeam = [ | ||
{ | ||
role: "Incident Manager", | ||
name: "George Abitbol", | ||
email: "[email protected]", | ||
phone: "+33 6 12 34 56 78", | ||
}, | ||
{ | ||
role: "Manager of Operations", | ||
name: "John Traore", | ||
email: "[email protected]", | ||
phone: "+33 6 12 34 56 78", | ||
}, | ||
]; | ||
|
||
// TODO remove hard coding | ||
const columnsResponseActions: TableColumn[] = [ | ||
{ value: "mainTask", label: "Main Task", type: "text", underline: true }, | ||
{ value: "subActivities", label: "Sub Activities", type: "text" }, | ||
{ value: "subPillar", label: "Sub Pillar", type: "text" }, | ||
{ value: "responsibleOfficer", label: "Responsible officer", type: "text" }, | ||
{ | ||
value: "status", | ||
label: "Status", | ||
type: "selector", | ||
options: [ | ||
{ value: "Complete", label: "Complete" }, | ||
{ value: "Pending", label: "Pending" }, | ||
{ value: "In progress", label: "In progress" }, | ||
], | ||
}, | ||
{ | ||
value: "verification", | ||
label: "Verification", | ||
type: "selector", | ||
options: [ | ||
{ value: "Unverified", label: "Unverified" }, | ||
{ value: "Verified", label: "Verified" }, | ||
], | ||
}, | ||
{ value: "timeline", label: "Timeline", type: "text" }, | ||
{ value: "dueDate", label: "Due date", type: "text" }, | ||
]; | ||
const dataResponseActions = [ | ||
{ | ||
mainTask: "Data management", | ||
subActivities: "Configure tablet", | ||
subPillar: "Planning", | ||
responsibleOfficer: "Moses Banda", | ||
status: "Complete", | ||
verification: "Unverified", | ||
timeline: "Qtr 2 June", | ||
dueDate: "8 June", | ||
}, | ||
{ | ||
mainTask: "Risk communication", | ||
subActivities: "Develop risk communication plan", | ||
subPillar: "RCCE", | ||
responsibleOfficer: "Mr Zimba", | ||
status: "Pending", | ||
verification: "Verified", | ||
timeline: "Qtr 3 June", | ||
dueDate: "17 June", | ||
}, | ||
{ | ||
mainTask: "Vaccine transportation", | ||
subActivities: "Reverse cold storage transport", | ||
subPillar: "Logistics", | ||
responsibleOfficer: "Mr Guissimon", | ||
status: "In progress", | ||
verification: "Unverified", | ||
timeline: "Qtr 3 June", | ||
dueDate: "9 June", | ||
}, | ||
{ | ||
mainTask: "Training of RRT", | ||
subActivities: "Train and deploy RRTs", | ||
subPillar: "Operations", | ||
responsibleOfficer: "Dr Chika", | ||
status: "Not done", | ||
verification: "Unverified", | ||
timeline: "Qtr 3 June", | ||
dueDate: "9 June", | ||
}, | ||
{ | ||
mainTask: "Supplies", | ||
subActivities: "Procure granular chlorine", | ||
subPillar: "Administration", | ||
responsibleOfficer: "Moses Banda", | ||
status: "Pending", | ||
verification: "Unverified", | ||
timeline: "Qtr 4 June", | ||
dueDate: "20 June", | ||
}, | ||
{ | ||
mainTask: "Supplies", | ||
subActivities: "Procure RDTs", | ||
subPillar: "Operations", | ||
responsibleOfficer: "Mpanga Kasonde", | ||
status: "In Progress", | ||
verification: "Unverified", | ||
timeline: "Qtr 3 June", | ||
dueDate: "17 June", | ||
}, | ||
{ | ||
mainTask: "Strengthen surveillance", | ||
subActivities: "Active case search", | ||
subPillar: "Surveillance", | ||
responsibleOfficer: "Namonda Mbumwae", | ||
status: "Complete", | ||
verification: "Unverified", | ||
timeline: "Qtr 1 June", | ||
dueDate: "5 June", | ||
}, | ||
]; | ||
|
||
return ( | ||
<Layout | ||
title={i18n.t("Incident Action Plan")} | ||
subtitle={i18n.t("Cholera in NW Province, June 2023")} | ||
> | ||
<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> | ||
} | ||
> | ||
<BasicTable | ||
showRowIndex | ||
columns={columnsResponseActions} | ||
rows={dataResponseActions} | ||
onChange={(...arg) => console.log(arg)} | ||
/> | ||
</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> | ||
} | ||
> | ||
<BasicTable | ||
columns={columnsTeam} | ||
rows={dataTeam} | ||
onChange={(...arg) => console.log(arg)} | ||
/> | ||
</Section> | ||
</Layout> | ||
></Layout> | ||
); | ||
}); |