import _ from "lodash"; import useTranslation from "next-translate/useTranslation"; import { formatDates } from "../../../utils"; let RepLPAQuestionnaireCheck_enforcement = (props) => { let { t } = useTranslation(); const { formObj, currentView, setSubmitBack, showQuestionnaireSection, setShowQuestionnaireSection, setRepresentationSubmit, questionnaireCount, } = props; const repFormData = formObj.representationForm.values; return ( <> {/* Section 1 Appeal procedure and site visit */} <>

{t("myrepresentations:enf-section-heading-one")}

<>
{"5. " + t("myrepresentations:enf-section-question-4")}
{repFormData.procedureType}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(1); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{(repFormData.procedureType == "Hearing" || repFormData.procedureType == "Inquiry") && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{/* { setRepresentationSubmit(false); setShowQuestionnaireSection(1); }} > {t("common:change-link-label")} {" "} {FieldsTranslations( rows[0].value )} */}
)} <>
{"6. " + t("myrepresentations:enf-section-question-5")}
{repFormData.enterToView}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(1); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
<>
{"7. " + t("myrepresentations:enf-section-question-6")}
{repFormData.enterNeighbouringLandToViewSite}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(1); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.enterNeighbouringLandToViewSite == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{/* { setRepresentationSubmit(false); setShowQuestionnaireSection(1); }} > {t("common:change-link-label")} {" "} {FieldsTranslations( rows[0].value )} */}
)} <>
{"8. " + t("myrepresentations:enf-section-question-7")}
{repFormData.enterNeighbouringLandAccessRequired}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(1); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.enterNeighbouringLandAccessRequired != "Yes" && repFormData.enforcementNoticePlan != null && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(1); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"9. " + t("myrepresentations:enf-section-question-8")}
{repFormData.healthAndSafetyIssues}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(1); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.healthAndSafetyIssues == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(1); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"10. " + t("myrepresentations:enf-section-question-9")}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(1); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{/* Section 2 Deemed Application Fee */} <>

{t("myrepresentations:enf-section-heading-two")}

<>
{"11. " + t("myrepresentations:enf-section-question-10")}
{repFormData.feePaid}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(2); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
<>
{"12. " + t("myrepresentations:enf-section-question-11")}
{repFormData.feeExempt}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(2); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.feeExempt == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} {/* Section 3 Planning History and Current Status */} <>

{t("myrepresentations:enf-section-heading-three")}

<>
{"13. " + t( "myrepresentations:enf-section-question-12" )}{" "}
{repFormData.previousGrantedCerts}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.previousGrantedCerts == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"14. " + t("myrepresentations:enf-section-question-13")}
{repFormData.stopNoticeServed}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.stopNoticeServed == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"15. " + t("myrepresentations:enf-section-question-14")}
{repFormData.relatedCases}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.relatedCases == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"16. " + t("myrepresentations:enf-section-question-15")}
{repFormData.previousEnforcement}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.previousEnforcement == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"17. " + t("myrepresentations:enf-section-question-16")}
{repFormData.subjectArticle4}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.subjectArticle4 == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"18. " + t("myrepresentations:enf-section-question-17")}
{repFormData.previousPDRRestriction}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.previousPDRRestriction == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} {/* Section 4 Supporting Documents */} <>

{t("myrepresentations:enf-section-heading-four")}

<>
{"19. " + t("myrepresentations:enf-section-question-18")}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(4); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
<>
{"20. " + t("myrepresentations:enf-section-question-19")}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(4); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
<>
{"21. " + t("myrepresentations:enf-section-question-20")}
{repFormData.LPAintentionToSubmitFullStatement}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(4); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{/* Section 5 */} <>

{t("myrepresentations:enf-section-heading-five")}

