added dns pages and representation flow
This commit is contained in:
@@ -50,9 +50,15 @@ const Breadcrumbs = (props) => {
|
||||
</Link>
|
||||
</li>
|
||||
<li className="govuk-breadcrumbs__list-item">
|
||||
<Link href="/">
|
||||
<Link
|
||||
href={
|
||||
router.pathname.includes("dns") ? "/dns" : "/"
|
||||
}
|
||||
>
|
||||
<a className="govuk-breadcrumbs__link">
|
||||
{t("common:service-name")}
|
||||
{router.pathname.includes("dns")
|
||||
? "Developments of National Significance"
|
||||
: t("common:service-name")}
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
@@ -238,6 +244,46 @@ const Breadcrumbs = (props) => {
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{router.pathname == "/dns" ? (
|
||||
<>
|
||||
<li className="govuk-breadcrumbs__list-item">
|
||||
<Link href="/dns">
|
||||
<a className="govuk-breadcrumbs__link">
|
||||
Developments of National Significance
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
</>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{router.pathname == "/dns/application-process" ? (
|
||||
<>
|
||||
<li className="govuk-breadcrumbs__list-item">
|
||||
Guidance
|
||||
</li>
|
||||
</>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{router.pathname == "/dns/help" ? (
|
||||
<>
|
||||
<li className="govuk-breadcrumbs__list-item">
|
||||
Help
|
||||
</li>
|
||||
</>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{router.pathname == "/dns/contact-us" ? (
|
||||
<>
|
||||
<li className="govuk-breadcrumbs__list-item">
|
||||
Contact us
|
||||
</li>
|
||||
</>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{!_.isEmpty(slug) ? (
|
||||
<>
|
||||
<li className="govuk-breadcrumbs__list-item">
|
||||
|
||||
@@ -0,0 +1,212 @@
|
||||
import Link from "next/link";
|
||||
import { useState, useEffect } from "react";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import jsonpath from "jsonpath";
|
||||
import _ from "lodash";
|
||||
import { Field, FieldArray, reduxForm, formValueSelector } from "redux-form";
|
||||
import { connect } from "react-redux";
|
||||
import { useDropzone } from "react-dropzone";
|
||||
|
||||
import { setRepresentationCapacity } from "../../../store/currentView/action";
|
||||
import RepCapacitySelection from "./representationCapacitySelection";
|
||||
import RepDetails from "./representationDetails";
|
||||
import RepAppellant from "./representationAppellant";
|
||||
import RepAgent from "./representationAgent";
|
||||
import RepInterestedPartyPerson from "./representationInterestedPartyPerson";
|
||||
import RepLandOwner from "./representationLandowner";
|
||||
import {
|
||||
RenderPickList,
|
||||
RenderRadioList,
|
||||
RenderTextfield,
|
||||
} from "./representationElements";
|
||||
|
||||
let MakeRepresentation = (props) => {
|
||||
let { t } = useTranslation();
|
||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||
|
||||
const [clearRepForm, setClearRepForm] = useState(false);
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const {
|
||||
caseReference,
|
||||
myCases,
|
||||
myRepresentations,
|
||||
watchedCases,
|
||||
awaitingSubmission,
|
||||
searchResultsObj,
|
||||
currentType,
|
||||
currentView,
|
||||
setRepresentationCapacity,
|
||||
} = props;
|
||||
const formObj = props.props.form;
|
||||
let setCaseQueryObj = props[currentType];
|
||||
var casesObj = {};
|
||||
|
||||
currentType == "searchResultsObj"
|
||||
? (casesObj = jsonpath.query(
|
||||
setCaseQueryObj,
|
||||
'$..[?(@.title=="' + caseReference + '")]'
|
||||
))
|
||||
: (casesObj = jsonpath.query(
|
||||
setCaseQueryObj,
|
||||
'$..[?(@.reference=="' + caseReference + '")]'
|
||||
));
|
||||
|
||||
casesObj = Object.assign({}, ...casesObj);
|
||||
|
||||
const capacityOptionsArr = [
|
||||
"Appellant",
|
||||
"Agent",
|
||||
"Interested Party/Person",
|
||||
"Land Owner",
|
||||
];
|
||||
|
||||
const appellantApplicantRepresentationArr = [
|
||||
"Other",
|
||||
"Statement",
|
||||
"Statement of common ground",
|
||||
"Written statement of evidence",
|
||||
];
|
||||
|
||||
const interestedPersonRepresentationArr = [
|
||||
"Interested Party/Person correspondence",
|
||||
];
|
||||
|
||||
const landOwnerRepresentationArr = [
|
||||
"Other",
|
||||
"Statement",
|
||||
"Written statement of evidence",
|
||||
];
|
||||
|
||||
const repCapacityType = () => {
|
||||
currentView.representationCapacity == false
|
||||
? false
|
||||
: _.isEmpty(formObj["representationForm"])
|
||||
? false
|
||||
: _.isEmpty(formObj["representationForm"].values)
|
||||
? false
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"].values.representationCapacity
|
||||
)
|
||||
? setRepresentationCapacity(false)
|
||||
: setRepresentationCapacity(
|
||||
formObj["representationForm"].values.representationCapacity
|
||||
.replace(/[\s\-\+\(\)\,\/]/g, "")
|
||||
.toLowerCase()
|
||||
);
|
||||
|
||||
return currentView.representationCapacity;
|
||||
};
|
||||
|
||||
const whichControl = () => {
|
||||
repCapacityType();
|
||||
switch (currentView.representationCapacity) {
|
||||
case false:
|
||||
return (
|
||||
<RepCapacitySelection
|
||||
formObj={formObj}
|
||||
capacityOptionsArr={capacityOptionsArr}
|
||||
currentType={currentType}
|
||||
casesObj={casesObj}
|
||||
setRepresentationCapacity={setRepresentationCapacity}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "appellant":
|
||||
setRepresentationCapacity("appellant");
|
||||
return (
|
||||
<RepAppellant
|
||||
formObj={formObj}
|
||||
appellantApplicantRepresentationArr={
|
||||
appellantApplicantRepresentationArr
|
||||
}
|
||||
setRepresentationCapacity={setRepresentationCapacity}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "agent":
|
||||
setRepresentationCapacity("agent");
|
||||
return (
|
||||
<RepAgent
|
||||
formObj={formObj}
|
||||
appellantApplicantRepresentationArr={
|
||||
appellantApplicantRepresentationArr
|
||||
}
|
||||
setRepresentationCapacity={setRepresentationCapacity}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "interestedpartyperson":
|
||||
setRepresentationCapacity("interestedpartyperson");
|
||||
return (
|
||||
<RepInterestedPartyPerson
|
||||
formObj={formObj}
|
||||
interestedPersonRepresentationArr={
|
||||
interestedPersonRepresentationArr
|
||||
}
|
||||
setRepresentationCapacity={setRepresentationCapacity}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "landowner":
|
||||
setRepresentationCapacity("landowner");
|
||||
return (
|
||||
<RepLandOwner
|
||||
formObj={formObj}
|
||||
landOwnerRepresentationArr={landOwnerRepresentationArr}
|
||||
setRepresentationCapacity={setRepresentationCapacity}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
default:
|
||||
return (
|
||||
<RepCapacitySelection
|
||||
formObj={formObj}
|
||||
capacityOptionsArr={capacityOptionsArr}
|
||||
currentType={currentType}
|
||||
casesObj={casesObj}
|
||||
setRepresentationCapacity={setRepresentationCapacity}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
{whichControl()} - {props.firstValue}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
search: state.search,
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
currentView: state.currentView,
|
||||
//form: state.form,
|
||||
};
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
setRepresentationCapacity: (representationCapacity) => {
|
||||
dispatch(setRepresentationCapacity(representationCapacity));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
const selector = formValueSelector("representationForm");
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(
|
||||
reduxForm({
|
||||
form: "representationForm",
|
||||
destroyOnUnmount: false,
|
||||
})(MakeRepresentation)
|
||||
);
|
||||
@@ -1,21 +1,44 @@
|
||||
import Link from "next/link";
|
||||
import { useState, useEffect } from "react";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import jsonpath from "jsonpath";
|
||||
import _ from "lodash";
|
||||
import { Field, FieldArray, reduxForm, formValueSelector } from "redux-form";
|
||||
import {
|
||||
Field,
|
||||
FieldArray,
|
||||
reduxForm,
|
||||
formValueSelector,
|
||||
reset,
|
||||
} from "redux-form";
|
||||
import { connect } from "react-redux";
|
||||
import { useDropzone } from "react-dropzone";
|
||||
|
||||
const MakeRepresentation = (props) => {
|
||||
import {
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
setSubmitBack,
|
||||
setRepresentationSubmitConfirmation,
|
||||
} from "../../../store/currentView/action";
|
||||
import RepCapacitySelection from "./representationCapacitySelection";
|
||||
import RepDetails from "./representationDetails";
|
||||
import RepAppellant from "./representationAppellant";
|
||||
import RepAgent from "./representationAgent";
|
||||
import RepInterestedPartyPerson from "./representationInterestedPartyPerson";
|
||||
import RepLandOwner from "./representationLandowner";
|
||||
import RepCompleteSubmit from "./representationCompleteSubmit";
|
||||
|
||||
import {
|
||||
RenderPickList,
|
||||
RenderRadioList,
|
||||
RenderTextfield,
|
||||
} from "./representationElements";
|
||||
|
||||
let MakeRepresentation = (props) => {
|
||||
let { t } = useTranslation();
|
||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||
|
||||
const files = acceptedFiles.map((file) => (
|
||||
<li key={file.path}>
|
||||
{file.path} - {file.size} bytes
|
||||
</li>
|
||||
));
|
||||
const [clearRepForm, setClearRepForm] = useState(false);
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
@@ -27,6 +50,12 @@ const MakeRepresentation = (props) => {
|
||||
awaitingSubmission,
|
||||
searchResultsObj,
|
||||
currentType,
|
||||
currentView,
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
setSubmitBack,
|
||||
handleSubmit,
|
||||
setRepresentationSubmitConfirmation,
|
||||
} = props;
|
||||
const formObj = props.props.form;
|
||||
let setCaseQueryObj = props[currentType];
|
||||
@@ -44,404 +73,186 @@ const MakeRepresentation = (props) => {
|
||||
|
||||
casesObj = Object.assign({}, ...casesObj);
|
||||
|
||||
const RenderRepresentationCapacity = ({
|
||||
datafieldname,
|
||||
name,
|
||||
label,
|
||||
id,
|
||||
errorMsg,
|
||||
options,
|
||||
input: { onChange, value },
|
||||
meta: { touched, error },
|
||||
...custom
|
||||
}) => {
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className={
|
||||
touched && error
|
||||
? "govuk-form-group govuk-form-group--error"
|
||||
: "govuk-form-group "
|
||||
}
|
||||
>
|
||||
<fieldset
|
||||
className="govuk-fieldset"
|
||||
aria-describedby={name + "-hint"}
|
||||
>
|
||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--s govuk-!-font-weight-regular">
|
||||
<label
|
||||
className="govuk-fieldset__heading govuk-body-m"
|
||||
id={id + "_label"}
|
||||
>
|
||||
{label}
|
||||
</label>
|
||||
</legend>
|
||||
{touched && error && (
|
||||
<span
|
||||
id={id + "-error"}
|
||||
className="govuk-error-message"
|
||||
>
|
||||
<span className="govuk-visually-hidden">
|
||||
Error:
|
||||
</span>{" "}
|
||||
{errorMsg}
|
||||
</span>
|
||||
)}
|
||||
<div className="govuk-radios govuk-radios--small">
|
||||
{Object.keys(options).map((key, index) => (
|
||||
<div
|
||||
className="govuk-radios__item"
|
||||
data-children-count={key}
|
||||
key={key}
|
||||
>
|
||||
<Field
|
||||
id={id + "_" + index}
|
||||
name={id}
|
||||
component="input"
|
||||
type="radio"
|
||||
className="govuk-radios__input"
|
||||
value={options[key]}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-radios__label"
|
||||
htmlFor={id + "_" + index}
|
||||
>
|
||||
{options[key]}
|
||||
</label>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
const { name, label } = props;
|
||||
const capacityOptionsArr = [
|
||||
"Appellant",
|
||||
"Agent",
|
||||
"Interested Party / Person",
|
||||
"Interested Party/Person",
|
||||
"Land Owner",
|
||||
];
|
||||
const required = (value) => (value ? undefined : "Required");
|
||||
|
||||
const RenderPickList = ({
|
||||
datafieldname,
|
||||
name,
|
||||
label,
|
||||
input,
|
||||
meta: { touched, errorStr },
|
||||
}) => {
|
||||
const dropdownObj = ["Final Comments", "Other", "Proof of Evidence"];
|
||||
const appellantApplicantRepresentationArr = [
|
||||
"Other",
|
||||
"Statement",
|
||||
"Statement of common ground",
|
||||
"Written statement of evidence",
|
||||
];
|
||||
|
||||
return (
|
||||
<div>
|
||||
<select
|
||||
{...input}
|
||||
className="govuk-select "
|
||||
id={name}
|
||||
name={name}
|
||||
>
|
||||
<option>Select...</option>
|
||||
{Object.keys(dropdownObj).map((key, index) => {
|
||||
return (
|
||||
<option key={key} value={dropdownObj[key]}>
|
||||
{dropdownObj[key]}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
</select>
|
||||
const interestedPersonRepresentationArr = [
|
||||
"Interested Party/Person correspondence",
|
||||
];
|
||||
|
||||
{touched && errorStr && <span>{errorStr}</span>}
|
||||
</div>
|
||||
);
|
||||
const landOwnerRepresentationArr = [
|
||||
"Other",
|
||||
"Statement",
|
||||
"Written statement of evidence",
|
||||
];
|
||||
|
||||
const repCapacityType = () => {
|
||||
return _.isEmpty(formObj["representationForm"])
|
||||
? false
|
||||
: _.isEmpty(formObj["representationForm"].values)
|
||||
? false
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"].values.representationCapacity
|
||||
)
|
||||
? false
|
||||
: formObj["representationForm"].values.representationCapacity
|
||||
.replace(/[\s\-\+\(\)\,\/]/g, "")
|
||||
.toLowerCase();
|
||||
};
|
||||
|
||||
const RenderTextfield = ({
|
||||
id,
|
||||
rows,
|
||||
datafieldname,
|
||||
name,
|
||||
label,
|
||||
input,
|
||||
errorMsg,
|
||||
type,
|
||||
className,
|
||||
meta: { touched, error },
|
||||
...custom
|
||||
}) => {
|
||||
return (
|
||||
<>
|
||||
<label className="govuk-label " htmlFor={id} id={id + "_label"}>
|
||||
{label}
|
||||
</label>
|
||||
{touched && error && (
|
||||
<span id={id + "-error"} className="govuk-error-message">
|
||||
<span className="govuk-visually-hidden">Error:</span>{" "}
|
||||
{errorMsg}
|
||||
</span>
|
||||
)}
|
||||
<input
|
||||
{...input}
|
||||
className={className}
|
||||
name={name}
|
||||
id={id}
|
||||
type={type}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
const whichControl = () => {
|
||||
switch (currentView.representationCapacity) {
|
||||
case false:
|
||||
return (
|
||||
<RepCapacitySelection
|
||||
formObj={formObj}
|
||||
capacityOptionsArr={capacityOptionsArr}
|
||||
currentType={currentType}
|
||||
casesObj={casesObj}
|
||||
setRepresentationCapacity={setRepresentationCapacity}
|
||||
setRepresentationSubmit={setRepresentationSubmit}
|
||||
onHandleSubmit={onHandleSubmit}
|
||||
currentView={currentView}
|
||||
setSubmitBack={setSubmitBack}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "appellant":
|
||||
//setRepresentationCapacity("appellant");
|
||||
return (
|
||||
<RepAppellant
|
||||
formObj={formObj}
|
||||
appellantApplicantRepresentationArr={
|
||||
appellantApplicantRepresentationArr
|
||||
}
|
||||
setRepresentationCapacity={setRepresentationCapacity}
|
||||
setRepresentationSubmit={setRepresentationSubmit}
|
||||
onHandleSubmit={onHandleSubmit}
|
||||
currentView={currentView}
|
||||
setSubmitBack={setSubmitBack}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "agent":
|
||||
//setRepresentationCapacity("agent");
|
||||
return (
|
||||
<RepAgent
|
||||
formObj={formObj}
|
||||
appellantApplicantRepresentationArr={
|
||||
appellantApplicantRepresentationArr
|
||||
}
|
||||
setRepresentationCapacity={setRepresentationCapacity}
|
||||
setRepresentationSubmit={setRepresentationSubmit}
|
||||
onHandleSubmit={onHandleSubmit}
|
||||
currentView={currentView}
|
||||
setSubmitBack={setSubmitBack}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "interestedpartyperson":
|
||||
// setRepresentationCapacity("interestedpartyperson");
|
||||
return (
|
||||
<RepInterestedPartyPerson
|
||||
formObj={formObj}
|
||||
interestedPersonRepresentationArr={
|
||||
interestedPersonRepresentationArr
|
||||
}
|
||||
setRepresentationCapacity={setRepresentationCapacity}
|
||||
setRepresentationSubmit={setRepresentationSubmit}
|
||||
onHandleSubmit={onHandleSubmit}
|
||||
currentView={currentView}
|
||||
setSubmitBack={setSubmitBack}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "landowner":
|
||||
//setRepresentationCapacity("landowner");
|
||||
return (
|
||||
<RepLandOwner
|
||||
formObj={formObj}
|
||||
landOwnerRepresentationArr={landOwnerRepresentationArr}
|
||||
setRepresentationCapacity={setRepresentationCapacity}
|
||||
onHandleSubmit={onHandleSubmit}
|
||||
setRepresentationSubmit={setRepresentationSubmit}
|
||||
currentView={currentView}
|
||||
setSubmitBack={setSubmitBack}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
default:
|
||||
return (
|
||||
<RepCapacitySelection
|
||||
formObj={formObj}
|
||||
capacityOptionsArr={capacityOptionsArr}
|
||||
currentType={currentType}
|
||||
casesObj={casesObj}
|
||||
setRepresentationCapacity={setRepresentationCapacity}
|
||||
setRepresentationSubmit={setRepresentationSubmit}
|
||||
currentView={currentView}
|
||||
setSubmitBack={setSubmitBack}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const onHandleSubmit = (values) => {
|
||||
console.log(
|
||||
values.representationCapacity,
|
||||
currentView.representationCapacity
|
||||
);
|
||||
|
||||
// console.log(_.isEmpty(currentView.representationCapacity));
|
||||
// console.log(
|
||||
// values.representationCapacity
|
||||
// .replace(/[\s\-\+\(\)\,\/]/g, "")
|
||||
// .toLowerCase() == currentView.representationCapacity
|
||||
// );
|
||||
|
||||
_.isEmpty(currentView.representationCapacity)
|
||||
? setRepresentationCapacity(
|
||||
values.representationCapacity
|
||||
.replace(/[\s\-\+\(\)\,\/]/g, "")
|
||||
.toLowerCase()
|
||||
)
|
||||
: setRepresentationSubmit(true);
|
||||
};
|
||||
|
||||
const repForm = props.props.form;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<h1 className="govuk-heading-xl govuk-!-margin-bottom-7">
|
||||
Make a representation
|
||||
</h1>
|
||||
{repForm["representationForm.submitSucceeded"] == true ? (
|
||||
<RepCompleteSubmit
|
||||
formObj={formObj}
|
||||
capacityOptionsArr={capacityOptionsArr}
|
||||
currentType={currentType}
|
||||
casesObj={casesObj}
|
||||
setRepresentationCapacity={setRepresentationCapacity}
|
||||
setRepresentationSubmit={setRepresentationSubmit}
|
||||
currentView={currentView}
|
||||
setSubmitBack={setSubmitBack}
|
||||
setRepresentationSubmitConfirmation={
|
||||
setRepresentationSubmitConfirmation
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
<form onSubmit={handleSubmit(onHandleSubmit)}>
|
||||
{whichControl()}
|
||||
</form>
|
||||
)}
|
||||
|
||||
<dl className="govuk-summary-list govuk-!-margin-bottom-9">
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
Appeal Reference
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{currentType == "searchResultsObj"
|
||||
? casesObj.title
|
||||
: casesObj.reference}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-applicant-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{casesObj.appellantApplicant || ""}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-agent-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
Mr A Agent
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-site-address-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{casesObj.address1 || ""}
|
||||
<br />
|
||||
{casesObj.town || ""}
|
||||
|
||||
<br />
|
||||
{casesObj.postcode || ""}
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div className="vo_hidden">
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<h2 className="govuk-heading-m ">Your details</h2>
|
||||
<Field
|
||||
name="representationCapacity"
|
||||
datafieldname="representationCapacity"
|
||||
label="In what capacity do you wish to make representations on this case?"
|
||||
options={capacityOptionsArr}
|
||||
id="representationCapacity"
|
||||
className="govuk-radios__input"
|
||||
//validate={[required]}
|
||||
errorMsg="Select and option"
|
||||
component={RenderRepresentationCapacity}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-button-group">
|
||||
<Link href="/representation">
|
||||
<a className="govuk-button">Continue</a>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<h2 className="govuk-heading-m ">Representation</h2>
|
||||
|
||||
<div className="govuk-form-group">
|
||||
<label
|
||||
className="govuk-label govuk-body-m"
|
||||
htmlFor="representationType"
|
||||
>
|
||||
What kind of representation are you making?
|
||||
</label>
|
||||
<Field
|
||||
name="representationType"
|
||||
component={RenderPickList}
|
||||
datafieldname="representationType"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-form-group">
|
||||
<p className="govuk-body">
|
||||
You can enter your comments in the space
|
||||
provided or attach a separate document.
|
||||
</p>
|
||||
<fieldset
|
||||
className="govuk-fieldset"
|
||||
aria-describedby="commentBox-hint"
|
||||
>
|
||||
<div
|
||||
id="commentBox-hint"
|
||||
className="govuk-hint"
|
||||
>
|
||||
My comments are set out in:*
|
||||
</div>
|
||||
<div
|
||||
className="govuk-checkboxes"
|
||||
data-module="govuk-checkboxes"
|
||||
>
|
||||
<div className="govuk-checkboxes__item">
|
||||
<Field
|
||||
className="govuk-checkboxes__input"
|
||||
id="commentBox"
|
||||
name="commentBox"
|
||||
value="email"
|
||||
data-aria-controls="commentBox"
|
||||
type="checkbox"
|
||||
component={RenderTextfield}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-checkboxes__label"
|
||||
htmlFor="commentBox"
|
||||
>
|
||||
the box below{" "}
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
_.isEmpty(
|
||||
formObj["representationForm"]
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
||||
: _.isEmpty(
|
||||
formObj[
|
||||
"representationForm"
|
||||
].values
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden q11 "
|
||||
: _.isEmpty(
|
||||
formObj[
|
||||
"representationForm"
|
||||
].values.commentBox
|
||||
)
|
||||
? formObj["representationForm"]
|
||||
.values.commentBox ==
|
||||
false
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: "govuk-checkboxes__conditional"
|
||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden wwwaqqqq"
|
||||
}
|
||||
id="conditional-commentBox"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<textarea
|
||||
className="govuk-input govuk-!-width-two-thirds"
|
||||
rows="5"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-checkboxes__item">
|
||||
<Field
|
||||
className="govuk-checkboxes__input"
|
||||
id="documentBox"
|
||||
name="documentBox"
|
||||
value="email"
|
||||
data-aria-controls="documentBox"
|
||||
type="checkbox"
|
||||
component={RenderTextfield}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-checkboxes__label"
|
||||
htmlFfor="documentBox"
|
||||
>
|
||||
separate documents
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
_.isEmpty(
|
||||
formObj["representationForm"]
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
||||
: _.isEmpty(
|
||||
formObj[
|
||||
"representationForm"
|
||||
].values
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: _.isEmpty(
|
||||
formObj[
|
||||
"representationForm"
|
||||
].values.documentBox
|
||||
)
|
||||
? formObj["representationForm"]
|
||||
.values.documentBox ==
|
||||
false
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: "govuk-checkboxes__conditional"
|
||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden"
|
||||
}
|
||||
id="conditional-documentBox"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<section className="container">
|
||||
<div
|
||||
{...getRootProps({
|
||||
className: "dropzone",
|
||||
})}
|
||||
>
|
||||
<input
|
||||
{...getInputProps()}
|
||||
/>
|
||||
<p>
|
||||
Drag and drop files here
|
||||
or click to select files
|
||||
</p>
|
||||
</div>
|
||||
<aside>
|
||||
<h4>Files</h4>
|
||||
<ul>{files}</ul>
|
||||
</aside>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>{" "}
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-button-group">
|
||||
<Link href="/representation">
|
||||
<a className="govuk-button">Continue</a>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{console.log("is submitted", currentView.representationSubmit)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -452,12 +263,27 @@ const mapStateToProps = (state) => {
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
currentView: state.currentView,
|
||||
//form: state.form,
|
||||
};
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {};
|
||||
return {
|
||||
setRepresentationCapacity: (representationCapacity) => {
|
||||
dispatch(setRepresentationCapacity(representationCapacity));
|
||||
dispatch(reset("representationForm"));
|
||||
},
|
||||
setRepresentationSubmit: (representationSubmit) => {
|
||||
dispatch(setRepresentationSubmit(representationSubmit));
|
||||
},
|
||||
setSubmitBack: () => {
|
||||
dispatch(setRepresentationSubmit(false));
|
||||
},
|
||||
setRepresentationSubmitConfirmation: () => {
|
||||
dispatch(setRepresentationSubmitConfirmation(true));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
const selector = formValueSelector("representationForm");
|
||||
|
||||
@@ -0,0 +1,235 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { Field, reduxForm } from "redux-form";
|
||||
import {
|
||||
RenderPickList,
|
||||
RenderTextfield,
|
||||
RenderRadioList,
|
||||
RenderMultiline,
|
||||
} from "./representationElements";
|
||||
import {
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
} from "../../../store/currentView/action";
|
||||
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) => (
|
||||
<li key={file.path}>
|
||||
{file.path} - {file.size} bytes
|
||||
</li>
|
||||
));
|
||||
|
||||
return (
|
||||
<div id="rep-appellant">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-grid-row">
|
||||
<h2 className="govuk-heading-m ">Representation - agent</h2>
|
||||
|
||||
<div className="govuk-form-group">
|
||||
<label
|
||||
className="govuk-label govuk-body-m"
|
||||
htmlFor="representationType"
|
||||
>
|
||||
What kind of representation are you making?
|
||||
</label>
|
||||
<Field
|
||||
name="representationType"
|
||||
component={RenderPickList}
|
||||
datafieldname="representationType"
|
||||
optionsArr={appellantApplicantRepresentationArr}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
className="govuk-input govuk-!-width-three-quarters"
|
||||
id="representationDescription"
|
||||
name="representationDescription"
|
||||
value="email"
|
||||
data-aria-controls="representationDescription"
|
||||
type="text"
|
||||
component={RenderTextfield}
|
||||
label="Description of representation"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<p className="govuk-body">
|
||||
You can enter your comments in the space provided or
|
||||
attach a separate document.
|
||||
</p>
|
||||
<fieldset
|
||||
className="govuk-fieldset"
|
||||
aria-describedby="commentBox-hint"
|
||||
>
|
||||
<div id="commentBox-hint" className="govuk-hint">
|
||||
My comments are set out in:*
|
||||
</div>
|
||||
<div
|
||||
className="govuk-checkboxes"
|
||||
data-module="govuk-checkboxes"
|
||||
>
|
||||
<div className="govuk-checkboxes__item">
|
||||
<Field
|
||||
className="govuk-checkboxes__input"
|
||||
id="commentBox"
|
||||
name="commentBox"
|
||||
value="email"
|
||||
data-aria-controls="commentBox"
|
||||
type="checkbox"
|
||||
component={RenderTextfield}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-checkboxes__label"
|
||||
htmlFor="commentBox"
|
||||
>
|
||||
the box below{" "}
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
_.isEmpty(formObj["representationForm"])
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden q11 "
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values.commentBox
|
||||
)
|
||||
? formObj["representationForm"]
|
||||
.values.commentBox == false
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: "govuk-checkboxes__conditional"
|
||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden wwwaqqqq"
|
||||
}
|
||||
id="conditional-commentBox"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationComments"
|
||||
id="representationComments"
|
||||
component={RenderMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={
|
||||
props.name + "-hint"
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-checkboxes__item">
|
||||
<Field
|
||||
className="govuk-checkboxes__input"
|
||||
id="documentBox"
|
||||
name="documentBox"
|
||||
value="email"
|
||||
data-aria-controls="documentBox"
|
||||
type="checkbox"
|
||||
component={RenderTextfield}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-checkboxes__label"
|
||||
htmlFor="documentBox"
|
||||
>
|
||||
separate documents
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
_.isEmpty(formObj["representationForm"])
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values.documentBox
|
||||
)
|
||||
? formObj["representationForm"]
|
||||
.values.documentBox == false
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: "govuk-checkboxes__conditional"
|
||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden"
|
||||
}
|
||||
id="conditional-documentBox"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<section className="container">
|
||||
<div
|
||||
{...getRootProps({
|
||||
className: "dropzone",
|
||||
})}
|
||||
>
|
||||
<input {...getInputProps()} />
|
||||
<p>
|
||||
Drag and drop files here or
|
||||
click to select files
|
||||
</p>
|
||||
</div>
|
||||
<aside>
|
||||
<h4>Files</h4>
|
||||
<ul>{files}</ul>
|
||||
</aside>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>{" "}
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-button-group">
|
||||
<button
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
Continue
|
||||
</button>
|
||||
{/* <a
|
||||
onClick={() => {
|
||||
setRepresentationSubmit(false);
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
Continue
|
||||
</a> */}
|
||||
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationCapacity("false");
|
||||
}}
|
||||
className="govuk-link"
|
||||
>
|
||||
Back
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default RepAgent;
|
||||
@@ -0,0 +1,238 @@
|
||||
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 {
|
||||
RenderPickList,
|
||||
RenderTextfield,
|
||||
RenderRadioList,
|
||||
RenderMultiline,
|
||||
} from "./representationElements";
|
||||
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();
|
||||
const files = acceptedFiles.map((file) => (
|
||||
<li key={file.path}>
|
||||
{file.path} - {file.size} bytes
|
||||
</li>
|
||||
));
|
||||
|
||||
return (
|
||||
<div id="rep-appellant">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-grid-row">
|
||||
<h2 className="govuk-heading-m ">
|
||||
Representation - appellantApplicant
|
||||
</h2>
|
||||
|
||||
<div className="govuk-form-group">
|
||||
<label
|
||||
className="govuk-label govuk-body-m"
|
||||
htmlFor="representationType"
|
||||
>
|
||||
What kind of representation are you making?
|
||||
</label>
|
||||
<Field
|
||||
name="representationType"
|
||||
component={RenderPickList}
|
||||
datafieldname="representationType"
|
||||
optionsArr={appellantApplicantRepresentationArr}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
className="govuk-input govuk-!-width-three-quarters"
|
||||
id="representationDescription"
|
||||
name="representationDescription"
|
||||
value="email"
|
||||
data-aria-controls="representationDescription"
|
||||
type="text"
|
||||
component={RenderTextfield}
|
||||
label="Description of representation"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<p className="govuk-body">
|
||||
You can enter your comments in the space provided or
|
||||
attach a separate document.
|
||||
</p>
|
||||
<fieldset
|
||||
className="govuk-fieldset"
|
||||
aria-describedby="commentBox-hint"
|
||||
>
|
||||
<div id="commentBox-hint" className="govuk-hint">
|
||||
My comments are set out in:*
|
||||
</div>
|
||||
<div
|
||||
className="govuk-checkboxes"
|
||||
data-module="govuk-checkboxes"
|
||||
>
|
||||
<div className="govuk-checkboxes__item">
|
||||
<Field
|
||||
className="govuk-checkboxes__input"
|
||||
id="commentBox"
|
||||
name="commentBox"
|
||||
value="email"
|
||||
data-aria-controls="commentBox"
|
||||
type="checkbox"
|
||||
component={RenderTextfield}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-checkboxes__label"
|
||||
htmlFor="commentBox"
|
||||
>
|
||||
the box below{" "}
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
_.isEmpty(formObj["representationForm"])
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden q11 "
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values.commentBox
|
||||
)
|
||||
? formObj["representationForm"]
|
||||
.values.commentBox == false
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: "govuk-checkboxes__conditional"
|
||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden wwwaqqqq"
|
||||
}
|
||||
id="conditional-commentBox"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationComments"
|
||||
id="representationComments"
|
||||
component={RenderMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={
|
||||
props.name + "-hint"
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-checkboxes__item">
|
||||
<Field
|
||||
className="govuk-checkboxes__input"
|
||||
id="documentBox"
|
||||
name="documentBox"
|
||||
value="email"
|
||||
data-aria-controls="documentBox"
|
||||
type="checkbox"
|
||||
component={RenderTextfield}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-checkboxes__label"
|
||||
htmlFor="documentBox"
|
||||
>
|
||||
separate documents
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
_.isEmpty(formObj["representationForm"])
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values.documentBox
|
||||
)
|
||||
? formObj["representationForm"]
|
||||
.values.documentBox == false
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: "govuk-checkboxes__conditional"
|
||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden"
|
||||
}
|
||||
id="conditional-documentBox"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<section className="container">
|
||||
<div
|
||||
{...getRootProps({
|
||||
className: "dropzone",
|
||||
})}
|
||||
>
|
||||
<input {...getInputProps()} />
|
||||
<p>
|
||||
Drag and drop files here or
|
||||
click to select files
|
||||
</p>
|
||||
</div>
|
||||
<aside>
|
||||
<h4>Files</h4>
|
||||
<ul>{files}</ul>
|
||||
</aside>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>{" "}
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-button-group">
|
||||
{currentView.representationCapacity}
|
||||
<button
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
Continue
|
||||
</button>
|
||||
{/* <a
|
||||
onClick={() => {
|
||||
setRepresentationSubmit(false);
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
Continue
|
||||
</a> */}
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationCapacity(false);
|
||||
}}
|
||||
className="govuk-link"
|
||||
>
|
||||
Back
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default RepAppellant;
|
||||
@@ -0,0 +1,88 @@
|
||||
import Link from "next/link";
|
||||
import { connect } from "react-redux";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import {
|
||||
Field,
|
||||
reduxForm,
|
||||
formValueSelector,
|
||||
handleSubmit,
|
||||
reset,
|
||||
} from "redux-form";
|
||||
import {
|
||||
RenderPickList,
|
||||
RenderTextfield,
|
||||
RenderRadioList,
|
||||
RenderMultiline,
|
||||
} from "./representationElements";
|
||||
import { useDropzone } from "react-dropzone";
|
||||
import RepDetails from "./representationDetails";
|
||||
import { setRepresentationCapacity } from "../../../store/currentView/action";
|
||||
|
||||
let RepCapacitySelection = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const {
|
||||
formObj,
|
||||
capacityOptionsArr,
|
||||
currentType,
|
||||
casesObj,
|
||||
validate,
|
||||
handleSubmit,
|
||||
} = props;
|
||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||
const files = acceptedFiles.map((file) => (
|
||||
<li key={file.path}>
|
||||
{file.path} - {file.size} bytes
|
||||
</li>
|
||||
));
|
||||
|
||||
const required = (value) => (value ? undefined : "Required");
|
||||
|
||||
return (
|
||||
<>
|
||||
<RepDetails
|
||||
formObj={formObj}
|
||||
currentType={currentType}
|
||||
casesObj={casesObj}
|
||||
/>{" "}
|
||||
<div id="rep-details" className="vo_hiddens">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-grid-row">
|
||||
<h2 className="govuk-heading-m ">
|
||||
Your details - {props.firstValue}
|
||||
</h2>
|
||||
<Field
|
||||
name="representationCapacity"
|
||||
datafieldname="representationCapacity"
|
||||
label="In what capacity do you wish to make representations on this case?"
|
||||
options={capacityOptionsArr}
|
||||
id="representationCapacity"
|
||||
className="govuk-radios__input"
|
||||
errorMsg="Select an option"
|
||||
component={RenderRadioList}
|
||||
validate={[required]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-button-group">
|
||||
<button
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
Continue
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default RepCapacitySelection;
|
||||
@@ -0,0 +1,76 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { Field, reduxForm } from "redux-form";
|
||||
import {
|
||||
RenderPickList,
|
||||
RenderTextfield,
|
||||
RenderRadioList,
|
||||
RenderMultiline,
|
||||
} from "./representationElements";
|
||||
import {
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
setSubmitBack,
|
||||
} from "../../../store/currentView/action";
|
||||
import { useDropzone } from "react-dropzone";
|
||||
|
||||
const RepComplete = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const {
|
||||
formObj,
|
||||
appellantApplicantRepresentationArr,
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
currentView,
|
||||
setSubmitBack,
|
||||
setRepresentationSubmitConfirmation,
|
||||
} = props;
|
||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||
const files = acceptedFiles.map((file) => (
|
||||
<li key={file.path}>
|
||||
{file.path} - {file.size} bytes
|
||||
</li>
|
||||
));
|
||||
|
||||
return (
|
||||
<div id="rep-appellant">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-grid-row">
|
||||
<h2 className="govuk-heading-m ">
|
||||
Submission of Representation
|
||||
</h2>
|
||||
<p>
|
||||
Thank you for submitting your representation(s) using
|
||||
the Appeals Casework Portal.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Please remember that any supporting documentation needs
|
||||
to be received by us within the appropriate deadline for
|
||||
the case. Anything you send to us must be clearly marked
|
||||
with the case reference number and the site address
|
||||
(including the postcode, where known).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
You will shortly receive confirmation to the email
|
||||
address you have provided.
|
||||
</p>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-button-group">
|
||||
<Link href="/myportal">
|
||||
<a className="govuk-button">Continue</a>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default RepComplete;
|
||||
@@ -0,0 +1,122 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { Field, reduxForm } from "redux-form";
|
||||
import {
|
||||
RenderPickList,
|
||||
RenderTextfield,
|
||||
RenderRadioList,
|
||||
RenderMultiline,
|
||||
} from "./representationElements";
|
||||
import {
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
setSubmitBack,
|
||||
setRepresentationSubmitConfirmation,
|
||||
} from "../../../store/currentView/action";
|
||||
import { useDropzone } from "react-dropzone";
|
||||
import RepComplete from "./representationComplete";
|
||||
|
||||
const RepCompleteSubmit = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const {
|
||||
formObj,
|
||||
appellantApplicantRepresentationArr,
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
currentView,
|
||||
setSubmitBack,
|
||||
setRepresentationSubmitConfirmation,
|
||||
} = props;
|
||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||
const files = acceptedFiles.map((file) => (
|
||||
<li key={file.path}>
|
||||
{file.path} - {file.size} bytes
|
||||
</li>
|
||||
));
|
||||
|
||||
return (
|
||||
<>
|
||||
{currentView.representationSubmitConfirmation == true ? (
|
||||
<RepComplete />
|
||||
) : (
|
||||
<div id="rep-appellant">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-grid-row">
|
||||
<h2 className="govuk-heading-m ">Submit</h2>
|
||||
<p>
|
||||
The gathering and subsequent processing of the
|
||||
personal data supplied by you in this form, is
|
||||
in accordance with the terms of our registration
|
||||
under the Data Protection Act 2018.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The Planning Inspectorate takes its data
|
||||
protection responsibilities for the information
|
||||
you provide us with very seriously. To find out
|
||||
more about how we use and manage your personal
|
||||
data, please go to our privacy notice.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
I confirm that all sections of this form have
|
||||
been fully completed and that the details are
|
||||
correct to the best of my knowledge.
|
||||
</p>
|
||||
|
||||
<div className="govuk-form-group">
|
||||
<label
|
||||
className="govuk-label govuk-body-m"
|
||||
htmlFor="representationType"
|
||||
>
|
||||
I confirm I have read the above.
|
||||
</label>
|
||||
{/* <Field
|
||||
name="representationType"
|
||||
component={RenderPickList}
|
||||
datafieldname="representationType"
|
||||
optionsArr={appellantApplicantRepresentationArr}
|
||||
/> */}
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-button-group">
|
||||
<button
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
onClick={() =>
|
||||
setRepresentationSubmitConfirmation()
|
||||
}
|
||||
>
|
||||
Continue
|
||||
</button>
|
||||
{/* <a
|
||||
onClick={() => {
|
||||
setRepresentationSubmit(false);
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
Continue
|
||||
</a> */}
|
||||
|
||||
<a
|
||||
onClick={() => setSubmitBack()}
|
||||
className="govuk-link"
|
||||
>
|
||||
Back
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default RepCompleteSubmit;
|
||||
@@ -0,0 +1,84 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { Field, reduxForm } from "redux-form";
|
||||
import { RenderPickList, RenderTextfield } from "./representationElements";
|
||||
|
||||
const RepDetails = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
|
||||
const { currentType, casesObj } = props;
|
||||
|
||||
return (
|
||||
<>
|
||||
{" "}
|
||||
<div className="govuk-grid-column-full">
|
||||
<div id="rep-sumamry" className="govuk-grid-row">
|
||||
<h1 className="govuk-heading-xl govuk-!-margin-bottom-7">
|
||||
Make a representation
|
||||
</h1>
|
||||
|
||||
<dl className="govuk-summary-list govuk-!-margin-bottom-9">
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
Appeal Reference
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{currentType == "searchResultsObj"
|
||||
? casesObj.title
|
||||
: casesObj.reference}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-applicant-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{casesObj.appellantApplicant || ""}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-agent-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
Mr A Agent
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-site-address-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{casesObj.address1 || ""}
|
||||
<br />
|
||||
{casesObj.town || ""}
|
||||
|
||||
<br />
|
||||
{casesObj.postcode || ""}
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<p className="govuk-body">
|
||||
This form enables you to submit comments on a case to
|
||||
The Planning Inspectorate.{" "}
|
||||
</p>
|
||||
<p className="govuk-body">
|
||||
Please note that comments from interested parties need
|
||||
to be made within the timetable. This can be found on
|
||||
the previous ‘Case Summary‘ page. Comments
|
||||
submitted after this date may be considered invalid and
|
||||
returned to the sender.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default RepDetails;
|
||||
@@ -0,0 +1,194 @@
|
||||
import { Field, reduxForm } from "redux-form";
|
||||
import router from "next/router";
|
||||
import React, { useState } from "react";
|
||||
|
||||
export const RenderRadioList = ({
|
||||
datafieldname,
|
||||
name,
|
||||
label,
|
||||
id,
|
||||
errorMsg,
|
||||
options,
|
||||
input: { onChange, value },
|
||||
meta: { touched, error },
|
||||
...custom
|
||||
}) => {
|
||||
const required = (value) => (value ? undefined : "Required");
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className={
|
||||
touched && error
|
||||
? "govuk-form-group govuk-form-group--error"
|
||||
: "govuk-form-group "
|
||||
}
|
||||
>
|
||||
<fieldset
|
||||
className="govuk-fieldset"
|
||||
aria-describedby={name + "-hint"}
|
||||
>
|
||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--s govuk-!-font-weight-regular">
|
||||
<label
|
||||
className="govuk-fieldset__heading govuk-body-m"
|
||||
id={id + "_label"}
|
||||
>
|
||||
{label}
|
||||
</label>
|
||||
</legend>
|
||||
{touched && error && (
|
||||
<span
|
||||
id={id + "-error"}
|
||||
className="govuk-error-message"
|
||||
>
|
||||
<span className="govuk-visually-hidden">
|
||||
Error:
|
||||
</span>{" "}
|
||||
{errorMsg}
|
||||
</span>
|
||||
)}
|
||||
<div className="govuk-radios govuk-radios--small">
|
||||
{Object.keys(options).map((key, index) => (
|
||||
<div
|
||||
className="govuk-radios__item"
|
||||
data-children-count={key}
|
||||
key={key}
|
||||
>
|
||||
<Field
|
||||
id={id + "_" + index}
|
||||
name={id}
|
||||
component="input"
|
||||
type="radio"
|
||||
className="govuk-radios__input"
|
||||
value={options[key]}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-radios__label"
|
||||
htmlFor={id + "_" + index}
|
||||
>
|
||||
{options[key]}
|
||||
</label>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export const RenderPickList = ({
|
||||
datafieldname,
|
||||
name,
|
||||
label,
|
||||
input,
|
||||
optionsArr,
|
||||
meta: { touched, errorStr },
|
||||
}) => {
|
||||
return (
|
||||
<div>
|
||||
<select {...input} className="govuk-select " id={name} name={name}>
|
||||
<option>Select...</option>
|
||||
{Object.keys(optionsArr).map((key, index) => {
|
||||
return (
|
||||
<option key={key} value={optionsArr[key]}>
|
||||
{optionsArr[key]}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
</select>
|
||||
|
||||
{touched && errorStr && <span>{errorStr}</span>}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export const RenderTextfield = ({
|
||||
id,
|
||||
rows,
|
||||
datafieldname,
|
||||
name,
|
||||
label,
|
||||
input,
|
||||
errorMsg,
|
||||
type,
|
||||
className,
|
||||
meta: { touched, error },
|
||||
...custom
|
||||
}) => {
|
||||
return (
|
||||
<>
|
||||
<label className="govuk-label " htmlFor={id} id={id + "_label"}>
|
||||
{label}
|
||||
</label>
|
||||
{touched && error && (
|
||||
<span id={id + "-error"} className="govuk-error-message">
|
||||
<span className="govuk-visually-hidden">Error:</span>{" "}
|
||||
{errorMsg}
|
||||
</span>
|
||||
)}
|
||||
<input
|
||||
{...input}
|
||||
className={className}
|
||||
name={name}
|
||||
id={id}
|
||||
type={type}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export const RenderMultiline = ({
|
||||
id,
|
||||
className,
|
||||
rows,
|
||||
datafieldname,
|
||||
name,
|
||||
label,
|
||||
input,
|
||||
meta: { touched, error },
|
||||
...custom
|
||||
}) => {
|
||||
return (
|
||||
<>
|
||||
<textarea
|
||||
{...input}
|
||||
id={id}
|
||||
name={name}
|
||||
rows={rows}
|
||||
className={className}
|
||||
></textarea>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export function MultiLinefield(props) {
|
||||
const { name, label } = props;
|
||||
|
||||
return (
|
||||
<div className="govuk-form-group">
|
||||
<h1 className="govuk-label-wrapper">
|
||||
<label className="govuk-label" htmlFor={props.name}>
|
||||
{props.label}
|
||||
</label>
|
||||
</h1>
|
||||
<div
|
||||
id={props.name + "-hint"}
|
||||
className="govuk-hint govuk-!-font-size-14"
|
||||
>
|
||||
Do not include personal or financial information, like your
|
||||
National Insurance number or credit card details.
|
||||
</div>
|
||||
|
||||
<Field
|
||||
name={props.name}
|
||||
id={props.name}
|
||||
component={RenderMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={props.name + "-hint"}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,323 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { Field, reduxForm } from "redux-form";
|
||||
import {
|
||||
RenderPickList,
|
||||
RenderTextfield,
|
||||
RenderRadioList,
|
||||
RenderMultiline,
|
||||
} from "./representationElements";
|
||||
import { useDropzone } from "react-dropzone";
|
||||
|
||||
const RepInterestedPartyPerson = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const {
|
||||
formObj,
|
||||
interestedPersonRepresentationArr,
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
} = props;
|
||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||
const files = acceptedFiles.map((file) => (
|
||||
<li key={file.path}>
|
||||
{file.path} - {file.size} bytes
|
||||
</li>
|
||||
));
|
||||
return (
|
||||
<div id="rep-interested">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-grid-row">
|
||||
<h2 className="govuk-heading-m ">
|
||||
Representation - interested
|
||||
</h2>
|
||||
|
||||
<div className="govuk-form-group">
|
||||
<label
|
||||
className="govuk-label govuk-body-m"
|
||||
htmlFor="representationType"
|
||||
>
|
||||
What kind of representation are you making?
|
||||
</label>
|
||||
<Field
|
||||
name="representationType"
|
||||
component={RenderPickList}
|
||||
datafieldname="representationType"
|
||||
optionsArr={interestedPersonRepresentationArr}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
className="govuk-input govuk-!-width-three-quarters"
|
||||
id="representationDescription"
|
||||
name="representationDescription"
|
||||
value="email"
|
||||
data-aria-controls="representationDescription"
|
||||
type="text"
|
||||
component={RenderTextfield}
|
||||
label="Description of representation"
|
||||
/>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<fieldset
|
||||
className="govuk-fieldset"
|
||||
aria-describedby="contact-hint"
|
||||
>
|
||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--l">
|
||||
<label
|
||||
className="govuk-fieldset__heading govuk-body-m"
|
||||
id="representationCapacity_label"
|
||||
>
|
||||
Are you acting on behalf of a company,
|
||||
group or organisation?
|
||||
</label>
|
||||
</legend>
|
||||
<div id="contact-hint" className="govuk-hint">
|
||||
e.g. ‘Owners of Numbers 1-5 High
|
||||
Street‘, or ‘Mr and Mrs
|
||||
Smith‘ or ‘The executors of Mr
|
||||
Evans‘ estate‘
|
||||
</div>
|
||||
<div
|
||||
className="govuk-radios govuk-radios--conditional"
|
||||
data-module="govuk-radios"
|
||||
>
|
||||
<div className="govuk-radios__item">
|
||||
<input
|
||||
className="govuk-radios__input"
|
||||
id="contact"
|
||||
name="contact"
|
||||
type="radio"
|
||||
value="email"
|
||||
data-aria-controls="conditional-contact"
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-radios__label"
|
||||
htmlFor="contact"
|
||||
>
|
||||
Yes
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className="govuk-radios__conditional govuk-radios__conditional--hidden"
|
||||
id="conditional-contact"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<label
|
||||
className="govuk-label"
|
||||
htmlFor="contact-by-email"
|
||||
>
|
||||
Enter the name of the
|
||||
company/group/organisation *
|
||||
</label>
|
||||
<input
|
||||
className="govuk-input govuk-!-width-one-third"
|
||||
id="contact-by-email"
|
||||
name="contact-by-email"
|
||||
type="email"
|
||||
spellCheck="false"
|
||||
autoComplete="email"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-radios__item">
|
||||
<input
|
||||
className="govuk-radios__input"
|
||||
id="contact-2"
|
||||
name="contact"
|
||||
type="radio"
|
||||
value="phone"
|
||||
data-aria-controls="conditional-contact-2"
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-radios__label"
|
||||
htmlFor="contact-2"
|
||||
>
|
||||
No
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<p className="govuk-body">
|
||||
You can enter your comments in the space
|
||||
provided or attach a separate document.
|
||||
</p>
|
||||
<fieldset
|
||||
className="govuk-fieldset"
|
||||
aria-describedby="commentBox-hint"
|
||||
>
|
||||
<div
|
||||
id="commentBox-hint"
|
||||
className="govuk-hint"
|
||||
>
|
||||
My comments are set out in:*
|
||||
</div>
|
||||
<div
|
||||
className="govuk-checkboxes"
|
||||
data-module="govuk-checkboxes"
|
||||
>
|
||||
<div className="govuk-checkboxes__item">
|
||||
<Field
|
||||
className="govuk-checkboxes__input"
|
||||
id="commentBox"
|
||||
name="commentBox"
|
||||
value="email"
|
||||
data-aria-controls="commentBox"
|
||||
type="checkbox"
|
||||
component={RenderTextfield}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-checkboxes__label"
|
||||
htmlFor="commentBox"
|
||||
>
|
||||
the box below{" "}
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
_.isEmpty(
|
||||
formObj["representationForm"]
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
||||
: _.isEmpty(
|
||||
formObj[
|
||||
"representationForm"
|
||||
].values
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden q11 "
|
||||
: _.isEmpty(
|
||||
formObj[
|
||||
"representationForm"
|
||||
].values.commentBox
|
||||
)
|
||||
? formObj["representationForm"]
|
||||
.values.commentBox ==
|
||||
false
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: "govuk-checkboxes__conditional"
|
||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden wwwaqqqq"
|
||||
}
|
||||
id="conditional-commentBox"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationComments"
|
||||
id="representationComments"
|
||||
component={RenderMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={
|
||||
props.name + "-hint"
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-checkboxes__item">
|
||||
<Field
|
||||
className="govuk-checkboxes__input"
|
||||
id="documentBox"
|
||||
name="documentBox"
|
||||
value="email"
|
||||
data-aria-controls="documentBox"
|
||||
type="checkbox"
|
||||
component={RenderTextfield}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-checkboxes__label"
|
||||
htmlFor="documentBox"
|
||||
>
|
||||
separate documents
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
_.isEmpty(
|
||||
formObj["representationForm"]
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
||||
: _.isEmpty(
|
||||
formObj[
|
||||
"representationForm"
|
||||
].values
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: _.isEmpty(
|
||||
formObj[
|
||||
"representationForm"
|
||||
].values.documentBox
|
||||
)
|
||||
? formObj["representationForm"]
|
||||
.values.documentBox ==
|
||||
false
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: "govuk-checkboxes__conditional"
|
||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden"
|
||||
}
|
||||
id="conditional-documentBox"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<section className="container">
|
||||
<div
|
||||
{...getRootProps({
|
||||
className: "dropzone",
|
||||
})}
|
||||
>
|
||||
<input
|
||||
{...getInputProps()}
|
||||
/>
|
||||
<p>
|
||||
Drag and drop files here
|
||||
or click to select files
|
||||
</p>
|
||||
</div>
|
||||
<aside>
|
||||
<h4>Files</h4>
|
||||
<ul>{files}</ul>
|
||||
</aside>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>{" "}
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-button-group">
|
||||
<Link href="/representation">
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationSubmit(false);
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
Continue
|
||||
</a>
|
||||
</Link>
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationCapacity(false);
|
||||
}}
|
||||
className="govuk-link"
|
||||
>
|
||||
Back
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default RepInterestedPartyPerson;
|
||||
@@ -0,0 +1,230 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { Field, reduxForm } from "redux-form";
|
||||
import {
|
||||
RenderPickList,
|
||||
RenderTextfield,
|
||||
RenderRadioList,
|
||||
RenderMultiline,
|
||||
} from "./representationElements";
|
||||
import { useDropzone } from "react-dropzone";
|
||||
import {
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
} from "../../../store/currentView/action";
|
||||
|
||||
const RepLandOwner = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const {
|
||||
formObj,
|
||||
landOwnerRepresentationArr,
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
} = props;
|
||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||
const files = acceptedFiles.map((file) => (
|
||||
<li key={file.path}>
|
||||
{file.path} - {file.size} bytes
|
||||
</li>
|
||||
));
|
||||
|
||||
return (
|
||||
<div id="landowner">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-grid-row">
|
||||
<h2 className="govuk-heading-m ">
|
||||
Representation - landowner
|
||||
</h2>
|
||||
|
||||
<div className="govuk-form-group">
|
||||
<label
|
||||
className="govuk-label govuk-body-m"
|
||||
htmlFor="representationType"
|
||||
>
|
||||
What kind of representation are you making?
|
||||
</label>
|
||||
<Field
|
||||
name="representationType"
|
||||
component={RenderPickList}
|
||||
datafieldname="representationType"
|
||||
optionsArr={landOwnerRepresentationArr}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
className="govuk-input govuk-!-width-three-quarters"
|
||||
id="representationDescription"
|
||||
name="representationDescription"
|
||||
value="email"
|
||||
data-aria-controls="representationDescription"
|
||||
type="text"
|
||||
component={RenderTextfield}
|
||||
label="Description of representation"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<p className="govuk-body">
|
||||
You can enter your comments in the space provided or
|
||||
attach a separate document.
|
||||
</p>
|
||||
<fieldset
|
||||
className="govuk-fieldset"
|
||||
aria-describedby="commentBox-hint"
|
||||
>
|
||||
<div id="commentBox-hint" className="govuk-hint">
|
||||
My comments are set out in:*
|
||||
</div>
|
||||
<div
|
||||
className="govuk-checkboxes"
|
||||
data-module="govuk-checkboxes"
|
||||
>
|
||||
<div className="govuk-checkboxes__item">
|
||||
<Field
|
||||
className="govuk-checkboxes__input"
|
||||
id="commentBox"
|
||||
name="commentBox"
|
||||
value="email"
|
||||
data-aria-controls="commentBox"
|
||||
type="checkbox"
|
||||
component={RenderTextfield}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-checkboxes__label"
|
||||
htmlFor="commentBox"
|
||||
>
|
||||
the box below{" "}
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
_.isEmpty(formObj["representationForm"])
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden q11 "
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values.commentBox
|
||||
)
|
||||
? formObj["representationForm"]
|
||||
.values.commentBox == false
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: "govuk-checkboxes__conditional"
|
||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden wwwaqqqq"
|
||||
}
|
||||
id="conditional-commentBox"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationComments"
|
||||
id="representationComments"
|
||||
component={RenderMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={
|
||||
props.name + "-hint"
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-checkboxes__item">
|
||||
<Field
|
||||
className="govuk-checkboxes__input"
|
||||
id="documentBox"
|
||||
name="documentBox"
|
||||
value="email"
|
||||
data-aria-controls="documentBox"
|
||||
type="checkbox"
|
||||
component={RenderTextfield}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-checkboxes__label"
|
||||
htmlFor="documentBox"
|
||||
>
|
||||
separate documents
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
_.isEmpty(formObj["representationForm"])
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values.documentBox
|
||||
)
|
||||
? formObj["representationForm"]
|
||||
.values.documentBox == false
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: "govuk-checkboxes__conditional"
|
||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden"
|
||||
}
|
||||
id="conditional-documentBox"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<section className="container">
|
||||
<div
|
||||
{...getRootProps({
|
||||
className: "dropzone",
|
||||
})}
|
||||
>
|
||||
<input {...getInputProps()} />
|
||||
<p>
|
||||
Drag and drop files here or
|
||||
click to select files
|
||||
</p>
|
||||
</div>
|
||||
<aside>
|
||||
<h4>Files</h4>
|
||||
<ul>{files}</ul>
|
||||
</aside>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-button-group">
|
||||
<Link href="/representation">
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationSubmit(false);
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
Continue
|
||||
</a>
|
||||
</Link>
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationCapacity(false);
|
||||
}}
|
||||
className="govuk-link"
|
||||
>
|
||||
Back
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default RepLandOwner;
|
||||
@@ -0,0 +1,44 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import { useContext } from "react";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
|
||||
const ApplicationIntro = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
|
||||
return (
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-one-half">
|
||||
<h1 className="govuk-heading-l">Applications</h1>
|
||||
<p className="govuk-body">The applications listed are those:</p>
|
||||
<ul className="govuk-list govuk-list--bullet">
|
||||
<li>
|
||||
Where the developer has advised the Planning
|
||||
Inspectorate in writing that they intend to submit an
|
||||
application to us in the future
|
||||
</li>
|
||||
<li>
|
||||
Where an application has already been made to the
|
||||
Planning Inspectorate and is undergoing the examination
|
||||
process
|
||||
</li>
|
||||
<li>Where a proposal has been decided.</li>
|
||||
</ul>
|
||||
<p>
|
||||
Use the table below to find applications by stage or type.
|
||||
Alternatively, use the map by clicking on the markers to go
|
||||
to the applications page. A list of key events and deadlines
|
||||
for all applications is available on our calendar page.
|
||||
</p>
|
||||
</div>
|
||||
<div className="govuk-grid-column-one-half">
|
||||
<img src="https://via.placeholder.com/450" />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ApplicationIntro;
|
||||
@@ -0,0 +1,352 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import { useContext } from "react";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
|
||||
const ApplicationList = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="govuk-grid-row govuk-!-margin-top-9">
|
||||
<div className="govuk-form-group">
|
||||
<label className="govuk-label-s " htmlFor="sort">
|
||||
Show{" "}
|
||||
<select
|
||||
className="govuk-select"
|
||||
id="showNo"
|
||||
name="showNo"
|
||||
>
|
||||
<option value="1">10</option>
|
||||
<option value="1">25</option>
|
||||
<option value="1">50</option>
|
||||
<option value="1">100</option>
|
||||
</select>{" "}
|
||||
Entries
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<p className="govuk-body-s">Showing 1 to 10 of 54 entries</p>
|
||||
</div>
|
||||
<div className="govuk-grid-row ">
|
||||
<div className="govuk-grid-column-full govuk-!-padding-left-0 govuk-!-padding-right-0">
|
||||
<dl className="govuk-summary-list govuk-!-margin-bottom-0 results">
|
||||
<div className="govuk-summary-list__row results-headings">
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-14 results_wider govuk-!-padding-left-2">
|
||||
Reference
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-14">
|
||||
Application
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-14">
|
||||
Developer{" "}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-14">
|
||||
Type
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-14">
|
||||
Status
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-!-padding-left-2">
|
||||
<span className="results-visually-hidden">
|
||||
Reference:
|
||||
</span>
|
||||
CAS-00009-W8N6W4
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<a href="/application-view">
|
||||
<span className="results-visually-hidden">
|
||||
Application:{" "}
|
||||
</span>
|
||||
TWA - Morlais Demonstration Zone
|
||||
</a>
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Developer:
|
||||
</span>
|
||||
Menter Mon
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Type:
|
||||
</span>
|
||||
Energy
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Status:
|
||||
</span>
|
||||
Recommendation
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-!-padding-left-2">
|
||||
<span className="results-visually-hidden">
|
||||
Reference:
|
||||
</span>
|
||||
CAS-00009-W8N6W4
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<a href="/application-view">
|
||||
<span className="results-visually-hidden">
|
||||
Application:{" "}
|
||||
</span>
|
||||
TWA - Morlais Demonstration Zone
|
||||
</a>
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Developer:
|
||||
</span>
|
||||
Menter Mon
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Type:
|
||||
</span>
|
||||
Energy
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Status:
|
||||
</span>
|
||||
Recommendation
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-!-padding-left-2">
|
||||
<span className="results-visually-hidden">
|
||||
Reference:
|
||||
</span>
|
||||
CAS-00009-W8N6W4
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<a href="/application-view">
|
||||
<span className="results-visually-hidden">
|
||||
Application:{" "}
|
||||
</span>
|
||||
TWA - Morlais Demonstration Zone
|
||||
</a>
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Developer:
|
||||
</span>
|
||||
Menter Mon
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Type:
|
||||
</span>
|
||||
Energy
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Status:
|
||||
</span>
|
||||
Recommendation
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-!-padding-left-2">
|
||||
<span className="results-visually-hidden">
|
||||
Reference:
|
||||
</span>
|
||||
CAS-00009-W8N6W4
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<a href="/application-view">
|
||||
<span className="results-visually-hidden">
|
||||
Application:{" "}
|
||||
</span>
|
||||
TWA - Morlais Demonstration Zone
|
||||
</a>
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Developer:
|
||||
</span>
|
||||
Menter Mon
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Type:
|
||||
</span>
|
||||
Energy
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Status:
|
||||
</span>
|
||||
Recommendation
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-!-padding-left-2">
|
||||
<span className="results-visually-hidden">
|
||||
Reference:
|
||||
</span>
|
||||
CAS-00009-W8N6W4
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<a href="/application-view">
|
||||
<span className="results-visually-hidden">
|
||||
Application:{" "}
|
||||
</span>
|
||||
TWA - Morlais Demonstration Zone
|
||||
</a>
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Developer:
|
||||
</span>
|
||||
Menter Mon
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Type:
|
||||
</span>
|
||||
Energy
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Status:
|
||||
</span>
|
||||
Recommendation
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-!-padding-left-2">
|
||||
<span className="results-visually-hidden">
|
||||
Reference:
|
||||
</span>
|
||||
CAS-00009-W8N6W4
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<a href="/application-view">
|
||||
<span className="results-visually-hidden">
|
||||
Application:{" "}
|
||||
</span>
|
||||
TWA - Morlais Demonstration Zone
|
||||
</a>
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Developer:
|
||||
</span>
|
||||
Menter Mon
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Type:
|
||||
</span>
|
||||
Energy
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Status:
|
||||
</span>
|
||||
Recommendation
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-!-padding-left-2">
|
||||
<span className="results-visually-hidden">
|
||||
Reference:
|
||||
</span>
|
||||
CAS-00009-W8N6W4
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<a href="/application-view">
|
||||
<span className="results-visually-hidden">
|
||||
Application:{" "}
|
||||
</span>
|
||||
TWA - Morlais Demonstration Zone
|
||||
</a>
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Developer:
|
||||
</span>
|
||||
Menter Mon
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Type:
|
||||
</span>
|
||||
Energy
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Status:
|
||||
</span>
|
||||
Recommendation
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-!-padding-left-2">
|
||||
<span className="results-visually-hidden">
|
||||
Reference:
|
||||
</span>
|
||||
CAS-00009-W8N6W4
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<a href="/application-view">
|
||||
<span className="results-visually-hidden">
|
||||
Application:{" "}
|
||||
</span>
|
||||
TWA - Morlais Demonstration Zone
|
||||
</a>
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Developer:
|
||||
</span>
|
||||
Menter Mon
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Type:
|
||||
</span>
|
||||
Energy
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
Status:
|
||||
</span>
|
||||
Recommendation
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row ">
|
||||
<p>
|
||||
Previous <span>1</span>{" "}
|
||||
<span>
|
||||
<Link href="#">2</Link>
|
||||
</span>{" "}
|
||||
<span>
|
||||
<Link href="#">3</Link>
|
||||
</span>{" "}
|
||||
<span>
|
||||
<Link href="#">4</Link>
|
||||
</span>{" "}
|
||||
<span>
|
||||
<Link href="#">5</Link>
|
||||
</span>{" "}
|
||||
<Link href="#">Next</Link>
|
||||
</p>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default ApplicationList;
|
||||
@@ -0,0 +1,26 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
|
||||
const ApplicationsForComment = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
return (
|
||||
<div className="govuk-panel govuk-grid-column-one-third govuk-panel--open-for-comments">
|
||||
<h2 className="govuk-heading-m">Applications open for comments</h2>
|
||||
<div className="govuk-panel__body">
|
||||
<ul className="govuk-list">
|
||||
<li>
|
||||
<a className="govuk-body-s " href="">
|
||||
Holyhead Harbour Revision Order
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ApplicationsForComment;
|
||||
@@ -0,0 +1,78 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
|
||||
const DNSLinks = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
return (
|
||||
<div className="govuk-grid-column-two-thirds govuk-panel--dns-links govuk-!-padding-top-5">
|
||||
<div className="govuk-grid-column-one-half">
|
||||
<ul className="govuk-list">
|
||||
<li>
|
||||
<h3 className="govuk-heading-l govuk-!-font-size-27">
|
||||
<Link href="/dns/applications">
|
||||
<a className="govuk-link govuk-link--no-underline">
|
||||
Applications
|
||||
</a>
|
||||
</Link>
|
||||
<p className="govuk-body-s govuk-!-padding-top-2">
|
||||
A list of all the Developments of National
|
||||
Significance that have already been submitted
|
||||
and those we are expecting to be submitted.
|
||||
</p>
|
||||
</h3>
|
||||
</li>
|
||||
<li>
|
||||
<h3 className="govuk-heading-l govuk-!-font-size-27">
|
||||
<Link href="/dns/help">
|
||||
<a className="govuk-link govuk-link--no-underline">
|
||||
Help
|
||||
</a>
|
||||
</Link>
|
||||
<p className="govuk-body-s govuk-!-padding-top-2">
|
||||
Information about this website.
|
||||
</p>
|
||||
</h3>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div className="govuk-grid-column-one-half">
|
||||
<ul className="govuk-list">
|
||||
<li>
|
||||
<h3 className="govuk-heading-l govuk-!-font-size-27">
|
||||
<Link href="/dns/application-process">
|
||||
<a className="govuk-link govuk-link--no-underline ">
|
||||
Guidance
|
||||
</a>
|
||||
</Link>
|
||||
<p className="govuk-body-s govuk-!-padding-top-2">
|
||||
An overview and detailed guidance on the
|
||||
Developments of National Significance
|
||||
application process
|
||||
</p>
|
||||
</h3>
|
||||
</li>
|
||||
<li>
|
||||
<h3 className="govuk-heading-l govuk-!-font-size-27">
|
||||
<a
|
||||
className="govuk-link govuk-link--no-underline"
|
||||
href="#"
|
||||
>
|
||||
Contact us{" "}
|
||||
</a>
|
||||
<p className="govuk-body-s govuk-!-padding-top-2">
|
||||
How to get in touch with The Planning
|
||||
Inspectorate.
|
||||
</p>
|
||||
</h3>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default DNSLinks;
|
||||
@@ -0,0 +1,35 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
|
||||
const LatestApplications = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
return (
|
||||
<div className="govuk-panel govuk-grid-column-one-third govuk-panel--latest">
|
||||
<h2 className="govuk-heading-m">Latest Applications</h2>
|
||||
<div className="govuk-panel__body">
|
||||
<ul className="govuk-list">
|
||||
<li className="govuk-body-s ">
|
||||
<a href="">Brynrhyd Solar Farm</a>
|
||||
</li>
|
||||
<li className="govuk-body-s ">
|
||||
<a href="">Brynrhyd Solar Farm</a>
|
||||
</li>
|
||||
|
||||
<li className="govuk-body-s ">
|
||||
<a href="">Brynrhyd Solar Farm</a>
|
||||
</li>
|
||||
|
||||
<li className="govuk-body-s ">
|
||||
<a href="">Brynrhyd Solar Farm</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default LatestApplications;
|
||||
@@ -0,0 +1,43 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
|
||||
const TitleContent = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
return (
|
||||
<div className="govuk-panel govuk-grid-column-two-thirds govuk-panel--header">
|
||||
<h1 className="govuk-panel__title">
|
||||
Developments of National Significance
|
||||
</h1>
|
||||
<div className="govuk-panel__body">
|
||||
<p className="govuk-body-s">
|
||||
A Development of National Significance (DNS) is a type of
|
||||
planning application for a large infrastructure project of
|
||||
national importance in Wales. Here you can find out about
|
||||
proposed DNS applications. This site is managed by the
|
||||
Planning Inspectorate.
|
||||
</p>
|
||||
</div>
|
||||
<div className="govuk-form-group govuk-!-margin-bottom-0">
|
||||
<input
|
||||
className="govuk-input govuk-!-width-one-half"
|
||||
id="one-third"
|
||||
name="one-third"
|
||||
type="text"
|
||||
placeholder="Search application name"
|
||||
/>
|
||||
<button
|
||||
className="govuk-button govuk-!-margin-bottom-0"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
Search
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default TitleContent;
|
||||
@@ -0,0 +1,40 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import { useContext } from "react";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import TitleContent from "./homepage/titleContent";
|
||||
import LatestApplications from "./homepage/latestApplications";
|
||||
import DNSLinks from "./homepage/dnsLinks";
|
||||
import ApplicationsForComment from "./homepage/applicationsForComment";
|
||||
|
||||
export default function Main({ children, pages }) {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
|
||||
return (
|
||||
<main
|
||||
className="govuk-main-wrapper govuk-main-wrapper--auto-spacing"
|
||||
id="main-content"
|
||||
role="main"
|
||||
>
|
||||
<div className="govuk-grid-row govuk-!-margin-bottom-0">
|
||||
<div className="govuk-grid-column-full govuk-!-padding-bottom-0">
|
||||
<div className="flex-container grid-row govuk-body govuk-!-margin-bottom-0 ">
|
||||
<TitleContent />
|
||||
<LatestApplications />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row govuk-!-margin-top-0">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="flex-container grid-row govuk-body ">
|
||||
<DNSLinks />
|
||||
<ApplicationsForComment />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
+39
-3
@@ -8,8 +8,23 @@ const Header = (props) => {
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const { setLogout } = props;
|
||||
const noSignoutLink = ["/", "/logout"];
|
||||
const { setLogout, serviceName } = props;
|
||||
const noSignoutLink = [
|
||||
"/",
|
||||
"/logout",
|
||||
"/dns",
|
||||
"/dns/application-process",
|
||||
"/dns/help",
|
||||
"/dns/contact-us",
|
||||
"/dns/applications",
|
||||
];
|
||||
const hasContactLink = [
|
||||
"/dns",
|
||||
"/dns/application-process",
|
||||
"/dns/help",
|
||||
"/dns/contact-us",
|
||||
"/dns/applications",
|
||||
];
|
||||
|
||||
return (
|
||||
<header
|
||||
@@ -72,7 +87,7 @@ const Header = (props) => {
|
||||
className="govuk-header__link
|
||||
govuk-header__link--service-name"
|
||||
>
|
||||
{t("common:service-name")}
|
||||
{serviceName || t("common:service-name")}
|
||||
</a>
|
||||
</Link>
|
||||
</div>
|
||||
@@ -99,6 +114,18 @@ const Header = (props) => {
|
||||
</div>
|
||||
<div className="content">
|
||||
<ul>
|
||||
{hasContactLink.includes(router.pathname) ==
|
||||
true ? (
|
||||
<li>
|
||||
<Link href="/dns/contact-us">
|
||||
<a className="govuk-header__link ">
|
||||
Contact
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{noSignoutLink.includes(router.pathname) ==
|
||||
true ? (
|
||||
""
|
||||
@@ -157,6 +184,15 @@ const Header = (props) => {
|
||||
</div>
|
||||
</div>
|
||||
<div className="fullNav">
|
||||
{hasContactLink.includes(router.pathname) == true ? (
|
||||
<Link href="/dns/contact-us">
|
||||
<a className="govuk-header__link govuk-!-margin-right-3">
|
||||
Contact
|
||||
</a>
|
||||
</Link>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{noSignoutLink.includes(router.pathname) == true ? (
|
||||
""
|
||||
) : (
|
||||
|
||||
@@ -20,7 +20,13 @@ const TopThree = (props) => {
|
||||
<div className="cardModuleDetails">
|
||||
<div className="cardModuleReference">
|
||||
<b>Case reference:</b>{" "}
|
||||
<Link href="/case">
|
||||
<Link
|
||||
href={
|
||||
topThreeType == "awaitingSubmission"
|
||||
? "/representation"
|
||||
: "/case"
|
||||
}
|
||||
>
|
||||
<a
|
||||
data-id={i}
|
||||
onClick={() => {
|
||||
|
||||
Reference in New Issue
Block a user