// 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 { 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") && (
<>
{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") && (
<>
>
)}
{_.has(repFormData, "LPAcaseFileAndReps") && (
<>
>
)}
{_.has(repFormData, "LPAldpAndMap") && (
<>
>
)}
{_.has(repFormData, "LPAintentionToSubmitFullStatement") && (
<>
>
)}
{_.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, "governmentDepartmentComments") && (
<>
{repFormData.governmentDepartmentComments == "Yes" && (
)}
>
)}
{_.has(repFormData, "developmentNotBeginLaterThanFiveYears") && (
<>
>
)}
{_.has(repFormData, "developmentCarriedOutInAccordance") && (
<>
{repFormData.developmentCarriedOutInAccordance == "Yes" && (
)}
>
)}
{_.has(repFormData, "developmentNotTakePlaceBiodiversity") && (
<>
>
)}
{_.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" && (
)}
>
)}
{_.has(repFormData, "developmentAnyOtherConditions") && (
<>
{repFormData.developmentAnyOtherConditions == "Yes" && (
)}
>
)}
{_.has(repFormData, "copyOfApplicantsCertificate") && (
<>
{repFormData.copyOfApplicantsCertificate == "Yes" && (
)}
>
)}
{_.has(repFormData, "advertismentGiven") && (
<>
{repFormData.advertismentGiven == "Yes" && (
)}
>
)}
{_.has(repFormData, "copyOfLetterOfAppealNotification") && (
<>
{repFormData.copyOfLetterOfAppealNotification == "Yes" && (
)}
>
)}
{_.has(repFormData, "lpaEIAOS") && (
<>
{repFormData.lpaEIAOS == "Yes" && (
)}
>
)}
{_.has(repFormData, "advertismentConsentDiscontinuanceNotice") && (
<>
{repFormData.lpaEIAOS == "Yes" && (
)}
>
)}
{_.has(repFormData, "detailsOfOtherAppeals") && (
<>
{repFormData.detailsOfOtherAppeals == "Yes" && (
)}
>
)}
{_.has(repFormData, "detailsOfPreviousAppeals") && (
<>
{repFormData.detailsOfPreviousAppeals == "Yes" && (
)}
>
)}
{_.has(repFormData, "otherRelevantInformation") && (
<>
{repFormData.otherRelevantInformation == "Yes" && (
)}
>
)}
{_.has(repFormData, "signedDate") && (
<>
>
)}
{_.has(repFormData, "caseOfficer") && (
<>
>
)}
{_.has(repFormData, "onBehalfOfLPA") && (
<>
>
)}
>
);
};
export default RepLPAQuestionnaireCheck;