Skip to content

Commit

Permalink
remove accordian for superadmin
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed May 29, 2024
1 parent 215de12 commit 25688a6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
13 changes: 6 additions & 7 deletions src/views/cipp/app-settings/SettingsSuperAdmin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import React from 'react'
import { CippCallout } from 'src/components/layout/index.js'
import CippAccordionItem from 'src/components/contentcards/CippAccordionItem'
import SettingsCustomRoles from 'src/views/cipp/app-settings/components/SettingsCustomRoles'
import CippButtonCard from 'src/components/contentcards/CippButtonCard'

export function SettingsSuperAdmin() {
const partnerConfig = useGenericGetRequestQuery({
Expand Down Expand Up @@ -39,8 +40,8 @@ export function SettingsSuperAdmin() {
)

return (
<CAccordion>
<CippAccordionItem
<>
<CippButtonCard
title="Tenant Mode"
titleType="big"
isFetching={partnerConfig.isFetching}
Expand Down Expand Up @@ -102,10 +103,8 @@ export function SettingsSuperAdmin() {
</CRow>
</>
</>
</CippAccordionItem>
<CippAccordionItem title="Custom Roles (beta)" titleType="big">
<SettingsCustomRoles />
</CippAccordionItem>
</CAccordion>
</CippButtonCard>
<SettingsCustomRoles />
</>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import PropTypes from 'prop-types'
import { OnChange } from 'react-final-form-listeners'
import { useListTenantsQuery } from 'src/store/api/tenants'
import CippListOffcanvas, { OffcanvasListSection } from 'src/components/utilities/CippListOffcanvas'
import CippButtonCard from 'src/components/contentcards/CippButtonCard'

const SettingsCustomRoles = () => {
const [genericPostRequest, postResults] = useLazyGenericPostRequestQuery()
Expand Down Expand Up @@ -219,7 +220,7 @@ const SettingsCustomRoles = () => {
}

return (
<CippPage title="Custom Roles" tenantSelector={false}>
<CippButtonCard title="Custom Roles" titleType="big" isFetching={isFetching || tenantsFetching}>
<>
<p className="me-1">
Custom roles can be used to restrict permissions for users with the 'editor' or 'readonly'
Expand All @@ -231,7 +232,6 @@ const SettingsCustomRoles = () => {
beta and should be treated as such. The custom role must be added to the user in SWA in
conjunction with the base role. (e.g. editor,mycustomrole)
</p>
{(isFetching || tenantsFetching) && <Skeleton count={1} />}
{isSuccess && !isFetching && !tenantsFetching && (
<Form
onSubmit={handleSubmit}
Expand Down Expand Up @@ -325,6 +325,7 @@ const SettingsCustomRoles = () => {
</>
</CAccordion>
</CCol>

<CCol xl={4} md={12}>
<FormSpy subscription={{ values: true }}>
{({ values }) => {
Expand Down Expand Up @@ -402,7 +403,7 @@ const SettingsCustomRoles = () => {
/>
)}
</>
</CippPage>
</CippButtonCard>
)
}

Expand Down

0 comments on commit 25688a6

Please sign in to comment.