import Link from "next/link"; import { connect } from "react-redux"; import { useRouter } from "next/router"; import useTranslation from "next-translate/useTranslation"; import { Field, reduxForm, reset } from "redux-form"; import React, { useCallback, useEffect, useMemo, useState } from "react"; import { RenderPickList, RenderTextfield, RenderRadioList, RenderMultiline, RenderRichMultiline, RenderFileUpload, FileUploadField, RepresentationGuidanceText, } from "./representationElements"; import { getFormCollectionByID, getThumbnailIconByExtension, bytesToSize, } from "../../utils"; import { useDropzone } from "react-dropzone"; // import { // setRepresentationCapacity, // setRepresentationSubmit, // } from "../../../store/currentView/action"; const RepAppellant = (props) => { let { t } = useTranslation(); const router = useRouter(); const { locale } = router; const { formObj, appellantApplicantRepresentationArr, setRepresentationCapacity, setRepresentationSubmit, currentView, } = props; const { acceptedFiles, getRootProps, getInputProps } = useDropzone(); // console.log(props); return ( <>

{t( "myrepresentations:representation-from-an-appellant-heading" )}

{typeof props.representationType == "undefined" || typeof formObj.representationForm.values .representationType == "undefined" ? ( ) : ( )}
{/*
*/} {(typeof props.representationType != "undefined" || typeof formObj.representationForm.values.representationType != "undefined") && (

{t("myrepresentations:enter-comment-label")}

{t("myrepresentations:comments-set-out-label")}:
{formObj.representationForm.values.appealType == "846040004" ? (

{t( "myrepresentations:questionnaire-publish-policy-label" )}{" "} https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html

) : (

{t( "myrepresentations:publish-policy-label" )}{" "} 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" > {t("common:continue-button")} ww */} { setRepresentationCapacity(); }} className="govuk-link" > {t("common:back-link")}
); }; export default RepAppellant;