V2Wizard: Add components to the Registration step
This migrates all the needed components from Javascript and DDF to Typescript and RTK. New slices were added for registration type and activation key. Disabling the "Next" button should work correctly now.
This commit is contained in:
parent
9ce438295d
commit
360984df7c
8 changed files with 513 additions and 304 deletions
|
|
@ -10,6 +10,7 @@ import {
|
|||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
import ImageOutputStep from './steps/ImageOutput';
|
||||
import RegistrationStep from './steps/Registration';
|
||||
import Aws from './steps/TargetEnvironment/Aws';
|
||||
import Gcp from './steps/TargetEnvironment/Gcp';
|
||||
import { isAwsAccountIdValid, isGcpEmailValid } from './validators';
|
||||
|
|
@ -18,12 +19,14 @@ import { useAppDispatch, useAppSelector } from '../../store/hooks';
|
|||
import './CreateImageWizard.scss';
|
||||
import {
|
||||
initializeWizard,
|
||||
selectActivationKey,
|
||||
selectAwsAccountId,
|
||||
selectAwsShareMethod,
|
||||
selectAwsSource,
|
||||
selectGcpEmail,
|
||||
selectGcpShareMethod,
|
||||
selectImageTypes,
|
||||
selectRegistrationType,
|
||||
} from '../../store/wizardSlice';
|
||||
import { resolveRelPath } from '../../Utilities/path';
|
||||
import { ImageBuilderHeader } from '../sharedComponents/ImageBuilderHeader';
|
||||
|
|
@ -77,6 +80,11 @@ const CreateImageWizard = () => {
|
|||
const gcpShareMethod = useAppSelector((state) => selectGcpShareMethod(state));
|
||||
const gcpEmail = useAppSelector((state) => selectGcpEmail(state));
|
||||
|
||||
const registrationType = useAppSelector((state) =>
|
||||
selectRegistrationType(state)
|
||||
);
|
||||
const activationKey = useAppSelector((state) => selectActivationKey(state));
|
||||
|
||||
return (
|
||||
<>
|
||||
<ImageBuilderHeader />
|
||||
|
|
@ -138,6 +146,19 @@ const CreateImageWizard = () => {
|
|||
</WizardStep>,
|
||||
]}
|
||||
/>
|
||||
<WizardStep
|
||||
name="Register"
|
||||
id="step-register"
|
||||
footer={
|
||||
<CustomWizardFooter
|
||||
disableNext={
|
||||
registrationType !== 'register-later' && !activationKey
|
||||
}
|
||||
/>
|
||||
}
|
||||
>
|
||||
<RegistrationStep />
|
||||
</WizardStep>
|
||||
<WizardStep
|
||||
name="Review"
|
||||
id="step-review"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue