Skip to content

Commit 463e20a

Browse files
remove actions column on list management pages (#1188)
* remove actions column on list management pages * move go to workplan column to start --------- Co-authored-by: Tom Chapman <tchapman000@gmail.com>
1 parent ecd276a commit 463e20a

File tree

6 files changed

+10
-76
lines changed

6 files changed

+10
-76
lines changed

epictrack-web/src/components/indigenousNation/IndigenousNationList.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ export default function IndigenousNationList() {
4040
[ctx.data]
4141
);
4242

43-
const handleDelete = (id: string) => {
44-
ctx.setShowDeleteDialog(true);
45-
ctx.setId(id);
46-
};
47-
4843
const columns = React.useMemo<MRT_ColumnDef<FirstNation>[]>(
4944
() => [
5045
{
@@ -115,14 +110,6 @@ export default function IndigenousNationList() {
115110
isLoading: ctx.loading,
116111
showGlobalFilter: true,
117112
}}
118-
enableRowActions={true}
119-
renderRowActions={({ row }: any) => (
120-
<Box>
121-
<IconButton onClick={() => handleDelete(row.original.id)}>
122-
<DeleteIcon />
123-
</IconButton>
124-
</Box>
125-
)}
126113
renderTopToolbarCustomActions={() => (
127114
<Box
128115
sx={{

epictrack-web/src/components/project/ProjectList.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ const ProjectList = () => {
5656
setEnvRegions(envRegions);
5757
}, [projects]);
5858

59-
const handleDelete = (id: string) => {
60-
ctx.setShowDeleteDialog(true);
61-
ctx.setId(id);
62-
};
6359
const columns = React.useMemo<MRT_ColumnDef<Project>[]>(
6460
() => [
6561
{
@@ -132,14 +128,6 @@ const ProjectList = () => {
132128
isLoading: ctx.loading,
133129
showGlobalFilter: true,
134130
}}
135-
enableRowActions={true}
136-
renderRowActions={({ row }: any) => (
137-
<Box>
138-
<IconButton onClick={() => handleDelete(row.original.id)}>
139-
<DeleteIcon />
140-
</IconButton>
141-
</Box>
142-
)}
143131
renderTopToolbarCustomActions={() => (
144132
<Box
145133
sx={{

epictrack-web/src/components/proponent/ProponentList.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,6 @@ export default function ProponentList() {
6767
[staffs]
6868
);
6969

70-
const handleDelete = (id: string) => {
71-
ctx.setShowDeleteDialog(true);
72-
ctx.setId(id);
73-
};
74-
7570
const getStaffs = async () => {
7671
const staffsResult = await staffService.getAll();
7772
if (staffsResult.status === 200) {
@@ -106,14 +101,6 @@ export default function ProponentList() {
106101
isLoading: ctx.loading,
107102
showGlobalFilter: true,
108103
}}
109-
enableRowActions={true}
110-
renderRowActions={({ row }: any) => (
111-
<Box>
112-
<IconButton onClick={() => handleDelete(row.original.id)}>
113-
<DeleteIcon />
114-
</IconButton>
115-
</Box>
116-
)}
117104
renderTopToolbarCustomActions={() => (
118105
<Box
119106
sx={{

epictrack-web/src/components/staff/StaffList.tsx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ const StaffList = () => {
4040
}
4141
}, [staff]);
4242

43-
const handleDelete = (id: string) => {
44-
ctx.setShowDeleteDialog(true);
45-
ctx.setId(id);
46-
};
47-
4843
const columns = React.useMemo<MRT_ColumnDef<Staff>[]>(
4944
() => [
5045
{
@@ -125,17 +120,6 @@ const StaffList = () => {
125120
isLoading: ctx.loading,
126121
showGlobalFilter: true,
127122
}}
128-
enableRowActions={true}
129-
renderRowActions={({ row }: any) => (
130-
<Box>
131-
<IconButton onClick={() => onEdit(row.original.id)}>
132-
<EditIcon />
133-
</IconButton>
134-
<IconButton onClick={() => handleDelete(row.original.id)}>
135-
<DeleteIcon />
136-
</IconButton>
137-
</Box>
138-
)}
139123
renderTopToolbarCustomActions={() => (
140124
<Box
141125
sx={{

epictrack-web/src/components/work/WorkList.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ const WorkList = () => {
7575

7676
const columns = React.useMemo<MRT_ColumnDef<Work>[]>(
7777
() => [
78+
{
79+
header: "Go to Workplan",
80+
Cell: ({ row }) => (
81+
<Box>
82+
<Link to={`/work-plan?work_id=${row.original.id}`}>
83+
<GoToIcon />
84+
</Link>
85+
</Box>
86+
),
87+
},
7888
{
7989
accessorKey: "title",
8090
header: "Name",
@@ -140,16 +150,6 @@ const WorkList = () => {
140150
</span>
141151
),
142152
},
143-
{
144-
header: "Go to Workplan",
145-
Cell: ({ row }) => (
146-
<Box>
147-
<Link to={`/work-plan?work_id=${row.original.id}`}>
148-
<GoToIcon />
149-
</Link>
150-
</Box>
151-
),
152-
},
153153
],
154154
[projects, phases, teams, ministries, workTypes, eaActs]
155155
);

epictrack-web/src/components/work/workStaff/WorkStaffList.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,6 @@ const WorkStaffList = () => {
117117
header: "Project",
118118
enableHiding: false,
119119
filterVariant: "multi-select",
120-
Cell: ({ cell }) => (
121-
<ETGridTitle to={"#"}>{cell.getValue<string>()}</ETGridTitle>
122-
),
123120
filterSelectOptions: projectFilter,
124121
},
125122
{
@@ -186,15 +183,6 @@ const WorkStaffList = () => {
186183
isLoading: loading,
187184
showGlobalFilter: true,
188185
}}
189-
renderTopToolbarCustomActions={() => (
190-
<Box
191-
sx={{
192-
width: "100%",
193-
display: "flex",
194-
justifyContent: "right",
195-
}}
196-
></Box>
197-
)}
198186
/>
199187
</Grid>
200188
</ETPageContainer>

0 commit comments

Comments
 (0)