-
Notifications
You must be signed in to change notification settings - Fork 5
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
Set review stepper state to complete after user submits registration #1162
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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<ReviewSubmitProps> = ({ | |
// 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 })); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the significance of the 6? Is it the step number? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, 6 is the review step number. There are constants for steps 1-5. I was unable to determine why 6 was excluded, since 6 is listed as a step number a few times in the code. However, I did notice some cases where the constants weren't used for other step numbers, so a story updating this should be added. |
||
} | ||
|
||
const handleJumpToTrisaImplementationStep = () => { | ||
dispatch(setHasReachSubmitStep({ hasReachSubmitStep: false })); | ||
jumpToStep(StepsIndexes.TRISA_IMPLEMENTATION); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stepper label color doesn't immediately update after the registration is submitted. To fix this, I think
react-query
will have to be used which would require some refactoring that should be handled in a separate story.