<>
{"22. " + t("myrepresentations:enf-section-question-21")}
{repFormData.AONB}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
<>
{"23. " + t("myrepresentations:enf-section-question-22")}
{repFormData.ROW}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.ROW == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"24. " + t("myrepresentations:enf-section-question-23")}
{repFormData.conservationArea}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.conservationArea == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"25. " + t("myrepresentations:enf-section-question-24")}
{repFormData.affectListedBuilding}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.affectListedBuilding == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"26. " + t("myrepresentations:enf-section-question-25")}
{repFormData.affectListedBuilding}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.TPO == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"27. " + t("myrepresentations:enf-section-question-26")}
{repFormData.natureConservationSite}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.natureConservationSite == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"28. " + t("myrepresentations:enf-section-question-27")}
{repFormData.protectedSpecies}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.protectedSpecies == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"29. " + t("myrepresentations:enf-section-question-28")}
{repFormData.gypsyTravellerInvolvment}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
<>
{"30. " + t("myrepresentations:enf-section-question-29")}
{repFormData.floodingIssue}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.floodingIssue == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"31. " + t("myrepresentations:enf-section-question-30")}
{repFormData.governmentDepartmentComments}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.governmentDepartmentComments == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} {/* Section 6 */} <>

{t("myrepresentations:enf-section-heading-six")}

<>
32. {t("myrepresentations:enf-section-question-31")}
{repFormData.developmentNotBeginLaterThanFiveYears}
<>
a) {t("myrepresentations:enf-section-question-31a")}
{repFormData.developmentCarriedOutInAccordance}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(6); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.developmentCarriedOutInAccordance == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(6); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
b) {t("myrepresentations:enf-section-question-31b")}
{repFormData.developmentNotTakePlaceBiodiversity}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(6); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
<>
c) {t("myrepresentations:enf-section-question-31c")}
{repFormData.developmentNotTakePlaceBroadband}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(6); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.developmentNotTakePlaceBroadband == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ repFormData.developmentNotTakePlaceBroadbandEvidence }
{ setRepresentationSubmit(false); setShowQuestionnaireSection(6); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
33. {t("myrepresentations:enf-section-question-32")}
{repFormData.developmentAnyOtherConditions}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(6); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.developmentAnyOtherConditions == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(6); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} {/* Section 7 Before sending, have you attached or provided a web link to: */}

{t("myrepresentations:s78-section-heading-five-sub")}

<>
{"34. " + t("myrepresentations:enf-section-question-33")}
{repFormData.copyOfEnforcementNotice}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.copyOfEnforcementNotice == "No" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"35. " + t("myrepresentations:enf-section-question-34")}
{repFormData.enforcementNoticePlan}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.enforcementNoticePlan != "Yes" && repFormData.enforcementNoticePlan != null && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"36. " + t("myrepresentations:enf-section-question-35")}
{repFormData.enforcementNoticePlan}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.listOfNotifiedOfEnforcement != "Yes" && repFormData.enforcementNoticePlan != null && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"37. " + t("myrepresentations:enf-section-question-36")}
{repFormData.copyOfLetterOfAppealNotification}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.copyOfLetterOfAppealNotification == "No" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"38. " + t("myrepresentations:enf-section-question-37")}
{repFormData.lpaEIAOS}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.lpaEIAOS == "No" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"39. " + t("myrepresentations:enf-section-question-38")}
{repFormData.detailsOfOtherAppeals}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.detailsOfOtherAppeals == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"40. " + t("myrepresentations:enf-section-question-39")}
{repFormData.detailsOfPreviousAppeals}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.detailsOfPreviousAppeals == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} <>
{"41. " + t("myrepresentations:enf-section-question-40")}
{repFormData.otherRelevantInformation}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.otherRelevantInformation == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} {/* Section 9 Declaration */} <>

{t("myrepresentations:enf-section-heading-eight")}

<>
{t("myrepresentations:enf-section-question-signed")}
{repFormData.caseOfficer}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(9); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
<>
{t("myrepresentations:s78-section-question-date")}
{formatDates(repFormData.signedDate)}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(9); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
<>
{t( "myrepresentations:enf-section-question-onbehalf" )}
{repFormData.onBehalfOfLPA}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(9); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
); }; export default RepLPAQuestionnaireCheck_enforcement;