Skip to content

Commit ff507f8

Browse files
authored
Merge pull request #4463 from kris6673/fix-archive-and-blockedForSpam
Fix: Fix blocked for spam and add alert text
2 parents c2d579f + 103e8bc commit ff507f8

File tree

2 files changed

+25
-14
lines changed

2 files changed

+25
-14
lines changed

src/components/CippCards/CippExchangeInfoCard.jsx

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
IconButton,
99
Typography,
1010
CircularProgress,
11+
Alert,
1112
} from "@mui/material";
1213
import { PropertyList } from "/src/components/property-list";
1314
import { PropertyListItem } from "/src/components/property-list-item";
@@ -59,6 +60,11 @@ export const CippExchangeInfoCard = (props) => {
5960
</Stack>
6061
}
6162
/>
63+
{exchangeData?.BlockedForSpam ? (
64+
<Alert severity="warning" sx={{ mx: 2, mt: 2, mb: 2 }}>
65+
This mailbox is currently blocked for spam.
66+
</Alert>
67+
) : null}
6268
<Divider />
6369
<PropertyList>
6470
<PropertyListItem
@@ -81,7 +87,10 @@ export const CippExchangeInfoCard = (props) => {
8187
Hidden from GAL:
8288
</Typography>
8389
<Typography variant="inherit">
84-
{getCippFormatting(exchangeData?.HiddenFromAddressLists, "HiddenFromAddressLists")}
90+
{getCippFormatting(
91+
exchangeData?.HiddenFromAddressLists,
92+
"HiddenFromAddressLists"
93+
)}
8594
</Typography>
8695
</Grid>
8796
<Grid size={{ xs: 12, md: 4 }}>
@@ -127,14 +136,15 @@ export const CippExchangeInfoCard = (props) => {
127136
value={
128137
isLoading ? (
129138
<Skeleton variant="text" width={200} />
130-
) : (() => {
139+
) : (
140+
(() => {
131141
const forwardingAddress = exchangeData?.ForwardingAddress;
132142
const forwardAndDeliver = exchangeData?.ForwardAndDeliver;
133-
143+
134144
// Determine forwarding type and clean address
135145
let forwardingType = "None";
136146
let cleanAddress = "";
137-
147+
138148
if (forwardingAddress) {
139149
if (forwardingAddress.startsWith("smtp:")) {
140150
forwardingType = "External";
@@ -144,18 +154,17 @@ export const CippExchangeInfoCard = (props) => {
144154
cleanAddress = forwardingAddress;
145155
}
146156
}
147-
157+
148158
return (
149159
<Grid container spacing={2}>
150160
<Grid size={{ xs: 12, md: 6 }}>
151161
<Typography variant="inherit" color="text.primary" gutterBottom>
152162
Forwarding Status:
153163
</Typography>
154164
<Typography variant="inherit">
155-
{forwardingType === "None"
165+
{forwardingType === "None"
156166
? getCippFormatting(false, "ForwardingStatus")
157-
: `${forwardingType} Forwarding`
158-
}
167+
: `${forwardingType} Forwarding`}
159168
</Typography>
160169
</Grid>
161170
{forwardingType !== "None" && (
@@ -172,18 +181,17 @@ export const CippExchangeInfoCard = (props) => {
172181
<Typography variant="inherit" color="text.primary" gutterBottom>
173182
Forwarding Address:
174183
</Typography>
175-
<Typography variant="inherit">
176-
{cleanAddress}
177-
</Typography>
184+
<Typography variant="inherit">{cleanAddress}</Typography>
178185
</Grid>
179186
</>
180187
)}
181188
</Grid>
182189
);
183190
})()
191+
)
184192
}
185193
/>
186-
194+
187195
{/* Archive section - always show status */}
188196
<PropertyListItem
189197
divider
@@ -207,7 +215,10 @@ export const CippExchangeInfoCard = (props) => {
207215
Auto Expanding Archive:
208216
</Typography>
209217
<Typography variant="inherit">
210-
{getCippFormatting(exchangeData?.AutoExpandingArchive, "AutoExpandingArchive")}
218+
{getCippFormatting(
219+
exchangeData?.AutoExpandingArchive,
220+
"AutoExpandingArchive"
221+
)}
211222
</Typography>
212223
</Grid>
213224
<Grid size={{ xs: 12, md: 6 }}>

src/pages/identity/administration/users/user/exchange.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const Page = () => {
6565
waiting: waiting,
6666
});
6767
const userRequest = ApiGetCall({
68-
url: `/api/ListUserMailboxDetails?UserId=${userId}&tenantFilter=${userSettingsDefaults.currentTenant}`,
68+
url: `/api/ListUserMailboxDetails?UserId=${userId}&tenantFilter=${userSettingsDefaults.currentTenant}&userMail=${graphUserRequest.data?.[0]?.userPrincipalName}`,
6969
queryKey: `Mailbox-${userId}`,
7070
waiting: waiting,
7171
});

0 commit comments

Comments
 (0)