welsh versions of questionnaire
This commit is contained in:
@@ -25,6 +25,9 @@ import jsonpath from "jsonpath";
|
||||
import { useState } from "react";
|
||||
import Enforcement_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_enforcement";
|
||||
import S78_Qquestionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_s78";
|
||||
import { RepresentationProgress_s78 } from "./representationProgress/representationProgress_s78";
|
||||
import { RepresentationProgress_enforcement } from "./representationProgress/representationProgress_enforcement";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
|
||||
let RepLPA = (props) => {
|
||||
let { t } = useTranslation();
|
||||
@@ -102,6 +105,58 @@ let RepLPA = (props) => {
|
||||
}
|
||||
};
|
||||
|
||||
const whichProgress = () => {
|
||||
{
|
||||
console.log("curr");
|
||||
switch (currentView.caseReference.appealType) {
|
||||
case 846040000:
|
||||
case 846040001:
|
||||
case 846040006:
|
||||
case 846040025:
|
||||
case 846040004:
|
||||
case 846040018:
|
||||
case 846040003:
|
||||
case 846040009:
|
||||
case 846040008:
|
||||
return (
|
||||
<RepresentationProgress_s78
|
||||
props={props}
|
||||
containerID={
|
||||
props.props.props.accountDetails.containerID
|
||||
}
|
||||
currentView={currentView}
|
||||
showQuestionnaireSection={showQuestionnaireSection}
|
||||
setShowQuestionnaireSection={
|
||||
setShowQuestionnaireSection
|
||||
}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
|
||||
case 846040005:
|
||||
case 846040006:
|
||||
case 846040007:
|
||||
return (
|
||||
<RepresentationProgress_enforcement
|
||||
props={props}
|
||||
containerID={
|
||||
props.props.props.accountDetails.containerID
|
||||
}
|
||||
currentView={currentView}
|
||||
showQuestionnaireSection={showQuestionnaireSection}
|
||||
setShowQuestionnaireSection={
|
||||
setShowQuestionnaireSection
|
||||
}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
default:
|
||||
return <>hello</>;
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let setCaseDetailsObj = router.query.hasOwnProperty("state")
|
||||
? router.query.state == "edit"
|
||||
? props.props.myRepresentations.myRepresentations
|
||||
@@ -142,14 +197,25 @@ let RepLPA = (props) => {
|
||||
<div className="govuk-grid-row">
|
||||
<h2 className="govuk-heading-m ">
|
||||
{typeof props.representationType != "undefined"
|
||||
? props.representationType
|
||||
? props.representationType == "Questionnaire"
|
||||
? locale == "cy"
|
||||
? "Holiadur"
|
||||
: props.representationType
|
||||
: props.representationType
|
||||
: locale == "cy"
|
||||
? "Cynrychioliadau"
|
||||
: "Representation"}{" "}
|
||||
from an LPA for a{" "}
|
||||
{
|
||||
getFormCollectionByID(
|
||||
currentView.caseReference.appealType
|
||||
).value
|
||||
}
|
||||
{locale == "cy" ? "o ACLI am a" : "from an LPA for a"}{" "}
|
||||
{locale == "cy"
|
||||
? jsonpath.query(
|
||||
transLookup,
|
||||
'$..[?(@.attributevalue=="' +
|
||||
currentView.caseReference.appealType +
|
||||
'")].value_cy'
|
||||
)
|
||||
: getFormCollectionByID(
|
||||
currentView.caseReference.appealType
|
||||
).value}
|
||||
</h2>
|
||||
|
||||
{typeof props.representationType == "undefined" && (
|
||||
@@ -158,7 +224,10 @@ let RepLPA = (props) => {
|
||||
className="govuk-label govuk-body-m"
|
||||
htmlFor="representationType"
|
||||
>
|
||||
What kind of representation are you making?
|
||||
{t(
|
||||
"myrepresentations:representation-from-an-agent-heading"
|
||||
)}
|
||||
?
|
||||
</label>
|
||||
<Field
|
||||
id="representationType"
|
||||
@@ -177,8 +246,7 @@ let RepLPA = (props) => {
|
||||
(props.representationType != "Questionnaire" ? (
|
||||
<>
|
||||
<p className="govuk-body">
|
||||
You can enter your comments in the space
|
||||
provided or attach a separate document.
|
||||
{t("myrepresentations:enter-comment-label")}
|
||||
</p>
|
||||
<fieldset
|
||||
className="govuk-fieldset"
|
||||
@@ -188,7 +256,10 @@ let RepLPA = (props) => {
|
||||
id="commentBox-hint"
|
||||
className="govuk-hint"
|
||||
>
|
||||
My comments are set out in:
|
||||
{t(
|
||||
"myrepresentations:comments-set-out-label"
|
||||
)}
|
||||
:
|
||||
</div>
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
@@ -212,7 +283,9 @@ let RepLPA = (props) => {
|
||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||
<FileUploadField
|
||||
name={"representationDocuments"}
|
||||
label={"Add your files"}
|
||||
label={t(
|
||||
"myrepresentations:add-files-label"
|
||||
)}
|
||||
ticketnumber={
|
||||
props.props.caseReference
|
||||
}
|
||||
@@ -256,7 +329,7 @@ let RepLPA = (props) => {
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
Continue
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
)}
|
||||
{showQuestionnaireSection > 1 && (
|
||||
@@ -281,7 +354,7 @@ let RepLPA = (props) => {
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
Continue
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
{/* <a
|
||||
onClick={() => {
|
||||
@@ -290,7 +363,7 @@ let RepLPA = (props) => {
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
Continue
|
||||
{t("common:continue-button")}
|
||||
</a> */}
|
||||
<a
|
||||
onClick={() => {
|
||||
@@ -298,7 +371,7 @@ let RepLPA = (props) => {
|
||||
}}
|
||||
className="govuk-link"
|
||||
>
|
||||
Back
|
||||
{t("common:back-link")}
|
||||
</a>
|
||||
</>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user