Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User List Updates #1550

Merged
merged 10 commits into from
May 16, 2023
24 changes: 24 additions & 0 deletions src/components/tables/CellLicense.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import PropTypes from 'prop-types'
import M365Licenses from 'src/data/M365Licenses'

export function CellLicense({ cell }) {
let licenses = []
cell?.map((licenseAssignment, idx) => {
for (var x = 0; x < M365Licenses.length; x++) {
if (licenseAssignment.skuId == M365Licenses[x].GUID) {
licenses.push(M365Licenses[x].Product_Display_Name)
break
}
}
})
return licenses.join(', ')
}

CellLicense.propTypes = {
cell: PropTypes.object,
}

export const cellLicenseFormatter = () => (row, index, column, id) => {
const cell = column.selector(row)
return CellLicense({ cell })
}
2 changes: 1 addition & 1 deletion src/components/tables/CippDatatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function CippDatatable({ path, params, ...rest }) {
data = [],
isFetching,
error,
} = useListDatatableQuery({ path, params: { refreshGuid, graphFilter, ...params } })
} = useListDatatableQuery({ path, params: { refreshGuid, $filter: graphFilter, ...params } })
return (
<CippTable
{...rest}
Expand Down
Loading
Loading