@@ -18,7 +18,7 @@ import CippExchangeSettingsForm from "../../../../../components/CippFormPages/Ci
18
18
import { useForm } from "react-hook-form" ;
19
19
import { Alert , Button , Collapse , CircularProgress , Typography } from "@mui/material" ;
20
20
import { CippApiResults } from "../../../../../components/CippComponents/CippApiResults" ;
21
- import { TrashIcon } from "@heroicons/react/24/outline " ;
21
+ import { Block , PlayArrow , DeleteForever } from "@mui/icons-material " ;
22
22
import { CippPropertyListCard } from "../../../../../components/CippCards/CippPropertyListCard" ;
23
23
import { getCippTranslation } from "../../../../../utils/get-cipp-translation" ;
24
24
import { getCippFormatting } from "../../../../../utils/get-cipp-formatting" ;
@@ -188,10 +188,40 @@ const Page = () => {
188
188
] ;
189
189
190
190
const mailboxRuleActions = [
191
+ {
192
+ label : "Enable Mailbox Rule" ,
193
+ type : "POST" ,
194
+ icon : < PlayArrow /> ,
195
+ url : "/api/ExecSetMailboxRule" ,
196
+ data : {
197
+ ruleId : "Identity" ,
198
+ userPrincipalName : graphUserRequest . data ?. [ 0 ] ?. userPrincipalName ,
199
+ ruleName : "Name" ,
200
+ Enable : true ,
201
+ } ,
202
+ condition : ( row ) => ! row . Enabled ,
203
+ confirmText : "Are you sure you want to enable this mailbox rule?" ,
204
+ multiPost : false ,
205
+ } ,
206
+ {
207
+ label : "Disable Mailbox Rule" ,
208
+ type : "POST" ,
209
+ icon : < Block /> ,
210
+ url : "/api/ExecSetMailboxRule" ,
211
+ data : {
212
+ ruleId : "Identity" ,
213
+ userPrincipalName : graphUserRequest . data ?. [ 0 ] ?. userPrincipalName ,
214
+ ruleName : "Name" ,
215
+ Disable : true ,
216
+ } ,
217
+ condition : ( row ) => row . Enabled ,
218
+ confirmText : "Are you sure you want to disable this mailbox rule?" ,
219
+ multiPost : false ,
220
+ } ,
191
221
{
192
222
label : "Remove Mailbox Rule" ,
193
223
type : "POST" ,
194
- icon : < TrashIcon /> ,
224
+ icon : < DeleteForever /> ,
195
225
url : "/api/ExecRemoveMailboxRule" ,
196
226
data : {
197
227
ruleId : "Identity" ,
0 commit comments