Skip to content

Commit

Permalink
Merge branch 'KelvinTegelaar:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
incedIT authored Jun 26, 2024
2 parents 17a901c + 6224b50 commit e9e1949
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cipp",
"version": "5.9.0",
"version": "5.9.3",
"description": "The CyberDrain Improved Partner Portal is a portal to help manage administration for Microsoft Partners.",
"homepage": "https://cipp.app/",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion public/version_latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.9.0
5.9.3
17 changes: 10 additions & 7 deletions src/components/tables/CippTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ export default function CippTable({

// Define the flatten function
const flatten = (obj, prefix = '') => {
if (obj === null) return {}
return Object.keys(obj).reduce((output, key) => {
const newKey = prefix ? `${prefix}.${key}` : key
const value = obj[key] === null ? '' : obj[key]
Expand All @@ -645,9 +646,13 @@ export default function CippTable({
Object.assign(output, flatten(value, newKey))
} else {
if (Array.isArray(value)) {
value.map((item, idx) => {
Object.assign(output, flatten(item, `${newKey}[${idx}]`))
})
if (typeof value[0] === 'object') {
value.map((item, idx) => {
Object.assign(output, flatten(item, `${newKey}[${idx}]`))
})
} else {
output[newKey] = value
}
} else {
output[newKey] = value
}
Expand Down Expand Up @@ -683,8 +688,7 @@ export default function CippTable({
})
return Array.isArray(exportData) && exportData.length > 0
? exportData.map((obj) => {
const flattenedObj = flatten(obj)
return applyFormatter(flattenedObj)
return flatten(applyFormatter(obj))
})
: []
}
Expand All @@ -695,8 +699,7 @@ export default function CippTable({
// Adjusted dataFlat processing to include formatting
let dataFlat = Array.isArray(data)
? data.map((item) => {
const flattenedItem = flatten(item)
return applyFormatter(flattenedItem)
return flatten(applyFormatter(item))
})
: []
if (!disablePDFExport) {
Expand Down
2 changes: 1 addition & 1 deletion src/views/identity/reports/SignIns.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ const SignInsReport = () => {
title="Sign Ins Report"
capabilities={{ allTenants: false, helpContext: 'https://google.com' }}
datatable={{
filterlists: [
filterlist: [
{
filterName: 'Risky sign-ins',
filter: 'Complex: riskState ne none',
Expand Down
2 changes: 1 addition & 1 deletion version_latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.9.0
5.9.3

0 comments on commit e9e1949

Please sign in to comment.