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]; console.log(resultsObj); 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) // );