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

Tenant Onboarding Wizard #1947

Merged
merged 1 commit into from
Dec 13, 2023
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
5 changes: 5 additions & 0 deletions src/_nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ const _nav = [
name: 'App Consent Requests',
to: '/tenant/administration/app-consent-requests',
},
{
component: CNavItem,
name: 'Tenant Onboarding',
to: '/tenant/administration/tenant-onboarding-wizard',
},
{
component: CNavItem,
name: 'Tenant Offboarding',
Expand Down
8 changes: 8 additions & 0 deletions src/adminRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ const appapproval = React.lazy(() => import('src/views/cipp/AppApproval'))
const TenantOffboardingWizard = React.lazy(() =>
import('src/views/tenant/administration/TenantOffboardingWizard'),
)
const TenantOnboardingWizard = React.lazy(() =>
import('src/views/tenant/administration/TenantOnboardingWizard'),
)

const adminRoutes = [
{ path: '/cipp', name: 'CIPP' },
Expand Down Expand Up @@ -46,6 +49,11 @@ const adminRoutes = [
name: 'Tenant Offboarding',
component: TenantOffboardingWizard,
},
{
path: '/tenant/administration/tenant-onboarding-wizard',
name: 'Tenant Onboarding',
component: TenantOnboardingWizard,
},
]

export default adminRoutes
6 changes: 4 additions & 2 deletions src/components/layout/CippWizard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default class CippWizard extends React.Component {
onPageChange: PropTypes.func,
nextPage: PropTypes.func,
previousPage: PropTypes.func,
hideSubmit: PropTypes.bool,
}

static defaultProps = {
Expand All @@ -27,6 +28,7 @@ export default class CippWizard extends React.Component {
page: 0,
values: props.initialValues,
wizardTitle: props.wizardTitle,
hideSubmit: props.hideSubmit,
}
}

Expand Down Expand Up @@ -64,7 +66,7 @@ export default class CippWizard extends React.Component {

render() {
const { children } = this.props
const { page, values, wizardTitle } = this.state
const { page, values, wizardTitle, hideSubmit } = this.state
const activePage = React.Children.toArray(children)[page]
const isLastPage = page === React.Children.count(children) - 1

Expand Down Expand Up @@ -104,7 +106,7 @@ export default class CippWizard extends React.Component {
Next »
</CButton>
)}
{isLastPage && (
{isLastPage && !hideSubmit && (
<>
<CButton type="submit" disabled={submitting}>
Submit
Expand Down
5 changes: 4 additions & 1 deletion src/components/tables/WizardTableField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default class WizardTableField extends React.Component {
reportName: PropTypes.string.isRequired,
keyField: PropTypes.string.isRequired,
path: PropTypes.string.isRequired,
params: PropTypes.object,
columns: PropTypes.array.isRequired,
fieldProps: PropTypes.object,
}
Expand Down Expand Up @@ -56,7 +57,7 @@ export default class WizardTableField extends React.Component {
}

render() {
const { reportName, keyField, columns, path } = this.props
const { reportName, keyField, columns, path, params, ...props } = this.props
return (
<CippDatatable
reportName={reportName}
Expand All @@ -65,12 +66,14 @@ export default class WizardTableField extends React.Component {
actions={false}
striped
path={path}
params={params}
disablePDFExport={true}
disableCSVExport={true}
tableProps={{
selectableRows: true,
onSelectedRowsChange: this.handleSelect,
}}
{...props}
/>
)
}
Expand Down
Loading
Loading