rep questionnaire nav/progress
This commit is contained in:
@@ -22,7 +22,7 @@ import {
|
||||
import { useDropzone } from "react-dropzone";
|
||||
import { select } from "xpath";
|
||||
import jsonpath from "jsonpath";
|
||||
|
||||
import { useState } from "react";
|
||||
import Enforcement_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_enforcement";
|
||||
import S78_Qquestionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_s78";
|
||||
|
||||
@@ -39,6 +39,8 @@ let RepLPA = (props) => {
|
||||
currentView,
|
||||
procedureTypeValue,
|
||||
onBehalfOfLPA,
|
||||
setShowQuestionnaireSection,
|
||||
showQuestionnaireSection,
|
||||
} = props;
|
||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||
const files = acceptedFiles.map((file) => (
|
||||
@@ -68,6 +70,10 @@ let RepLPA = (props) => {
|
||||
props.props.props.accountDetails.containerID
|
||||
}
|
||||
currentView={currentView}
|
||||
showQuestionnaireSection={showQuestionnaireSection}
|
||||
setShowQuestionnaireSection={
|
||||
setShowQuestionnaireSection
|
||||
}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
@@ -82,6 +88,10 @@ let RepLPA = (props) => {
|
||||
props.props.props.accountDetails.containerID
|
||||
}
|
||||
currentView={currentView}
|
||||
showQuestionnaireSection={showQuestionnaireSection}
|
||||
setShowQuestionnaireSection={
|
||||
setShowQuestionnaireSection
|
||||
}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
@@ -131,7 +141,10 @@ let RepLPA = (props) => {
|
||||
<>
|
||||
<div className="govuk-grid-row">
|
||||
<h2 className="govuk-heading-m ">
|
||||
Representation from an LPA for a{" "}
|
||||
{typeof props.representationType != "undefined"
|
||||
? props.representationType
|
||||
: "Representation"}{" "}
|
||||
from an LPA for a{" "}
|
||||
{
|
||||
getFormCollectionByID(
|
||||
currentView.caseReference.appealType
|
||||
@@ -139,21 +152,23 @@ let RepLPA = (props) => {
|
||||
}
|
||||
</h2>
|
||||
|
||||
<div className="govuk-form-group">
|
||||
<label
|
||||
className="govuk-label govuk-body-m"
|
||||
htmlFor="representationType"
|
||||
>
|
||||
What kind of representation are you making?
|
||||
</label>
|
||||
<Field
|
||||
id="representationType"
|
||||
name="representationType"
|
||||
component={RenderPickList}
|
||||
datafieldname="representationType"
|
||||
optionsArr={appellantApplicantRepresentationArr}
|
||||
/>
|
||||
</div>
|
||||
{typeof props.representationType == "undefined" && (
|
||||
<div className="govuk-form-group">
|
||||
<label
|
||||
className="govuk-label govuk-body-m"
|
||||
htmlFor="representationType"
|
||||
>
|
||||
What kind of representation are you making?
|
||||
</label>
|
||||
<Field
|
||||
id="representationType"
|
||||
name="representationType"
|
||||
component={RenderPickList}
|
||||
datafieldname="representationType"
|
||||
optionsArr={appellantApplicantRepresentationArr}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
@@ -219,14 +234,56 @@ let RepLPA = (props) => {
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-button-group">
|
||||
<button
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
Continue
|
||||
</button>
|
||||
{/* <a
|
||||
{typeof props.representationType != "undefined" &&
|
||||
props.representationType == "Questionnaire" && (
|
||||
<>
|
||||
{showQuestionnaireSection < 7 && (
|
||||
<a
|
||||
href="#"
|
||||
onClick={() => {
|
||||
setShowQuestionnaireSection(
|
||||
showQuestionnaireSection + 1
|
||||
);
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
Next section
|
||||
</a>
|
||||
)}
|
||||
{showQuestionnaireSection == 7 && (
|
||||
<button
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
Continue
|
||||
</button>
|
||||
)}
|
||||
{showQuestionnaireSection > 1 && (
|
||||
<a
|
||||
onClick={() => {
|
||||
setShowQuestionnaireSection(
|
||||
showQuestionnaireSection - 1
|
||||
);
|
||||
}}
|
||||
className="govuk-link"
|
||||
>
|
||||
Back
|
||||
</a>
|
||||
)}
|
||||
</>
|
||||
)}{" "}
|
||||
{typeof props.representationType != "undefined" &&
|
||||
props.representationType != "Questionnaire" && (
|
||||
<>
|
||||
<button
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
Continue
|
||||
</button>
|
||||
{/* <a
|
||||
onClick={() => {
|
||||
|
||||
setRepresentationSubmit(false);
|
||||
@@ -235,15 +292,16 @@ let RepLPA = (props) => {
|
||||
>
|
||||
Continue
|
||||
</a> */}
|
||||
|
||||
<a
|
||||
onClick={() => {
|
||||
//setRepresentationCapacity();
|
||||
}}
|
||||
className="govuk-link"
|
||||
>
|
||||
Back
|
||||
</a>
|
||||
<a
|
||||
onClick={() => {
|
||||
//setRepresentationCapacity();
|
||||
}}
|
||||
className="govuk-link"
|
||||
>
|
||||
Back
|
||||
</a>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user