import Link from "next/link"; import { connect } from "react-redux"; import { useRouter } from "next/router"; import useTranslation from "next-translate/useTranslation"; import { Field, reduxForm } from "redux-form"; import { RenderPickList, RenderTextfield, RenderRadioList, RenderMultiline, RenderRichMultiline, RenderCondtionalRadioList, FileUploadField, } from "./representationElements"; import { getFormCollectionByID, getThumbnailIconByExtension, bytesToSize, } from "../../utils"; import { useDropzone } from "react-dropzone"; const RepAgent = (props) => { let { t } = useTranslation(); const router = useRouter(); const { locale } = router; const { formObj, appellantApplicantRepresentationArr, setRepresentationCapacity, setRepresentationSubmit, currentView, } = props; const { acceptedFiles, getRootProps, getInputProps } = useDropzone(); const files = acceptedFiles.map((file) => (
  • {file.path} - {file.size} bytes
  • )); const required = (value) => (value ? undefined : "Required"); return ( <>

    Representation from an Agent

    {/*
    */}

    You can enter your comments in the space provided or attach a separate document.

    My comments are set out in:

    Please note that all representations may be published in line with our Publishing Policy. Should your representation include any sensitive information or potentially defamatory information, it may be redacted before publishing. If it contains racist, libellous or offensive content it will be returned to you and you will be asked to provide an amended version.{" "} https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html

    {props.currentView.caseReference.hasOwnProperty( "repDetails" ) && props.currentView.caseReference.repDetails.filesList .length > 0 ? (
    {props.currentView.caseReference.repDetails.filesList.map( (blob, i) => (
    {blob.name} {blob.name} ( {bytesToSize(blob.size)})
    ) )}
    ) : ( "" )}
    {" "}
    {/* { setRepresentationSubmit(true); }} className="govuk-button" > Continue ww */} { setRepresentationCapacity(); }} className="govuk-link" > Back
    ); }; export default RepAgent;