apply GEL to reps
This commit is contained in:
@@ -7,11 +7,20 @@ import { connect } from "react-redux";
|
||||
|
||||
import { useSession } from "next-auth/react";
|
||||
import { setCurrentView } from "../store/currentView/action";
|
||||
import { Field, change, reduxForm } from "redux-form";
|
||||
|
||||
import { setCurrentSection } from "../store/appealType/action";
|
||||
|
||||
import {
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
} from "../store/currentView/action";
|
||||
const Breadcrumbs = (props) => {
|
||||
const { currentView, setCurrentView, setCurrentSection } = props;
|
||||
const {
|
||||
currentView,
|
||||
setCurrentView,
|
||||
setCurrentSection,
|
||||
setRepresentationCapacity,
|
||||
} = props;
|
||||
const router = useRouter();
|
||||
let { t } = useTranslation();
|
||||
|
||||
@@ -28,7 +37,8 @@ const Breadcrumbs = (props) => {
|
||||
<ol className="govuk-breadcrumbs__list">
|
||||
{router.pathname != "/myportal/[appealtypes]" &&
|
||||
router.pathname != "/newappeal" &&
|
||||
router.pathname != "/newappeal/[appealtypes]" && (
|
||||
router.pathname != "/newappeal/[appealtypes]" &&
|
||||
router.pathname != "/myportal/representation" && (
|
||||
<li className="govuk-breadcrumbs__list-item">
|
||||
<Link
|
||||
href={"/"}
|
||||
@@ -731,7 +741,7 @@ const Breadcrumbs = (props) => {
|
||||
)}
|
||||
{router.pathname == "/myportal/representation" && (
|
||||
<>
|
||||
{session != null && (
|
||||
{/* {session != null && (
|
||||
<li className="govuk-breadcrumbs__list-item">
|
||||
<Link
|
||||
href={
|
||||
@@ -777,6 +787,22 @@ const Breadcrumbs = (props) => {
|
||||
props.props.currentView.caseReference
|
||||
.currentReference
|
||||
}
|
||||
</li> */}
|
||||
<li className="govuk-breadcrumbs__link-item">
|
||||
<a
|
||||
className="govuk-breadcrumbs__link"
|
||||
href="#"
|
||||
onClick={() => {
|
||||
setRepresentationCapacity();
|
||||
props.updateField(
|
||||
"representationForm",
|
||||
"representationType",
|
||||
""
|
||||
);
|
||||
}}
|
||||
>
|
||||
{t("common:back-link")}
|
||||
</a>
|
||||
</li>
|
||||
</>
|
||||
)}
|
||||
@@ -1006,6 +1032,12 @@ const mapStateToProps = (state) => {
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
updateField: (form, field, newValue) =>
|
||||
dispatch(change(form, field, newValue)),
|
||||
setRepresentationCapacity: (representationCapacity) => {
|
||||
//dispatch(reset("representationForm"));
|
||||
dispatch(setRepresentationCapacity(representationCapacity));
|
||||
},
|
||||
setCurrentView: (currentView) => {
|
||||
dispatch(setCurrentView(currentView));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user