linked watched cases for all personnas
This commit is contained in:
@@ -24,7 +24,7 @@ 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";
|
||||
import S78_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_s78";
|
||||
import RepresentationProgress_s78 from "./representationProgress/representationProgress_s78";
|
||||
import RepresentationProgress_enforcement from "./representationProgress/representationProgress_enforcement";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
@@ -35,6 +35,8 @@ let RepLPA = (props) => {
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const {
|
||||
onSubmit,
|
||||
handleSubmit,
|
||||
formObj,
|
||||
appellantApplicantRepresentationArr,
|
||||
setRepresentationCapacity,
|
||||
@@ -44,6 +46,8 @@ let RepLPA = (props) => {
|
||||
onBehalfOfLPA,
|
||||
setShowQuestionnaireSection,
|
||||
showQuestionnaireSection,
|
||||
questionnaireCount,
|
||||
setQuestionnaireCount,
|
||||
} = props;
|
||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||
const files = acceptedFiles.map((file) => (
|
||||
@@ -53,6 +57,34 @@ let RepLPA = (props) => {
|
||||
));
|
||||
const required = (value) => (value ? undefined : "Required");
|
||||
|
||||
const updateQuestionnaireCount = () => {
|
||||
{
|
||||
switch (currentView.caseReference.appealType) {
|
||||
case 846040000:
|
||||
case 846040001:
|
||||
case 846040006:
|
||||
case 846040025:
|
||||
case 846040004:
|
||||
case 846040018:
|
||||
case 846040003:
|
||||
case 846040009:
|
||||
case 846040008:
|
||||
setQuestionnaireCount(7);
|
||||
break;
|
||||
|
||||
case 846040005:
|
||||
case 846040006:
|
||||
case 846040007:
|
||||
setQuestionnaireCount(9);
|
||||
|
||||
break;
|
||||
default:
|
||||
setQuestionnaireCount(7);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
const whichQuestionnaire = () => {
|
||||
{
|
||||
switch (currentView.caseReference.appealType) {
|
||||
@@ -65,8 +97,9 @@ let RepLPA = (props) => {
|
||||
case 846040003:
|
||||
case 846040009:
|
||||
case 846040008:
|
||||
updateQuestionnaireCount();
|
||||
return (
|
||||
<S78_Qquestionnaire
|
||||
<S78_Questionnaire
|
||||
props={props}
|
||||
containerID={
|
||||
props.props.props.accountDetails.containerID
|
||||
@@ -76,6 +109,7 @@ let RepLPA = (props) => {
|
||||
setShowQuestionnaireSection={
|
||||
setShowQuestionnaireSection
|
||||
}
|
||||
questionnaireCount={questionnaireCount}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
@@ -83,6 +117,7 @@ let RepLPA = (props) => {
|
||||
case 846040005:
|
||||
case 846040006:
|
||||
case 846040007:
|
||||
updateQuestionnaireCount();
|
||||
return (
|
||||
<Enforcement_Questionnaire
|
||||
props={props}
|
||||
@@ -94,6 +129,7 @@ let RepLPA = (props) => {
|
||||
setShowQuestionnaireSection={
|
||||
setShowQuestionnaireSection
|
||||
}
|
||||
questionnaireCount={questionnaireCount}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
@@ -235,7 +271,6 @@ let RepLPA = (props) => {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
{typeof props.representationType != "undefined" &&
|
||||
@@ -306,18 +341,26 @@ let RepLPA = (props) => {
|
||||
{typeof props.representationType != "undefined" &&
|
||||
props.representationType == "Questionnaire" && (
|
||||
<>
|
||||
{showQuestionnaireSection < 7 && (
|
||||
<a
|
||||
href="#"
|
||||
onClick={() => {
|
||||
setShowQuestionnaireSection(
|
||||
showQuestionnaireSection + 1
|
||||
);
|
||||
}}
|
||||
{showQuestionnaireSection <=
|
||||
questionnaireCount && (
|
||||
<button
|
||||
// type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
Next section
|
||||
</a>
|
||||
{t("common:continue-button")}ww
|
||||
</button>
|
||||
// <a
|
||||
// href="#"
|
||||
// onClick={() => {
|
||||
// setShowQuestionnaireSection(
|
||||
// showQuestionnaireSection + 1
|
||||
// );
|
||||
// }}
|
||||
// className="govuk-button"
|
||||
// >
|
||||
// Next section
|
||||
// </a>
|
||||
)}
|
||||
{showQuestionnaireSection == 9 && (
|
||||
<button
|
||||
@@ -352,15 +395,6 @@ let RepLPA = (props) => {
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
{/* <a
|
||||
onClick={() => {
|
||||
|
||||
setRepresentationSubmit(false);
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</a> */}
|
||||
<a
|
||||
onClick={() => {
|
||||
//setRepresentationCapacity();
|
||||
|
||||
Reference in New Issue
Block a user