Skip to content

Commit 3a8afdd

Browse files
Merge pull request #3377 from kris6673/transport-template
FIX: Enhance transport rule page with icons and fix templating
2 parents a8b8e51 + d7e9921 commit 3a8afdd

File tree

5 files changed

+20
-24
lines changed

5 files changed

+20
-24
lines changed

src/pages/email/connectionfilter/list-templates/index.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,13 @@ const Page = () => {
66
const pageTitle = "Connection filter Templates";
77

88
const actions = [
9-
{
10-
label: "View Template",
11-
icon: <EyeIcon />, // Placeholder for the view icon
12-
color: "success",
13-
offCanvas: true,
14-
},
159
{
1610
label: "Delete Template",
1711
type: "POST",
1812
url: "/api/RemoveConnectionfilterTemplate",
1913
data: { ID: "GUID" },
2014
confirmText: "Do you want to delete the template?",
21-
icon: <TrashIcon />, // Placeholder for the delete icon
15+
icon: <TrashIcon />,
2216
color: "danger",
2317
},
2418
];

src/pages/email/connectors/list-connector-templates/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const Page = () => {
1515
ID: "GUID",
1616
},
1717
confirmText: "Do you want to delete the template?",
18-
icon: <TrashIcon />, // Placeholder for delete icon
18+
icon: <TrashIcon />,
1919
color: "danger",
2020
},
2121
];

src/pages/email/spamfilter/list-templates/index.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ const Page = () => {
66
const pageTitle = "Spamfilter Templates";
77

88
const actions = [
9-
{
10-
label: "View Template",
11-
icon: <EyeIcon />, // Placeholder for the view icon
12-
color: "success",
13-
offCanvas: true,
14-
},
159
{
1610
label: "Delete Template",
1711
type: "POST",

src/pages/email/transport/list-rules/index.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { Layout as DashboardLayout } from "/src/layouts/index.js";
22
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
33
import { Button } from "@mui/material";
4+
import { Book, DoDisturb, Done } from "@mui/icons-material";
5+
import { TrashIcon } from "@heroicons/react/24/outline";
46
import Link from "next/link";
57

68
const Page = () => {
@@ -11,8 +13,9 @@ const Page = () => {
1113
label: "Create template based on rule",
1214
type: "POST",
1315
url: "/api/AddTransportTemplate",
14-
data: {}, // No extra data was specified for this action in the original file
16+
postEntireRow: true,
1517
confirmText: "Are you sure you want to create a template based on this rule?",
18+
icon: <Book />,
1619
},
1720
{
1821
label: "Enable Rule",
@@ -23,6 +26,7 @@ const Page = () => {
2326
GUID: "Guid",
2427
},
2528
confirmText: "Are you sure you want to enable this rule?",
29+
icon: <Done />,
2630
},
2731
{
2832
label: "Disable Rule",
@@ -33,6 +37,7 @@ const Page = () => {
3337
GUID: "Guid",
3438
},
3539
confirmText: "Are you sure you want to disable this rule?",
40+
icon: <DoDisturb />,
3641
},
3742
{
3843
label: "Delete Rule",
@@ -43,15 +48,24 @@ const Page = () => {
4348
},
4449
confirmText: "Are you sure you want to delete this rule?",
4550
color: "danger",
51+
icon: <TrashIcon />,
4652
},
4753
];
4854

4955
const offCanvas = {
50-
extendedInfoFields: ["CreatedBy", "LastModifiedBy", "WhenChanged", "Description", "Guid"],
56+
extendedInfoFields: [
57+
"Guid",
58+
"CreatedBy",
59+
"LastModifiedBy",
60+
"WhenChanged",
61+
"Name",
62+
"Comments",
63+
"Description",
64+
],
5165
actions: actions,
5266
};
5367

54-
const simpleColumns = ["Name", "State", "Mode", "RuleErrorAction", "WhenChanged"];
68+
const simpleColumns = ["Name", "State", "Mode", "RuleErrorAction", "WhenChanged", "Comments"];
5569

5670
return (
5771
<CippTablePage

src/pages/email/transport/list-templates/index.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,13 @@ const Page = () => {
88
const pageTitle = "Transport Rule Templates";
99

1010
const actions = [
11-
{
12-
label: "View Template",
13-
icon: <EyeIcon />, // Placeholder icon for developer customization
14-
color: "success",
15-
offCanvas: true,
16-
},
1711
{
1812
label: "Delete Template",
1913
type: "POST",
2014
url: "/api/RemoveTransportRuleTemplate",
2115
data: { ID: "GUID" },
2216
confirmText: "Do you want to delete the template?",
23-
icon: <TrashIcon />, // Placeholder icon for developer customization
17+
icon: <TrashIcon />,
2418
color: "danger",
2519
},
2620
];

0 commit comments

Comments
 (0)