Skip to content

Tweaks and bugfixes #2585

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

Merged
merged 5 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/components/tables/CippTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,13 @@ export default function CippTable({
if (typeof value === 'object' && !Array.isArray(value)) {
Object.assign(output, flatten(value, newKey))
} else {
output[newKey] = value
if (Array.isArray(value)) {
value.map((item, idx) => {
Object.assign(output, flatten(item, `${newKey}[${idx}]`))
})
} else {
output[newKey] = value
}
}
return output
}, {})
Expand Down
1 change: 1 addition & 0 deletions src/views/identity/administration/DeployJITAdmin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
import { faCircleNotch, faEdit, faEye } from '@fortawesome/free-solid-svg-icons'
import { CippContentCard, CippPage, CippPageList } from 'src/components/layout'
import { CellTip, cellGenericFormatter } from 'src/components/tables/CellGenericFormat'
import 'react-datepicker/dist/react-datepicker.css'

Check warning on line 21 in src/views/identity/administration/DeployJITAdmin.jsx

View workflow job for this annotation

GitHub Actions / NPM Install and Build (16.x, ubuntu-latest)

'/home/runner/work/CIPP/CIPP/node_modules/react-datepicker/dist/react-datepicker.css' imported multiple times
import { TenantSelector } from 'src/components/utilities'
import arrayMutators from 'final-form-arrays'
import DatePicker from 'react-datepicker'
import 'react-datepicker/dist/react-datepicker.css'

Check warning on line 25 in src/views/identity/administration/DeployJITAdmin.jsx

View workflow job for this annotation

GitHub Actions / NPM Install and Build (16.x, ubuntu-latest)

'/home/runner/work/CIPP/CIPP/node_modules/react-datepicker/dist/react-datepicker.css' imported multiple times
import { useListUsersQuery } from 'src/store/api/users'
import GDAPRoles from 'src/data/GDAPRoles'
import { CippDatatable, cellDateFormatter } from 'src/components/tables'
Expand Down Expand Up @@ -75,6 +75,7 @@
$select: 'id,displayName,userPrincipalName,accountEnabled',
$count: true,
$top: 999,
$orderby: 'displayName',
},
})

Expand Down
16 changes: 14 additions & 2 deletions src/views/tenant/conditional/DeployVacation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,17 @@ const ListClassicAlerts = () => {
data: users = [],
isFetching: usersIsFetching,
error: usersError,
} = useListUsersQuery({ tenantDomain })
} = useGenericGetRequestQuery({
path: '/api/ListGraphRequest',
params: {
TenantFilter: tenantDomain,
Endpoint: 'users',
$select: 'id,displayName,userPrincipalName,accountEnabled',
$count: true,
$top: 999,
$orderby: 'displayName',
},
})

const {
data: caPolicies = [],
Expand Down Expand Up @@ -90,12 +100,13 @@ const ListClassicAlerts = () => {
<CCol>
<RFFSelectSearch
label={'Users in ' + tenantDomain}
values={users?.map((user) => ({
values={users?.Results?.map((user) => ({
value: user.id,
name: `${user.displayName} <${user.userPrincipalName}>`,
}))}
placeholder={!usersIsFetching ? 'Select user' : 'Loading...'}
name="UserId"
isLoading={usersIsFetching}
/>
</CCol>
</CRow>
Expand All @@ -109,6 +120,7 @@ const ListClassicAlerts = () => {
}))}
placeholder={!caIsFetching ? 'Select policy' : 'Loading...'}
name="PolicyId"
isLoading={caIsFetching}
/>
</CCol>
</CRow>
Expand Down
Loading