Merged PR 1586: SIPS Sprint 6 280425
16003 Sips Documents, 16010 Role baes reps for sips Related work items: #16003, #16010
This commit is contained in:
@@ -420,7 +420,9 @@ export const createRepPDFBlob = async (
|
|||||||
: repName.indexOf("_Comments") > 0
|
: repName.indexOf("_Comments") > 0
|
||||||
? "846040003"
|
? "846040003"
|
||||||
: repName.indexOf("_Impact") > 0
|
: repName.indexOf("_Impact") > 0
|
||||||
? "846040001"
|
? "846040029"
|
||||||
|
: repName.indexOf("_Consultation_Response") > 0
|
||||||
|
? "846040005"
|
||||||
: "846040002";
|
: "846040002";
|
||||||
|
|
||||||
const tags = {
|
const tags = {
|
||||||
|
|||||||
@@ -0,0 +1,298 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { Field, change, reduxForm } from "redux-form";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
||||||
|
import {
|
||||||
|
FileUploadField,
|
||||||
|
RenderCondtionalRadioList,
|
||||||
|
RenderPickList,
|
||||||
|
RenderRichMultiline,
|
||||||
|
} from "./representationElements";
|
||||||
|
|
||||||
|
import { useDropzone } from "react-dropzone";
|
||||||
|
import {
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
|
const ConsultationAgent = (props) => {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
const {
|
||||||
|
formObj,
|
||||||
|
appellantApplicantRepresentationArr,
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
currentView,
|
||||||
|
setRepFileName,
|
||||||
|
updateRepresentation,
|
||||||
|
setSavingStatus,
|
||||||
|
savingStatus,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
} = props;
|
||||||
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
|
|
||||||
|
if (JSON.stringify(formObj) != "{}") {
|
||||||
|
setRepFileName(formObj.representationForm.values);
|
||||||
|
|
||||||
|
let filterFilesList = props.currentView.caseReference.hasOwnProperty(
|
||||||
|
"repDetails"
|
||||||
|
)
|
||||||
|
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
|
"filesList"
|
||||||
|
)
|
||||||
|
? props.currentView.caseReference.repDetails.filesList.filter(
|
||||||
|
function (el) {
|
||||||
|
return el != null;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
: []
|
||||||
|
: [];
|
||||||
|
|
||||||
|
const files = acceptedFiles.map((file) => (
|
||||||
|
<li key={file.path}>
|
||||||
|
{file.path} - {file.size} bytes
|
||||||
|
</li>
|
||||||
|
));
|
||||||
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
{typeof formObj.representationForm.values
|
||||||
|
.representationType == "undefined" &&
|
||||||
|
props.representationType != "Select..." ? (
|
||||||
|
<>
|
||||||
|
<h2 className="govuk-heading-m ">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:consultation-from-an-agent-heading"
|
||||||
|
)}
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<label
|
||||||
|
className="govuk-label govuk-body-m"
|
||||||
|
htmlFor="representationType"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:kind-of-consultation-label"
|
||||||
|
)}
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<Field
|
||||||
|
name="representationType"
|
||||||
|
component={RenderPickList}
|
||||||
|
datafieldname="representationType"
|
||||||
|
optionsArr={
|
||||||
|
appellantApplicantRepresentationArr
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<label className="govuk-label govuk-body-m">
|
||||||
|
{t("myrepresentations:representation-type")}:{" "}
|
||||||
|
{router.locale == "cy"
|
||||||
|
? formObj.representationForm.values
|
||||||
|
.representationType == "Questionnaire"
|
||||||
|
? "Holiadur"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType == "Statement"
|
||||||
|
? "Datganiad"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
|
"Final comments"
|
||||||
|
? "Sylwadau terfynol"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType}
|
||||||
|
</label>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{(typeof props.representationType != "undefined" ||
|
||||||
|
typeof formObj.representationForm.values
|
||||||
|
.representationType != "undefined") && (
|
||||||
|
<>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<Field
|
||||||
|
name="representationOnBehalfOf"
|
||||||
|
datafieldname="representationOnBehalfOf"
|
||||||
|
// label={t("myrepresentations:capacity-select-what-capacity-label")}
|
||||||
|
options={["Yes", "No"]}
|
||||||
|
id="representationOnBehalfOf"
|
||||||
|
className="govuk-radios__input"
|
||||||
|
errorMsg={t(
|
||||||
|
"myrepresentations:select-an-option-label"
|
||||||
|
)}
|
||||||
|
component={RenderCondtionalRadioList}
|
||||||
|
validate={[required]}
|
||||||
|
legend={t("case:representation-onbehalfof")}
|
||||||
|
hint={t(
|
||||||
|
"myrepresentations:representation-onbehalfof-hint"
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<p className="govuk-body">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:consultation-comment-label"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
<fieldset
|
||||||
|
className="govuk-fieldset"
|
||||||
|
aria-describedby="commentBox-hint"
|
||||||
|
>
|
||||||
|
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||||
|
<FileUploadField
|
||||||
|
name={"representationDocuments"}
|
||||||
|
id={"representationDocuments"}
|
||||||
|
label={t(
|
||||||
|
"myrepresentations:add-files-label"
|
||||||
|
)}
|
||||||
|
ticketnumber={
|
||||||
|
props.props.caseReference
|
||||||
|
}
|
||||||
|
hint={"sdsd"}
|
||||||
|
fileList={
|
||||||
|
props.currentView.fileList
|
||||||
|
|
||||||
|
// props.currentView.caseReference.hasOwnProperty(
|
||||||
|
// "repDetails"
|
||||||
|
// )
|
||||||
|
// ? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
|
// "filesList"
|
||||||
|
// ) &&
|
||||||
|
// props.currentView
|
||||||
|
// .caseReference
|
||||||
|
// .repDetails.filesList
|
||||||
|
// .length > 0
|
||||||
|
// ? props.currentView
|
||||||
|
// .caseReference
|
||||||
|
// .repDetails
|
||||||
|
// .filesList
|
||||||
|
// : []
|
||||||
|
// : []
|
||||||
|
}
|
||||||
|
setFilesForRepresentations={
|
||||||
|
setFilesForRepresentations
|
||||||
|
}
|
||||||
|
containerID={
|
||||||
|
props.props.props.accountDetails
|
||||||
|
.containerID
|
||||||
|
}
|
||||||
|
filenamePrefix={props.formObj}
|
||||||
|
props={props.props.props}
|
||||||
|
setCurrentReference={
|
||||||
|
props.setCurrentReference
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>{" "}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{typeof formObj.representationForm.values.representationType !=
|
||||||
|
"undefined" && (
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-button-group">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="govuk-button"
|
||||||
|
data-module="govuk-button"
|
||||||
|
>
|
||||||
|
{t("common:continue-button")}
|
||||||
|
</button>
|
||||||
|
{/* {router.query.state != "edit" && (
|
||||||
|
<a
|
||||||
|
onClick={() => {
|
||||||
|
setRepresentationCapacity();
|
||||||
|
props.updateField(
|
||||||
|
"representationForm",
|
||||||
|
"representationCapacity",
|
||||||
|
""
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
className="govuk-link"
|
||||||
|
>
|
||||||
|
{t("common:back-link")}
|
||||||
|
</a>
|
||||||
|
)} */}
|
||||||
|
{savingStatus ? (
|
||||||
|
<span className=" progress-save-active">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"}
|
||||||
|
<img
|
||||||
|
className="data-loading-icon"
|
||||||
|
src="/assets/images/loading.gif"
|
||||||
|
alt={
|
||||||
|
router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<button
|
||||||
|
className="govuk-button progress-save "
|
||||||
|
onClick={() => {
|
||||||
|
let valuesObj =
|
||||||
|
props.props.props.form[props.form]
|
||||||
|
.values || {};
|
||||||
|
|
||||||
|
//console.log("valuesobj:", valuesObj);
|
||||||
|
|
||||||
|
delete valuesObj[
|
||||||
|
"_pinswg_appellant_value"
|
||||||
|
];
|
||||||
|
|
||||||
|
//console.log("on save:", valuesObj);
|
||||||
|
updateRepresentation(
|
||||||
|
valuesObj,
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("common:save-exit-button")}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
updateField: (form, field, newValue) =>
|
||||||
|
dispatch(change(form, field, newValue)),
|
||||||
|
|
||||||
|
setFilesForRepresentations: (fileList) => {
|
||||||
|
dispatch(setFilesForRepresentations(fileList));
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default connect(
|
||||||
|
null,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(
|
||||||
|
reduxForm({
|
||||||
|
form: "representationForm",
|
||||||
|
enableReinitialize: true,
|
||||||
|
destroyOnUnmount: false,
|
||||||
|
})(ConsultationAgent)
|
||||||
|
);
|
||||||
@@ -0,0 +1,271 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { Field, change, reduxForm } from "redux-form";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
||||||
|
import {
|
||||||
|
FileUploadField,
|
||||||
|
RenderPickList,
|
||||||
|
RenderRichMultiline,
|
||||||
|
} from "./representationElements";
|
||||||
|
|
||||||
|
import { useDropzone } from "react-dropzone";
|
||||||
|
import {
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
|
const ConsultationAppellant = (props) => {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
const {
|
||||||
|
formObj,
|
||||||
|
appellantApplicantRepresentationArr,
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
currentView,
|
||||||
|
setRepFileName,
|
||||||
|
updateRepresentation,
|
||||||
|
setSavingStatus,
|
||||||
|
savingStatus,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
} = props;
|
||||||
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
|
|
||||||
|
console.log(JSON.stringify(formObj) == "{}" ? "empty" : "value");
|
||||||
|
|
||||||
|
if (JSON.stringify(formObj) != "{}") {
|
||||||
|
setRepFileName(formObj.representationForm.values);
|
||||||
|
|
||||||
|
let filterFilesList = props.currentView.caseReference.hasOwnProperty(
|
||||||
|
"repDetails"
|
||||||
|
)
|
||||||
|
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
|
"filesList"
|
||||||
|
)
|
||||||
|
? props.currentView.caseReference.repDetails.filesList.filter(
|
||||||
|
function (el) {
|
||||||
|
return el != null;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
: []
|
||||||
|
: [];
|
||||||
|
|
||||||
|
filterFilesList = filterFilesList.filter(
|
||||||
|
(value, index, self) =>
|
||||||
|
index === self.findIndex((t) => t.name === value.name)
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
{typeof formObj.representationForm.values
|
||||||
|
.representationType == "undefined" &&
|
||||||
|
props.representationType != "Select..." ? (
|
||||||
|
<>
|
||||||
|
<h2 className="govuk-heading-m ">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:consultation-from-an-appellant-heading"
|
||||||
|
)}
|
||||||
|
</h2>
|
||||||
|
<label
|
||||||
|
className="govuk-label govuk-body-m"
|
||||||
|
htmlFor="representationType"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:kind-of-consultation-label"
|
||||||
|
)}
|
||||||
|
</label>
|
||||||
|
<Field
|
||||||
|
name="representationType"
|
||||||
|
component={RenderPickList}
|
||||||
|
datafieldname="representationType"
|
||||||
|
optionsArr={
|
||||||
|
appellantApplicantRepresentationArr
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<label className="govuk-label govuk-body-m">
|
||||||
|
{t("myrepresentations:representation-type")}:{" "}
|
||||||
|
{router.locale == "cy"
|
||||||
|
? formObj.representationForm.values
|
||||||
|
.representationType == "Questionnaire"
|
||||||
|
? "Holiadur"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType == "Statement"
|
||||||
|
? "Datganiad"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
|
"Final comments"
|
||||||
|
? "Sylwadau terfynol"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType}
|
||||||
|
</label>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{(typeof props.representationType != "undefined" ||
|
||||||
|
typeof formObj.representationForm.values
|
||||||
|
.representationType != "undefined") && (
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<p className="govuk-body">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:consultation-comment-label"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
<fieldset
|
||||||
|
className="govuk-fieldset"
|
||||||
|
aria-describedby="commentBox-hint"
|
||||||
|
>
|
||||||
|
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||||
|
<FileUploadField
|
||||||
|
name={"representationDocuments"}
|
||||||
|
id={"representationDocuments"}
|
||||||
|
label={t(
|
||||||
|
"myrepresentations:add-files-label"
|
||||||
|
)}
|
||||||
|
ticketnumber={props.props.caseReference}
|
||||||
|
hint={"sdsd"}
|
||||||
|
fileList={
|
||||||
|
props.currentView.fileList
|
||||||
|
// props.currentView.caseReference.hasOwnProperty(
|
||||||
|
// "repDetails"
|
||||||
|
// )
|
||||||
|
// ? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
|
// "filesList"
|
||||||
|
// ) &&
|
||||||
|
// props.currentView
|
||||||
|
// .caseReference.repDetails
|
||||||
|
// .filesList.length > 0
|
||||||
|
// ? props.currentView
|
||||||
|
// .caseReference
|
||||||
|
// .repDetails.filesList
|
||||||
|
// : []
|
||||||
|
// : []
|
||||||
|
}
|
||||||
|
setFilesForRepresentations={
|
||||||
|
setFilesForRepresentations
|
||||||
|
}
|
||||||
|
containerID={
|
||||||
|
props.props.props.accountDetails
|
||||||
|
.containerID
|
||||||
|
}
|
||||||
|
filenamePrefix={props.formObj}
|
||||||
|
props={props.props.props}
|
||||||
|
setCurrentReference={
|
||||||
|
props.setCurrentReference
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>{" "}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{typeof formObj.representationForm.values.representationType !=
|
||||||
|
"undefined" && (
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-button-group">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="govuk-button"
|
||||||
|
data-module="govuk-button"
|
||||||
|
>
|
||||||
|
{t("common:continue-button")}
|
||||||
|
</button>
|
||||||
|
{/* {router.query.state != "edit" && (
|
||||||
|
<a
|
||||||
|
onClick={() => {
|
||||||
|
setRepresentationCapacity();
|
||||||
|
props.updateField(
|
||||||
|
"representationForm",
|
||||||
|
"representationType",
|
||||||
|
""
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
className="govuk-link"
|
||||||
|
>
|
||||||
|
{t("common:back-link")}
|
||||||
|
</a>
|
||||||
|
)} */}
|
||||||
|
|
||||||
|
{savingStatus ? (
|
||||||
|
<span className=" progress-save-active">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"}
|
||||||
|
<img
|
||||||
|
className="data-loading-icon"
|
||||||
|
src="/assets/images/loading.gif"
|
||||||
|
alt={
|
||||||
|
router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<button
|
||||||
|
className="govuk-button progress-save "
|
||||||
|
onClick={() => {
|
||||||
|
let valuesObj =
|
||||||
|
props.props.props.form[props.form]
|
||||||
|
.values || {};
|
||||||
|
|
||||||
|
//console.log("valuesobj:", valuesObj);
|
||||||
|
|
||||||
|
delete valuesObj[
|
||||||
|
"_pinswg_appellant_value"
|
||||||
|
];
|
||||||
|
|
||||||
|
//console.log("on save:", valuesObj);
|
||||||
|
updateRepresentation(
|
||||||
|
valuesObj,
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("common:save-exit-button")}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//const mapStateToProps = (state, props) => {};
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => {
|
||||||
|
return {
|
||||||
|
updateField: (form, field, newValue) =>
|
||||||
|
dispatch(change(form, field, newValue)),
|
||||||
|
|
||||||
|
setFilesForRepresentations: (fileList) => {
|
||||||
|
dispatch(setFilesForRepresentations(fileList));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(
|
||||||
|
null,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(
|
||||||
|
reduxForm({
|
||||||
|
form: "representationForm",
|
||||||
|
enableReinitialize: true,
|
||||||
|
destroyOnUnmount: false,
|
||||||
|
})(ConsultationAppellant)
|
||||||
|
);
|
||||||
@@ -0,0 +1,311 @@
|
|||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { Field, change, reduxForm } from "redux-form";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
||||||
|
import {
|
||||||
|
FileUploadField,
|
||||||
|
RenderCondtionalRadioList,
|
||||||
|
RenderPickList,
|
||||||
|
RenderRichMultiline,
|
||||||
|
} from "./representationElements";
|
||||||
|
|
||||||
|
import { useDropzone } from "react-dropzone";
|
||||||
|
import {
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
|
const ConsultationInterestedPartyPerson = (props) => {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
const {
|
||||||
|
formObj,
|
||||||
|
interestedPersonRepresentationArr,
|
||||||
|
setRepresentationCapacity,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
setRepFileName,
|
||||||
|
updateRepresentation,
|
||||||
|
setSavingStatus,
|
||||||
|
savingStatus,
|
||||||
|
setFilesForRepresentations,
|
||||||
|
} = props;
|
||||||
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
|
||||||
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
|
|
||||||
|
if (JSON.stringify(formObj) != "{}") {
|
||||||
|
setRepFileName(formObj.representationForm.values);
|
||||||
|
|
||||||
|
let filterFilesList = props.currentView.caseReference.hasOwnProperty(
|
||||||
|
"repDetails"
|
||||||
|
)
|
||||||
|
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
|
"filesList"
|
||||||
|
)
|
||||||
|
? props.currentView.caseReference.repDetails.filesList.filter(
|
||||||
|
function (el) {
|
||||||
|
return el != null;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
: []
|
||||||
|
: [];
|
||||||
|
|
||||||
|
const files = acceptedFiles.map((file) => (
|
||||||
|
<li key={file.path}>
|
||||||
|
{file.path} - {file.size} bytes
|
||||||
|
</li>
|
||||||
|
));
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
{typeof formObj.representationForm.values
|
||||||
|
.representationType == "undefined" &&
|
||||||
|
props.representationType != "Select..." ? (
|
||||||
|
<>
|
||||||
|
<h2 className="govuk-heading-m ">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:consultation-from-an-interested-person-heading"
|
||||||
|
)}
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<label
|
||||||
|
className="govuk-label govuk-body-m"
|
||||||
|
htmlFor="representationType"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:kind-of-consultation-label"
|
||||||
|
)}
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<Field
|
||||||
|
name="representationType"
|
||||||
|
component={RenderPickList}
|
||||||
|
datafieldname="representationType"
|
||||||
|
validate={[required]}
|
||||||
|
optionsArr={
|
||||||
|
interestedPersonRepresentationArr
|
||||||
|
}
|
||||||
|
errorMsg={t(
|
||||||
|
"myrepresentations:select-an-option-label"
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<label className="govuk-label govuk-body-m">
|
||||||
|
{t("myrepresentations:representation-type")}:{" "}
|
||||||
|
{router.locale == "cy"
|
||||||
|
? formObj.representationForm.values
|
||||||
|
.representationType == "Questionnaire"
|
||||||
|
? "Holiadur"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType == "Statement"
|
||||||
|
? "Datganiad"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
|
"Final comments"
|
||||||
|
? "Sylwadau terfynol"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType}
|
||||||
|
</label>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{(typeof props.representationType != "undefined" ||
|
||||||
|
typeof formObj.representationForm.values
|
||||||
|
.representationType != "undefined") && (
|
||||||
|
<>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<Field
|
||||||
|
name="representationOnBehalfOf"
|
||||||
|
datafieldname="representationOnBehalfOf"
|
||||||
|
// label="In what capacity do you wish to make representations on this case?"
|
||||||
|
options={[
|
||||||
|
t(
|
||||||
|
"myrepresentations:questionnaire-yes"
|
||||||
|
),
|
||||||
|
t("myrepresentations:questionnaire-no"),
|
||||||
|
]}
|
||||||
|
id="representationOnBehalfOf"
|
||||||
|
className="govuk-radios__input"
|
||||||
|
errorMsg={t(
|
||||||
|
"myrepresentations:select-an-option-label"
|
||||||
|
)}
|
||||||
|
component={RenderCondtionalRadioList}
|
||||||
|
validate={[required]}
|
||||||
|
legend={t("case:representation-onbehalfof")}
|
||||||
|
hint={t(
|
||||||
|
"myrepresentations:representation-onbehalfof-hint"
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
<p className="govuk-body">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:consultation-comment-label"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
<fieldset
|
||||||
|
className="govuk-fieldset"
|
||||||
|
aria-describedby="commentBox-hint"
|
||||||
|
>
|
||||||
|
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||||
|
<FileUploadField
|
||||||
|
name={"representationDocuments"}
|
||||||
|
id={"representationDocuments"}
|
||||||
|
label={t(
|
||||||
|
"myrepresentations:add-files-label"
|
||||||
|
)}
|
||||||
|
ticketnumber={
|
||||||
|
props.props.caseReference
|
||||||
|
}
|
||||||
|
hint={"sdsd"}
|
||||||
|
fileList={
|
||||||
|
props.currentView.fileList
|
||||||
|
|
||||||
|
// props.currentView.caseReference.hasOwnProperty(
|
||||||
|
// "repDetails"
|
||||||
|
// )
|
||||||
|
// ? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||||
|
// "filesList"
|
||||||
|
// ) &&
|
||||||
|
// props.currentView
|
||||||
|
// .caseReference
|
||||||
|
// .repDetails.filesList
|
||||||
|
// .length > 0
|
||||||
|
// ? props.currentView
|
||||||
|
// .caseReference
|
||||||
|
// .repDetails
|
||||||
|
// .filesList
|
||||||
|
// : []
|
||||||
|
// : []
|
||||||
|
}
|
||||||
|
setFilesForRepresentations={
|
||||||
|
setFilesForRepresentations
|
||||||
|
}
|
||||||
|
containerID={
|
||||||
|
props.props.props.accountDetails
|
||||||
|
.containerID
|
||||||
|
}
|
||||||
|
filenamePrefix={props.formObj}
|
||||||
|
props={props.props.props}
|
||||||
|
setCurrentReference={
|
||||||
|
props.setCurrentReference
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>{" "}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{typeof formObj.representationForm.values.representationType !=
|
||||||
|
"undefined" && (
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-button-group">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="govuk-button"
|
||||||
|
data-module="govuk-button"
|
||||||
|
>
|
||||||
|
{t("common:continue-button")}
|
||||||
|
</button>
|
||||||
|
{/*
|
||||||
|
<a
|
||||||
|
onClick={() => {
|
||||||
|
setRepresentationCapacity();
|
||||||
|
props.updateField(
|
||||||
|
"representationForm",
|
||||||
|
"representationCapacity",
|
||||||
|
""
|
||||||
|
);
|
||||||
|
props.updateField(
|
||||||
|
"representationForm",
|
||||||
|
"representationType",
|
||||||
|
""
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
className="govuk-link"
|
||||||
|
>
|
||||||
|
{t("case:summary-back-button-label")}
|
||||||
|
</a> */}
|
||||||
|
{savingStatus ? (
|
||||||
|
<span className=" progress-save-active">
|
||||||
|
{router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"}
|
||||||
|
<img
|
||||||
|
className="data-loading-icon"
|
||||||
|
src="/assets/images/loading.gif"
|
||||||
|
alt={
|
||||||
|
router.locale == "cy"
|
||||||
|
? "Nôl data"
|
||||||
|
: "Saving data"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<button
|
||||||
|
className="govuk-button progress-save "
|
||||||
|
onClick={() => {
|
||||||
|
let valuesObj =
|
||||||
|
props.props.props.form[props.form]
|
||||||
|
.values || {};
|
||||||
|
|
||||||
|
//console.log("valuesobj:", valuesObj);
|
||||||
|
|
||||||
|
delete valuesObj[
|
||||||
|
"_pinswg_appellant_value"
|
||||||
|
];
|
||||||
|
|
||||||
|
//console.log("on save:", valuesObj);
|
||||||
|
updateRepresentation(
|
||||||
|
valuesObj,
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("common:save-exit-button")}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//const mapStateToProps = (state, props) => {};
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
updateField: (form, field, newValue) =>
|
||||||
|
dispatch(change(form, field, newValue)),
|
||||||
|
setFilesForRepresentations: (fileList) => {
|
||||||
|
dispatch(setFilesForRepresentations(fileList));
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default connect(
|
||||||
|
null,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(
|
||||||
|
reduxForm({
|
||||||
|
form: "representationForm",
|
||||||
|
enableReinitialize: true,
|
||||||
|
destroyOnUnmount: false,
|
||||||
|
})(ConsultationInterestedPartyPerson)
|
||||||
|
);
|
||||||
@@ -19,9 +19,13 @@ import {
|
|||||||
} from "../../../store/currentView/action";
|
} from "../../../store/currentView/action";
|
||||||
import RepAgent from "./representationAgent";
|
import RepAgent from "./representationAgent";
|
||||||
import RepAppellant from "./representationAppellant";
|
import RepAppellant from "./representationAppellant";
|
||||||
|
import ConsultationAppellant from "./consultationAppellant";
|
||||||
|
import ConsultationAgent from "./consultationAgent";
|
||||||
import RepCapacitySelection from "./representationCapacitySelection";
|
import RepCapacitySelection from "./representationCapacitySelection";
|
||||||
import RepCompleteSubmit from "./representationCompleteSubmit";
|
import RepCompleteSubmit from "./representationCompleteSubmit";
|
||||||
import RepInterestedPartyPerson from "./representationInterestedPartyPerson";
|
import RepInterestedPartyPerson from "./representationInterestedPartyPerson";
|
||||||
|
import ConsultationInterestedPartyPerson from "./consultationInterestedPartyPerson";
|
||||||
|
|
||||||
import RepLPA from "./representationLPA";
|
import RepLPA from "./representationLPA";
|
||||||
import RepLPACapacitySelection from "./representationLPACapacitySelection";
|
import RepLPACapacitySelection from "./representationLPACapacitySelection";
|
||||||
import RepLandOwner from "./representationLandowner";
|
import RepLandOwner from "./representationLandowner";
|
||||||
@@ -67,9 +71,13 @@ let MakeRepresentation = (props) => {
|
|||||||
let setCaseQueryObj = props[currentType] || {};
|
let setCaseQueryObj = props[currentType] || {};
|
||||||
var casesObj = {};
|
var casesObj = {};
|
||||||
|
|
||||||
|
const appealType = currentView.caseReference.appealType;
|
||||||
|
const accountDetails = props.props.accountDetails.accountDetails;
|
||||||
|
const caseReferenceObj = props.props.currentView.caseReference;
|
||||||
|
|
||||||
const updateQuestionnaireCount = () => {
|
const updateQuestionnaireCount = () => {
|
||||||
{
|
{
|
||||||
switch (currentView.caseReference.appealType) {
|
switch (appealType) {
|
||||||
case 846040000:
|
case 846040000:
|
||||||
case 846040001:
|
case 846040001:
|
||||||
case 846040025:
|
case 846040025:
|
||||||
@@ -95,12 +103,22 @@ let MakeRepresentation = (props) => {
|
|||||||
let questionnaireCount = updateQuestionnaireCount();
|
let questionnaireCount = updateQuestionnaireCount();
|
||||||
|
|
||||||
const isLPA =
|
const isLPA =
|
||||||
props.props.accountDetails.accountDetails[
|
accountDetails[
|
||||||
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
|
||||||
] == "LPA"
|
] == "LPA"
|
||||||
? true
|
? true
|
||||||
: false;
|
: false;
|
||||||
|
|
||||||
|
// const isNRW = accountDetails.emailaddress1.includes(
|
||||||
|
// "@cyfoethnaturiolcymru.gov.uk"
|
||||||
|
// )
|
||||||
|
// ? true
|
||||||
|
// : false;
|
||||||
|
|
||||||
|
const isNRW = accountDetails.emailaddress1.includes("@rdbtech.co.uk")
|
||||||
|
? true
|
||||||
|
: false;
|
||||||
|
|
||||||
const setRepFileName = (values) => {
|
const setRepFileName = (values) => {
|
||||||
//console.log("---------------\n", values);
|
//console.log("---------------\n", values);
|
||||||
if (
|
if (
|
||||||
@@ -132,6 +150,8 @@ let MakeRepresentation = (props) => {
|
|||||||
case "lpa":
|
case "lpa":
|
||||||
case "LPA":
|
case "LPA":
|
||||||
repCap = "LPA";
|
repCap = "LPA";
|
||||||
|
case "NRW":
|
||||||
|
repCap = "NRW";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -156,8 +176,14 @@ let MakeRepresentation = (props) => {
|
|||||||
case "Final comments":
|
case "Final comments":
|
||||||
repType = "Comments";
|
repType = "Comments";
|
||||||
break;
|
break;
|
||||||
|
case "Consultation Response":
|
||||||
|
repType = "Consultation_Response";
|
||||||
|
break;
|
||||||
case "Local Impact Report":
|
case "Local Impact Report":
|
||||||
repType = "Impact";
|
repType = "Local_Impact_Report";
|
||||||
|
break;
|
||||||
|
case "Marine Impact Report":
|
||||||
|
repType = "Marine_Impact_Report";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "Other":
|
case "Other":
|
||||||
@@ -235,12 +261,11 @@ let MakeRepresentation = (props) => {
|
|||||||
t("myrepresentations:capacity-options-arr-agent"),
|
t("myrepresentations:capacity-options-arr-agent"),
|
||||||
];
|
];
|
||||||
|
|
||||||
props.props.currentView.caseReference.appealType != 846040017
|
appealType != 846040017
|
||||||
? capacityOptionsArr.push(
|
? capacityOptionsArr.push(
|
||||||
t("myrepresentations:capacity-options-arr-interested")
|
t("myrepresentations:capacity-options-arr-interested")
|
||||||
)
|
)
|
||||||
: props.props.currentView.caseReference.specialistProcess !=
|
: caseReferenceObj.specialistProcess != 846040000 &&
|
||||||
846040000 &&
|
|
||||||
capacityOptionsArr.push(
|
capacityOptionsArr.push(
|
||||||
t("myrepresentations:capacity-options-arr-interested")
|
t("myrepresentations:capacity-options-arr-interested")
|
||||||
);
|
);
|
||||||
@@ -308,11 +333,13 @@ let MakeRepresentation = (props) => {
|
|||||||
const buildRepsArr = (detailsObj) => {
|
const buildRepsArr = (detailsObj) => {
|
||||||
let buildArr = [];
|
let buildArr = [];
|
||||||
|
|
||||||
// console.log(currentView.caseReference.appealType, "");
|
// console.log(appealType, "");
|
||||||
|
|
||||||
let todaysDate = new Date();
|
let todaysDate = new Date();
|
||||||
|
|
||||||
const isDNS = currentView.caseReference.appealType == 846040011;
|
const isDNS = appealType == 846040011;
|
||||||
|
|
||||||
|
const isSIPS = appealType == 846040002;
|
||||||
|
|
||||||
let startDate;
|
let startDate;
|
||||||
let questionnaireDate;
|
let questionnaireDate;
|
||||||
@@ -365,30 +392,30 @@ let MakeRepresentation = (props) => {
|
|||||||
)));
|
)));
|
||||||
|
|
||||||
isLPA &&
|
isLPA &&
|
||||||
currentView.caseReference.appealType != 846040019 &&
|
appealType != 846040019 &&
|
||||||
currentView.caseReference.appealType != 846040011 &&
|
appealType != 846040011 &&
|
||||||
currentView.caseReference.appealType != 846040015 &&
|
appealType != 846040015 &&
|
||||||
currentView.caseReference.appealType != 846040016 &&
|
appealType != 846040016 &&
|
||||||
todaysDate >= startDate &&
|
todaysDate >= startDate &&
|
||||||
todaysDate <= finalCommentsDate &&
|
todaysDate <= finalCommentsDate &&
|
||||||
buildArr.push("Questionnaire");
|
buildArr.push("Questionnaire");
|
||||||
|
|
||||||
isLPA &&
|
isLPA &&
|
||||||
isDNS &&
|
isDNS &&
|
||||||
currentView.caseReference.appealType != 846040019 &&
|
appealType != 846040019 &&
|
||||||
todaysDate >= startDate &&
|
todaysDate >= startDate &&
|
||||||
todaysDate <= finalCommentsDate &&
|
todaysDate <= finalCommentsDate &&
|
||||||
buildArr.push("Local Impact Report");
|
buildArr.push("Local Impact Report");
|
||||||
|
|
||||||
isLPA &&
|
isLPA &&
|
||||||
isDNS &&
|
isDNS &&
|
||||||
currentView.caseReference.appealType != 846040019 &&
|
appealType != 846040019 &&
|
||||||
todaysDate >= startDate &&
|
todaysDate >= startDate &&
|
||||||
todaysDate <= finalCommentsDate &&
|
todaysDate <= finalCommentsDate &&
|
||||||
buildArr.push("Statement");
|
buildArr.push("Statement");
|
||||||
|
|
||||||
!isDNS &&
|
!isDNS &&
|
||||||
currentView.caseReference.appealType != 846040004 &&
|
appealType != 846040004 &&
|
||||||
todaysDate >= startDate &&
|
todaysDate >= startDate &&
|
||||||
todaysDate <= statementDueDate &&
|
todaysDate <= statementDueDate &&
|
||||||
buildArr.push("Statement");
|
buildArr.push("Statement");
|
||||||
@@ -399,14 +426,14 @@ let MakeRepresentation = (props) => {
|
|||||||
todaysDate <= statementDueDate &&
|
todaysDate <= statementDueDate &&
|
||||||
buildArr.push("Statement");
|
buildArr.push("Statement");
|
||||||
|
|
||||||
(currentView.caseReference.appealType != 846040004 ||
|
(appealType != 846040004 ||
|
||||||
(currentView.caseReference.appealType == 846040015 &&
|
(appealType == 846040015 &&
|
||||||
currentView.caseReference.specialistProcess != 846040001)) &&
|
currentView.caseReference.specialistProcess != 846040001)) &&
|
||||||
todaysDate >= statementDueDate &&
|
todaysDate >= statementDueDate &&
|
||||||
todaysDate <= finalCommentsDate &&
|
todaysDate <= finalCommentsDate &&
|
||||||
buildArr.push("Final comments");
|
buildArr.push("Final comments");
|
||||||
|
|
||||||
currentView.caseReference.appealType == 846040004 &&
|
appealType == 846040004 &&
|
||||||
currentView.caseReference.specialistProcess != 846040001 &&
|
currentView.caseReference.specialistProcess != 846040001 &&
|
||||||
todaysDate >= statementDueDate &&
|
todaysDate >= statementDueDate &&
|
||||||
todaysDate <= finalCommentsDate &&
|
todaysDate <= finalCommentsDate &&
|
||||||
@@ -414,10 +441,16 @@ let MakeRepresentation = (props) => {
|
|||||||
|
|
||||||
//is LPA Advert part 3 no statement
|
//is LPA Advert part 3 no statement
|
||||||
isLPA &&
|
isLPA &&
|
||||||
currentView.caseReference.appealType == 846040018 &&
|
appealType == 846040018 &&
|
||||||
currentView.caseReference.specialistProcess == 846040000 &&
|
currentView.caseReference.specialistProcess == 846040000 &&
|
||||||
buildArr.pop("Statements");
|
buildArr.pop("Statements");
|
||||||
|
|
||||||
|
console.log("is this a sip......", isSIPS, !isLPA);
|
||||||
|
|
||||||
|
isSIPS && buildArr.push("Consultation Response");
|
||||||
|
isSIPS && buildArr.push("Local Impact Report");
|
||||||
|
isSIPS && isNRW && buildArr.push("Marine Impact Report");
|
||||||
|
|
||||||
return buildArr;
|
return buildArr;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -436,6 +469,7 @@ let MakeRepresentation = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const whichControl = () => {
|
const whichControl = () => {
|
||||||
|
let SipsOrRep;
|
||||||
if (
|
if (
|
||||||
isLPA &&
|
isLPA &&
|
||||||
_.isEmpty(currentView.representationCapacity)
|
_.isEmpty(currentView.representationCapacity)
|
||||||
@@ -502,8 +536,13 @@ let MakeRepresentation = (props) => {
|
|||||||
"myrepresentations:capacity-options-arr-appellant"
|
"myrepresentations:capacity-options-arr-appellant"
|
||||||
).toLocaleLowerCase():
|
).toLocaleLowerCase():
|
||||||
//setRepresentationCapacity("appellant");
|
//setRepresentationCapacity("appellant");
|
||||||
|
|
||||||
|
SipsOrRep =
|
||||||
|
appealType == 846040002
|
||||||
|
? ConsultationAppellant
|
||||||
|
: RepAppellant;
|
||||||
return (
|
return (
|
||||||
<RepAppellant
|
<SipsOrRep
|
||||||
formObj={formObj}
|
formObj={formObj}
|
||||||
appellantApplicantRepresentationArr={buildRepsArr(
|
appellantApplicantRepresentationArr={buildRepsArr(
|
||||||
detailsObj
|
detailsObj
|
||||||
@@ -532,7 +571,7 @@ let MakeRepresentation = (props) => {
|
|||||||
// setRepresentationCapacity("LPA");
|
// setRepresentationCapacity("LPA");
|
||||||
// }, []);
|
// }, []);
|
||||||
|
|
||||||
console.log(currentView.caseReference.appealType);
|
console.log(appealType);
|
||||||
return (
|
return (
|
||||||
<RepLPA
|
<RepLPA
|
||||||
formObj={formObj}
|
formObj={formObj}
|
||||||
@@ -568,8 +607,12 @@ let MakeRepresentation = (props) => {
|
|||||||
"myrepresentations:capacity-options-arr-agent"
|
"myrepresentations:capacity-options-arr-agent"
|
||||||
).toLowerCase():
|
).toLowerCase():
|
||||||
//setRepresentationCapacity("agent");
|
//setRepresentationCapacity("agent");
|
||||||
|
|
||||||
|
SipsOrRep =
|
||||||
|
appealType == 846040002 ? ConsultationAgent : RepAgent;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RepAgent
|
<SipsOrRep
|
||||||
formObj={formObj}
|
formObj={formObj}
|
||||||
appellantApplicantRepresentationArr={buildRepsArr(
|
appellantApplicantRepresentationArr={buildRepsArr(
|
||||||
detailsObj
|
detailsObj
|
||||||
@@ -595,8 +638,14 @@ let MakeRepresentation = (props) => {
|
|||||||
"myrepresentations:capacity-options-arr-interested"
|
"myrepresentations:capacity-options-arr-interested"
|
||||||
).toLowerCase():
|
).toLowerCase():
|
||||||
// setRepresentationCapacity("interestedpartyperson");
|
// setRepresentationCapacity("interestedpartyperson");
|
||||||
|
|
||||||
|
SipsOrRep =
|
||||||
|
appealType == 846040002
|
||||||
|
? ConsultationInterestedPartyPerson
|
||||||
|
: RepInterestedPartyPerson;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RepInterestedPartyPerson
|
<SipsOrRep
|
||||||
formObj={formObj}
|
formObj={formObj}
|
||||||
interestedPersonRepresentationArr={buildRepsArr(
|
interestedPersonRepresentationArr={buildRepsArr(
|
||||||
detailsObj
|
detailsObj
|
||||||
@@ -666,7 +715,7 @@ let MakeRepresentation = (props) => {
|
|||||||
|
|
||||||
const whichProgress = () => {
|
const whichProgress = () => {
|
||||||
{
|
{
|
||||||
switch (currentView.caseReference.appealType) {
|
switch (appealType) {
|
||||||
case 846040000:
|
case 846040000:
|
||||||
case 846040001:
|
case 846040001:
|
||||||
case 846040025:
|
case 846040025:
|
||||||
@@ -781,15 +830,12 @@ let MakeRepresentation = (props) => {
|
|||||||
|
|
||||||
Object.assign(values, {
|
Object.assign(values, {
|
||||||
"containerID": props.props.accountDetails.containerID,
|
"containerID": props.props.accountDetails.containerID,
|
||||||
"appealType":
|
"appealType": appealType || caseReferenceObj.repDetails.appealType,
|
||||||
props.props.currentView.caseReference.appealType ||
|
|
||||||
props.props.currentView.caseReference.repDetails.appealType,
|
|
||||||
"incidentID":
|
"incidentID":
|
||||||
props.props.currentView.caseReference.incidentid ||
|
caseReferenceObj.incidentid ||
|
||||||
props.props.currentView.caseReference.repDetails.incidentid,
|
caseReferenceObj.repDetails.incidentid,
|
||||||
"caseRef": props.props.currentView.caseReference.currentReference,
|
"caseRef": caseReferenceObj.currentReference,
|
||||||
"casereference":
|
"casereference": caseReferenceObj.currentReference,
|
||||||
props.props.currentView.caseReference.currentReference,
|
|
||||||
"pinswg_questionnaireduedate":
|
"pinswg_questionnaireduedate":
|
||||||
detailsObj.pinswg_questionnaireduedate,
|
detailsObj.pinswg_questionnaireduedate,
|
||||||
"pinswg_statementduedate":
|
"pinswg_statementduedate":
|
||||||
@@ -801,12 +847,10 @@ let MakeRepresentation = (props) => {
|
|||||||
"pinswg_finalcommentsduedate":
|
"pinswg_finalcommentsduedate":
|
||||||
detailsObj.pinswg_finalcommentsduedate ||
|
detailsObj.pinswg_finalcommentsduedate ||
|
||||||
detailsObj.pinswg_endofrepresentationperiod,
|
detailsObj.pinswg_endofrepresentationperiod,
|
||||||
"pinswg_name":
|
"pinswg_name": caseReferenceObj.currentReference,
|
||||||
props.props.currentView.caseReference.currentReference,
|
"firstname": accountDetails.firstname,
|
||||||
"firstname": props.props.accountDetails.accountDetails.firstname,
|
"lastname": accountDetails.lastname,
|
||||||
"lastname": props.props.accountDetails.accountDetails.lastname,
|
"emailAddress": accountDetails.emailaddress1,
|
||||||
"emailAddress":
|
|
||||||
props.props.accountDetails.accountDetails.emailaddress1,
|
|
||||||
"siteAddress":
|
"siteAddress":
|
||||||
detailsObj.pinswg_siteaddressline1 +
|
detailsObj.pinswg_siteaddressline1 +
|
||||||
(detailsObj.pinswg_siteaddressline2 != null
|
(detailsObj.pinswg_siteaddressline2 != null
|
||||||
@@ -850,18 +894,14 @@ let MakeRepresentation = (props) => {
|
|||||||
updateBody = setRepFileName(values);
|
updateBody = setRepFileName(values);
|
||||||
|
|
||||||
Object.assign(updateBody, {
|
Object.assign(updateBody, {
|
||||||
"pinswg_name":
|
"pinswg_name": caseReferenceObj.currentReference,
|
||||||
props.props.currentView.caseReference.currentReference,
|
|
||||||
"containerID": props.props.accountDetails.containerID,
|
"containerID": props.props.accountDetails.containerID,
|
||||||
"appealType":
|
"appealType": appealType || caseReferenceObj.repDetails.appealType,
|
||||||
props.props.currentView.caseReference.appealType ||
|
"casereference": caseReferenceObj.currentReference,
|
||||||
props.props.currentView.caseReference.repDetails.appealType,
|
|
||||||
"casereference":
|
|
||||||
props.props.currentView.caseReference.currentReference,
|
|
||||||
"incidentID":
|
"incidentID":
|
||||||
props.props.currentView.caseReference.incidentid ||
|
caseReferenceObj.incidentid ||
|
||||||
props.props.currentView.caseReference.repDetails.incidentid,
|
caseReferenceObj.repDetails.incidentid,
|
||||||
"caseRef": props.props.currentView.caseReference.currentReference,
|
"caseRef": caseReferenceObj.currentReference,
|
||||||
});
|
});
|
||||||
|
|
||||||
updateBody = JSON.stringify(updateBody);
|
updateBody = JSON.stringify(updateBody);
|
||||||
@@ -965,15 +1005,12 @@ let MakeRepresentation = (props) => {
|
|||||||
Object.assign(values, {
|
Object.assign(values, {
|
||||||
"containerID": props.props.accountDetails.containerID,
|
"containerID": props.props.accountDetails.containerID,
|
||||||
"appealType":
|
"appealType":
|
||||||
props.props.currentView.caseReference.appealType ||
|
appealType || caseReferenceObj.repDetails.appealType,
|
||||||
props.props.currentView.caseReference.repDetails.appealType,
|
|
||||||
"incidentID":
|
"incidentID":
|
||||||
props.props.currentView.caseReference.incidentid ||
|
caseReferenceObj.incidentid ||
|
||||||
props.props.currentView.caseReference.repDetails.incidentid,
|
caseReferenceObj.repDetails.incidentid,
|
||||||
"caseRef":
|
"caseRef": caseReferenceObj.currentReference,
|
||||||
props.props.currentView.caseReference.currentReference,
|
"casereference": caseReferenceObj.currentReference,
|
||||||
"casereference":
|
|
||||||
props.props.currentView.caseReference.currentReference,
|
|
||||||
"pinswg_questionnaireduedate":
|
"pinswg_questionnaireduedate":
|
||||||
detailsObj.pinswg_questionnaireduedate,
|
detailsObj.pinswg_questionnaireduedate,
|
||||||
"pinswg_endofrepresentationperiod":
|
"pinswg_endofrepresentationperiod":
|
||||||
@@ -984,13 +1021,10 @@ let MakeRepresentation = (props) => {
|
|||||||
"pinswg_statementsduedate": detailsObj.pinswg_statementsduedate,
|
"pinswg_statementsduedate": detailsObj.pinswg_statementsduedate,
|
||||||
"pinswg_finalcommentsduedate":
|
"pinswg_finalcommentsduedate":
|
||||||
detailsObj.pinswg_finalcommentsduedate,
|
detailsObj.pinswg_finalcommentsduedate,
|
||||||
"pinswg_name":
|
"pinswg_name": caseReferenceObj.currentReference,
|
||||||
props.props.currentView.caseReference.currentReference,
|
"firstname": accountDetails.firstname,
|
||||||
"firstname":
|
"lastname": accountDetails.lastname,
|
||||||
props.props.accountDetails.accountDetails.firstname,
|
"emailAddress": accountDetails.emailaddress1,
|
||||||
"lastname": props.props.accountDetails.accountDetails.lastname,
|
|
||||||
"emailAddress":
|
|
||||||
props.props.accountDetails.accountDetails.emailaddress1,
|
|
||||||
"siteAddress":
|
"siteAddress":
|
||||||
detailsObj.pinswg_siteaddressline1 +
|
detailsObj.pinswg_siteaddressline1 +
|
||||||
(detailsObj.pinswg_siteaddressline2 != null
|
(detailsObj.pinswg_siteaddressline2 != null
|
||||||
@@ -1208,9 +1242,13 @@ let MakeRepresentation = (props) => {
|
|||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<h1 className="govuk-heading-l">
|
<h1 className="govuk-heading-l">
|
||||||
{t(
|
{appealType == 846040002
|
||||||
"myrepresentations:make-a-representation-on-label"
|
? t(
|
||||||
)}{" "}
|
"myrepresentations:make-a-consultation-on-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"myrepresentations:make-a-representation-on-label"
|
||||||
|
)}{" "}
|
||||||
{currentView.caseReference.currentReference}{" "}
|
{currentView.caseReference.currentReference}{" "}
|
||||||
</h1>
|
</h1>
|
||||||
<div id="rep-form">
|
<div id="rep-form">
|
||||||
@@ -1230,7 +1268,9 @@ let MakeRepresentation = (props) => {
|
|||||||
<div className="govuk-summary-list">
|
<div className="govuk-summary-list">
|
||||||
<div className="govuk-body-s">
|
<div className="govuk-body-s">
|
||||||
{currentView.caseReference
|
{currentView.caseReference
|
||||||
.appealType == 846040011
|
.appealType == 846040011 ||
|
||||||
|
currentView.caseReference
|
||||||
|
.appealType == 846040002
|
||||||
? t(
|
? t(
|
||||||
"myrepresentations:local-impact-report"
|
"myrepresentations:local-impact-report"
|
||||||
)
|
)
|
||||||
@@ -1245,43 +1285,86 @@ let MakeRepresentation = (props) => {
|
|||||||
) ||
|
) ||
|
||||||
detailsObj.hasOwnProperty(
|
detailsObj.hasOwnProperty(
|
||||||
"pinswg_endofrepresentationperiod"
|
"pinswg_endofrepresentationperiod"
|
||||||
|
) ||
|
||||||
|
detailsObj.hasOwnProperty(
|
||||||
|
"pinswg_consultationclose"
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_questionnaireduedate ||
|
detailsObj.pinswg_questionnaireduedate ||
|
||||||
detailsObj.pinswg_endofrepresentationperiod
|
detailsObj.pinswg_endofrepresentationperiod ||
|
||||||
|
detailsObj.pinswg_consultationclose
|
||||||
)
|
)
|
||||||
: "N/A"}
|
: "N/A"}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-body-s">
|
|
||||||
{t(
|
|
||||||
"myrepresentations:statements-due-label"
|
|
||||||
)}
|
|
||||||
:
|
|
||||||
<span className="govuk-body-s">
|
|
||||||
{" "}
|
|
||||||
{formatDates(
|
|
||||||
detailsObj.pinswg_statementduedate ||
|
|
||||||
detailsObj.pinswg_statementsduedate ||
|
|
||||||
detailsObj.pinswg_endofrepresentationperiod
|
|
||||||
)}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{currentView.caseReference
|
{currentView.caseReference
|
||||||
.appealType != 846040011 && (
|
.appealType != 846040002 && (
|
||||||
<div className="govuk-body-s">
|
<div className="govuk-body-s">
|
||||||
{t(
|
{t(
|
||||||
"myrepresentations:final-comments-due-label"
|
"myrepresentations:statements-due-label"
|
||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
<span className="govuk-body-s">
|
<span className="govuk-body-s">
|
||||||
{" "}
|
{" "}
|
||||||
{formatDates(
|
{formatDates(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_statementduedate ||
|
||||||
|
detailsObj.pinswg_statementsduedate ||
|
||||||
|
detailsObj.pinswg_endofrepresentationperiod
|
||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{currentView.caseReference
|
||||||
|
.appealType == 846040002 &&
|
||||||
|
isNRW && (
|
||||||
|
<div className="govuk-body-s">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:marine-impact-report"
|
||||||
|
)}
|
||||||
|
:
|
||||||
|
<span className="govuk-body-s">
|
||||||
|
{" "}
|
||||||
|
{formatDates(
|
||||||
|
detailsObj.pinswg_consultationclose
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{currentView.caseReference
|
||||||
|
.appealType == 846040002 && (
|
||||||
|
<div className="govuk-body-s">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:consultation-close-label"
|
||||||
|
)}
|
||||||
|
:
|
||||||
|
<span className="govuk-body-s">
|
||||||
|
{" "}
|
||||||
|
{formatDates(
|
||||||
|
detailsObj.pinswg_consultationclose
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{currentView.caseReference
|
||||||
|
.appealType != 846040011 ||
|
||||||
|
(currentView.caseReference
|
||||||
|
.appealType !=
|
||||||
|
846040002 && (
|
||||||
|
<div className="govuk-body-s">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:final-comments-due-label"
|
||||||
|
)}
|
||||||
|
:
|
||||||
|
<span className="govuk-body-s">
|
||||||
|
{" "}
|
||||||
|
{formatDates(
|
||||||
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ let RepCapacitySelection = (props) => {
|
|||||||
));
|
));
|
||||||
|
|
||||||
const required = (value) => (value ? undefined : "Required");
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
const appealType = props.props.currentView.caseReference.appealType;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -39,6 +40,7 @@ let RepCapacitySelection = (props) => {
|
|||||||
myRepresentations={props.props.myRepresentations}
|
myRepresentations={props.props.myRepresentations}
|
||||||
props={props}
|
props={props}
|
||||||
setCurrentReference={setCurrentReference}
|
setCurrentReference={setCurrentReference}
|
||||||
|
appealType={appealType}
|
||||||
/>{" "}
|
/>{" "}
|
||||||
<div id="rep-details" className="">
|
<div id="rep-details" className="">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
@@ -52,9 +54,15 @@ let RepCapacitySelection = (props) => {
|
|||||||
<Field
|
<Field
|
||||||
name="representationCapacity"
|
name="representationCapacity"
|
||||||
datafieldname="representationCapacity"
|
datafieldname="representationCapacity"
|
||||||
label={t(
|
label={
|
||||||
"myrepresentations:capacity-select-what-capacity-label"
|
appealType != 846040002
|
||||||
)}
|
? t(
|
||||||
|
"myrepresentations:capacity-select-what-capacity-label"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"myrepresentations:sips-capacity-select-what-capacity-label"
|
||||||
|
)
|
||||||
|
}
|
||||||
options={capacityOptionsArr}
|
options={capacityOptionsArr}
|
||||||
id="representationCapacity"
|
id="representationCapacity"
|
||||||
className="govuk-radios__input"
|
className="govuk-radios__input"
|
||||||
|
|||||||
@@ -264,21 +264,33 @@ const RepCompleteSubmit = (props) => {
|
|||||||
<div className="govuk-grid-row govuk-body">
|
<div className="govuk-grid-row govuk-body">
|
||||||
<h1 className="govuk-heading-m ">
|
<h1 className="govuk-heading-m ">
|
||||||
{" "}
|
{" "}
|
||||||
{t(
|
{repFormData.appealType == 846040002
|
||||||
"myrepresentations:rep-check-submit-heading"
|
? t(
|
||||||
)}
|
"myrepresentations:consultation-check-submit-heading"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"myrepresentations:rep-check-submit-heading"
|
||||||
|
)}
|
||||||
</h1>
|
</h1>
|
||||||
<dl className="govuk-summary-list ">
|
<dl className="govuk-summary-list ">
|
||||||
<h2 className="govuk-heading-m govuk-!-margin-top-9">
|
<h2 className="govuk-heading-m govuk-!-margin-top-9">
|
||||||
{t(
|
{repFormData.appealType == 846040002
|
||||||
"myrepresentations:rep-check-your-rep-heading"
|
? t(
|
||||||
)}
|
"myrepresentations:consultation-check-your-rep-heading"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"myrepresentations:rrep-check-your-rep-heading"
|
||||||
|
)}
|
||||||
</h2>
|
</h2>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
{repFormData.appealType == 846040002
|
||||||
"case:representation-representation-type"
|
? t(
|
||||||
)}
|
"case:consultation-representation-type"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:representation-representation-type"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
|
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
@@ -427,58 +439,63 @@ const RepCompleteSubmit = (props) => {
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{repFormData.representationType !=
|
{repFormData.representationType !=
|
||||||
"Questionnaire" && (
|
"Questionnaire" &&
|
||||||
<div className="govuk-summary-list__row">
|
repFormData.appealType != 846040002 && (
|
||||||
<dt className="govuk-summary-list__key">
|
<div className="govuk-summary-list__row">
|
||||||
{t("case:representation-comments")}
|
<dt className="govuk-summary-list__key">
|
||||||
</dt>
|
{t(
|
||||||
|
"case:representation-comments"
|
||||||
|
)}
|
||||||
|
</dt>
|
||||||
|
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
<span
|
<span
|
||||||
className="multiline-elipsis"
|
className="multiline-elipsis"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: repFormData.representationComments,
|
__html: repFormData.representationComments,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dd className="govuk-summary-list__actions">
|
<dd className="govuk-summary-list__actions">
|
||||||
<a
|
<a
|
||||||
className="govuk-link"
|
className="govuk-link"
|
||||||
href="#"
|
href="#"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
// setSubmitBack();
|
// setSubmitBack();
|
||||||
|
|
||||||
setCurrentReference({
|
setCurrentReference({
|
||||||
"ticketnumber":
|
"ticketnumber":
|
||||||
repFormData.ticketnumber,
|
repFormData.ticketnumber,
|
||||||
"currentReference":
|
"currentReference":
|
||||||
repFormData.caseRef,
|
repFormData.caseRef,
|
||||||
"currentType":
|
"currentType":
|
||||||
"myRepresentations",
|
"myRepresentations",
|
||||||
"incidentid":
|
"incidentid":
|
||||||
repFormData.incidentID,
|
repFormData.incidentID,
|
||||||
"appealType":
|
"appealType":
|
||||||
repFormData.appealType,
|
repFormData.appealType,
|
||||||
"repDetails":
|
"repDetails":
|
||||||
repFormData,
|
repFormData,
|
||||||
});
|
});
|
||||||
setRepresentationSubmit(
|
setRepresentationSubmit(
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("common:change-link-label")}
|
{t(
|
||||||
<span className="govuk-visually-hidden">
|
"common:change-link-label"
|
||||||
{" "}
|
)}
|
||||||
{/* {FieldsTranslations(
|
<span className="govuk-visually-hidden">
|
||||||
|
{" "}
|
||||||
|
{/* {FieldsTranslations(
|
||||||
rows[0].value
|
rows[0].value
|
||||||
)} */}
|
)} */}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:representation-files")}
|
{t("case:representation-files")}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const RepDetails = (props) => {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
|
|
||||||
const { currentType, casesObj } = props;
|
const { currentType, casesObj, appealType } = props;
|
||||||
|
|
||||||
let { caseReference } = props;
|
let { caseReference } = props;
|
||||||
|
|
||||||
@@ -97,10 +97,14 @@ const RepDetails = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
{t("myrepresentations:capacity-para-one")}
|
{appealType == 846040002
|
||||||
|
? t("myrepresentations:sips-capacity-para-one")
|
||||||
|
: t("myrepresentations:capacity-para-one")}
|
||||||
</p>
|
</p>
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
{t("myrepresentations:capacity-para-two")}
|
{appealType == 846040002
|
||||||
|
? t("myrepresentations:sips-capacity-para-two")
|
||||||
|
: t("myrepresentations:capacity-para-two")}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ const RepInterestedPartyPerson = (props) => {
|
|||||||
<>
|
<>
|
||||||
<h2 className="govuk-heading-m ">
|
<h2 className="govuk-heading-m ">
|
||||||
{t(
|
{t(
|
||||||
"myrepresentations:representation-from-an-interested-person-heading"
|
"myrepresentations:consultation-from-an-interested-person-heading"
|
||||||
)}
|
)}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|||||||
@@ -94,12 +94,15 @@ const RepsOnResults = (props) => {
|
|||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
{(_.has(detailsObj, "pinswg_startdate") ||
|
{(_.has(detailsObj, "pinswg_startdate") ||
|
||||||
_.has(detailsObj, "pinswg_applicationacceptedasvalid")) &&
|
_.has(detailsObj, "pinswg_applicationacceptedasvalid") ||
|
||||||
|
_.has(detailsObj, "pinswg_consultationopen")) &&
|
||||||
showReps(
|
showReps(
|
||||||
detailsObj.pinswg_startdate ||
|
detailsObj.pinswg_startdate ||
|
||||||
detailsObj.pinswg_applicationacceptedasvalid,
|
detailsObj.pinswg_applicationacceptedasvalid ||
|
||||||
|
detailsObj.pinswg_consultationopen,
|
||||||
detailsObj.pinswg_finalcommentsduedate ||
|
detailsObj.pinswg_finalcommentsduedate ||
|
||||||
detailsObj.pinswg_endofrepresentationperiod
|
detailsObj.pinswg_endofrepresentationperiod ||
|
||||||
|
detailsObj.pinswg_consultationclose
|
||||||
) && (
|
) && (
|
||||||
<>
|
<>
|
||||||
{showRepButton(detailsObj.appealType) ? (
|
{showRepButton(detailsObj.appealType) ? (
|
||||||
@@ -119,8 +122,7 @@ const RepsOnResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
</Link> */}
|
</Link> */}
|
||||||
<div className="govuk-body govuk-!-font-size-14">
|
<div className="govuk-body govuk-!-font-size-14">
|
||||||
{props.currentView.caseReference
|
{props.appealType == 846040002
|
||||||
.appealType == 846040002
|
|
||||||
? t(
|
? t(
|
||||||
"case:summary-consultation-open-label"
|
"case:summary-consultation-open-label"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -343,6 +343,9 @@ const SearchResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
<RepsOnResults
|
<RepsOnResults
|
||||||
detailsObj={detailsObj}
|
detailsObj={detailsObj}
|
||||||
|
appealType={
|
||||||
|
item.pinswg_appealcasetype
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
|
|||||||
@@ -95,6 +95,7 @@
|
|||||||
"summary-no-details-label": "Nid oes unrhyw fanylion ar gael ar hyn o bryd",
|
"summary-no-details-label": "Nid oes unrhyw fanylion ar gael ar hyn o bryd",
|
||||||
"summary-case-relevant-authoritylabel": "Awdurdod perthnasol",
|
"summary-case-relevant-authoritylabel": "Awdurdod perthnasol",
|
||||||
"representation-representation-type": "Pa fath o sylw ydych chi'n ei wneud?",
|
"representation-representation-type": "Pa fath o sylw ydych chi'n ei wneud?",
|
||||||
|
"consultation-representation-type": "Pa fath o ymgynghoriad ydych chi'n ei wneud?",
|
||||||
"representation-onbehalfof": "A ydych yn gweithredu ar ran cwmni, grŵp neu sefydliad",
|
"representation-onbehalfof": "A ydych yn gweithredu ar ran cwmni, grŵp neu sefydliad",
|
||||||
"representation-onbehalfof-details": "Enw'r cwmni/grŵp/sefydliad",
|
"representation-onbehalfof-details": "Enw'r cwmni/grŵp/sefydliad",
|
||||||
"representation-comments": "Sylwadau",
|
"representation-comments": "Sylwadau",
|
||||||
|
|||||||
@@ -3,18 +3,26 @@
|
|||||||
"sign-in-to-raise-rep-label": "I wneud sylwadau ar yr apêl hon, bydd angen i chi fewngofnodi gyda'ch cyfeiriad e-bost. Os nad ydych eisiau mewngofnodi i wneud sylwadau, cysylltwch â'r canlynol",
|
"sign-in-to-raise-rep-label": "I wneud sylwadau ar yr apêl hon, bydd angen i chi fewngofnodi gyda'ch cyfeiriad e-bost. Os nad ydych eisiau mewngofnodi i wneud sylwadau, cysylltwch â'r canlynol",
|
||||||
"sign-in-to-raise-rep-button": "Mewngofnodwch i wneud sylwadau",
|
"sign-in-to-raise-rep-button": "Mewngofnodwch i wneud sylwadau",
|
||||||
"make-a-representation-on-label": "Gwnewch sylwadau ar",
|
"make-a-representation-on-label": "Gwnewch sylwadau ar",
|
||||||
|
"make-a-consultation-on-label": "Gwneud ymateb i'r ymgynghoriad ar",
|
||||||
"make-a-representation-for-label": "Gwnewch sylwadau ar ran",
|
"make-a-representation-for-label": "Gwnewch sylwadau ar ran",
|
||||||
"timetable-title": "Amserlen",
|
"timetable-title": "Amserlen",
|
||||||
"questionnaire-due-label": "Holiadur i ddod",
|
"questionnaire-due-label": "Holiadur i ddod",
|
||||||
"local-impact-report": "Adroddiad ar yr Effaith Leol i ddod",
|
"local-impact-report": "Adroddiad ar yr Effaith Leol i ddod",
|
||||||
|
"marine-impact-report": "Adroddiad Effaith Morol i'w gyhoeddi",
|
||||||
"statements-due-label": "Datganiadau i ddod",
|
"statements-due-label": "Datganiadau i ddod",
|
||||||
"final-comments-due-label": "Sylwadau terfynol i ddod",
|
"final-comments-due-label": "Sylwadau terfynol i ddod",
|
||||||
|
"consultation-close-label": "Daeth y cyfnod ymgynghori i ben",
|
||||||
"representation-from-an-agent-heading": "Sylwadau gan Asiant",
|
"representation-from-an-agent-heading": "Sylwadau gan Asiant",
|
||||||
|
"consultation-from-an-agent-heading": "Ymateb ymgynghorydd gan Asiant",
|
||||||
"representation-from-an-lpa-heading": "Sylwadau gan ACLl",
|
"representation-from-an-lpa-heading": "Sylwadau gan ACLl",
|
||||||
"representation-from-an-appellant-heading": "Sylwadau gan Apelydd",
|
"representation-from-an-appellant-heading": "Sylwadau gan Apelydd",
|
||||||
|
"consultation-from-an-appellant-heading": " Ymateb i'r ymgynghoriad gan Apelydd",
|
||||||
"representation-from-an-interested-person-heading": "Sylwadau gan Barti/Unigolyn â Buddiant",
|
"representation-from-an-interested-person-heading": "Sylwadau gan Barti/Unigolyn â Buddiant",
|
||||||
|
"consultation-from-an-interested-person-heading": "Ymateb i'r ymgynghoriad gan Barti/Person â Diddordeb",
|
||||||
"kind-of-rep-label": "Pa fath o sylw ydych chi'n ei wneud?",
|
"kind-of-rep-label": "Pa fath o sylw ydych chi'n ei wneud?",
|
||||||
|
"kind-of-consultation-label": "Pa fath o ymateb i'r ymgynghoriad ydych chi'n ei wneud?",
|
||||||
"enter-comment-label": "Gallwch roi eich cynrychioliad yn y gofod a ddarparwyd neu atodi dogfen ar wahân.",
|
"enter-comment-label": "Gallwch roi eich cynrychioliad yn y gofod a ddarparwyd neu atodi dogfen ar wahân.",
|
||||||
|
"consultation-comment-label": "Gallwch atodi'ch dogfennau sy'n gysylltiedig â'ch ymateb i'r ymgynghoriad.",
|
||||||
"comments-set-out-label": "Mae fy sylwadau wedi'u nodi yn",
|
"comments-set-out-label": "Mae fy sylwadau wedi'u nodi yn",
|
||||||
"publish-policy-label": "Sylwch y gall pob sylw gael ei gyhoeddi yn unol â'n ",
|
"publish-policy-label": "Sylwch y gall pob sylw gael ei gyhoeddi yn unol â'n ",
|
||||||
"publish-policy-link-label": "Polisi Cyhoeddi.",
|
"publish-policy-link-label": "Polisi Cyhoeddi.",
|
||||||
@@ -29,13 +37,18 @@
|
|||||||
"fileupload-file-error-invalid-label": "yn annilys",
|
"fileupload-file-error-invalid-label": "yn annilys",
|
||||||
"capacity-para-one": "Mae'r ffurflen hon yn eich galluogi i gyflwyno sylwadau ar achos i Benderfyniadau Cynllunio ac Amgylchedd Cymru",
|
"capacity-para-one": "Mae'r ffurflen hon yn eich galluogi i gyflwyno sylwadau ar achos i Benderfyniadau Cynllunio ac Amgylchedd Cymru",
|
||||||
"capacity-para-two": "Sylwch fod angen cyflwyno sylwadau gan bartïon â diddordeb o fewn yr amserlen. Mae hwn i'w weld ar y dudalen \"Crynodeb Achos\" flaenorol. Gall sylwadau a gyflwynir ar ôl y dyddiad hwn gael eu hystyried yn annilys.",
|
"capacity-para-two": "Sylwch fod angen cyflwyno sylwadau gan bartïon â diddordeb o fewn yr amserlen. Mae hwn i'w weld ar y dudalen \"Crynodeb Achos\" flaenorol. Gall sylwadau a gyflwynir ar ôl y dyddiad hwn gael eu hystyried yn annilys.",
|
||||||
|
"sips-capacity-para-one": "Mae'r ffurflen hon yn eich galluogi i gyflwyno ymateb i ymgynghoriad ar achos i Benderfyniadau Cynllunio ac Amgylchedd Cymru.",
|
||||||
|
"sips-capacity-para-two": "Sylwch fod angen ymateb i'r ymgynghoriad gan bartïon â diddordeb o fewn yr amserlen. Mae hwn i'w weld ar y dudalen \"Crynodeb Achos\" flaenorol. Gall ymatebion i ymgynghoriadau a gyflwynir ar ôl y dyddiad hwn gael eu hystyried yn annilys.",
|
||||||
"capacity-select-your-details": "Eich manylion",
|
"capacity-select-your-details": "Eich manylion",
|
||||||
"capacity-select-what-capacity-label": "Ym mha rinwedd ydych chi am gyflwyno sylwadau ar yr achos hwn?",
|
"capacity-select-what-capacity-label": "Ym mha rinwedd ydych chi am gyflwyno sylwadau ar yr achos hwn?",
|
||||||
|
"sips-capacity-select-what-capacity-label": "Ym mha rinwedd ydych chi am wneud ymateb i ymgynghoriad ar yr achos hwn?",
|
||||||
"capacity-options-arr-appellant": "Apelydd",
|
"capacity-options-arr-appellant": "Apelydd",
|
||||||
"capacity-options-arr-agent": "Asiant",
|
"capacity-options-arr-agent": "Asiant",
|
||||||
"capacity-options-arr-interested": "Parti â buddiant",
|
"capacity-options-arr-interested": "Parti â buddiant",
|
||||||
"rep-check-submit-heading": "Gwiriwch eich sylwadau",
|
"rep-check-submit-heading": "Gwiriwch eich sylwadau",
|
||||||
|
"consultation-check-submit-heading ": "Gwiriwch eich ymateb i'r ymgynghoriad",
|
||||||
"rep-check-your-rep-heading": "Eich sylwadau",
|
"rep-check-your-rep-heading": "Eich sylwadau",
|
||||||
|
"consultation-check-your-rep-heading": "Eich ymateb i'r ymgynghoriad",
|
||||||
"rep-check-tandc-para-one": "Mae'r data personol a ddarparwyd gennych ar y ffurflen hon yn cael ei chasglu a'i phrosesu yn unol â thelerau ein cofrestriad o dan Ddeddf Diogelu Data 2018.",
|
"rep-check-tandc-para-one": "Mae'r data personol a ddarparwyd gennych ar y ffurflen hon yn cael ei chasglu a'i phrosesu yn unol â thelerau ein cofrestriad o dan Ddeddf Diogelu Data 2018.",
|
||||||
"rep-check-tandc-para-two": "Mae Penderfyniadau Cynllunio a'r Amgylchedd Cymru yn cymryd ei chyfrifoldebau diogelu data am y wybodaeth a roddwch i ni o ddifrif. I ddarganfod mwy am sut rydym yn defnyddio ac yn rheoli eich data personol, ewch i ein",
|
"rep-check-tandc-para-two": "Mae Penderfyniadau Cynllunio a'r Amgylchedd Cymru yn cymryd ei chyfrifoldebau diogelu data am y wybodaeth a roddwch i ni o ddifrif. I ddarganfod mwy am sut rydym yn defnyddio ac yn rheoli eich data personol, ewch i ein",
|
||||||
"rep-check-tandc-para-three": "Cadarnhaf fod pob adran o’r ffurflen hon wedi’u llenwi’n llawn a bod y manylion yn gywir hyd eithaf fy ngwybodaeth.",
|
"rep-check-tandc-para-three": "Cadarnhaf fod pob adran o’r ffurflen hon wedi’u llenwi’n llawn a bod y manylion yn gywir hyd eithaf fy ngwybodaeth.",
|
||||||
|
|||||||
@@ -95,6 +95,8 @@
|
|||||||
"summary-no-details-label": "No details currently held",
|
"summary-no-details-label": "No details currently held",
|
||||||
"summary-case-relevant-authoritylabel": "Relevant authority",
|
"summary-case-relevant-authoritylabel": "Relevant authority",
|
||||||
"representation-representation-type": "What kind of representation are you making?",
|
"representation-representation-type": "What kind of representation are you making?",
|
||||||
|
"consultation-representation-type": "What kind of consultation are you making?",
|
||||||
|
"representation-consultation-type": "What kind of consultation response are you making?",
|
||||||
"representation-onbehalfof": "Are you acting on behalf of a company, group or organisation",
|
"representation-onbehalfof": "Are you acting on behalf of a company, group or organisation",
|
||||||
"representation-onbehalfof-details": "Name of the company/group/organisation",
|
"representation-onbehalfof-details": "Name of the company/group/organisation",
|
||||||
"representation-comments": "Representation",
|
"representation-comments": "Representation",
|
||||||
|
|||||||
@@ -3,18 +3,26 @@
|
|||||||
"sign-in-to-raise-rep-label": "To raise a representation for this appeal you will need to login with your email address. If you do not wish to login to raise a representation contact",
|
"sign-in-to-raise-rep-label": "To raise a representation for this appeal you will need to login with your email address. If you do not wish to login to raise a representation contact",
|
||||||
"sign-in-to-raise-rep-button": "Sign in to raise representation",
|
"sign-in-to-raise-rep-button": "Sign in to raise representation",
|
||||||
"make-a-representation-on-label": "Make a representation on",
|
"make-a-representation-on-label": "Make a representation on",
|
||||||
|
"make-a-consultation-on-label": "Make a consultation response on",
|
||||||
"make-a-representation-for-label": "Make a representation for",
|
"make-a-representation-for-label": "Make a representation for",
|
||||||
"timetable-title": "Timetable",
|
"timetable-title": "Timetable",
|
||||||
"questionnaire-due-label": "Questionnaire due",
|
"questionnaire-due-label": "Questionnaire due",
|
||||||
"local-impact-report": "Local Impact Report due",
|
"local-impact-report": "Local Impact Report due",
|
||||||
|
"marine-impact-report": "Marine Impact Report due",
|
||||||
"statements-due-label": "Statements due",
|
"statements-due-label": "Statements due",
|
||||||
"final-comments-due-label": "Final comments due",
|
"final-comments-due-label": "Final comments due",
|
||||||
|
"consultation-close-label": "Consultation period end",
|
||||||
"representation-from-an-agent-heading": "Representation from an Agent",
|
"representation-from-an-agent-heading": "Representation from an Agent",
|
||||||
|
"consultation-from-an-agent-heading": "Consultant repsponse from an Agent",
|
||||||
"representation-from-an-lpa-heading": "Representation from an LPA",
|
"representation-from-an-lpa-heading": "Representation from an LPA",
|
||||||
"representation-from-an-appellant-heading": "Representation from an Appellant",
|
"representation-from-an-appellant-heading": "Representation from an Appellant",
|
||||||
|
"consultation-from-an-appellant-heading": "Consultation response from an Appellant",
|
||||||
"representation-from-an-interested-person-heading": "Representation from an Interested Party/Person",
|
"representation-from-an-interested-person-heading": "Representation from an Interested Party/Person",
|
||||||
|
"consultation-from-an-interested-person-heading": "Consultation response from an Interested Party/Person",
|
||||||
"kind-of-rep-label": "What kind of representation are you making?",
|
"kind-of-rep-label": "What kind of representation are you making?",
|
||||||
|
"kind-of-consultation-label": "What kind of consultation respone are you making?",
|
||||||
"enter-comment-label": "You can enter your representation in the space provided or attach a separate document.",
|
"enter-comment-label": "You can enter your representation in the space provided or attach a separate document.",
|
||||||
|
"consultation-comment-label": "You can attach your documents related to your consultation response.",
|
||||||
"comments-set-out-label": "My comments are set out in",
|
"comments-set-out-label": "My comments are set out in",
|
||||||
"publish-policy-label": "Please note that all representations may be published in line with our ",
|
"publish-policy-label": "Please note that all representations may be published in line with our ",
|
||||||
"publish-policy-link-label": "Publishing Policy.",
|
"publish-policy-link-label": "Publishing Policy.",
|
||||||
@@ -29,13 +37,18 @@
|
|||||||
"fileupload-file-error-invalid-label": "is invalid",
|
"fileupload-file-error-invalid-label": "is invalid",
|
||||||
"capacity-para-one": "This form enables you to submit representations on a case to Planning and Environment Decisions Wales.",
|
"capacity-para-one": "This form enables you to submit representations on a case to Planning and Environment Decisions Wales.",
|
||||||
"capacity-para-two": "Please note that representations from interested parties need to be made within the timetable. This can be found on the previous \"Case Summary\" page. Representations submitted after this date may be considered invalid.",
|
"capacity-para-two": "Please note that representations from interested parties need to be made within the timetable. This can be found on the previous \"Case Summary\" page. Representations submitted after this date may be considered invalid.",
|
||||||
|
"sips-capacity-para-one": "This form enables you to submit a consultation repsonse on a case to Planning and Environment Decisions Wales.",
|
||||||
|
"sips-capacity-para-two": "Please note that consultation responses from interested parties need to be made within the timetable. This can be found on the previous \"Case Summary\" page. Consultations responses submitted after this date may be considered invalid.",
|
||||||
"capacity-select-your-details": "Your details",
|
"capacity-select-your-details": "Your details",
|
||||||
"capacity-select-what-capacity-label": "In what capacity do you wish to make representations on this case?",
|
"capacity-select-what-capacity-label": "In what capacity do you wish to make representations on this case?",
|
||||||
|
"sips-capacity-select-what-capacity-label": "In what capacity do you wish to make a consultation repsonse on this case?",
|
||||||
"capacity-options-arr-appellant": "Appellant",
|
"capacity-options-arr-appellant": "Appellant",
|
||||||
"capacity-options-arr-agent": "Agent",
|
"capacity-options-arr-agent": "Agent",
|
||||||
"capacity-options-arr-interested": "Interested party",
|
"capacity-options-arr-interested": "Interested party",
|
||||||
"rep-check-submit-heading": "Check your representation",
|
"rep-check-submit-heading": "Check your representation",
|
||||||
|
"consultation-check-submit-heading": "Check your consultation response",
|
||||||
"rep-check-your-rep-heading": "Your representation",
|
"rep-check-your-rep-heading": "Your representation",
|
||||||
|
"consultation-check-your-rep-heading": "Your consultation repsonse",
|
||||||
"rep-check-tandc-para-one": "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.",
|
"rep-check-tandc-para-one": "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.",
|
||||||
"rep-check-tandc-para-two": "Planning and Environment Decisions Wales 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",
|
"rep-check-tandc-para-two": "Planning and Environment Decisions Wales 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",
|
||||||
"rep-check-tandc-para-three": "I confirm that all sections of this form have been fully completed and that the details are correct to the best of my knowledge.",
|
"rep-check-tandc-para-three": "I confirm that all sections of this form have been fully completed and that the details are correct to the best of my knowledge.",
|
||||||
|
|||||||
@@ -266,6 +266,12 @@ export default async function handler(req, res) {
|
|||||||
case "Local Impact Report":
|
case "Local Impact Report":
|
||||||
repType = "Impact";
|
repType = "Impact";
|
||||||
break;
|
break;
|
||||||
|
case "Consultation Response":
|
||||||
|
repType = "Consultation_Response";
|
||||||
|
break;
|
||||||
|
case "Marine Impact Report":
|
||||||
|
repType = "Marine_Impact";
|
||||||
|
break;
|
||||||
|
|
||||||
case "Other":
|
case "Other":
|
||||||
repType = "OTHER";
|
repType = "OTHER";
|
||||||
|
|||||||
Reference in New Issue
Block a user