From fd0c80510c2723af6a22c567ef35f0f2af2ffdcc Mon Sep 17 00:00:00 2001 From: daniellemaxwell Date: Wed, 28 Feb 2024 16:00:46 -0500 Subject: [PATCH] Set review stepper state to complete after user submits registration --- web/gds-user-ui/src/components/ReviewSubmit/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/gds-user-ui/src/components/ReviewSubmit/index.tsx b/web/gds-user-ui/src/components/ReviewSubmit/index.tsx index 2b692ed97..b7ae2f009 100644 --- a/web/gds-user-ui/src/components/ReviewSubmit/index.tsx +++ b/web/gds-user-ui/src/components/ReviewSubmit/index.tsx @@ -18,12 +18,13 @@ import useCertificateStepper from 'hooks/useCertificateStepper'; import { STEPPER_NETWORK } from 'utils/constants'; import WarningBox from 'components/WarningBox'; -import { setHasReachSubmitStep } from 'application/store/stepper.slice'; +import { setHasReachSubmitStep, setStepStatus } from 'application/store/stepper.slice'; import { useAppDispatch } from 'application/store'; import { StepsIndexes } from 'constants/steps'; import { useFetchCertificateStep } from 'hooks/useFetchCertificateStep'; import { StepEnum } from 'types/enums'; import useSubmissionStatus from 'modules/dashboard/registration/hooks/useSubmissionStatus'; +import { LSTATUS } from 'components/RegistrationForm/CertificateStepLabel'; interface ReviewSubmitProps { onSubmitHandler: (e: React.FormEvent, network: string) => void; @@ -71,6 +72,11 @@ const ReviewSubmit: React.FC = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [isSent]); + // Update the review step status to complete if the user submits a registration. + if (isTestNetSubmitted || isMainNetSubmitted) { + dispatch(setStepStatus({ step: 6, status: LSTATUS.COMPLETE })); + } + const handleJumpToTrisaImplementationStep = () => { dispatch(setHasReachSubmitStep({ hasReachSubmitStep: false })); jumpToStep(StepsIndexes.TRISA_IMPLEMENTATION);