Skip to content

Commit a35dbc7

Browse files
authored
Merge pull request #3965 from KelvinTegelaar/dev
Dev to hotfix
2 parents 3c868ca + 7ec9712 commit a35dbc7

File tree

18 files changed

+118
-71
lines changed

18 files changed

+118
-71
lines changed

public/version.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "7.5.0"
3-
}
2+
"version": "7.5.1"
3+
}

src/components/CippCards/CippInfoBar.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ export const CippInfoBar = ({ data, isFetching }) => {
6363
</Grid>
6464
{item.offcanvas && (
6565
<>
66-
{console.log("item.offcanvas", item.offcanvas)}
6766
<CippOffCanvas
6867
title={item?.offcanvas?.title || "Details"}
6968
size="md"

src/components/CippComponents/BPASyncDialog.jsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,16 @@ export const BPASyncDialog = ({ createDialog }) => {
2727
// Use methods for form handling and control
2828
const { handleSubmit, control } = methods;
2929

30-
const [tenantId, setTenantId] = useState("");
3130
const [isSyncing, setIsSyncing] = useState(false);
32-
33-
// Use ApiGetCall instead of useApiCall
3431
const bpaSyncResults = ApiPostCall({
3532
urlfromdata: true,
3633
});
3734

3835
const handleForm = (values) => {
39-
setTenantId(values.tenantFilter || "");
40-
setIsSyncing(true);
41-
4236
bpaSyncResults.mutate({
4337
url: "/api/ExecBPA",
44-
queryKey: `bpa-sync-${tenantId}`,
45-
data: tenantId ? { TenantFilter: tenantId } : {},
38+
queryKey: `bpa-sync-${values.tenantFilter}`,
39+
data: values.tenantFilter ? { TenantFilter: values.tenantFilter } : {},
4640
});
4741
};
4842

src/components/CippComponents/CippAppPermissionBuilder.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ const CippAppPermissionBuilder = ({
427427
waiting: true,
428428
});
429429

430-
console.log(spInfo);
430+
//console.log(spInfo);
431431

432432
const currentAppPermission = useWatch({
433433
control: formControl.control,

src/components/CippComponents/CippExchangeActions.jsx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
import {
2-
EyeIcon,
3-
TrashIcon,
4-
MagnifyingGlassIcon,
5-
PlayCircleIcon,
6-
} from "@heroicons/react/24/outline";
1+
import { TrashIcon, MagnifyingGlassIcon, PlayCircleIcon } from "@heroicons/react/24/outline";
72
import {
83
Archive,
94
MailOutline,
@@ -14,8 +9,11 @@ import {
149
PhonelinkLock,
1510
Key,
1611
PostAdd,
17-
Add,
1812
Gavel,
13+
Language,
14+
Outbox,
15+
NotificationImportant,
16+
DataUsage,
1917
} from "@mui/icons-material";
2018

2119
export const CippExchangeActions = () => {
@@ -190,12 +188,12 @@ export const CippExchangeActions = () => {
190188
],
191189
},
192190
{
193-
label: "Set mailbox locale",
191+
label: "Set Mailbox Locale",
194192
type: "POST",
195193
url: "/api/ExecSetMailboxLocale",
196194
data: { user: "UPN", ProhibitSendQuota: true },
197195
confirmText: "Enter a locale, e.g. en-US",
198-
icon: <MailOutline />,
196+
icon: <Language />,
199197
fields: [
200198
{
201199
label: "Locale",
@@ -211,7 +209,7 @@ export const CippExchangeActions = () => {
211209
url: "/api/ExecSetMailboxQuota",
212210
data: { user: "UPN", ProhibitSendQuota: true },
213211
confirmText: "Enter a quota. e.g. 1000MB, 10GB,1TB",
214-
icon: <MailOutline />,
212+
icon: <Outbox />,
215213
fields: [
216214
{
217215
label: "Quota",
@@ -230,7 +228,7 @@ export const CippExchangeActions = () => {
230228
ProhibitSendReceiveQuota: true,
231229
},
232230
confirmText: "Enter a quota. e.g. 1000MB, 10GB,1TB",
233-
icon: <MailOutline />,
231+
icon: <DataUsage />,
234232
fields: [
235233
{
236234
label: "Quota",
@@ -246,7 +244,7 @@ export const CippExchangeActions = () => {
246244
url: "/api/ExecSetMailboxQuota",
247245
data: { user: "UPN", IssueWarningQuota: true },
248246
confirmText: "Enter a quota. e.g. 1000MB, 10GB,1TB",
249-
icon: <MailOutline />,
247+
icon: <NotificationImportant />,
250248
fields: [
251249
{
252250
label: "Quota",

src/components/CippIntegrations/CippApiClientManagement.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,13 @@ const CippApiClientManagement = () => {
253253
showDivider={false}
254254
isFetching={azureConfig.isFetching}
255255
/>
256-
{azureConfig.isSuccess && azureConfig.data?.Results?.ClientIDs && (
256+
{azureConfig.isSuccess && (
257257
<>
258258
{!isEqual(
259259
apiClients.data?.pages?.[0]?.Results?.filter((c) => c.Enabled)
260260
.map((c) => c.ClientId)
261261
.sort(),
262-
azureConfig.data?.Results?.ClientIDs?.sort()
262+
(azureConfig.data?.Results?.ClientIDs || []).sort()
263263
) && (
264264
<Box sx={{ px: 3 }}>
265265
<Alert severity="warning">

src/components/CippTable/CippGraphExplorerFilter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ const CippGraphExplorerFilter = ({
451451
setCardExpanded(false);
452452
};
453453

454-
console.log(cardExpanded);
454+
//console.log(cardExpanded);
455455
const deletePreset = (id) => {
456456
savePresetApi.mutate({
457457
url: "/api/ExecGraphExplorerPreset",

src/components/csvExportButton.js

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,28 @@ const flattenObject = (obj, parentKey = "") => {
1414
const fullKey = parentKey ? `${parentKey}.${key}` : key;
1515
if (typeof obj[key] === "object" && obj[key] !== null && !Array.isArray(obj[key])) {
1616
Object.assign(flattened, flattenObject(obj[key], fullKey));
17+
} else if (Array.isArray(obj[key]) && typeof obj[key][0] === "string") {
18+
flattened[fullKey] = obj[key];
1719
} else if (Array.isArray(obj[key])) {
18-
// Handle arrays of objects by applying the formatter on each property
19-
flattened[fullKey] = obj[key]
20-
.map((item) =>
21-
typeof item === "object"
22-
? JSON.stringify(
23-
Object.fromEntries(
24-
Object.entries(flattenObject(item)).map(([k, v]) => [k, getCippFormatting(v, k, "text", false)])
20+
let testFormatting = getCippFormatting(obj[key], key, "text", false, false);
21+
if (typeof testFormatting === "string" && !testFormatting.includes("[object Object]")) {
22+
flattened[fullKey] = testFormatting;
23+
} else {
24+
flattened[fullKey] = obj[key]
25+
.map((item) =>
26+
typeof item === "object"
27+
? JSON.stringify(
28+
Object.fromEntries(
29+
Object.entries(flattenObject(item)).map(([k, v]) => [
30+
k,
31+
getCippFormatting(v, k, "text", false),
32+
])
33+
)
2534
)
26-
)
27-
: getCippFormatting(item, fullKey, "text", false)
28-
)
29-
.join(", ");
35+
: getCippFormatting(item, fullKey, "text", false, false)
36+
)
37+
.join(", ");
38+
}
3039
} else {
3140
flattened[fullKey] = obj[key];
3241
}
@@ -57,6 +66,12 @@ export const CSVExportButton = (props) => {
5766
const formattedRow = {};
5867
columnKeys.forEach((key) => {
5968
const value = row[key];
69+
// check for string and do not format
70+
if (typeof value === "string") {
71+
formattedRow[key] = value;
72+
return;
73+
}
74+
6075
// Pass flattened data to the formatter for CSV export
6176
formattedRow[key] = getCippFormatting(value, key, "text", false);
6277
});

src/pages/cipp/custom-data/schema-extensions/add.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const Page = () => {
4848
});
4949

5050
const handleAddSchema = (data) => {
51-
console.log(data);
51+
//console.log(data);
5252
if (!data.properties || data.properties.length === 0) {
5353
formControl.setError("properties", {
5454
type: "manual",

src/pages/email/administration/quarantine/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,15 @@ const Page = () => {
3939
const [traceDetails, setTraceDetails] = useState([]);
4040
const [traceMessageId, setTraceMessageId] = useState(null);
4141
const [messageSubject, setMessageSubject] = useState(null);
42+
const [messageContentsWaiting, setMessageContentsWaiting] = useState(false);
4243

4344
const getMessageContents = ApiGetCall({
4445
url: "/api/ListMailQuarantineMessage",
4546
data: {
4647
tenantFilter: tenantFilter,
4748
Identity: messageId,
4849
},
49-
waiting: false,
50+
waiting: messageContentsWaiting,
5051
queryKey: `ListMailQuarantineMessage-${messageId}`,
5152
});
5253

@@ -61,7 +62,9 @@ const Page = () => {
6162
const viewMessage = (row) => {
6263
const id = row.Identity;
6364
setMessageId(id);
64-
getMessageContents.waiting = true;
65+
if (!messageContentsWaiting) {
66+
setMessageContentsWaiting(true);
67+
}
6568
getMessageContents.refetch();
6669
setDialogOpen(true);
6770
};
@@ -85,7 +88,7 @@ const Page = () => {
8588
} else {
8689
setDialogContent(<Skeleton variant="rectangular" height={400} />);
8790
}
88-
}, [getMessageContents.isSuccess]);
91+
}, [getMessageContents.isSuccess, getMessageContents.data]);
8992

9093
const actions = [
9194
{

0 commit comments

Comments
 (0)