From 0c98bcd83105cde0e7b1dbe2258e0a330200ba3b Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Tue, 17 Oct 2023 09:07:18 +0100 Subject: [PATCH] rep pdf questionnaire variants --- .../representation/representationAgent.js | 14 + .../representation/representationAppellant.js | 22 +- .../representationCompleteSubmit.js | 40 +- .../representation/representationElements.js | 94 +- .../case/representation/representationLPA.js | 1584 ++++++++------- .../representationLPAQuestionnaire.js | 796 -------- ...resentationLPAQuestionnaire_enforcement.js | 942 +++++++++ .../representationLPAQuestionnaire_s78.js | 809 ++++++++ ...ationLPAQuestionnaireCheck_enforcement.js} | 791 +------- ...representationLPAQuestionnaireCheck_s78.js | 1793 +++++++++++++++++ components/pdftemplates/enforcement_pdf.js | 1590 +++++++++++++++ 11 files changed, 6081 insertions(+), 2394 deletions(-) delete mode 100644 components/case/representation/representationLPAQuestionnaire.js create mode 100644 components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js create mode 100644 components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js rename components/case/representation/{representationLPAQuestionnaireCheck.js => representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement.js} (62%) create mode 100644 components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78.js create mode 100644 components/pdftemplates/enforcement_pdf.js diff --git a/components/case/representation/representationAgent.js b/components/case/representation/representationAgent.js index 13640e0b..f365c23d 100644 --- a/components/case/representation/representationAgent.js +++ b/components/case/representation/representationAgent.js @@ -119,6 +119,20 @@ const RepAgent = (props) => { className="govuk-textarea govuk-input--width-30" aria-describedby={props.name + "-hint"} /> +

+ Please note that all representations may be + published in line with our Publishing + Policy. Should your representation include + any sensitive information or potentially + defamatory information, it may be redacted + before publishing. If it contains racist, + libellous or offensive content it will be + returned to you and you will be asked to + provide an amended version.{" "} + + https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html + +

{ > What kind of representation are you making? - + + {typeof props.representationType == "undefined" ? ( + + ) : ( +

{props.representationType}

+ )}
+ {/*
{ className="govuk-textarea govuk-input--width-30" aria-describedby={props.name + "-hint"} /> + {RepresentationGuidanceText( + formObj.representationForm.values.appealType + )}
{ console.log("///////// formObj:", formObj); + const whichQuestionnaireCheck = () => { + { + console.log("curr"); + switch (currentView.caseReference.appealType) { + case 846040000: + return ( + + ); + break; + + case 846040005: + return ( + + ); + break; + default: + return <>hello; + break; + } + } + }; + return ( <> {currentView.representationSubmitConfirmation == true ? ( @@ -251,11 +283,7 @@ const RepCompleteSubmit = (props) => {
- + {whichQuestionnaireCheck()}

The gathering and subsequent processing of the diff --git a/components/case/representation/representationElements.js b/components/case/representation/representationElements.js index 007c25dc..f3f38d25 100644 --- a/components/case/representation/representationElements.js +++ b/components/case/representation/representationElements.js @@ -578,34 +578,36 @@ export const RenderMultiline = ({ return ( <> - - {"hint" in custom} +

+ + {"hint" in custom} - {"hint" in custom && ( -
- {custom.hint} -
- )} - - + {"hint" in custom && ( +
+ {custom.hint} +
+ )} + + +
); }; @@ -998,3 +1000,41 @@ export function FileUploadField(props) { ); } + +export const RepresentationGuidanceText = (appealType) => { + console.log(appealType); + switch (appealType) { + case "846040004": //has/cas + return ( +

+ Please note that all questionnaire documents may be + published in line with our Publishing Policy. Should your + questionnaire include any sensitive information or + potentially defamatory information, it may be redacted + before publishing.{" "} + + https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html + +

+ ); + break; + default: + return ( +

+ Please note that all representations may be published in + line with our Publishing Policy. Should your representation + include any sensitive information or potentially defamatory + information, it may be redacted before publishing. If it + contains racist, libellous or offensive content it will be + returned to you and you will be asked to provide an amended + version.{" "} + + https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html + +

+ ); + break; + } + + return guidanceString; +}; diff --git a/components/case/representation/representationLPA.js b/components/case/representation/representationLPA.js index 197cc4a0..c98c804d 100644 --- a/components/case/representation/representationLPA.js +++ b/components/case/representation/representationLPA.js @@ -14,6 +14,7 @@ import { RenderRichMultiline, RenderDatePicker, } from "./representationElements"; +import { getFormCollectionByID } from "../../utils"; import { setRepresentationCapacity, setRepresentationSubmit, @@ -21,6 +22,9 @@ import { 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(); @@ -43,12 +47,51 @@ let RepLPA = (props) => { )); const required = (value) => (value ? undefined : "Required"); + const whichQuestionnaire = () => { + { + console.log("curr"); + switch (currentView.caseReference.appealType) { + case 846040000: + return ( + + ); + break; + + case 846040005: + return ( + + ); + break; + default: + return <>hello; + break; + } + } + }; + return (

- Representation from an LPA + Representation from an LPA for a{" "} + { + getFormCollectionByID( + currentView.caseReference.appealType + ).value + }

@@ -140,786 +183,787 @@ let RepLPA = (props) => { ) : ( - <> -
-

- Appeal procedure and site visit{" "} -

-
- - {(procedureTypeValue == "Hearing" || - procedureTypeValue == - "Inquiry") && ( - - )} + whichQuestionnaire() + // <> + //
+ //

+ // Appeal procedure and site visit{" "} + //

+ //
+ // + // {(procedureTypeValue == "Hearing" || + // procedureTypeValue == + // "Inquiry") && ( + // + // )} - + // -
- -
-
- -
-
- -
+ //
+ // + //
+ //
+ // + //
+ //
+ // + //
-
- -
-
-
-
-

- Supporting documents{" "} -

-
- -
-
- -
-
- -
- -
+ //
+ // + //
+ //
+ //
+ //
+ //

+ // Supporting documents{" "} + //

+ //
+ // + //
+ //
+ // + //
+ //
+ // + //
+ // + //
-
-

- Statutory considerations -

- + //
+ //

+ // Statutory considerations + //

+ // -
- -
-
- -
-
- -
-
- -
-
- -
-
- -
- -
- -
-
-
-

- Suggested conditions -

-
- 24. Review the following standard - conditions and advise whether they - would be necessary if - permission/consent is granted (not - applicable to Advertisement consent - proposals): -
+ //
+ // + //
+ //
+ // + //
+ //
+ // + //
+ //
+ // + //
+ //
+ // + //
+ //
+ // + //
+ // + //
+ // + //
+ //
+ //
+ //

+ // Suggested conditions + //

+ //
+ // 24. Review the following standard + // conditions and advise whether they + // would be necessary if + // permission/consent is granted (not + // applicable to Advertisement consent + // proposals): + //
- + // -
- -
- - + //
+ // + //
+ // + // -
- -
-
-
-

- Before sending, have you attached or - provided a web link to: -

+ //
+ // + //
+ //
+ //
+ //

+ // Before sending, have you attached or + // provided a web link to: + //

-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-

- Declaration -

-
- -
+ //
+ // + //
+ //
+ // + //
+ //
+ // + //
+ //
+ // + //
+ //
+ // + //
+ //
+ // + //
+ //
+ // + //
+ //
+ // + //
+ //
+ //
+ //

+ // Declaration + //

+ //
+ // + //
-
- {onBehalfOfLPA} seww - -
- -
+ //
+ // {onBehalfOfLPA} seww + // + //
+ // + //
-
- {" "} -
- -
-
- + //
+ // {" "} + //
+ // + //
+ //
+ // ))}
{" "}
diff --git a/components/case/representation/representationLPAQuestionnaire.js b/components/case/representation/representationLPAQuestionnaire.js deleted file mode 100644 index 959e896a..00000000 --- a/components/case/representation/representationLPAQuestionnaire.js +++ /dev/null @@ -1,796 +0,0 @@ -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 { - setRepresentationCapacity, - setRepresentationSubmit, -} from "../../../store/currentView/action"; -import { useDropzone } from "react-dropzone"; -import { select } from "xpath"; - -let RepLPAQuestionnaire = (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) => ( -
  • - {file.path} - {file.size} bytes -
  • - )); - const required = (value) => (value ? undefined : "Required"); - - return ( - <> - {props.representationTypeValue} - {props.procedureTypeValue} - -
    -
    - <> -
    -

    - Appeal procedure and site visit{" "} -

    -
    - - {(procedureTypeValue == "Hearing" || - procedureTypeValue == "Inquiry") && ( - - )} - - - -
    - -
    -
    - -
    -
    - -
    - -
    - -
    -
    -
    -
    -

    - Supporting documents{" "} -

    -
    - -
    -
    - -
    -
    - -
    - -
    - -
    -

    - Statutory considerations -

    - - -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    - -
    - -
    -
    -
    -

    - Suggested conditions -

    -
    - 24. Review the following standard conditions and - advise whether they would be necessary if - permission/consent is granted (not applicable to - Advertisement consent proposals): -
    - - - -
    - -
    - - - -
    - -
    -
    -
    -

    - Before sending, have you attached or provided a - web link to: -

    - -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    -

    Declaration

    -
    - -
    - -
    - {onBehalfOfLPA} seww - -
    - -
    - -
    - {" "} -
    - -
    -
    - -
    {" "} -
    - - ); -}; - -const selector = formValueSelector("representationForm"); // <-- same as form name - -RepLPAQuestionnaire = connect((state) => { - const representationTypeValue = selector(state, "representationType"); - const procedureTypeValue = selector(state, "procedureType"); - - return { - procedureTypeValue, - representationTypeValue, - }; -})(RepLPAQuestionnaire); - -const mapStateToProps = (state, props) => { - console.log(); - return { - search: state.search, - searchResultsObj: state.searchResultsObj, - formData: state.formData, - appealType: state.appealType, - currentView: state.currentView, - myRepresentations: state.myRepresentations, - initialValues: state.currentView.caseReference.repDetails, - }; -}; - -export default connect(mapStateToProps)( - reduxForm({ - form: "representationForm", - enableReinitialize: true, - destroyOnUnmount: false, - })(RepLPAQuestionnaire) -); diff --git a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js new file mode 100644 index 00000000..bce13bb5 --- /dev/null +++ b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js @@ -0,0 +1,942 @@ +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 { + setRepresentationCapacity, + setRepresentationSubmit, +} from "../../../../store/currentView/action"; +import { useDropzone } from "react-dropzone"; +import { select } from "xpath"; +import jsonpath from "jsonpath"; + +let Enforcement_Questionnaire = (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) => ( +
  • + {file.path} - {file.size} bytes +
  • + )); + const required = (value) => (value ? undefined : "Required"); + + let setCaseDetailsObj = router.query.hasOwnProperty("state") + ? router.query.state == "edit" + ? props.props.myRepresentations.myRepresentations + : props.props.searchResultsObj.searchDetailsObj + : props.props.searchResultsObj.searchDetailsObj; + + var detailsObj = {}; + + detailsObj = jsonpath.query( + setCaseDetailsObj, + '$..[?(@.pinswg_name=="' + + currentView.caseReference.currentReference + + '")]' + ); + + let setCaseResultssObj = router.query.hasOwnProperty("state") + ? router.query.state == "edit" + ? props.props.myRepresentations.myRepresentations + : props.props.searchResultsObj.searchResultsObj + : props.props.searchResultsObj.searchResultsObj; + + detailsObj = detailsObj[0]; + + var resultsObj = {}; + + resultsObj = jsonpath.query( + setCaseResultssObj, + '$..[?(@.ticketnumber=="' + + currentView.caseReference.currentReference + + '")]' + ); + resultsObj = resultsObj[0]; + + return ( + <> +
    +

    + Enforcement_Questionnaire Appeal procedure and site visit{" "} +

    +
    +
    + 1. PEDW Reference:{" "} + {currentView.caseReference.currentReference} +
    +
    +
    +
    + 2. LPA reference: {resultsObj.pinswg_lpareference} +
    +
    +
    +
    + 3. Site Address:{" "} + {detailsObj.pinswg_siteaddressline1 + + " " + + detailsObj.pinswg_siteaddressline2 + + " " + + detailsObj.pinswg_siteaddresstown + + " " + + detailsObj.pinswg_siteaddresspostcode} +
    +
    +
    + + + {(procedureTypeValue == "Hearing" || + procedureTypeValue == "Inquiry") && ( + + )} + + + +
    + +
    +
    + +
    +
    + +
    + +
    + +
    +
    +
    +
    +

    Deemed Applicaton Fee

    +
    + +
    +
    + +
    +
    + +
    +

    + Planning History and Current Status +

    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +

    Supporting documents

    +
    + +
    +
    + +
    + +
    + +
    +

    Statutory considerations

    + + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +

    Suggested conditions

    +
    + 31. If there is an appeal on ground (a), review the + following standard conditions and advise whether they would + be necessary if permission is granted: +
    + +
    + +
    + + + +
    + +
    +
    +
    +

    + Before sending, have you attached or provided a web link to: +

    + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +

    Declaration

    +
    + +
    + +
    + {onBehalfOfLPA} seww + +
    + +
    + +
    + {" "} +
    + +
    +
    + + ); +}; + +//export default Enforcement_Questionnaire; + +const selector = formValueSelector("representationForm"); // <-- same as form name + +Enforcement_Questionnaire = connect((state) => { + const representationTypeValue = selector(state, "representationType"); + const procedureTypeValue = selector(state, "procedureType"); + + return { + procedureTypeValue, + representationTypeValue, + }; +})(Enforcement_Questionnaire); + +const mapStateToProps = (state, props) => { + console.log(); + return { + search: state.search, + searchResultsObj: state.searchResultsObj, + formData: state.formData, + appealType: state.appealType, + currentView: state.currentView, + myRepresentations: state.myRepresentations, + initialValues: state.currentView.caseReference.repDetails, + }; +}; + +export default connect(mapStateToProps)( + reduxForm({ + form: "representationForm", + enableReinitialize: true, + destroyOnUnmount: false, + })(Enforcement_Questionnaire) +); diff --git a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js new file mode 100644 index 00000000..1624bfb3 --- /dev/null +++ b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js @@ -0,0 +1,809 @@ +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 { + setRepresentationCapacity, + setRepresentationSubmit, +} from "../../../../store/currentView/action"; +import { useDropzone } from "react-dropzone"; +import { select } from "xpath"; +import jsonpath from "jsonpath"; +import { getFormCollectionByID } from "../../../../components/utils"; + +let S78_Questionnaire = (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) => ( +
  • + {file.path} - {file.size} bytes +
  • + )); + const required = (value) => (value ? undefined : "Required"); + + let setCaseDetailsObj = router.query.hasOwnProperty("state") + ? router.query.state == "edit" + ? props.props.myRepresentations.myRepresentations + : props.props.searchResultsObj.searchDetailsObj + : props.props.searchResultsObj.searchDetailsObj; + + var detailsObj = {}; + + detailsObj = jsonpath.query( + setCaseDetailsObj, + '$..[?(@.pinswg_name=="' + + currentView.caseReference.currentReference + + '")]' + ); + + let setCaseResultssObj = router.query.hasOwnProperty("state") + ? router.query.state == "edit" + ? props.props.myRepresentations.myRepresentations + : props.props.searchResultsObj.searchResultsObj + : props.props.searchResultsObj.searchResultsObj; + + detailsObj = detailsObj[0]; + + var resultsObj = {}; + + resultsObj = jsonpath.query( + setCaseResultssObj, + '$..[?(@.ticketnumber=="' + + currentView.caseReference.currentReference + + '")]' + ); + resultsObj = resultsObj[0]; + + return ( + <> + {props.representationTypeValue} + {props.procedureTypeValue} + +
    +

    + Appeal procedure and site visit{" "} +

    +
    +
    + 1. PEDW Reference:{" "} + {currentView.caseReference.currentReference} +
    +
    +
    +
    + 2. LPA reference: {resultsObj.pinswg_lpareference} +
    +
    +
    +
    + 4. Appeal type:{" "} + { + getFormCollectionByID( + currentView.caseReference.appealType + ).value + } +
    +
    +
    +
    + 3. Site Address:{" "} + {detailsObj.pinswg_siteaddressline1 + + " " + + detailsObj.pinswg_siteaddressline2 + + " " + + detailsObj.pinswg_siteaddresstown + + " " + + detailsObj.pinswg_siteaddresspostcode} +
    +
    +
    + + {(procedureTypeValue == "Hearing" || + procedureTypeValue == "Inquiry") && ( + + )} + + + +
    + +
    +
    + +
    +
    + +
    + +
    + +
    +
    +
    +
    +

    Supporting documents

    +
    + +
    +
    + +
    +
    + +
    + +
    + +
    +

    Statutory considerations

    + + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    + +
    +
    +
    +

    Suggested conditions

    +
    + 24. Review the following standard conditions and advise + whether they would be necessary if permission/consent is + granted (not applicable to Advertisement consent proposals): +
    + + + +
    + +
    + + + +
    + +
    +
    +
    +

    + Before sending, have you attached or provided a web link to: +

    + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +

    Declaration

    +
    + +
    + +
    + {onBehalfOfLPA} seww + +
    + +
    + +
    + {" "} +
    + +
    +
    + + ); +}; + +export default S78_Questionnaire; + +// const selector = formValueSelector("representationForm"); //<-- same as form name + +// S78_Questionnaire = connect((state) => { +// const representationTypeValue = selector(state, "representationType"); +// const procedureTypeValue = selector(state, "procedureType"); + +// return { +// procedureTypeValue, +// representationTypeValue, +// }; +// })(S78_Questionnaire); + +// const mapStateToProps = (state, props) => { +// console.log(); +// return { +// search: state.search, +// searchResultsObj: state.searchResultsObj, +// formData: state.formData, +// appealType: state.appealType, +// currentView: state.currentView, +// myRepresentations: state.myRepresentations, +// initialValues: state.currentView.caseReference.repDetails, +// }; +// }; + +// export default connect(mapStateToProps)( +// reduxForm({ +// form: "representationForm", +// enableReinitialize: true, +// destroyOnUnmount: false, +// })(S78_Questionnaire) +// ); diff --git a/components/case/representation/representationLPAQuestionnaireCheck.js b/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement.js similarity index 62% rename from components/case/representation/representationLPAQuestionnaireCheck.js rename to components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement.js index 9c69c270..126bbd6a 100644 --- a/components/case/representation/representationLPAQuestionnaireCheck.js +++ b/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement.js @@ -1,796 +1,9 @@ -// 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 { -// setRepresentationCapacity, -// setRepresentationSubmit, -// } from "../../../store/currentView/action"; -// import { useDropzone } from "react-dropzone"; -// import { select } from "xpath"; - -// let RepLPAQuestionnaireCheck = (props) => { -// let { t } = useTranslation(); - -// const router = useRouter(); -// const { locale } = router; -// const { -// formObj, -// appellantApplicantRepresentationArr, -// setRepresentationCapacity, -// setRepresentationSubmit, -// currentView, -// procedureTypeValue, -// onBehalfOfLPA, -// } = props; - -// return ( -// <> - -//
    -//
    -// <> -//
    -//

    -// Appeal procedure and site visit{" "} -//

    -//
    -// -// {(procedureTypeValue == "Hearing" || -// procedureTypeValue == "Inquiry") && ( -// -// )} - -// - -//
    -// -//
    -//
    -// -//
    -//
    -// -//
    - -//
    -// -//
    -//
    -//
    -//
    -//

    -// Supporting documents{" "} -//

    -//
    -// -//
    -//
    -// -//
    -//
    -// -//
    -// -//
    - -//
    -//

    -// Statutory considerations -//

    -// - -//
    -// -//
    -//
    -// -//
    -//
    -// -//
    -//
    -// -//
    -//
    -// -//
    -//
    -// -//
    -// -//
    -// -//
    -//
    -//
    -//

    -// Suggested conditions -//

    -//
    -// 24. Review the following standard conditions and -// advise whether they would be necessary if -// permission/consent is granted (not applicable to -// Advertisement consent proposals): -//
    - -// - -//
    -// -//
    -// -// - -//
    -// -//
    -//
    -//
    -//

    -// Before sending, have you attached or provided a -// web link to: -//

    - -//
    -// -//
    -//
    -// -//
    -//
    -// -//
    -//
    -// -//
    -//
    -// -//
    -//
    -// -//
    -//
    -// -//
    -//
    -// -//
    -//
    -//
    -//

    Declaration

    -//
    -// -//
    - -//
    -// {onBehalfOfLPA} seww -// -//
    -// -//
    - -//
    -// {" "} -//
    -// -//
    -//
    -// -//
    {" "} -//
    -// -// ); -// }; - -// const selector = formValueSelector("representationForm"); // <-- same as form name - -// RepLPAQuestionnaire = connect((state) => { -// const representationTypeValue = selector(state, "representationType"); -// const procedureTypeValue = selector(state, "procedureType"); - -// return { -// procedureTypeValue, -// representationTypeValue, -// }; -// })(RepLPAQuestionnaire); - -// const mapStateToProps = (state, props) => { -// console.log(); -// return { -// initialValues: { -// onBehalfOfLPA: -// props.props.props.props.accountDetails.accountDetails[ -// "pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue" -// ], -// }, -// }; -// }; - -// export default connect(mapStateToProps)( -// reduxForm({ -// form: "representationForm", -// enableReinitialize: true, -// destroyOnUnmount: false, -// })(RepLPAQuestionnaire) -// ); - import _ from "lodash"; import Link from "next/link"; import { useRouter } from "next/router"; import useTranslation from "next-translate/useTranslation"; -let RepLPAQuestionnaireCheck = (props) => { +let RepLPAQuestionnaireCheck_enforcement = (props) => { let { t } = useTranslation(); const { formObj, currentView, setSubmitBack } = props; const repFormData = formObj.representationForm.values; @@ -2577,4 +1790,4 @@ let RepLPAQuestionnaireCheck = (props) => { ); }; -export default RepLPAQuestionnaireCheck; +export default RepLPAQuestionnaireCheck_enforcement; diff --git a/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78.js b/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78.js new file mode 100644 index 00000000..25899d0d --- /dev/null +++ b/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78.js @@ -0,0 +1,1793 @@ +import _ from "lodash"; +import Link from "next/link"; +import { useRouter } from "next/router"; +import useTranslation from "next-translate/useTranslation"; + +let RepLPAQuestionnaireCheck_s78 = (props) => { + let { t } = useTranslation(); + const { formObj, currentView, setSubmitBack } = props; + const repFormData = formObj.representationForm.values; + function formatDates(dateObj) { + var dateObj = new Date(dateObj); + var dd = String(dateObj.getDate()).padStart(2, "0"); + var mm = String(dateObj.getMonth() + 1).padStart(2, "0"); //January is 0! + var yyyy = dateObj.getFullYear(); + + return dd + "/" + mm + "/" + yyyy; + } + + return ( + <> + {_.has(repFormData, "procedureType") && ( + <> +
    +
    + 5. Which procedure do you consider the appeal should + follow? +
    + +
    + {repFormData.procedureType} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.representationOnBehalfOf == "Yes" && ( +
    +
    + {t("case:representation-onbehalfof-details")} +
    + +
    + {repFormData.representationOnBehalfOf_details} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + )} + + )} + {_.has(repFormData, "enterToView") && ( + <> +
    +
    + 6. Will the Inspector need to enter the appeal + site/property?{" "} +
    + +
    + {repFormData.enterToView} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + + )} + {_.has(repFormData, "enterNeighbouringLandToViewSite") && ( + <> +
    +
    + 7. Do you consider that the Inspector needs to enter + neighbouring private land/property to view the site? +
    + +
    + {repFormData.enterNeighbouringLandToViewSite} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.enterNeighbouringLandToViewSite == "Yes" && ( +
    +
    + {t("case:representation-onbehalfof-details")} +
    + +
    + { + repFormData.enterNeighbouringLandToViewSiteEvidence + } +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + )} + + )} + {_.has(repFormData, "enterNeighbouringLandAccessRequired") && ( + <> +
    +
    + 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? +
    + +
    + {repFormData.enterNeighbouringLandAccessRequired} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.enterNeighbouringLandAccessRequired == + "Yes" && ( + + )} + + )} + {_.has(repFormData, "healthAndSafetyIssues") && ( + <> +
    +
    + 9. Are you aware of any health and safety issues + which would need to be considered when the Inspector + visits the site? +
    + +
    + {repFormData.healthAndSafetyIssues} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.healthAndSafetyIssues == "Yes" && ( + + )} + + )} + {_.has(repFormData, "LPAcontactDetails") && ( + <> +
    +
    + 10. LPA contact for site visit, hearing or inquiry + arrangements: +
    + +
    + {repFormData.healthAndSafetyIssues} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + + )} + {_.has(repFormData, "LPAcaseFileAndReps") && ( + <> +
    +
    + 11. LPA case file and represen- tations +
    + +
    + {repFormData.LPAcaseFileAndReps} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + + )} + {_.has(repFormData, "LPAldpAndMap") && ( + <> +
    +
    + 12. LPA’s adopted local development plan and + Proposals Map +
    + +
    + {repFormData.LPAldpAndMap} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + + )} + {_.has(repFormData, "LPAintentionToSubmitFullStatement") && ( + <> +
    +
    + 14. If applicable, do you intend to submit a full + statement at the 4- week stage? +
    + +
    + {repFormData.LPAintentionToSubmitFullStatement} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + + )} + {_.has(repFormData, "AONB") && ( + <> +
    +
    + 15. Is all or part of the site within an Area of + Outstanding Natural Beauty? +
    + +
    + {repFormData.AONB} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + + )} + {_.has(repFormData, "ROW") && ( + <> +
    +
    + 16. Does the site include any public rights of way? +
    + +
    + {repFormData.ROW} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.ROW == "Yes" && ( + + )} + + )} + {_.has(repFormData, "conservationArea") && ( + <> +
    +
    + 17. Is all or part of the site within a Conservation + Area? +
    + +
    + {repFormData.conservationArea} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.conservationArea == "Yes" && ( + + )} + + )} + {_.has(repFormData, "affectListedBuilding") && ( + <> +
    +
    + 18. Would the proposal involve works to, or affect + the setting of, a listed building, Scheduled + Monument or other designated historic asset? +
    + +
    + {repFormData.affectListedBuilding} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.affectListedBuilding == "Yes" && ( + + )} + + )} + {_.has(repFormData, "TPO") && ( + <> +
    +
    + 19. Is any part of the site subject to a Tree + Preservation Order? +
    + +
    + {repFormData.affectListedBuilding} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.TPO == "Yes" && ( + + )} + + )} + {_.has(repFormData, "natureConservationSite") && ( + <> +
    +
    + 20. Is the site within or likely to affect an + International or National Designated Site for nature + conservation (as defined in Planning Policy Wales)? +
    + +
    + {repFormData.natureConservationSite} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.natureConservationSite == "Yes" && ( + + )} + + )} + {_.has(repFormData, "protectedSpecies") && ( + <> +
    +
    + 21. Are any protected species likely to be affected + by the proposal? +
    + +
    + {repFormData.protectedSpecies} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.protectedSpecies == "Yes" && ( + + )} + + )} + {_.has(repFormData, "gypsyTravellerInvolvment") && ( + <> +
    +
    + 22. Does the case involve persons claiming + Gypsy/Traveller status, whether or not this is + accepted by the LPA? +
    + +
    + {repFormData.gypsyTravellerInvolvment} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + + )} + {_.has(repFormData, "governmentDepartmentComments") && ( + <> +
    +
    + 23. Have you received comments or directions from + any government department/agency or statutory + undertaker, including in response to a statutory + notification or consultation? +
    + +
    + {repFormData.governmentDepartmentComments} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.governmentDepartmentComments == "Yes" && ( +
    +
    + Evidence +
    + +
    + { + repFormData.governmentDepartmentCommentsEvidence + } +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + )} + + )} + {_.has(repFormData, "developmentNotBeginLaterThanFiveYears") && ( + <> +
    +
    + 24a. The development shall begin not later than five + years from the date of this decision. +
    + +
    + {repFormData.developmentNotBeginLaterThanFiveYears} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + + )} + {_.has(repFormData, "developmentCarriedOutInAccordance") && ( + <> +
    +
    + 24b. 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. +
    + +
    + {repFormData.developmentCarriedOutInAccordance} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.developmentCarriedOutInAccordance == "Yes" && ( +
    +
    + Evidence +
    + +
    + { + repFormData.developmentCarriedOutInAccordanceEvidence + } +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + )} + + )} + {_.has(repFormData, "developmentNotTakePlaceBiodiversity") && ( + <> +
    +
    + 24c. 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. +
    + +
    + {repFormData.developmentNotTakePlaceBiodiversity} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + + )} + {_.has(repFormData, "developmentNotTakePlaceBroadband") && ( + <> +
    +
    + 24d. 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. +
    + +
    + {repFormData.developmentNotTakePlaceBroadband} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.developmentNotTakePlaceBroadband == "Yes" && ( +
    +
    + Evidence +
    + +
    + { + repFormData.developmentNotTakePlaceBroadbandEvidence + } +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + )} + + )} + {_.has(repFormData, "developmentAnyOtherConditions") && ( + <> +
    +
    + 25. Do you consider other conditions, or amended + versions of the above standard conditions, to be + necessary? +
    + +
    + {repFormData.developmentAnyOtherConditions} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.developmentAnyOtherConditions == "Yes" && ( +
    +
    + Evidence +
    + +
    + { + repFormData.developmentAnyOtherConditionsEvidence + } +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + )} + + )} + {_.has(repFormData, "copyOfApplicantsCertificate") && ( + <> +
    +
    + 26. A copy of the applicant’s certificate confirming + that they notified persons with an interest in the + land?* +
    + +
    + {repFormData.copyOfApplicantsCertificate} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.copyOfApplicantsCertificate == "Yes" && ( + + )} + + )} + {_.has(repFormData, "advertismentGiven") && ( + <> +
    +
    + 27. Evidence of any publicity given to the + application, including site notices and local + advertisement?** +
    + +
    + {repFormData.advertismentGiven} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.advertismentGiven == "Yes" && ( + + )} + + )} + {_.has(repFormData, "copyOfLetterOfAppealNotification") && ( + <> +
    +
    + 28. A copy of the letter with which you notified + people of the appeal AND a list of the people you + notified? +
    + +
    + {repFormData.copyOfLetterOfAppealNotification} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.copyOfLetterOfAppealNotification == "Yes" && ( +
    +
    + Evidence +
    + +
    + { + repFormData.copyOfLetterOfAppealNotificationEvidence + } +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + )} + + )} + {_.has(repFormData, "lpaEIAOS") && ( + <> +
    +
    + 29. The LPA’s Environmental Impact Assessment + Screening Opinion, if applicable? +
    + +
    + {repFormData.lpaEIAOS} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.lpaEIAOS == "Yes" && ( + + )} + + )} + {_.has(repFormData, "advertismentConsentDiscontinuanceNotice") && ( + <> +
    +
    + 30. Advertisement consent proposals only: A true + copy of the Discontinuance Notice (if one has been + issued)? +
    + +
    + { + repFormData.advertismentConsentDiscontinuanceNotice + } +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.lpaEIAOS == "Yes" && ( +
    +
    + Evidence +
    + +
    + { + repFormData.advertismentConsentDiscontinuanceNoticeEvidence + } +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + )} + + )} + {_.has(repFormData, "detailsOfOtherAppeals") && ( + <> +
    +
    + 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? +
    + +
    + {repFormData.detailsOfOtherAppeals} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.detailsOfOtherAppeals == "Yes" && ( + + )} + + )} + {_.has(repFormData, "detailsOfPreviousAppeals") && ( + <> +
    +
    + 32. Details of any previous appeal decision relating + to the site or a nearby site referred to by the LPA + or applicant? +
    + +
    + {repFormData.detailsOfPreviousAppeals} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.detailsOfPreviousAppeals == "Yes" && ( + + )} + + )} + {_.has(repFormData, "otherRelevantInformation") && ( + <> +
    +
    + 33. Any other relevant information that we should + know about? +
    + +
    + {repFormData.otherRelevantInformation} +
    + +
    + { + setSubmitBack(); + }} + > + {t("newappeal:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
    +
    + {repFormData.otherRelevantInformation == "Yes" && ( + + )} + + )} + {_.has(repFormData, "signedDate") && ( + <> + + + )} + {_.has(repFormData, "caseOfficer") && ( + <> + + + )} + {_.has(repFormData, "onBehalfOfLPA") && ( + <> + + + )} + + ); +}; +export default RepLPAQuestionnaireCheck_s78; diff --git a/components/pdftemplates/enforcement_pdf.js b/components/pdftemplates/enforcement_pdf.js new file mode 100644 index 00000000..b9d08a59 --- /dev/null +++ b/components/pdftemplates/enforcement_pdf.js @@ -0,0 +1,1590 @@ +import ReactPDF, { + Document, + Page, + Text, + View, + Image, + StyleSheet, + PDFViewer, + Font, +} from "@react-pdf/renderer"; +import Html from "react-pdf-html"; +import { getFormCollectionByID } from "../../components/utils"; + +const styles = StyleSheet.create({ + page: { + backgroundColor: "white", + padding: 20, + fontSize: 16, + paddingBottom: 50, + }, + header: { + fontSize: 25, + fontFamily: "Helvetica", + flexDirection: "row", + justifyContent: "space-between", + }, + subHeader: { + fontSize: 20, + }, + logoImage: { width: "200pt" }, + questionBullet: { width: "5%", fontSize: 12 }, + questionText: { width: "30%", fontSize: 12 }, + questionTextMid: { width: "80%", fontSize: 12 }, + questionTextWide: { width: "95%", fontSize: 12, marginBottom: 5 }, + questionAnswer: { + color: "#757575", + width: "65%", + fontSize: 12, + padding: 5, + border: 1, + borderColor: "#eee", + paddingLeft: 10, + backgroundColor: "white", + }, + questionAnswerMid: { + color: "#757575", + width: "20%", + fontSize: 12, + padding: 5, + border: 1, + borderColor: "#eee", + paddingLeft: 10, + backgroundColor: "white", + }, + questionAnswerWide: { + color: "#757575", + width: "95%", + fontSize: 12, + marginLeft: "5%", + border: 1, + borderColor: "#eee", + backgroundColor: "white", + padding: 5, + }, + + sectionContainer: { + backgroundColor: "#F8F8F8", + padding: 10, + marginTop: 20, + fontSize: 15, + }, + pageNumber: { + position: "absolute", + fontSize: 12, + bottom: 20, + left: 0, + right: 0, + textAlign: "center", + color: "grey", + }, + + richArea: { + fontSize: 12, + color: "red", + flexDirection: "column", + }, +}); + +export const EnforcementQuestionnaire_pdf = ({ docProps }) => { + console.log(docProps); + function formatDates(dateObj) { + var dateObj = new Date(dateObj); + var dd = String(dateObj.getDate()).padStart(2, "0"); + var mm = String(dateObj.getMonth() + 1).padStart(2, "0"); //January is 0! + var yyyy = dateObj.getFullYear(); + + return dd + "/" + mm + "/" + yyyy; + } + let values = docProps; + let appealTypeValue = getFormCollectionByID(values.appealType); + + console.log("sdffhjdhjdjdgkj: ", values.procedureType); + return ( + + + + + + + Local Planning Authority Questionnaire + + + + For Planning Enforcement Appeals + + + + + + + + + The LPA must send the completed questionnaire and + any attachments to PEDW.casework@gov.wales and the + appellant (or their agent) within 5 working days of + the start date specified in our start letter. + + + + + Case details + + + + 1. + + PEDW reference: + + + {values.caseRef} + + + + 2. + + LPA reference: + + + {values.lpaRef} + + + + 3. + + Site address/grid ref: + + + {values.siteAddress} + + + + + + + + Appeal procedure and site visit + + + + + + + 4. + + + Which procedure do you consider the + appeal should follow? + + + {values.procedureType} + + + {values.procedureType != + "Written representations" && ( + + + {values.procedureTypeEvidence} + + + )} + + + 5. + + Will the Inspector need to enter the appeal + site/property? + + + {values.enterToView} + + + + + + + 6. + + + Do you consider that the Inspector needs + to enter neighbouring private + land/property to view the site? + + + {values.enterNeighbouringLandToViewSite} + + + + {values.enterNeighbouringLandToViewSite == + "Yes" && ( + + + { + values.enterNeighbouringLandToViewSiteEvidence + } + + + )} + + + + + 7. + + + 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? + + + { + values.enterNeighbouringLandAccessRequired + } + + + {values.enterNeighbouringLandAccessRequired != + "Yes" && ( + + + { + values.enterNeighbouringLandAccessRequiredEvidence + } + + + )} + + + + + 8. + + + Are you aware of any health and safety + issues which would need to be considered + when the Inspector visits the site? + + + {values.healthAndSafetyIssues} + + + {values.healthAndSafetyIssues == "Yes" && ( + + + { + values.healthAndSafetyIssuesEvidence + } + + + )} + + + + + 9. + + + + LPA contact for site visit, hearing or + inquiry arrangements: + + + + + {values.LPAcontactDetails} + + + + + + + + + + Deemed Application Fee{" "} + + + + + + + 10. + + + Has the local planning authority + received the correct fee payable in + relation to this appeal for the deemed + planning application/ground (a) to be + considered? + + + {values.feePaid} + + + + + + + 11. + + + Is the appeal fee exempt? + + + {values.feeExempt} + + + {values.feeExempt == "Yes" && ( + + + {values.feeExemptEvidence} + + + )} + + + + + + + + Supporting documents + + + + + 12. + + Have any planning permissions or lawful + development certificates been granted + previously in respect of the development or + on the site? + + + {values.previousGrantedCerts} + + + {values.previousGrantedCerts == "Yes" && ( + + + {values.previousGrantedCertsEvidence} + + + )} + + 13. + + Has a Stop Notice been served in addition to + the Enforcement Notice? + + + {values.stopNoticeServed} + + + {values.stopNoticeServed == "Yes" && ( + + + {values.stopNoticeServedEvidence} + + + )} + + 14. + + Are there any related cases (e.g. appeals + under s78 of the Town and Country Planning + Act 1990) which are currently or have + previously been before the Welsh Ministers? + + + {values.relatedCases} + + + {values.relatedCases == "Yes" && ( + + + {values.relatedCasesEvidence} + + + )} + + 15. + + Has there been any previous enforcement + action on the site? + + + {values.previousEnforcement} + + + {values.previousEnforcement == "Yes" && ( + + + {values.previousEnforcementEvidence} + + + )} + + 16. + + Is the site subject to an Article 4 + Direction? + + + {values.subjectArticle4} + + + {values.subjectArticle4 == "Yes" && ( + + + {values.subjectArticle4Evidence} + + + )} + + 17. + + Have permitted development rights been + restricted by any previous planning + condition? + + + {values.previousPDRRestriction} + + + {values.previousPDRRestriction == "Yes" && ( + + + {values.previousPDRRestrictionEvidence} + + + )} + + + + + + + Supporting documents + + + + + 18. + + LPA’s adopted local development plan and + Proposals Map + + + + {values.LPAldpAndMap} + + + + + 19. + + Adopted local guidance relevant to the + proposal: + + + + {values.LPAlocalGuidance} + + + + + 20. + + If applicable, do you intend to submit a + full statement at the 4- week stage? + + + {values.LPAintentionToSubmitFullStatement} + + + + + + + + Statutory considerations + + + + + 21. + + Is all or part of the site within an Area of + Outstanding Natural Beauty? + + + {values.AONB} + + + + + + 22. + + + Does the site include any public rights + of way? + + + {values.ROW} + + + {values.ROW == "Yes" && ( + + + {values.ROWEvidence} + + + )} + + + + + 23. + + + Is all or part of the site within a + Conservation Area? + + + {values.conservationArea}{" "} + + + {values.conservationArea == "Yes" && ( + + + {values.conservationAreaEvidence} + + + )} + + + + + 24. + + + Does the development include works to, + or affect the setting of, a listed + building, Scheduled Monument or other + designated historic asset? + + + {values.affectListedBuilding} + + + {values.affectListedBuilding == "Yes" && ( + + + { + values.affectListedBuildingEvidence + } + + + )} + + + + + 25. + + + Is any part of the site subject to a + Tree Preservation Order? + + + {values.TPO} + + + {values.TPO == "Yes" && ( + + + {values.TPOEvidence} + + + )} + + + + + 26. + + + Is the site within or likely to affect + an International or National Designated + Site for nature conservation (as defined + in Planning Policy Wales)? + + + {values.natureConservationSite} + + + {values.natureConservationSite == "Yes" && ( + + + { + values.natureConservationSiteEvidence + } + + + )} + + + + + 27. + + + Are any protected species likely to be + affected by the proposal? + + + {values.protectedSpecies} + + + {values.protectedSpecies == "Yes" && ( + + + {values.protectedSpeciesEvidence} + + + )} + + + 28. + + Does the case involve persons claiming + Gypsy/Traveller status, whether or not this + is accepted by the LPA? + + + {values.gypsyTravellerInvolvment} + + + + + + 29. + + + Is flooding an issue? + + + {values.floodingIssue} + + + {values.floodingIssue == "Yes" && ( + + + {values.floodingIssueEvidence} + + + )} + + + + + 30. + + + Have you received comments or directions + from any government department/agency or + statutory undertaker, including in + response to a statutory notification or + consultation? + + + {values.governmentDepartmentComments} + + + {values.governmentDepartmentComments == + "Yes" && ( + + + { + values.governmentDepartmentCommentsEvidence + } + + + )} + + + + + + + Suggested considerations + + + + + 31. + + If there is an appeal on ground (a), review + the following standard conditions and advise + whether they would be necessary if + permission is granted: + + + + + + + a) + + + 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. + + + { + values.developmentCarriedOutInAccordance + } + + + {values.developmentCarriedOutInAccordance == + "Yes" && ( + + + { + values.developmentCarriedOutInAccordanceEvidence + } + + + )} + + + b) + + 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. + + + {values.developmentNotTakePlaceBiodiversity} + + + + 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. + + + {values.developmentNotTakePlaceBroadband} + + + + + + 25. + + + Do you consider other conditions, or + amended versions of the above standard + conditions, to be necessary? + + + {values.developmentAnyOtherConditions} + + + {values.developmentAnyOtherConditions == + "Yes" && ( + + + { + values.developmentAnyOtherConditionsEvidence + } + + + )} + + + + + + + Before sending, have you attached or provided a + web link to: + + + + + + + 33. + + + A true copy of the enforcement notice? + + + {values.copyOfEnforcementNotice} + + + + + {values.copyOfEnforcementNoticeEvidence} + + + + + + + + 34. + + + The enforcement notice plan. + + + {values.enforcementNoticePlan} + + + + + + {values.enforcementNoticePlan} + + + + + + + + 35. + + + A list of those served with the + enforcement notice. + + + {values.listOfNotifiedOfEnforcement} + + + + + { + values.listOfNotifiedOfEnforcementEvidence + } + + + + + + + 36. + + + A copy of the letter with which you + notified people of the appeal AND a list + of the people you notified? + + + { + values.copyOfLetterOfAppealNotification + } + + + + + { + values.copyOfLetterOfAppealNotificationEvidence + } + + + + + + + + 37. + + + The LPA’s Environmental Impact + Assessment Screening Opinion and + ‘Regulation 45 Notice’*, if applicable? + + + {values.lpaEIAOS} + + + {values.lpaEIAOS == "Yes" && ( + + + {values.lpaEIAOSEvidence} + + + )} + + + + + 38. + + + 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? + + + {values.detailsOfOtherAppeals} + + + {values.detailsOfOtherAppeals == "Yes" && ( + + + { + values.detailsOfOtherAppealsEvidence + } + + + )} + + + + + + 39. + + + Details of any previous appeal decision + relating to the site or a nearby site + referred to by the LPA or applicant? + + + {values.detailsOfPreviousAppeals} + + + {values.detailsOfPreviousAppeals == "Yes" && ( + + + { + values.detailsOfPreviousAppealsEvidence + } + + + )} + + + + + + 40. + + + Any other relevant information that we + should know about? + + + {values.otherRelevantInformation} + + + {values.otherRelevantInformation == "Yes" && ( + + + { + values.otherRelevantInformationEvidence + } + + + )} + + + + + + Declaration + + + + + + Signed: + + + {values.caseOfficer} + + + + + Date: + + + {formatDates(values.signedDate)} + + + + + + On behalf of: + + + {values.onBehalfOfLPA} + + + + + + + Supporting documents + + + + + + + List of attached files + + + {values.hasOwnProperty("filesList") && + values.filesList.map(function (p) { + return ( + + + {p.name} - {p.size} + + + ); + })} + + + + + + + * Regulation 45 of the Town and Country Planning + (Environmental Impact Assessment) (Wales) + Regulations 2017 (as amended). + + + + + + `${pageNumber} / ${totalPages}` + } + fixed + /> + + + + ); +};