import _ from "lodash"; import useTranslation from "next-translate/useTranslation"; import { formatDates } from "../../../utils"; let RepLPAQuestionnaireCheck_s78 = (props) => { let { t } = useTranslation(); const { formObj, currentView, setSubmitBack, showQuestionnaireSection, setShowQuestionnaireSection, setRepresentationSubmit, questionnaireCount, } = props; const repFormData = formObj.representationForm.values; return ( <> {showQuestionnaireSection} {_.has(repFormData, "procedureType") && ( <>
{"5. " + t("myrepresentations:s78-section-question-5")}
{repFormData.procedureType}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(1); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.representationOnBehalfOf == "Yes" && (
{t("case:representation-onbehalfof-details")}
{repFormData.representationOnBehalfOf_details}
{/* { setSubmitBack(); }} > {t("common:change-link-label")} {" "} {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "enterToView") && ( <>
{"6. " + t("myrepresentations:s78-section-question-6")}
{repFormData.enterToView}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(1); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} {_.has(repFormData, "enterNeighbouringLandToViewSite") && ( <>
{"7. " + t("myrepresentations:s78-section-question-7")}
{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 )} */}
)} )} {_.has(repFormData, "enterNeighbouringLandAccessRequired") && ( <>
{"8. " + t("myrepresentations:s78-section-question-8")}
{repFormData.enterNeighbouringLandAccessRequired}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(1); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.enterNeighbouringLandAccessRequired == "No" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(1); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "healthAndSafetyIssues") && ( <>
{"9. " + t("myrepresentations:s78-section-question-9")}
{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:s78-section-question-10")}
{_.has(repFormData, "LPAcontactDetails") ? (
) : ( "Not entered" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(1); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
<>
{"11. " + t("myrepresentations:s78-section-question-11")}
{_.has(repFormData, "LPAcaseFileAndReps") ? (
) : ( "Not entered" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(2); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
<>
{"12. " + t("myrepresentations:s78-section-question-12")}
{_.has(repFormData, "LPAldpAndMap") ? (
) : ( "Not entered" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(2); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
<>
{"13. " + t("myrepresentations:s78-section-question-13")}
{_.has(repFormData, "LPAlocalGuidance") ? (
) : ( "Not entered" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(2); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{_.has(repFormData, "LPAintentionToSubmitFullStatement") && ( <>
{"14. " + t("myrepresentations:s78-section-question-14")}
{repFormData.LPAintentionToSubmitFullStatement}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(2); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} {_.has(repFormData, "AONB") && ( <>
15. {t("myrepresentations:s78-section-question-15")}
{repFormData.AONB}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} {_.has(repFormData, "ROW") && ( <>
16. {t("myrepresentations:s78-section-question-16")}
{repFormData.ROW}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.ROW == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "conservationArea") && ( <>
{"17. " + t("myrepresentations:s78-section-question-17")}
{repFormData.conservationArea}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.conservationArea == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "affectListedBuilding") && ( <>
{"18. " + t("myrepresentations:s78-section-question-18")}
{repFormData.affectListedBuilding}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.affectListedBuilding == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "TPO") && ( <>
{"19. " + t("myrepresentations:s78-section-question-19")}
{repFormData.affectListedBuilding}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.TPO == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "natureConservationSite") && ( <>
{"20. " + t("myrepresentations:s78-section-question-20")}
{repFormData.natureConservationSite}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.natureConservationSite == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "protectedSpecies") && ( <>
{"21. " + t("myrepresentations:s78-section-question-21")}
{repFormData.protectedSpecies}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.protectedSpecies == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "gypsyTravellerInvolvment") && ( <>
{"22. " + t("myrepresentations:s78-section-question-22")}
{repFormData.gypsyTravellerInvolvment}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} {_.has(repFormData, "governmentDepartmentComments") && ( <>
{"23. " + t("myrepresentations:s78-section-question-23")}
{repFormData.governmentDepartmentComments}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.governmentDepartmentComments == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(3); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "developmentNotBeginLaterThanFiveYears") && ( <>
{"24a. " + t("myrepresentations:s78-section-question-24a")}
{repFormData.developmentNotBeginLaterThanFiveYears}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(4); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} {_.has(repFormData, "developmentCarriedOutInAccordance") && ( <>
{"24b. " + t("myrepresentations:s78-section-question-24b")}
{repFormData.developmentCarriedOutInAccordance}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(4); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.developmentCarriedOutInAccordance == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(4); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "developmentNotTakePlaceBiodiversity") && ( <>
{"24c. " + t("myrepresentations:s78-section-question-24c")}
{repFormData.developmentNotTakePlaceBiodiversity}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(4); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} {_.has(repFormData, "developmentNotTakePlaceBroadband") && ( <>
{"24d. " + t("myrepresentations:s78-section-question-24d")}
{repFormData.developmentNotTakePlaceBroadband}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(4); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.developmentNotTakePlaceBroadband == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(4); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "developmentAnyOtherConditions") && ( <>
{"25. " + t("myrepresentations:s78-section-question-25")}
{repFormData.developmentAnyOtherConditions}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(4); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.developmentAnyOtherConditions == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(4); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "copyOfApplicantsCertificate") && ( <>
{"26. " + t("myrepresentations:s78-section-question-26")}
{repFormData.copyOfApplicantsCertificate}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.copyOfApplicantsCertificate == "No" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "advertismentGiven") && ( <>
{"27. " + t("myrepresentations:s78-section-question-27")}
{repFormData.advertismentGiven}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.advertismentGiven == "No" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "copyOfLetterOfAppealNotification") && ( <>
{"28. " + t("myrepresentations:s78-section-question-28")}
{repFormData.copyOfLetterOfAppealNotification}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.copyOfLetterOfAppealNotification == "No" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "lpaEIAOS") && ( <>
{"29. " + t("myrepresentations:s78-section-question-29")}
{repFormData.lpaEIAOS}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.lpaEIAOS == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "advertismentConsentDiscontinuanceNotice") && ( <>
{"30. " + t("myrepresentations:s78-section-question-30")}
{ repFormData.advertismentConsentDiscontinuanceNotice }
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.lpaEIAOS == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "detailsOfOtherAppeals") && ( <>
{"31. " + t("myrepresentations:s78-section-question-31")}
{repFormData.detailsOfOtherAppeals}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.detailsOfOtherAppeals == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "detailsOfPreviousAppeals") && ( <>
{"32. " + t("myrepresentations:s78-section-question-32")}
{repFormData.detailsOfPreviousAppeals}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.detailsOfPreviousAppeals == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "otherRelevantInformation") && ( <>
{"33. " + t("myrepresentations:s78-section-question-33")}
{repFormData.otherRelevantInformation}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
{repFormData.otherRelevantInformation == "Yes" && (
{t( "myrepresentations:questionnaire-evidence-label" )}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(5); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} )} {_.has(repFormData, "signedDate") && ( <>
{t("myrepresentations:s78-section-question-signed")}
{repFormData.caseOfficer}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} {_.has(repFormData, "caseOfficer") && ( <>
{" "} {t("myrepresentations:s78-section-question-date")}
{formatDates(repFormData.signedDate)}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} {_.has(repFormData, "onBehalfOfLPA") && ( <>
{t( "myrepresentations:s78-section-question-onbehalf" )}
{repFormData.onBehalfOfLPA}
{ setRepresentationSubmit(false); setShowQuestionnaireSection(7); }} > {t("common:change-link-label")} {" "} {/* {FieldsTranslations( rows[0].value )} */}
)} ); }; export default RepLPAQuestionnaireCheck_s78;