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 */}
<>
Appeal procedure and site visit
{_.has(repFormData, "procedureType") && (
<>
{repFormData.representationOnBehalfOf == "Yes" && (
)}
>
)}
{_.has(repFormData, "enterToView") && (
<>
>
)}
{_.has(repFormData, "enterNeighbouringLandToViewSite") && (
<>
{repFormData.enterNeighbouringLandToViewSite ==
"Yes" && (
)}
>
)}
{_.has(repFormData, "enterNeighbouringLandAccessRequired") && (
<>
{repFormData.enterNeighbouringLandAccessRequired !=
"Yes" && (
)}
>
)}
{_.has(repFormData, "healthAndSafetyIssues") && (
<>
{repFormData.healthAndSafetyIssues == "Yes" && (
)}
>
)}
{_.has(repFormData, "LPAcontactDetails") && (
<>
>
)}
>
{/* Section 2 Deemed Application Fee */}
<>
{t("myrepresentations:enf-section-heading-two")}
{_.has(repFormData, "feePaid") && (
<>
>
)}
{_.has(repFormData, "feeExempt") && (
<>
>
)}
>
{/* Section 3 Planning History and Current Status */}
<>
{t("myrepresentations:enf-section-heading-three")}
{_.has(repFormData, "previousGrantedCerts") && (
<>
{repFormData.previousGrantedCerts == "Yes" && (
)}
>
)}
{_.has(repFormData, "stopNoticeServed") && (
<>
{repFormData.stopNoticeServed == "Yes" && (
)}
>
)}
{_.has(repFormData, "relatedCases") && (
<>
{repFormData.relatedCases == "Yes" && (
)}
>
)}
{_.has(repFormData, "previousEnforcement") && (
<>
{repFormData.previousEnforcement == "Yes" && (
)}
>
)}
{_.has(repFormData, "subjectArticle4") && (
<>
{repFormData.subjectArticle4 == "Yes" && (
)}
>
)}
{_.has(repFormData, "previousPDRRestriction") && (
<>
{repFormData.previousPDRRestriction == "Yes" && (
)}
>
)}
>
{/* Section 4 Supporting Documents */}
<>
{t("myrepresentations:enf-section-heading-four")}
{_.has(repFormData, "LPAldpAndMap") && (
<>
>
)}
{_.has(repFormData, "LPAlocalGuidance") && (
<>
>
)}
{_.has(repFormData, "LPAintentionToSubmitFullStatement") && (
<>
>
)}
>
{/* Section 5 */}
<>
{t("myrepresentations:enf-section-heading-five")}
{_.has(repFormData, "AONB") && (
<>
>
)}
{_.has(repFormData, "ROW") && (
<>
{repFormData.ROW == "Yes" && (
)}
>
)}
{_.has(repFormData, "conservationArea") && (
<>
{repFormData.conservationArea == "Yes" && (
)}
>
)}
{_.has(repFormData, "affectListedBuilding") && (
<>
{repFormData.affectListedBuilding == "Yes" && (
)}
>
)}
{_.has(repFormData, "TPO") && (
<>
{repFormData.TPO == "Yes" && (
)}
>
)}
{_.has(repFormData, "natureConservationSite") && (
<>
{repFormData.natureConservationSite == "Yes" && (
)}
>
)}
{_.has(repFormData, "protectedSpecies") && (
<>
{repFormData.protectedSpecies == "Yes" && (
)}
>
)}
{_.has(repFormData, "gypsyTravellerInvolvment") && (
<>
>
)}
{_.has(repFormData, "floodingIssue") && (
<>
{repFormData.floodingIssue == "Yes" && (
)}
>
)}
{_.has(repFormData, "governmentDepartmentComments") && (
<>
{repFormData.governmentDepartmentComments == "Yes" && (
)}
>
)}
>
{/* Section 6 */}
<>
{t("myrepresentations:enf-section-heading-six")}
{_.has(
repFormData,
"developmentNotBeginLaterThanFiveYears"
) && (
<>
>
)}
{_.has(repFormData, "developmentCarriedOutInAccordance") && (
<>
{repFormData.developmentCarriedOutInAccordance ==
"Yes" && (
)}
>
)}
{_.has(repFormData, "developmentNotTakePlaceBiodiversity") && (
<>
>
)}
{_.has(repFormData, "developmentNotTakePlaceBroadband") && (
<>
{repFormData.developmentNotTakePlaceBroadband ==
"Yes" && (
)}
>
)}
{_.has(repFormData, "developmentAnyOtherConditions") && (
<>
{repFormData.developmentAnyOtherConditions == "Yes" && (
)}
>
)}
>
{/* Section 7 Before sending, have you attached or provided a web link to: */}
{t("myrepresentations:enf-section-heading-seven")}
{_.has(repFormData, "copyOfEnforcementNotice") && (
<>
{repFormData.copyOfEnforcementNotice == "No" && (
)}
>
)}
{_.has(repFormData, "enforcementNoticePlan") && (
<>
{repFormData.enforcementNoticePlan != "Yes" && (
)}
>
)}
{_.has(repFormData, "listOfNotifiedOfEnforcement") && (
<>
{repFormData.listOfNotifiedOfEnforcement != "Yes" && (
)}
>
)}
{_.has(repFormData, "copyOfLetterOfAppealNotification") && (
<>
{repFormData.copyOfLetterOfAppealNotification == "No" && (
)}
>
)}
{_.has(repFormData, "lpaEIAOS") && (
<>
{repFormData.lpaEIAOS == "No" && (
)}
>
)}
{_.has(repFormData, "detailsOfOtherAppeals") && (
<>
{repFormData.detailsOfOtherAppeals == "Yes" && (
)}
>
)}
{_.has(repFormData, "detailsOfPreviousAppeals") && (
<>
{repFormData.detailsOfPreviousAppeals == "Yes" && (
)}
>
)}
{_.has(repFormData, "otherRelevantInformation") && (
<>
{repFormData.otherRelevantInformation == "Yes" && (
)}
>
)}
{/* Section 9 Declaration */}
<>
Declaration
{_.has(repFormData, "signedDate") && (
<>
>
)}
{_.has(repFormData, "caseOfficer") && (
<>
>
)}
{_.has(repFormData, "onBehalfOfLPA") && (
<>
>
)}
>
>
);
};
export default RepLPAQuestionnaireCheck_enforcement;