passing a ref api through form and update progress

This commit is contained in:
2021-07-20 16:46:14 +01:00
parent ff9f2d87c9
commit 1e81f1c97e
13 changed files with 455 additions and 29 deletions
+24 -2
View File
@@ -30,6 +30,7 @@ let BuildSection = (props) => {
formTitle,
setCurrentSection,
refno,
gotoSection,
} = props;
const currentSection = props.appealType.currentSection;
@@ -134,11 +135,29 @@ let BuildSection = (props) => {
{Object.keys(titleList).map((key) =>
parseInt(key) + 1 == currentSection ? (
<li key={key}>
<b>{titleList[key].value}</b>
<b>{titleList[key].value} </b>
</li>
) : (
<li key={key}>
{titleList[key].value}
{props.appealType
.formComplete == "true" ||
parseInt(key) + 1 <
currentSection ? (
<a
className="govuk-link"
href="#"
onClick={() => {
gotoSection(
parseInt(key) +
1
);
}}
>
{titleList[key].value}
</a>
) : (
titleList[key].value
)}
</li>
)
)}
@@ -167,6 +186,9 @@ const mapDispatchToProps = (dispatch) => {
setCurrentSection: (currentSection) => {
dispatch(setCurrentSection(currentSection));
},
gotoSection: (thisSection) => {
dispatch(setCurrentSection(thisSection));
},
};
};