Files
pedwfrontend/components/case/representation/representationLPA.js
T

1046 lines
68 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import Link from "next/link";
import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation";
import { connect } from "react-redux";
import { Field, reduxForm, formValueSelector } from "redux-form";
import {
RenderPickList,
RenderTextfield,
RenderRadioList,
RenderMultiline,
RenderCondtionalRadioList,
RenderLPACondtionalRadioList,
FileUploadField,
RenderRichMultiline,
RenderDatePicker,
} from "./representationElements";
import { getFormCollectionByID } from "../../utils";
import {
setRepresentationCapacity,
setRepresentationSubmit,
} from "../../../store/currentView/action";
import { useDropzone } from "react-dropzone";
import { select } from "xpath";
import Enforcement_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_enforcement";
import S78_Qquestionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_s78";
let RepLPA = (props) => {
let { t } = useTranslation();
const router = useRouter();
const { locale } = router;
const {
formObj,
appellantApplicantRepresentationArr,
setRepresentationCapacity,
setRepresentationSubmit,
currentView,
procedureTypeValue,
onBehalfOfLPA,
} = props;
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
const files = acceptedFiles.map((file) => (
<li key={file.path}>
{file.path} - {file.size} bytes
</li>
));
const required = (value) => (value ? undefined : "Required");
const whichQuestionnaire = () => {
{
console.log("curr");
switch (currentView.caseReference.appealType) {
case 846040000:
return (
<S78_Qquestionnaire
props={props}
containerID={
props.props.props.accountDetails.containerID
}
currentView={currentView}
/>
);
break;
case 846040005:
return (
<Enforcement_Questionnaire
props={props}
containerID={
props.props.props.accountDetails.containerID
}
currentView={currentView}
/>
);
break;
default:
return <>hello</>;
break;
}
}
};
return (
<div id="rep-appellant">
<div className="govuk-grid-column-full">
<div className="govuk-grid-row">
<h2 className="govuk-heading-m ">
Representation from an LPA for a{" "}
{
getFormCollectionByID(
currentView.caseReference.appealType
).value
}
</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>
</div>
{/* <div className="govuk-grid-row">
<div className="govuk-form-group">
<Field
className="govuk-input govuk-!-width-three-quarters"
id="representationDescription"
name="representationDescription"
value="email"
data-aria-controls="representationDescription"
type="text"
component={RenderTextfield}
label="Description of representation"
/>
</div>
</div> */}
<div className="govuk-grid-row">
<div className="govuk-form-group">
{typeof props.representationType != "undefined" &&
(props.representationType != "Questionnaire" ? (
<>
<p className="govuk-body">
You can enter your comments in the space
provided or attach a separate document.
</p>
<fieldset
className="govuk-fieldset"
aria-describedby="commentBox-hint"
>
<div
id="commentBox-hint"
className="govuk-hint"
>
My comments are set out in:
</div>
<div className="govuk-form-group">
<Field
name="representationComments"
id="representationComments"
component={RenderMultiline}
type="text"
rows="5"
className="govuk-textarea govuk-input--width-30"
aria-describedby={
props.name + "-hint"
}
/>
</div>
</fieldset>
<fieldset
className="govuk-fieldset govuk-!-margin-top-9"
aria-describedby="commentBox-hint"
>
{" "}
<div className="govuk-form-group govuk-!-margin-bottom-9">
<FileUploadField
name={"representationDocuments"}
label={"Add your files"}
ticketnumber={
props.props.caseReference
}
hint={"sdsd"}
fileList={[]}
setFilesForRepresentation={[]}
containerID={
props.props.props
.accountDetails
.containerID
}
/>
</div>
</fieldset>
</>
) : (
whichQuestionnaire()
// <>
// <fieldset
// className="govuk-fieldset"
// aria-describedby="commentBox-hint"
// >
// <h3 className="govuk-heading-s ">
// Appeal procedure and site visit{" "}
// </h3>
// <div className="govuk-form-group">
// <Field
// label="5. Which procedure do you consider the appeal should follow?"
// name="procedureType"
// optionsArr={[
// "Written representations",
// "Hearing",
// "Inquiry",
// ]}
// id="procedureType"
// component={RenderPickList}
// type="text"
// rows="5"
// className="govuk-textarea govuk-input--width-30"
// aria-describedby={
// props.name + "-hint"
// }
// />
// {(procedureTypeValue == "Hearing" ||
// procedureTypeValue ==
// "Inquiry") && (
// <Field
// label="If Hearing or Inquiry, provide reasons here for why you consider this to be justified"
// name="procedureTypeEvidence"
// id="procedureTypeEvidence"
// component={RenderMultiline}
// type="text"
// rows="5"
// className="govuk-textarea govuk-input--width-30"
// aria-describedby={
// props.name + "-hint"
// }
// richText="false"
// />
// )}
// <Field
// label="6. Will the Inspector need to enter the appeal site/property?"
// name="enterToView"
// id="enterToView"
// component={RenderRadioList}
// options={["Yes", "No"]}
// type="text"
// rows="5"
// className="govuk-textarea govuk-input--width-30"
// aria-describedby={
// props.name + "-hint"
// }
// />
// <div className="govuk-form-group">
// <Field
// name="enterNeighbouringLandToViewSite"
// datafieldname="enterNeighbouringLandToViewSite"
// options={["Yes", "No"]}
// id="enterNeighbouringLandToViewSite"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "7. Do you consider that the Inspector needs to enter neighbouring private land/property to view the site?"
// }
// conditionalLabel={
// "If Yes, give reasons and provide the neighbouring site address. If you have them, provide the contact details of the landowner in an attachment."
// }
// optionSelect={"Yes"}
// />
// </div>
// <div className="govuk-form-group">
// <Field
// name="enterNeighbouringLandAccessRequired"
// datafieldname="enterNeighbouringLandAccessRequired"
// options={["Yes", "No"]}
// id="enterNeighbouringLandAccessRequired"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "8. If access to private land/buildings is required, are you content for the Inspector to visit the site on an access required basis, with only the landowner or their representative present?"
// }
// conditionalLabel={
// "If No, give reasons for why you consider an Accompanied Site Visit to be necessary"
// }
// optionSelect={"No"}
// />
// </div>
// <div className="govuk-form-group">
// <Field
// name="healthAndSafetyIssues"
// datafieldname="healthAndSafetyIssues"
// options={["Yes", "No"]}
// id="healthAndSafetyIssues"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "9. Are you aware of any health and safety issues which would need to be considered when the Inspector visits the site?"
// }
// conditionalLabel={
// "If Yes, describe the health and safety issues to be considered"
// }
// optionSelect={"Yes"}
// />
// </div>
// <div className="govuk-form-group">
// <Field
// className="govuk-input govuk-!-width-three-quarters"
// id="LPAcontactDetails"
// name="LPAcontactDetails"
// value="email"
// data-aria-controls="LPAcontactDetails"
// type="text"
// component={
// RenderRichMultiline
// }
// label="10. LPA contact for site visit, hearing or inquiry arrangements:"
// />
// </div>
// </div>
// </fieldset>
// <fieldset
// className="govuk-fieldset govuk-!-margin-top-9"
// aria-describedby="commentBox-hint"
// >
// <h3 className="govuk-heading-s ">
// Supporting documents{" "}
// </h3>
// <div className="govuk-form-group">
// <Field
// label="11. LPA case file and representations"
// name="LPAcaseFileAndReps"
// id="LPAcaseFileAndReps"
// component={RenderMultiline}
// type="text"
// rows="5"
// className="govuk-textarea govuk-input--width-30"
// aria-describedby={
// props.name + "-hint"
// }
// richText="false"
// hint="Insert weblink(s) to case file and representations on the LPAs public portal. This must include all documents which were before the LPA at the time of its decision or when the appeal was made. Ensure that you link directly to the case documents list, not to a generic page on the LPAs portal. If web-based comments were also made, insert a second link to that page. Alternatively, state here if you are sending relevant case file documents under separate cover."
// />
// </div>
// <div className="govuk-form-group">
// <Field
// label="12. LPAs adopted local development plan and Proposals Map:"
// name="LPAldpAndMap"
// id="LPAldpAndMap"
// component={RenderMultiline}
// type="text"
// rows="5"
// className="govuk-textarea govuk-input--width-30"
// aria-describedby={
// props.name + "-hint"
// }
// richText="false"
// hint="Insert weblinks to the Written Statement of the adopted LDP/UDP, and the accompanying Proposals Map (including map key). Alternatively, list relevant policies here and attach excerpts."
// />
// </div>
// <div className="govuk-form-group">
// <Field
// label="13. Adopted local guidance relevant to the proposal"
// name="LPAlocalGuidance"
// id="LPAlocalGuidance"
// component={RenderMultiline}
// type="text"
// rows="5"
// className="govuk-textarea govuk-input--width-30"
// aria-describedby={
// props.name + "-hint"
// }
// richText="false"
// hint="Insert weblink(s) to any relevant any local guidance (e.g. Supplementary Planning Guidance, Conservation Area appraisals) which the LPA considers relevant, specifying the document name before the web link. Alternatively, list the relevant guidance and attach copies/excerpts."
// />
// </div>
// <Field
// label="14. If applicable, do you intend to submit a full statement at the 4- week stage?"
// name="LPAintentionToSubmitFullStatement"
// id="LPAintentionToSubmitFullStatement"
// component={RenderRadioList}
// options={["Yes", "No"]}
// type="text"
// rows="5"
// className="govuk-textarea govuk-input--width-30"
// aria-describedby={
// props.name + "-hint"
// }
// />
// </fieldset>
// <fieldset
// className="govuk-fieldset govuk-!-margin-top-9"
// aria-describedby="commentBox-hint"
// >
// <h3 className="govuk-heading-s ">
// Statutory considerations
// </h3>
// <Field
// label="15. Is all or part of the site within an Area of Outstanding Natural Beauty?"
// name="AONB"
// id="AONB"
// component={RenderRadioList}
// options={["Yes", "No"]}
// type="text"
// rows="5"
// className="govuk-textarea govuk-input--width-30"
// aria-describedby={
// props.name + "-hint"
// }
// />
// <div className="govuk-form-group">
// <Field
// name="ROW"
// datafieldname="ROW"
// options={["Yes", "No"]}
// id="ROW"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "16. Does the site include any public rights of way?"
// }
// conditionalLabel={
// "If Yes, attach or insert a link to the definitive map and statement for the local area"
// }
// optionSelect={"Yes"}
// />
// </div>
// <div className="govuk-form-group">
// <Field
// name="conservationArea"
// datafieldname="conservationArea"
// options={["Yes", "No"]}
// id="conservationArea"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "17. Is all or part of the site within a Conservation Area?"
// }
// conditionalLabel={
// "If Yes, attach or insert links to a plan showing the Conservation Area boundary"
// }
// optionSelect={"Yes"}
// />
// </div>
// <div className="govuk-form-group">
// <Field
// name="affectListedBuilding"
// datafieldname="affectListedBuilding"
// options={["Yes", "No"]}
// id="affectListedBuilding"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "18. Would the proposal involve works to, or affect the setting of, a listed building, Scheduled Monument or other designated historic asset?"
// }
// conditionalLabel={
// "If Yes, attach or insert links to the listing description(s) and location plan"
// }
// optionSelect={"Yes"}
// />
// </div>
// <div className="govuk-form-group">
// <Field
// name="TPO"
// datafieldname="TPO"
// options={["Yes", "No"]}
// id="TPO"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "19. Is any part of the site subject to a Tree Preservation Order?"
// }
// conditionalLabel={
// "If Yes, attach or insert links to the relevant plan and details"
// }
// optionSelect={"Yes"}
// />
// </div>
// <div className="govuk-form-group">
// <Field
// name="natureConservationSite"
// datafieldname="natureConservationSite"
// options={["Yes", "No"]}
// id="natureConservationSite"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "20. Is the site within or likely to affect an International or National Designated Site for nature conservation (as defined in Planning Policy Wales)?"
// }
// conditionalLabel={
// "If Yes, specify the name and attach any relevant details"
// }
// optionSelect={"Yes"}
// />
// </div>
// <div className="govuk-form-group">
// <Field
// name="protectedSpecies"
// datafieldname="protectedSpecies"
// options={["Yes", "No"]}
// id="protectedSpecies"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "21. Are any protected species likely to be affected by the proposal?"
// }
// conditionalLabel={
// "If Yes, specify which and attach any relevant details"
// }
// optionSelect={"Yes"}
// />
// </div>
// <Field
// label="22. Does the case involve persons claiming Gypsy/Traveller status, whether or not this is accepted by the LPA?"
// name="gypsyTravellerInvolvment"
// id="gypsyTravellerInvolvment"
// component={RenderRadioList}
// options={["Yes", "No"]}
// type="text"
// rows="5"
// className="govuk-textarea govuk-input--width-30"
// aria-describedby={
// props.name + "-hint"
// }
// />
// <div className="govuk-form-group">
// <Field
// name="governmentDepartmentComments"
// datafieldname="governmentDepartmentComments"
// options={["Yes", "No"]}
// id="governmentDepartmentComments"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "23. Have you received comments or directions from any government department/agency or statutory undertaker, including in response to a statutory notification or consultation?"
// }
// conditionalLabel={
// "If Yes, specify which and attach any relevant details"
// }
// optionSelect={"Yes"}
// />
// </div>
// </fieldset>
// <fieldset
// className="govuk-fieldset govuk-!-margin-top-9"
// aria-describedby="commentBox-hint"
// >
// <h3 className="govuk-heading-s ">
// Suggested conditions
// </h3>
// <div className="govuk-form-group govuk-body-m">
// 24. Review the following standard
// conditions and advise whether they
// would be necessary if
// permission/consent is granted (not
// applicable to Advertisement consent
// proposals):
// </div>
// <Field
// label="a) The development shall begin not later than five years from the date of this decision.
// Reason: To comply with Section 91 of the Town and Country Planning Act 1990 / Section 18 of the Town and Country Planning (Listed Building and Conservation Areas) Act 1990."
// name="developmentNotBeginLaterThanFiveYears"
// id="developmentNotBeginLaterThanFiveYears"
// component={RenderRadioList}
// options={["Yes", "No"]}
// type="text"
// rows="5"
// className="govuk-textarea govuk-input--width-30"
// aria-describedby={
// props.name + "-hint"
// }
// />
// <div className="govuk-form-group">
// <Field
// name="developmentCarriedOutInAccordance"
// datafieldname="developmentCarriedOutInAccordance"
// options={["Yes", "No"]}
// id="developmentCarriedOutInAccordance"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "b) The development shall be carried out in accordance with the following approved plans and documents: ............................ Reason: To ensure the development is carried out in accordance with the approved documents, plans and drawings submitted with the application."
// }
// conditionalLabel={
// "If Yes, list the approved plans, documents and drawings here or list them in an attached document"
// }
// optionSelect={"Yes"}
// />
// </div>
// <Field
// label="c) No development shall take place until a scheme for biodiversity enhancement has been submitted to and agreed in writing by the local planning authority. Development shall be carried out in accordance with the approved details.
// Reason: In the interests of maintaining and enhancing biodiversity, in accordance with Future Wales Policy 9."
// name="developmentNotTakePlaceBiodiversity"
// id="developmentNotTakePlaceBiodiversity"
// component={RenderRadioList}
// options={["Yes", "No"]}
// type="text"
// rows="5"
// className="govuk-textarea govuk-input--width-30"
// aria-describedby={
// props.name + "-hint"
// }
// />
// <Field
// label="d) No development shall take place until a scheme to enable the provision of gigabit capable broadband infrastructure from the site boundary to the dwellings/buildings hereby permitted has been submitted to and agreed in writing by the local planning authority. Development shall be carried out in accordance with the approved details.
// Reason: To support the roll-out of digital communications infrastructure across Wales in accordance with Policy 13 of Future Wales."
// name="developmentNotTakePlaceBroadband"
// id="developmentNotTakePlaceBroadband"
// component={RenderRadioList}
// options={["Yes", "No"]}
// type="text"
// rows="5"
// className="govuk-textarea govuk-input--width-30"
// aria-describedby={
// props.name + "-hint"
// }
// />
// <div className="govuk-form-group">
// <Field
// name="developmentAnyOtherConditions"
// datafieldname="developmentAnyOtherConditions"
// options={["Yes", "No"]}
// id="developmentAnyOtherConditions"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "25. Do you consider other conditions, or amended versions of the above standard conditions, to be necessary?"
// }
// conditionalLabel={
// "If Yes, list them here or in an attached document. Include reasons and relevant development plan policies. If you intend to send suggested conditions alongside your 4 week statement, state this here."
// }
// optionSelect={"Yes"}
// />
// </div>
// </fieldset>
// <fieldset
// className="govuk-fieldset govuk-!-margin-top-9"
// aria-describedby="commentBox-hint"
// >
// <h3 className="govuk-heading-s ">
// Before sending, have you attached or
// provided a web link to:
// </h3>
// <div className="govuk-form-group">
// <Field
// name="copyOfApplicantsCertificate"
// datafieldname="copyOfApplicantsCertificate"
// options={["Yes", "No"]}
// id="copyOfApplicantsCertificate"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "26. A copy of the applicants certificate confirming that they notified persons with an interest in the land?"
// }
// conditionalLabel={
// "Insert weblink here if available online. If No, give reasons"
// }
// optionSelect={"No"}
// />
// </div>
// <div className="govuk-form-group">
// <Field
// name="advertismentGiven"
// datafieldname="advertismentGiven"
// options={["Yes", "No"]}
// id="advertismentGiven"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "27. Evidence of any publicity given to the application, including site notices and local advertisement?**"
// }
// conditionalLabel={
// "Insert weblink here if available online. If No, give reasons"
// }
// optionSelect={"No"}
// />
// </div>
// <div className="govuk-form-group">
// <Field
// name="copyOfLetterOfAppealNotification"
// datafieldname="copyOfLetterOfAppealNotification"
// options={["Yes", "No"]}
// id="copyOfLetterOfAppealNotification"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "28. A copy of the letter with which you notified people of the appeal AND a list of the people you notified?"
// }
// conditionalLabel={
// "Insert weblink here if available online. If No, give reasons"
// }
// optionSelect={"No"}
// />
// </div>
// <div className="govuk-form-group">
// <Field
// name="lpaEIAOS"
// datafieldname="lpaEIAOS"
// options={["Yes", "No"]}
// id="lpaEIAOS"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "29. If Yes, insert weblink or attach a copy of the Screening Opinion and any related correspondence"
// }
// conditionalLabel={
// "Insert weblink here if available online. If No, give reasons"
// }
// optionSelect={"Yes"}
// />
// </div>
// <div className="govuk-form-group">
// <Field
// name="advertismentConsentDiscontinuanceNotice"
// datafieldname="advertismentConsentDiscontinuanceNotice"
// options={["Yes", "No"]}
// id="advertismentConsentDiscontinuanceNotice"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "30. Advertisement consent proposals only: A true copy of the Discontinuance Notice (if one has been issued)?"
// }
// conditionalLabel={
// "If Yes, state how the use of the site or the display of the advertisement(s) enjoys the benefit of deemed consent"
// }
// optionSelect={"Yes"}
// />
// </div>
// <div className="govuk-form-group">
// <Field
// name="detailsOfOtherAppeals"
// datafieldname="detailsOfOtherAppeals"
// options={["Yes", "No"]}
// id="detailsOfOtherAppeals"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "31. Details of other appeals or applications relating to the site, or a nearby site, which are still being considered by PEDW or the Welsh Ministers?"
// }
// conditionalLabel={
// "If Yes, provide reference numbers and, if applicable, attach or insert links to relevant documents"
// }
// optionSelect={"Yes"}
// />
// </div>
// <div className="govuk-form-group">
// <Field
// name="detailsOfPreviousAppeals"
// datafieldname="detailsOfPreviousAppeals"
// options={["Yes", "No"]}
// id="detailsOfPreviousAppeals"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "32. Details of any previous appeal decision relating to the site or a nearby site referred to by the LPA or applicant?"
// }
// conditionalLabel={
// "If Yes, provide the reference number(s) and address(es) and attach or insert links to the decision(s) and any relevant application documents"
// }
// optionSelect={"Yes"}
// />
// </div>
// <div className="govuk-form-group">
// <Field
// name="otherRelevantInformation"
// datafieldname="otherRelevantInformation"
// options={["Yes", "No"]}
// id="otherRelevantInformation"
// className="govuk-radios__input"
// errorMsg={t(
// "newappeal:select-an-option-label"
// )}
// component={
// RenderLPACondtionalRadioList
// }
// validate={[required]}
// legend={
// "33. Any other relevant information that we should know about?"
// }
// conditionalLabel={
// "If Yes, provide a brief description and attach or insert links to the relevant details"
// }
// optionSelect={"Yes"}
// />
// </div>
// </fieldset>
// <fieldset
// className="govuk-fieldset govuk-!-margin-top-9"
// aria-describedby="commentBox-hint"
// >
// <h3 className="govuk-heading-s ">
// Declaration
// </h3>
// <div className="govuk-form-group">
// <Field
// className="govuk-input govuk-!-width-one-half"
// id="caseOfficer"
// name="caseOfficer"
// data-aria-controls="caseOfficer"
// type="text"
// component={RenderTextfield}
// label="Signed"
// validate={[required]}
// />
// </div>
// <div className="govuk-form-group">
// {onBehalfOfLPA} seww
// <Field
// className="govuk-input govuk-!-width-one-half"
// id="onBehalfOfLPA"
// name="onBehalfOfLPA"
// data-aria-controls="caseOfficer"
// type="text"
// component={RenderTextfield}
// label="On behalf of"
// validate={[required]}
// />
// </div>
// <Field
// name="signedDate"
// id="signedDate"
// label="Date"
// component={RenderDatePicker}
// validate={[required]}
// errorMsg="Select a date"
// dateStart="0"
// dateEnd="1-y"
// />
// </fieldset>
// <fieldset
// className="govuk-fieldset govuk-!-margin-top-9"
// aria-describedby="commentBox-hint"
// >
// {" "}
// <div className="govuk-form-group govuk-!-margin-bottom-9">
// <FileUploadField
// name={"representationDocuments"}
// label={"Add your files"}
// ticketnumber={
// props.props.caseReference
// }
// hint={"sdsd"}
// fileList={[]}
// setFilesForRepresentation={[]}
// containerID={
// props.props.props
// .accountDetails
// .containerID
// }
// />
// </div>
// </fieldset>
// </>
))}
</div>{" "}
</div>
<div className="govuk-grid-row">
<div className="govuk-button-group">
<button
type="submit"
className="govuk-button"
data-module="govuk-button"
>
Continue
</button>
{/* <a
onClick={() => {
setRepresentationSubmit(false);
}}
className="govuk-button"
>
Continue
</a> */}
<a
onClick={() => {
//setRepresentationCapacity();
}}
className="govuk-link"
>
Back
</a>
</div>
</div>
</div>
</div>
);
};
const selector = formValueSelector("representationForm"); // <-- same as form name
RepLPA = connect((state) => {
const representationType = selector(state, "representationType");
const procedureType = selector(state, "procedureType");
return {
procedureType,
representationType,
};
})(RepLPA);
const mapStateToProps = (state, props) => {
let initialValuesTemp = Object.assign(
state.currentView.caseReference.hasOwnProperty("repDetails")
? state.currentView.caseReference.repDetails
: state.currentView.caseReference,
{
"onBehalfOfLPA":
props.props.props.accountDetails.accountDetails[
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
],
}
);
return {
search: state.search,
searchResultsObj: state.searchResultsObj,
formData: state.formData,
appealType: state.appealType,
currentView: state.currentView,
myRepresentations: state.myRepresentations,
initialValues: initialValuesTemp,
};
};
export default connect(mapStateToProps)(
reduxForm({
form: "representationForm",
enableReinitialize: true,
destroyOnUnmount: false,
})(RepLPA)
);