mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
Merge branch 'RegisterWizard' of https://github.com/abouolia/Bigcapital into RegisterWizard
This commit is contained in:
@@ -8,13 +8,12 @@ export default function AuthInsider({
|
||||
children,
|
||||
}) {
|
||||
return (
|
||||
<div class="authentication-insider">
|
||||
<div className={'authentication-insider__logo-section'}>
|
||||
<Icon icon="bigcapital" height={37} width={214} />
|
||||
<div class="authentication-insider__content">
|
||||
|
||||
<div class="authentication-insider__form">
|
||||
{ children }
|
||||
</div>
|
||||
|
||||
<div class="authentication-insider__content">{ children }</div>
|
||||
|
||||
<div class="authentication-insider__footer">
|
||||
<AuthCopyright />
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import React, { useEffect } from 'react';
|
||||
import { useQuery } from 'react-query';
|
||||
import { withWizard } from 'react-albus'
|
||||
|
||||
import withOrganizationActions from 'containers/Organization/withOrganizationActions';
|
||||
import withOrganization from 'containers/Organization/withOrganization'
|
||||
@@ -13,11 +14,19 @@ function SetupInitializingForm({
|
||||
|
||||
// #withOrganizationActions
|
||||
requestOrganizationBuild,
|
||||
|
||||
wizard: { next },
|
||||
}) {
|
||||
const requestBuildOrgnization = useQuery(
|
||||
const { isSuccess } = useQuery(
|
||||
['build-tenant'], () => requestOrganizationBuild(),
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (isSuccess) {
|
||||
next();
|
||||
}
|
||||
}, [isSuccess, next]);
|
||||
|
||||
return (
|
||||
<div class="setup-initializing-form">
|
||||
<h1>You organization is initializin...</h1>
|
||||
@@ -26,5 +35,6 @@ function SetupInitializingForm({
|
||||
}
|
||||
|
||||
export default compose(
|
||||
withOrganizationActions
|
||||
withOrganizationActions,
|
||||
withWizard,
|
||||
)(SetupInitializingForm);
|
||||
@@ -31,8 +31,8 @@ function SetupRightSection ({
|
||||
const handleSkip = useCallback(({ step, push }) => {
|
||||
const scenarios = [
|
||||
{ condition: !hasSubscriptions, redirectTo: 'subscription' },
|
||||
// { condition: , redirectTo: 'initializing' }
|
||||
{ condition: !hasSubscriptions, redirectTo: 'organization' },
|
||||
{ condition: hasSubscriptions && !isOrganizationInitialized, redirectTo: 'initializing' },
|
||||
{ condition: hasSubscriptions && !isOrganizationSeeded, redirectTo: 'organization' },
|
||||
];
|
||||
const scenario = scenarios.find((scenario) => scenario.condition);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user