From a5e35a6c9ef53d6b5bd8e51e0ec728f40ae6208a Mon Sep 17 00:00:00 2001 From: Danielle Date: Mon, 4 Mar 2024 10:56:22 -0500 Subject: [PATCH] Set review stepper state to complete after user submits registration (#1162) --- 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);