Skip to content

Commit

Permalink
Merge pull request KelvinTegelaar#2789 from JohnDuprey/dev
Browse files Browse the repository at this point in the history
Bugfixes and improvements
  • Loading branch information
JohnDuprey authored Aug 8, 2024
2 parents 968c5d7 + 5739fc4 commit 681c8ff
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/views/tenant/administration/GDAPRoleWizard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ const GDAPRoleWizard = () => {
return <li key={idx}>{message}</li>
})}
</CCallout>
<Link to="/tenant/administration/gdap-invite">
<Link to="/tenant/administration/gdap-invite-wizard">
<CButton>Create GDAP Invite</CButton>
</Link>
</>
Expand Down
5 changes: 4 additions & 1 deletion src/views/tenant/administration/TenantOnboardingWizard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ const TenantOnboardingWizard = () => {
</center>
<hr className="my-4" />
<div className="mb-2">
<TitleButton href="/tenant/administration/gdap-invite" title="Create GDAP Invite" />
<TitleButton
href="/tenant/administration/gdap-invite-wizard"
title="Create GDAP Invite"
/>
</div>
<Field name="selectedRelationships" validate={requiredArray}>
{(props) => (
Expand Down
37 changes: 23 additions & 14 deletions src/views/tenant/standards/ListAppliedStandards.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const DeleteAction = () => {
</>
)
}

const ApplyNewStandard = () => {
const [templateStandard, setTemplateStandard] = useState()
const [loadedTemplate, setLoadedTemplate] = useState(false)
Expand Down Expand Up @@ -268,6 +269,7 @@ const ApplyNewStandard = () => {
})

const tenantDomain = useSelector((state) => state.app.currentTenant.defaultDomainName)
const tenantDisplayName = useSelector((state) => state.app.currentTenant.displayName)
//console.log('tenantDomain', tenantDomain)
const [genericPostRequest, postResults] = useLazyGenericPostRequestQuery()

Expand All @@ -294,20 +296,27 @@ const ApplyNewStandard = () => {
})

const handleSubmit = async (values) => {
Object.keys(values.standards).filter(function (x) {
if (values.standards[x] === false) {
delete values.standards[x]
}
return null
})

//filter on only objects that are 'true'
genericPostRequest({
path: '/api/AddStandardsDeploy',
values: { ...values.standards, tenant: tenantDomain },
}).then(() => {
refetchStandards()
refetchConsolidated()
ModalService.confirm({
title: 'Save Standards',
body: (
<div>
<p>
Are you sure you want to save these standards to {tenantDisplayName}? This will apply
all Remediate options on the next run.
</p>
</div>
),
confirmLabel: 'Save',
cancelLabel: 'Cancel',
onConfirm: () => {
genericPostRequest({
path: '/api/AddStandardsDeploy',
values: { ...values.standards, tenant: tenantDomain },
}).then(() => {
refetchStandards()
refetchConsolidated()
})
},
})
}
const [intuneGetRequest, intuneTemplates] = useLazyGenericGetRequestQuery()
Expand Down

0 comments on commit 681c8ff

Please sign in to comment.