Unverified Commit 05c6b1c0 authored by Zhou (Link)  Fang's avatar Zhou (Link) Fang Committed by GitHub
Browse files

Added route constants (#315)

* Added route constants

* made all route URLs use constants

* Added sign in
parent 880d8cfa
...@@ -8,6 +8,7 @@ import Application from './components/Application/Application'; ...@@ -8,6 +8,7 @@ import Application from './components/Application/Application';
import Portal from './components/Portal/Portal'; import Portal from './components/Portal/Portal';
import NotFound404 from './components/ErrorPages/NotFound404'; import NotFound404 from './components/ErrorPages/NotFound404';
import InternalError50x from './components/ErrorPages/InternalError50x'; import InternalError50x from './components/ErrorPages/InternalError50x';
import { ROUTE_SIGN_IN } from './Constants/Constants';
const theme = createMuiTheme({ const theme = createMuiTheme({
palette: { palette: {
...@@ -23,7 +24,7 @@ const App = () => { ...@@ -23,7 +24,7 @@ const App = () => {
const [currentFormId, setCurrentFormId] = useState(''); const [currentFormId, setCurrentFormId] = useState('');
const [furthestPage, setFurthestPage] = useState({ const [furthestPage, setFurthestPage] = useState({
index: 0, index: 0,
pathName: '/sign-in', pathName: ROUTE_SIGN_IN,
}); });
const [needLoadingSignIn, setNeedLoadingSignIn] = useState(true); const [needLoadingSignIn, setNeedLoadingSignIn] = useState(true);
const [currentStepIndex, setCurrentStepIndex] = useState(0); const [currentStepIndex, setCurrentStepIndex] = useState(0);
......
...@@ -34,14 +34,13 @@ export const HAS_TOKEN_EXPIRED = 'HAS_TOKEN_EXPIRED'; ...@@ -34,14 +34,13 @@ export const HAS_TOKEN_EXPIRED = 'HAS_TOKEN_EXPIRED';
export const LOGIN_EXPIRED_MSG = 'Your session has expired, please sign in again.'; export const LOGIN_EXPIRED_MSG = 'Your session has expired, please sign in again.';
export const MAX_LENGTH_HELPER_TEXT = 'The value exceeds max length 255 characters'; export const MAX_LENGTH_HELPER_TEXT = 'The value exceeds max length 255 characters';
export const PATH_NAME_ARRAY = [ export const ROUTE_SIGN_IN = '/sign-in';
'/company-info', export const ROUTE_COMPANY = '/company-info';
'/membership-level', export const ROUTE_MEMBERSHIP = '/membership-level';
'/working-groups', export const ROUTE_WGS = '/working-groups';
'/signing-authority', export const ROUTE_SIGNING = '/signing-authority';
'/review', export const ROUTE_REVIEW = '/review';
'/submitted', export const ROUTE_SUBMITTED = '/submitted';
];
export const FETCH_METHOD = { export const FETCH_METHOD = {
POST: 'POST', POST: 'POST',
...@@ -66,12 +65,12 @@ export const MEMBERSHIP_LEVELS = [ ...@@ -66,12 +65,12 @@ export const MEMBERSHIP_LEVELS = [
]; ];
export const PAGE_STEP = [ export const PAGE_STEP = [
{ label: SIGN_IN, pathName: '/sign-in' }, { label: SIGN_IN, pathName: ROUTE_SIGN_IN },
{ label: COMPANY_INFORMATION, pathName: '/company-info' }, { label: COMPANY_INFORMATION, pathName: ROUTE_COMPANY },
{ label: MEMBERSHIP_LEVEL, pathName: '/membership-level' }, { label: MEMBERSHIP_LEVEL, pathName: ROUTE_MEMBERSHIP },
{ label: WORKING_GROUPS, pathName: '/working-groups' }, { label: WORKING_GROUPS, pathName: ROUTE_WGS },
{ label: SIGNING_AUTHORITY, pathName: '/signing-authority' }, { label: SIGNING_AUTHORITY, pathName: ROUTE_SIGNING },
{ label: REVIEW, pathName: '/review' }, { label: REVIEW, pathName: ROUTE_REVIEW },
]; ];
export const CONTACT_TYPE = { export const CONTACT_TYPE = {
......
...@@ -2,7 +2,7 @@ import { useCallback, useContext, useEffect, useState } from 'react'; ...@@ -2,7 +2,7 @@ import { useCallback, useContext, useEffect, useState } from 'react';
import { Switch, Route, Redirect, useHistory } from 'react-router-dom'; import { Switch, Route, Redirect, useHistory } from 'react-router-dom';
import { useFormik } from 'formik'; import { useFormik } from 'formik';
import SignIn from './SignIn/SignIn'; import SignIn from './SignIn/SignIn';
import { HAS_TOKEN_EXPIRED, LOGIN_EXPIRED_MSG, PAGE_STEP } from '../../Constants/Constants'; import { HAS_TOKEN_EXPIRED, LOGIN_EXPIRED_MSG, PAGE_STEP, ROUTE_COMPANY, ROUTE_MEMBERSHIP, ROUTE_REVIEW, ROUTE_SIGNING, ROUTE_SUBMITTED, ROUTE_WGS } from '../../Constants/Constants';
import { initialValues } from '../UIComponents/FormComponents/formFieldModel'; import { initialValues } from '../UIComponents/FormComponents/formFieldModel';
import CompanyInformation from './CompanyInformation/CompanyInformation'; import CompanyInformation from './CompanyInformation/CompanyInformation';
import MembershipLevel from './MembershipLevel/MembershipLevel'; import MembershipLevel from './MembershipLevel/MembershipLevel';
...@@ -52,7 +52,7 @@ export default function Application() { ...@@ -52,7 +52,7 @@ export default function Application() {
const submitForm = () => { const submitForm = () => {
executeSendDataByStep(5, '', currentFormId, currentUser.name, ''); executeSendDataByStep(5, '', currentFormId, currentUser.name, '');
goToNextStep(5, '/submitted'); goToNextStep(5, ROUTE_SUBMITTED);
}; };
const submitCompanyInfo = () => { const submitCompanyInfo = () => {
...@@ -124,7 +124,7 @@ export default function Application() { ...@@ -124,7 +124,7 @@ export default function Application() {
validationSchema: validationSchema[0], validationSchema: validationSchema[0],
onSubmit: () => { onSubmit: () => {
submitCompanyInfo(); submitCompanyInfo();
goToNextStep(1, '/membership-level'); goToNextStep(1, ROUTE_MEMBERSHIP);
}, },
}); });
...@@ -153,7 +153,7 @@ export default function Application() { ...@@ -153,7 +153,7 @@ export default function Application() {
validationSchema: validationSchema[1], validationSchema: validationSchema[1],
onSubmit: () => { onSubmit: () => {
submitMembershipLevel(); submitMembershipLevel();
goToNextStep(2, '/working-groups'); goToNextStep(2, ROUTE_WGS);
}, },
}); });
...@@ -186,7 +186,7 @@ export default function Application() { ...@@ -186,7 +186,7 @@ export default function Application() {
validationSchema: validationSchema[2], validationSchema: validationSchema[2],
onSubmit: () => { onSubmit: () => {
submitWorkingGroups(); submitWorkingGroups();
goToNextStep(3, '/signing-authority'); goToNextStep(3, ROUTE_SIGNING);
}, },
}); });
...@@ -227,7 +227,7 @@ export default function Application() { ...@@ -227,7 +227,7 @@ export default function Application() {
validationSchema: validationSchema[3], validationSchema: validationSchema[3],
onSubmit: () => { onSubmit: () => {
submitSigningAuthority(); submitSigningAuthority();
goToNextStep(4, '/review'); goToNextStep(4, ROUTE_REVIEW);
}, },
}); });
...@@ -303,7 +303,7 @@ export default function Application() { ...@@ -303,7 +303,7 @@ export default function Application() {
/> />
</Route> </Route>
<Route path="/company-info"> <Route path={ROUTE_COMPANY}>
{renderStepper()} {renderStepper()}
{ {
// stop users visiting steps/pages that are not able to edit yet // stop users visiting steps/pages that are not able to edit yet
...@@ -326,7 +326,7 @@ export default function Application() { ...@@ -326,7 +326,7 @@ export default function Application() {
} }
</Route> </Route>
<Route path="/membership-level"> <Route path={ROUTE_MEMBERSHIP}>
{renderStepper()} {renderStepper()}
{furthestPage.index >= 2 ? ( {furthestPage.index >= 2 ? (
<MembershipLevel <MembershipLevel
...@@ -338,7 +338,7 @@ export default function Application() { ...@@ -338,7 +338,7 @@ export default function Application() {
)} )}
</Route> </Route>
<Route path="/working-groups"> <Route path={ROUTE_WGS}>
{renderStepper()} {renderStepper()}
{furthestPage.index >= 3 ? ( {furthestPage.index >= 3 ? (
<WorkingGroupsWrapper <WorkingGroupsWrapper
...@@ -355,7 +355,7 @@ export default function Application() { ...@@ -355,7 +355,7 @@ export default function Application() {
)} )}
</Route> </Route>
<Route path="/signing-authority"> <Route path={ROUTE_SIGNING}>
{renderStepper()} {renderStepper()}
{furthestPage.index >= 4 ? ( {furthestPage.index >= 4 ? (
<SigningAuthority <SigningAuthority
...@@ -368,7 +368,7 @@ export default function Application() { ...@@ -368,7 +368,7 @@ export default function Application() {
)} )}
</Route> </Route>
<Route path="/review"> <Route path={ROUTE_REVIEW}>
{renderStepper()} {renderStepper()}
{furthestPage.index >= 5 ? ( {furthestPage.index >= 5 ? (
<Review <Review
...@@ -382,7 +382,7 @@ export default function Application() { ...@@ -382,7 +382,7 @@ export default function Application() {
)} )}
</Route> </Route>
<Route path="/submitted"> <Route path={ROUTE_SUBMITTED}>
{furthestPage.index >= 6 ? <SubmitSuccess /> : <Redirect to={furthestPage.pathName} />} {furthestPage.index >= 6 ? <SubmitSuccess /> : <Redirect to={furthestPage.pathName} />}
</Route> </Route>
......
...@@ -17,6 +17,7 @@ import { ...@@ -17,6 +17,7 @@ import {
getCurrentMode, getCurrentMode,
MODE_REACT_ONLY, MODE_REACT_ONLY,
MODE_REACT_API, MODE_REACT_API,
ROUTE_MEMBERSHIP,
} from '../../../Constants/Constants'; } from '../../../Constants/Constants';
import CustomStepButton from '../../UIComponents/Button/CustomStepButton'; import CustomStepButton from '../../UIComponents/Button/CustomStepButton';
import CompanyInformationVAT from './CompanyInformationVAT'; import CompanyInformationVAT from './CompanyInformationVAT';
...@@ -243,7 +244,7 @@ const CompanyInformation = ({ ...@@ -243,7 +244,7 @@ const CompanyInformation = ({
<CompanyInformationVAT formik={formik} /> <CompanyInformationVAT formik={formik} />
</div> </div>
<CustomStepButton previousPage="" nextPage="/membership-level" /> <CustomStepButton previousPage="" nextPage={ROUTE_MEMBERSHIP} />
</form> </form>
); );
}; };
......
...@@ -3,7 +3,7 @@ import CustomStepButton from '../../UIComponents/Button/CustomStepButton'; ...@@ -3,7 +3,7 @@ import CustomStepButton from '../../UIComponents/Button/CustomStepButton';
import { formField } from '../../UIComponents/FormComponents/formFieldModel'; import { formField } from '../../UIComponents/FormComponents/formFieldModel';
import { useContext, useEffect } from 'react'; import { useContext, useEffect } from 'react';
import { isObjectEmpty, scrollToTop } from '../../../Utils/formFunctionHelpers'; import { isObjectEmpty, scrollToTop } from '../../../Utils/formFunctionHelpers';
import { MEMBERSHIP_LEVELS } from '../../../Constants/Constants'; import { MEMBERSHIP_LEVELS, ROUTE_COMPANY, ROUTE_WGS } from '../../../Constants/Constants';
import DropdownMenu from '../../UIComponents/Inputs/DropdownMenu'; import DropdownMenu from '../../UIComponents/Inputs/DropdownMenu';
import MembershipContext from '../../../Context/MembershipContext'; import MembershipContext from '../../../Context/MembershipContext';
...@@ -56,8 +56,8 @@ const MembershipLevel = ({ formik, updatedFormValues }) => { ...@@ -56,8 +56,8 @@ const MembershipLevel = ({ formik, updatedFormValues }) => {
</div> </div>
<CustomStepButton <CustomStepButton
previousPage="/company-info" previousPage={ROUTE_COMPANY}
nextPage="/working-groups" nextPage={ROUTE_WGS}
checkIsEmpty={() => isObjectEmpty(formik.values.membershipLevel)} checkIsEmpty={() => isObjectEmpty(formik.values.membershipLevel)}
formik={formik} formik={formik}
updatedFormValues={updatedFormValues} updatedFormValues={updatedFormValues}
......
...@@ -3,7 +3,7 @@ import CustomStepButton from '../../UIComponents/Button/CustomStepButton'; ...@@ -3,7 +3,7 @@ import CustomStepButton from '../../UIComponents/Button/CustomStepButton';
import { FormValue } from '../../../Interfaces/form_interface'; import { FormValue } from '../../../Interfaces/form_interface';
import { scrollToTop } from '../../../Utils/formFunctionHelpers'; import { scrollToTop } from '../../../Utils/formFunctionHelpers';
import { FormControlLabel, Checkbox } from '@material-ui/core'; import { FormControlLabel, Checkbox } from '@material-ui/core';
import { OPTIONS_FOR_ORG_TYPE, OPTIONS_FOR_PURCHASING_PROCESS } from '../../../Constants/Constants'; import { OPTIONS_FOR_ORG_TYPE, OPTIONS_FOR_PURCHASING_PROCESS, ROUTE_SIGNING, ROUTE_SUBMITTED } from '../../../Constants/Constants';
import ReadOnlyInput from '../../UIComponents/Inputs/ReadOnlyInput'; import ReadOnlyInput from '../../UIComponents/Inputs/ReadOnlyInput';
import { formField } from '../../UIComponents/FormComponents/formFieldModel'; import { formField } from '../../UIComponents/FormComponents/formFieldModel';
import MembershipContext from '../../../Context/MembershipContext'; import MembershipContext from '../../../Context/MembershipContext';
...@@ -396,8 +396,8 @@ const Review: React.FC<ReviewProps> = ({ values, submitForm, isTermChecked, setI ...@@ -396,8 +396,8 @@ const Review: React.FC<ReviewProps> = ({ values, submitForm, isTermChecked, setI
/> />
<CustomStepButton <CustomStepButton
previousPage="/signing-authority" previousPage={ROUTE_SIGNING}
nextPage="/submitted" nextPage={ROUTE_SUBMITTED}
disableSubmit={!isTermChecked} disableSubmit={!isTermChecked}
checkIsEmpty={() => false} checkIsEmpty={() => false}
formik={false} formik={false}
......
...@@ -8,6 +8,7 @@ import { ...@@ -8,6 +8,7 @@ import {
getCurrentMode, getCurrentMode,
MODE_REACT_ONLY, MODE_REACT_ONLY,
MODE_REACT_API, MODE_REACT_API,
ROUTE_COMPANY,
} from '../../../Constants/Constants'; } from '../../../Constants/Constants';
import { NavLink } from 'react-router-dom'; import { NavLink } from 'react-router-dom';
import Loading from '../../UIComponents/Loading/Loading'; import Loading from '../../UIComponents/Loading/Loading';
...@@ -42,7 +43,7 @@ class SignIn extends React.Component { ...@@ -42,7 +43,7 @@ class SignIn extends React.Component {
static contextType = MembershipContext; static contextType = MembershipContext;
getFakeUser = (setFurthestPage) => { getFakeUser = (setFurthestPage) => {
setFurthestPage({ index: 1, pathName: '/company-info' }); setFurthestPage({ index: 1, pathName: ROUTE_COMPANY });
this.context.setCurrentFormId('reactOnly'); this.context.setCurrentFormId('reactOnly');
fetch('membership_data/fake_user.json', { headers: FETCH_HEADER }) fetch('membership_data/fake_user.json', { headers: FETCH_HEADER })
.then((resp) => resp.json()) .then((resp) => resp.json())
...@@ -65,7 +66,7 @@ class SignIn extends React.Component { ...@@ -65,7 +66,7 @@ class SignIn extends React.Component {
Get started by logging in with your Eclipse Foundation account: Get started by logging in with your Eclipse Foundation account:
</p> </p>
{getCurrentMode() === MODE_REACT_ONLY && ( {getCurrentMode() === MODE_REACT_ONLY && (
<NavLink to="/company-info"> <NavLink to={ROUTE_COMPANY}>
<button type="button" onClick={() => this.getFakeUser(setFurthestPage)} className="btn btn-secondary"> <button type="button" onClick={() => this.getFakeUser(setFurthestPage)} className="btn btn-secondary">
React Only Login React Only Login
</button> </button>
......
...@@ -5,6 +5,7 @@ import { useContext, useEffect } from 'react'; ...@@ -5,6 +5,7 @@ import { useContext, useEffect } from 'react';
import { isObjectEmpty, scrollToTop } from '../../../Utils/formFunctionHelpers'; import { isObjectEmpty, scrollToTop } from '../../../Utils/formFunctionHelpers';
import { Checkbox, FormControlLabel } from '@material-ui/core'; import { Checkbox, FormControlLabel } from '@material-ui/core';
import MembershipContext from '../../../Context/MembershipContext'; import MembershipContext from '../../../Context/MembershipContext';
import { ROUTE_REVIEW, ROUTE_WGS } from '../../../Constants/Constants';
/** /**
* Have not added any API calls here, * Have not added any API calls here,
...@@ -87,8 +88,8 @@ const SigningAuthority = ({ formik, formikOrgValue, updatedFormValues }) => { ...@@ -87,8 +88,8 @@ const SigningAuthority = ({ formik, formikOrgValue, updatedFormValues }) => {
</div> </div>
</div> </div>
<CustomStepButton <CustomStepButton
previousPage="/working-groups" previousPage={ROUTE_WGS}
nextPage="/review" nextPage={ROUTE_REVIEW}
checkIsEmpty={() => isObjectEmpty(formik.values.signingAuthorityRepresentative)} checkIsEmpty={() => isObjectEmpty(formik.values.signingAuthorityRepresentative)}
formik={formik} formik={formik}
updatedFormValues={updatedFormValues} updatedFormValues={updatedFormValues}
......
...@@ -17,6 +17,8 @@ import { ...@@ -17,6 +17,8 @@ import {
MODE_REACT_API, MODE_REACT_API,
FULL_WORKING_GROUP_LIST_FOR_REACT_ONLY, FULL_WORKING_GROUP_LIST_FOR_REACT_ONLY,
api_prefix, api_prefix,
ROUTE_MEMBERSHIP,
ROUTE_SIGNING,
} from '../../../Constants/Constants'; } from '../../../Constants/Constants';
import CustomStepButton from '../../UIComponents/Button/CustomStepButton'; import CustomStepButton from '../../UIComponents/Button/CustomStepButton';
import { FormikProvider } from 'formik'; import { FormikProvider } from 'formik';
...@@ -139,8 +141,8 @@ const WorkingGroupsWrapper = ({ ...@@ -139,8 +141,8 @@ const WorkingGroupsWrapper = ({
)} )}
</div> </div>
<CustomStepButton <CustomStepButton
previousPage="/membership-level" previousPage={ROUTE_MEMBERSHIP}
nextPage="/signing-authority" nextPage={ROUTE_SIGNING}
formik={formik} formik={formik}
checkIsEmpty={checkIsEmpty} checkIsEmpty={checkIsEmpty}
updatedFormValues={updatedFormValues} updatedFormValues={updatedFormValues}
......
import { Button } from '@material-ui/core'; import { Button } from '@material-ui/core';
import { useContext, useState } from 'react'; import { useContext, useState } from 'react';
import { useHistory } from 'react-router-dom'; import { useHistory } from 'react-router-dom';
import { ROUTE_SUBMITTED } from '../../../Constants/Constants';
import MembershipContext from '../../../Context/MembershipContext'; import MembershipContext from '../../../Context/MembershipContext';
import { checkIsNotFurthestPage, validateGoBack } from '../../../Utils/formFunctionHelpers'; import { checkIsNotFurthestPage, validateGoBack } from '../../../Utils/formFunctionHelpers';
import ModalWindow from '../Notifications/ModalWindow'; import ModalWindow from '../Notifications/ModalWindow';
...@@ -20,7 +21,7 @@ const CustomStepButton = ({ previousPage, nextPage, checkIsEmpty, disableSubmit, ...@@ -20,7 +21,7 @@ const CustomStepButton = ({ previousPage, nextPage, checkIsEmpty, disableSubmit,
const { furthestPage, currentStepIndex } = useContext(MembershipContext); const { furthestPage, currentStepIndex } = useContext(MembershipContext);
const handleBackBtnClicked = () => { const handleBackBtnClicked = () => {
if (nextPage === '/submitted') { if (nextPage === ROUTE_SUBMITTED) {
history.push(previousPage); history.push(previousPage);
return; return;
} }
...@@ -62,7 +63,7 @@ const CustomStepButton = ({ previousPage, nextPage, checkIsEmpty, disableSubmit, ...@@ -62,7 +63,7 @@ const CustomStepButton = ({ previousPage, nextPage, checkIsEmpty, disableSubmit,
<MembershipContext.Consumer> <MembershipContext.Consumer>
{() => ( {() => (
<Button variant="contained" color="primary" size="large" type="submit" disabled={disableSubmit}> <Button variant="contained" color="primary" size="large" type="submit" disabled={disableSubmit}>
{nextPage === '/submitted' ? 'Submit' : 'Next'} {nextPage === ROUTE_SUBMITTED ? 'Submit' : 'Next'}
</Button> </Button>
)} )}
</MembershipContext.Consumer> </MembershipContext.Consumer>
......
...@@ -6,6 +6,7 @@ import { ...@@ -6,6 +6,7 @@ import {
MODE_REACT_ONLY, MODE_REACT_ONLY,
MODE_REACT_API, MODE_REACT_API,
API_FORM_PARAM, API_FORM_PARAM,
ROUTE_COMPANY,
} from '../../../Constants/Constants'; } from '../../../Constants/Constants';
import { import {
handleNewForm, handleNewForm,
...@@ -33,8 +34,8 @@ const FormChooser = ({ ...@@ -33,8 +34,8 @@ const FormChooser = ({
const [hasExistingForm, setHasExistingForm] = useState(''); const [hasExistingForm, setHasExistingForm] = useState('');
const goToCompanyInfoStep = useCallback(() => { const goToCompanyInfoStep = useCallback(() => {
setFurthestPage({ index: 1, pathName: '/company-info' }); setFurthestPage({ index: 1, pathName: ROUTE_COMPANY });
history.push('/company-info'); history.push(ROUTE_COMPANY);
}, [history, setFurthestPage]); }, [history, setFurthestPage]);
const handleContinueExistingForm = () => { const handleContinueExistingForm = () => {
......
import { useContext, useState } from 'react'; import { useContext, useState } from 'react';
import { useHistory, useRouteMatch } from 'react-router-dom'; import { useHistory, useRouteMatch } from 'react-router-dom';
import { ROUTE_MEMBERSHIP, ROUTE_REVIEW, ROUTE_SIGNING, ROUTE_WGS } from '../../../Constants/Constants';
import MembershipContext from '../../../Context/MembershipContext'; import MembershipContext from '../../../Context/MembershipContext';
import { checkIsNotFurthestPage, isObjectEmpty, validateGoBack } from '../../../Utils/formFunctionHelpers'; import { checkIsNotFurthestPage, isObjectEmpty, validateGoBack } from '../../../Utils/formFunctionHelpers';
import ModalWindow from '../Notifications/ModalWindow'; import ModalWindow from '../Notifications/ModalWindow';
...@@ -93,14 +94,14 @@ const Step = ({ ...@@ -93,14 +94,14 @@ const Step = ({
formikCompanyInfo formikCompanyInfo
.validateForm() .validateForm()
.then((result) => navigateTo(result, '/membership-level', formikCompanyInfo, isEmpty)); .then((result) => navigateTo(result, ROUTE_MEMBERSHIP, formikCompanyInfo, isEmpty));
break; break;
case '#membership-level': case '#membership-level':
isEmpty = isObjectEmpty(formikMembershipLevel.values.membershipLevel); isEmpty = isObjectEmpty(formikMembershipLevel.values.membershipLevel);
formikMembershipLevel formikMembershipLevel
.validateForm() .validateForm()
.then((result) => navigateTo(result, '/working-groups', formikMembershipLevel, isEmpty)); .then((result) => navigateTo(result, ROUTE_WGS, formikMembershipLevel, isEmpty));
break; break;
case '#working-groups': case '#working-groups':
...@@ -114,14 +115,14 @@ const Step = ({ ...@@ -114,14 +115,14 @@ const Step = ({
} }
formikWorkingGroups formikWorkingGroups
.validateForm() .validateForm()
.then((result) => navigateTo(result, '/signing-authority', formikWorkingGroups, isEmpty)); .then((result) => navigateTo(result, ROUTE_SIGNING, formikWorkingGroups, isEmpty));
break; break;
case '#signing-authority': case '#signing-authority':
isEmpty = isObjectEmpty(formikSigningAuthority.values.signingAuthorityRepresentative); isEmpty = isObjectEmpty(formikSigningAuthority.values.signingAuthorityRepresentative);
formikSigningAuthority formikSigningAuthority
.validateForm() .validateForm()
.then((result) => navigateTo(result, '/review', formikSigningAuthority, isEmpty)); .then((result) => navigateTo(result, ROUTE_REVIEW, formikSigningAuthority, isEmpty));
break; break;
case '#review': case '#review':
history.push(pathName); history.push(pathName);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment