16003 Sips Documents, 16010 Role baes reps for sips
This commit is contained in:
@@ -420,7 +420,9 @@ export const createRepPDFBlob = async (
|
||||
: repName.indexOf("_Comments") > 0
|
||||
? "846040003"
|
||||
: repName.indexOf("_Impact") > 0
|
||||
? "846040001"
|
||||
? "846040029"
|
||||
: repName.indexOf("_Consultation_Response") > 0
|
||||
? "846040005"
|
||||
: "846040002";
|
||||
|
||||
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";
|
||||
import RepAgent from "./representationAgent";
|
||||
import RepAppellant from "./representationAppellant";
|
||||
import ConsultationAppellant from "./consultationAppellant";
|
||||
import ConsultationAgent from "./consultationAgent";
|
||||
import RepCapacitySelection from "./representationCapacitySelection";
|
||||
import RepCompleteSubmit from "./representationCompleteSubmit";
|
||||
import RepInterestedPartyPerson from "./representationInterestedPartyPerson";
|
||||
import ConsultationInterestedPartyPerson from "./consultationInterestedPartyPerson";
|
||||
|
||||
import RepLPA from "./representationLPA";
|
||||
import RepLPACapacitySelection from "./representationLPACapacitySelection";
|
||||
import RepLandOwner from "./representationLandowner";
|
||||
@@ -67,9 +71,13 @@ let MakeRepresentation = (props) => {
|
||||
let setCaseQueryObj = props[currentType] || {};
|
||||
var casesObj = {};
|
||||
|
||||
const appealType = currentView.caseReference.appealType;
|
||||
const accountDetails = props.props.accountDetails.accountDetails;
|
||||
const caseReferenceObj = props.props.currentView.caseReference;
|
||||
|
||||
const updateQuestionnaireCount = () => {
|
||||
{
|
||||
switch (currentView.caseReference.appealType) {
|
||||
switch (appealType) {
|
||||
case 846040000:
|
||||
case 846040001:
|
||||
case 846040025:
|
||||
@@ -95,12 +103,22 @@ let MakeRepresentation = (props) => {
|
||||
let questionnaireCount = updateQuestionnaireCount();
|
||||
|
||||
const isLPA =
|
||||
props.props.accountDetails.accountDetails[
|
||||
accountDetails[
|
||||
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
|
||||
] == "LPA"
|
||||
? true
|
||||
: false;
|
||||
|
||||
// const isNRW = accountDetails.emailaddress1.includes(
|
||||
// "@cyfoethnaturiolcymru.gov.uk"
|
||||
// )
|
||||
// ? true
|
||||
// : false;
|
||||
|
||||
const isNRW = accountDetails.emailaddress1.includes("@rdbtech.co.uk")
|
||||
? true
|
||||
: false;
|
||||
|
||||
const setRepFileName = (values) => {
|
||||
//console.log("---------------\n", values);
|
||||
if (
|
||||
@@ -132,6 +150,8 @@ let MakeRepresentation = (props) => {
|
||||
case "lpa":
|
||||
case "LPA":
|
||||
repCap = "LPA";
|
||||
case "NRW":
|
||||
repCap = "NRW";
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -156,8 +176,14 @@ let MakeRepresentation = (props) => {
|
||||
case "Final comments":
|
||||
repType = "Comments";
|
||||
break;
|
||||
case "Consultation Response":
|
||||
repType = "Consultation_Response";
|
||||
break;
|
||||
case "Local Impact Report":
|
||||
repType = "Impact";
|
||||
repType = "Local_Impact_Report";
|
||||
break;
|
||||
case "Marine Impact Report":
|
||||
repType = "Marine_Impact_Report";
|
||||
break;
|
||||
|
||||
case "Other":
|
||||
@@ -235,12 +261,11 @@ let MakeRepresentation = (props) => {
|
||||
t("myrepresentations:capacity-options-arr-agent"),
|
||||
];
|
||||
|
||||
props.props.currentView.caseReference.appealType != 846040017
|
||||
appealType != 846040017
|
||||
? capacityOptionsArr.push(
|
||||
t("myrepresentations:capacity-options-arr-interested")
|
||||
)
|
||||
: props.props.currentView.caseReference.specialistProcess !=
|
||||
846040000 &&
|
||||
: caseReferenceObj.specialistProcess != 846040000 &&
|
||||
capacityOptionsArr.push(
|
||||
t("myrepresentations:capacity-options-arr-interested")
|
||||
);
|
||||
@@ -308,11 +333,13 @@ let MakeRepresentation = (props) => {
|
||||
const buildRepsArr = (detailsObj) => {
|
||||
let buildArr = [];
|
||||
|
||||
// console.log(currentView.caseReference.appealType, "");
|
||||
// console.log(appealType, "");
|
||||
|
||||
let todaysDate = new Date();
|
||||
|
||||
const isDNS = currentView.caseReference.appealType == 846040011;
|
||||
const isDNS = appealType == 846040011;
|
||||
|
||||
const isSIPS = appealType == 846040002;
|
||||
|
||||
let startDate;
|
||||
let questionnaireDate;
|
||||
@@ -365,30 +392,30 @@ let MakeRepresentation = (props) => {
|
||||
)));
|
||||
|
||||
isLPA &&
|
||||
currentView.caseReference.appealType != 846040019 &&
|
||||
currentView.caseReference.appealType != 846040011 &&
|
||||
currentView.caseReference.appealType != 846040015 &&
|
||||
currentView.caseReference.appealType != 846040016 &&
|
||||
appealType != 846040019 &&
|
||||
appealType != 846040011 &&
|
||||
appealType != 846040015 &&
|
||||
appealType != 846040016 &&
|
||||
todaysDate >= startDate &&
|
||||
todaysDate <= finalCommentsDate &&
|
||||
buildArr.push("Questionnaire");
|
||||
|
||||
isLPA &&
|
||||
isDNS &&
|
||||
currentView.caseReference.appealType != 846040019 &&
|
||||
appealType != 846040019 &&
|
||||
todaysDate >= startDate &&
|
||||
todaysDate <= finalCommentsDate &&
|
||||
buildArr.push("Local Impact Report");
|
||||
|
||||
isLPA &&
|
||||
isDNS &&
|
||||
currentView.caseReference.appealType != 846040019 &&
|
||||
appealType != 846040019 &&
|
||||
todaysDate >= startDate &&
|
||||
todaysDate <= finalCommentsDate &&
|
||||
buildArr.push("Statement");
|
||||
|
||||
!isDNS &&
|
||||
currentView.caseReference.appealType != 846040004 &&
|
||||
appealType != 846040004 &&
|
||||
todaysDate >= startDate &&
|
||||
todaysDate <= statementDueDate &&
|
||||
buildArr.push("Statement");
|
||||
@@ -399,14 +426,14 @@ let MakeRepresentation = (props) => {
|
||||
todaysDate <= statementDueDate &&
|
||||
buildArr.push("Statement");
|
||||
|
||||
(currentView.caseReference.appealType != 846040004 ||
|
||||
(currentView.caseReference.appealType == 846040015 &&
|
||||
(appealType != 846040004 ||
|
||||
(appealType == 846040015 &&
|
||||
currentView.caseReference.specialistProcess != 846040001)) &&
|
||||
todaysDate >= statementDueDate &&
|
||||
todaysDate <= finalCommentsDate &&
|
||||
buildArr.push("Final comments");
|
||||
|
||||
currentView.caseReference.appealType == 846040004 &&
|
||||
appealType == 846040004 &&
|
||||
currentView.caseReference.specialistProcess != 846040001 &&
|
||||
todaysDate >= statementDueDate &&
|
||||
todaysDate <= finalCommentsDate &&
|
||||
@@ -414,10 +441,16 @@ let MakeRepresentation = (props) => {
|
||||
|
||||
//is LPA Advert part 3 no statement
|
||||
isLPA &&
|
||||
currentView.caseReference.appealType == 846040018 &&
|
||||
appealType == 846040018 &&
|
||||
currentView.caseReference.specialistProcess == 846040000 &&
|
||||
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;
|
||||
};
|
||||
|
||||
@@ -436,6 +469,7 @@ let MakeRepresentation = (props) => {
|
||||
};
|
||||
|
||||
const whichControl = () => {
|
||||
let SipsOrRep;
|
||||
if (
|
||||
isLPA &&
|
||||
_.isEmpty(currentView.representationCapacity)
|
||||
@@ -502,8 +536,13 @@ let MakeRepresentation = (props) => {
|
||||
"myrepresentations:capacity-options-arr-appellant"
|
||||
).toLocaleLowerCase():
|
||||
//setRepresentationCapacity("appellant");
|
||||
|
||||
SipsOrRep =
|
||||
appealType == 846040002
|
||||
? ConsultationAppellant
|
||||
: RepAppellant;
|
||||
return (
|
||||
<RepAppellant
|
||||
<SipsOrRep
|
||||
formObj={formObj}
|
||||
appellantApplicantRepresentationArr={buildRepsArr(
|
||||
detailsObj
|
||||
@@ -532,7 +571,7 @@ let MakeRepresentation = (props) => {
|
||||
// setRepresentationCapacity("LPA");
|
||||
// }, []);
|
||||
|
||||
console.log(currentView.caseReference.appealType);
|
||||
console.log(appealType);
|
||||
return (
|
||||
<RepLPA
|
||||
formObj={formObj}
|
||||
@@ -568,8 +607,12 @@ let MakeRepresentation = (props) => {
|
||||
"myrepresentations:capacity-options-arr-agent"
|
||||
).toLowerCase():
|
||||
//setRepresentationCapacity("agent");
|
||||
|
||||
SipsOrRep =
|
||||
appealType == 846040002 ? ConsultationAgent : RepAgent;
|
||||
|
||||
return (
|
||||
<RepAgent
|
||||
<SipsOrRep
|
||||
formObj={formObj}
|
||||
appellantApplicantRepresentationArr={buildRepsArr(
|
||||
detailsObj
|
||||
@@ -595,8 +638,14 @@ let MakeRepresentation = (props) => {
|
||||
"myrepresentations:capacity-options-arr-interested"
|
||||
).toLowerCase():
|
||||
// setRepresentationCapacity("interestedpartyperson");
|
||||
|
||||
SipsOrRep =
|
||||
appealType == 846040002
|
||||
? ConsultationInterestedPartyPerson
|
||||
: RepInterestedPartyPerson;
|
||||
|
||||
return (
|
||||
<RepInterestedPartyPerson
|
||||
<SipsOrRep
|
||||
formObj={formObj}
|
||||
interestedPersonRepresentationArr={buildRepsArr(
|
||||
detailsObj
|
||||
@@ -666,7 +715,7 @@ let MakeRepresentation = (props) => {
|
||||
|
||||
const whichProgress = () => {
|
||||
{
|
||||
switch (currentView.caseReference.appealType) {
|
||||
switch (appealType) {
|
||||
case 846040000:
|
||||
case 846040001:
|
||||
case 846040025:
|
||||
@@ -781,15 +830,12 @@ let MakeRepresentation = (props) => {
|
||||
|
||||
Object.assign(values, {
|
||||
"containerID": props.props.accountDetails.containerID,
|
||||
"appealType":
|
||||
props.props.currentView.caseReference.appealType ||
|
||||
props.props.currentView.caseReference.repDetails.appealType,
|
||||
"appealType": appealType || caseReferenceObj.repDetails.appealType,
|
||||
"incidentID":
|
||||
props.props.currentView.caseReference.incidentid ||
|
||||
props.props.currentView.caseReference.repDetails.incidentid,
|
||||
"caseRef": props.props.currentView.caseReference.currentReference,
|
||||
"casereference":
|
||||
props.props.currentView.caseReference.currentReference,
|
||||
caseReferenceObj.incidentid ||
|
||||
caseReferenceObj.repDetails.incidentid,
|
||||
"caseRef": caseReferenceObj.currentReference,
|
||||
"casereference": caseReferenceObj.currentReference,
|
||||
"pinswg_questionnaireduedate":
|
||||
detailsObj.pinswg_questionnaireduedate,
|
||||
"pinswg_statementduedate":
|
||||
@@ -801,12 +847,10 @@ let MakeRepresentation = (props) => {
|
||||
"pinswg_finalcommentsduedate":
|
||||
detailsObj.pinswg_finalcommentsduedate ||
|
||||
detailsObj.pinswg_endofrepresentationperiod,
|
||||
"pinswg_name":
|
||||
props.props.currentView.caseReference.currentReference,
|
||||
"firstname": props.props.accountDetails.accountDetails.firstname,
|
||||
"lastname": props.props.accountDetails.accountDetails.lastname,
|
||||
"emailAddress":
|
||||
props.props.accountDetails.accountDetails.emailaddress1,
|
||||
"pinswg_name": caseReferenceObj.currentReference,
|
||||
"firstname": accountDetails.firstname,
|
||||
"lastname": accountDetails.lastname,
|
||||
"emailAddress": accountDetails.emailaddress1,
|
||||
"siteAddress":
|
||||
detailsObj.pinswg_siteaddressline1 +
|
||||
(detailsObj.pinswg_siteaddressline2 != null
|
||||
@@ -850,18 +894,14 @@ let MakeRepresentation = (props) => {
|
||||
updateBody = setRepFileName(values);
|
||||
|
||||
Object.assign(updateBody, {
|
||||
"pinswg_name":
|
||||
props.props.currentView.caseReference.currentReference,
|
||||
"pinswg_name": caseReferenceObj.currentReference,
|
||||
"containerID": props.props.accountDetails.containerID,
|
||||
"appealType":
|
||||
props.props.currentView.caseReference.appealType ||
|
||||
props.props.currentView.caseReference.repDetails.appealType,
|
||||
"casereference":
|
||||
props.props.currentView.caseReference.currentReference,
|
||||
"appealType": appealType || caseReferenceObj.repDetails.appealType,
|
||||
"casereference": caseReferenceObj.currentReference,
|
||||
"incidentID":
|
||||
props.props.currentView.caseReference.incidentid ||
|
||||
props.props.currentView.caseReference.repDetails.incidentid,
|
||||
"caseRef": props.props.currentView.caseReference.currentReference,
|
||||
caseReferenceObj.incidentid ||
|
||||
caseReferenceObj.repDetails.incidentid,
|
||||
"caseRef": caseReferenceObj.currentReference,
|
||||
});
|
||||
|
||||
updateBody = JSON.stringify(updateBody);
|
||||
@@ -965,15 +1005,12 @@ let MakeRepresentation = (props) => {
|
||||
Object.assign(values, {
|
||||
"containerID": props.props.accountDetails.containerID,
|
||||
"appealType":
|
||||
props.props.currentView.caseReference.appealType ||
|
||||
props.props.currentView.caseReference.repDetails.appealType,
|
||||
appealType || caseReferenceObj.repDetails.appealType,
|
||||
"incidentID":
|
||||
props.props.currentView.caseReference.incidentid ||
|
||||
props.props.currentView.caseReference.repDetails.incidentid,
|
||||
"caseRef":
|
||||
props.props.currentView.caseReference.currentReference,
|
||||
"casereference":
|
||||
props.props.currentView.caseReference.currentReference,
|
||||
caseReferenceObj.incidentid ||
|
||||
caseReferenceObj.repDetails.incidentid,
|
||||
"caseRef": caseReferenceObj.currentReference,
|
||||
"casereference": caseReferenceObj.currentReference,
|
||||
"pinswg_questionnaireduedate":
|
||||
detailsObj.pinswg_questionnaireduedate,
|
||||
"pinswg_endofrepresentationperiod":
|
||||
@@ -984,13 +1021,10 @@ let MakeRepresentation = (props) => {
|
||||
"pinswg_statementsduedate": detailsObj.pinswg_statementsduedate,
|
||||
"pinswg_finalcommentsduedate":
|
||||
detailsObj.pinswg_finalcommentsduedate,
|
||||
"pinswg_name":
|
||||
props.props.currentView.caseReference.currentReference,
|
||||
"firstname":
|
||||
props.props.accountDetails.accountDetails.firstname,
|
||||
"lastname": props.props.accountDetails.accountDetails.lastname,
|
||||
"emailAddress":
|
||||
props.props.accountDetails.accountDetails.emailaddress1,
|
||||
"pinswg_name": caseReferenceObj.currentReference,
|
||||
"firstname": accountDetails.firstname,
|
||||
"lastname": accountDetails.lastname,
|
||||
"emailAddress": accountDetails.emailaddress1,
|
||||
"siteAddress":
|
||||
detailsObj.pinswg_siteaddressline1 +
|
||||
(detailsObj.pinswg_siteaddressline2 != null
|
||||
@@ -1208,9 +1242,13 @@ let MakeRepresentation = (props) => {
|
||||
) : (
|
||||
<>
|
||||
<h1 className="govuk-heading-l">
|
||||
{t(
|
||||
"myrepresentations:make-a-representation-on-label"
|
||||
)}{" "}
|
||||
{appealType == 846040002
|
||||
? t(
|
||||
"myrepresentations:make-a-consultation-on-label"
|
||||
)
|
||||
: t(
|
||||
"myrepresentations:make-a-representation-on-label"
|
||||
)}{" "}
|
||||
{currentView.caseReference.currentReference}{" "}
|
||||
</h1>
|
||||
<div id="rep-form">
|
||||
@@ -1230,7 +1268,9 @@ let MakeRepresentation = (props) => {
|
||||
<div className="govuk-summary-list">
|
||||
<div className="govuk-body-s">
|
||||
{currentView.caseReference
|
||||
.appealType == 846040011
|
||||
.appealType == 846040011 ||
|
||||
currentView.caseReference
|
||||
.appealType == 846040002
|
||||
? t(
|
||||
"myrepresentations:local-impact-report"
|
||||
)
|
||||
@@ -1245,43 +1285,86 @@ let MakeRepresentation = (props) => {
|
||||
) ||
|
||||
detailsObj.hasOwnProperty(
|
||||
"pinswg_endofrepresentationperiod"
|
||||
) ||
|
||||
detailsObj.hasOwnProperty(
|
||||
"pinswg_consultationclose"
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_questionnaireduedate ||
|
||||
detailsObj.pinswg_endofrepresentationperiod
|
||||
detailsObj.pinswg_endofrepresentationperiod ||
|
||||
detailsObj.pinswg_consultationclose
|
||||
)
|
||||
: "N/A"}
|
||||
</span>
|
||||
</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
|
||||
.appealType != 846040011 && (
|
||||
.appealType != 846040002 && (
|
||||
<div className="govuk-body-s">
|
||||
{t(
|
||||
"myrepresentations:final-comments-due-label"
|
||||
"myrepresentations:statements-due-label"
|
||||
)}
|
||||
:
|
||||
<span className="govuk-body-s">
|
||||
{" "}
|
||||
{formatDates(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
detailsObj.pinswg_statementduedate ||
|
||||
detailsObj.pinswg_statementsduedate ||
|
||||
detailsObj.pinswg_endofrepresentationperiod
|
||||
)}
|
||||
</span>
|
||||
</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>
|
||||
|
||||
@@ -27,6 +27,7 @@ let RepCapacitySelection = (props) => {
|
||||
));
|
||||
|
||||
const required = (value) => (value ? undefined : "Required");
|
||||
const appealType = props.props.currentView.caseReference.appealType;
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -39,6 +40,7 @@ let RepCapacitySelection = (props) => {
|
||||
myRepresentations={props.props.myRepresentations}
|
||||
props={props}
|
||||
setCurrentReference={setCurrentReference}
|
||||
appealType={appealType}
|
||||
/>{" "}
|
||||
<div id="rep-details" className="">
|
||||
<div className="govuk-grid-column-full">
|
||||
@@ -52,9 +54,15 @@ let RepCapacitySelection = (props) => {
|
||||
<Field
|
||||
name="representationCapacity"
|
||||
datafieldname="representationCapacity"
|
||||
label={t(
|
||||
"myrepresentations:capacity-select-what-capacity-label"
|
||||
)}
|
||||
label={
|
||||
appealType != 846040002
|
||||
? t(
|
||||
"myrepresentations:capacity-select-what-capacity-label"
|
||||
)
|
||||
: t(
|
||||
"myrepresentations:sips-capacity-select-what-capacity-label"
|
||||
)
|
||||
}
|
||||
options={capacityOptionsArr}
|
||||
id="representationCapacity"
|
||||
className="govuk-radios__input"
|
||||
|
||||
@@ -264,21 +264,33 @@ const RepCompleteSubmit = (props) => {
|
||||
<div className="govuk-grid-row govuk-body">
|
||||
<h1 className="govuk-heading-m ">
|
||||
{" "}
|
||||
{t(
|
||||
"myrepresentations:rep-check-submit-heading"
|
||||
)}
|
||||
{repFormData.appealType == 846040002
|
||||
? t(
|
||||
"myrepresentations:consultation-check-submit-heading"
|
||||
)
|
||||
: t(
|
||||
"myrepresentations:rep-check-submit-heading"
|
||||
)}
|
||||
</h1>
|
||||
<dl className="govuk-summary-list ">
|
||||
<h2 className="govuk-heading-m govuk-!-margin-top-9">
|
||||
{t(
|
||||
"myrepresentations:rep-check-your-rep-heading"
|
||||
)}
|
||||
{repFormData.appealType == 846040002
|
||||
? t(
|
||||
"myrepresentations:consultation-check-your-rep-heading"
|
||||
)
|
||||
: t(
|
||||
"myrepresentations:rrep-check-your-rep-heading"
|
||||
)}
|
||||
</h2>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:representation-representation-type"
|
||||
)}
|
||||
{repFormData.appealType == 846040002
|
||||
? t(
|
||||
"case:consultation-representation-type"
|
||||
)
|
||||
: t(
|
||||
"case:representation-representation-type"
|
||||
)}
|
||||
</dt>
|
||||
|
||||
<dd className="govuk-summary-list__value">
|
||||
@@ -427,58 +439,63 @@ const RepCompleteSubmit = (props) => {
|
||||
</>
|
||||
)}
|
||||
{repFormData.representationType !=
|
||||
"Questionnaire" && (
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:representation-comments")}
|
||||
</dt>
|
||||
"Questionnaire" &&
|
||||
repFormData.appealType != 846040002 && (
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:representation-comments"
|
||||
)}
|
||||
</dt>
|
||||
|
||||
<dd className="govuk-summary-list__value">
|
||||
<span
|
||||
className="multiline-elipsis"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: repFormData.representationComments,
|
||||
}}
|
||||
/>
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value">
|
||||
<span
|
||||
className="multiline-elipsis"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: repFormData.representationComments,
|
||||
}}
|
||||
/>
|
||||
</dd>
|
||||
|
||||
<dd className="govuk-summary-list__actions">
|
||||
<a
|
||||
className="govuk-link"
|
||||
href="#"
|
||||
onClick={() => {
|
||||
// setSubmitBack();
|
||||
<dd className="govuk-summary-list__actions">
|
||||
<a
|
||||
className="govuk-link"
|
||||
href="#"
|
||||
onClick={() => {
|
||||
// setSubmitBack();
|
||||
|
||||
setCurrentReference({
|
||||
"ticketnumber":
|
||||
repFormData.ticketnumber,
|
||||
"currentReference":
|
||||
repFormData.caseRef,
|
||||
"currentType":
|
||||
"myRepresentations",
|
||||
"incidentid":
|
||||
repFormData.incidentID,
|
||||
"appealType":
|
||||
repFormData.appealType,
|
||||
"repDetails":
|
||||
repFormData,
|
||||
});
|
||||
setRepresentationSubmit(
|
||||
false
|
||||
);
|
||||
}}
|
||||
>
|
||||
{t("common:change-link-label")}
|
||||
<span className="govuk-visually-hidden">
|
||||
{" "}
|
||||
{/* {FieldsTranslations(
|
||||
setCurrentReference({
|
||||
"ticketnumber":
|
||||
repFormData.ticketnumber,
|
||||
"currentReference":
|
||||
repFormData.caseRef,
|
||||
"currentType":
|
||||
"myRepresentations",
|
||||
"incidentid":
|
||||
repFormData.incidentID,
|
||||
"appealType":
|
||||
repFormData.appealType,
|
||||
"repDetails":
|
||||
repFormData,
|
||||
});
|
||||
setRepresentationSubmit(
|
||||
false
|
||||
);
|
||||
}}
|
||||
>
|
||||
{t(
|
||||
"common:change-link-label"
|
||||
)}
|
||||
<span className="govuk-visually-hidden">
|
||||
{" "}
|
||||
{/* {FieldsTranslations(
|
||||
rows[0].value
|
||||
)} */}
|
||||
</span>
|
||||
</a>
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
</span>
|
||||
</a>
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:representation-files")}
|
||||
|
||||
@@ -8,7 +8,7 @@ const RepDetails = (props) => {
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
|
||||
const { currentType, casesObj } = props;
|
||||
const { currentType, casesObj, appealType } = props;
|
||||
|
||||
let { caseReference } = props;
|
||||
|
||||
@@ -97,10 +97,14 @@ const RepDetails = (props) => {
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<p className="govuk-body">
|
||||
{t("myrepresentations:capacity-para-one")}
|
||||
{appealType == 846040002
|
||||
? t("myrepresentations:sips-capacity-para-one")
|
||||
: t("myrepresentations:capacity-para-one")}
|
||||
</p>
|
||||
<p className="govuk-body">
|
||||
{t("myrepresentations:capacity-para-two")}
|
||||
{appealType == 846040002
|
||||
? t("myrepresentations:sips-capacity-para-two")
|
||||
: t("myrepresentations:capacity-para-two")}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -71,7 +71,7 @@ const RepInterestedPartyPerson = (props) => {
|
||||
<>
|
||||
<h2 className="govuk-heading-m ">
|
||||
{t(
|
||||
"myrepresentations:representation-from-an-interested-person-heading"
|
||||
"myrepresentations:consultation-from-an-interested-person-heading"
|
||||
)}
|
||||
</h2>
|
||||
|
||||
|
||||
@@ -94,12 +94,15 @@ const RepsOnResults = (props) => {
|
||||
<br />
|
||||
<br />
|
||||
{(_.has(detailsObj, "pinswg_startdate") ||
|
||||
_.has(detailsObj, "pinswg_applicationacceptedasvalid")) &&
|
||||
_.has(detailsObj, "pinswg_applicationacceptedasvalid") ||
|
||||
_.has(detailsObj, "pinswg_consultationopen")) &&
|
||||
showReps(
|
||||
detailsObj.pinswg_startdate ||
|
||||
detailsObj.pinswg_applicationacceptedasvalid,
|
||||
detailsObj.pinswg_applicationacceptedasvalid ||
|
||||
detailsObj.pinswg_consultationopen,
|
||||
detailsObj.pinswg_finalcommentsduedate ||
|
||||
detailsObj.pinswg_endofrepresentationperiod
|
||||
detailsObj.pinswg_endofrepresentationperiod ||
|
||||
detailsObj.pinswg_consultationclose
|
||||
) && (
|
||||
<>
|
||||
{showRepButton(detailsObj.appealType) ? (
|
||||
@@ -119,8 +122,7 @@ const RepsOnResults = (props) => {
|
||||
)}
|
||||
</Link> */}
|
||||
<div className="govuk-body govuk-!-font-size-14">
|
||||
{props.currentView.caseReference
|
||||
.appealType == 846040002
|
||||
{props.appealType == 846040002
|
||||
? t(
|
||||
"case:summary-consultation-open-label"
|
||||
)
|
||||
|
||||
@@ -343,6 +343,9 @@ const SearchResults = (props) => {
|
||||
)}
|
||||
<RepsOnResults
|
||||
detailsObj={detailsObj}
|
||||
appealType={
|
||||
item.pinswg_appealcasetype
|
||||
}
|
||||
/>
|
||||
</dd>
|
||||
<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-case-relevant-authoritylabel": "Awdurdod perthnasol",
|
||||
"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-details": "Enw'r cwmni/grŵp/sefydliad",
|
||||
"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-button": "Mewngofnodwch i wneud sylwadau",
|
||||
"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",
|
||||
"timetable-title": "Amserlen",
|
||||
"questionnaire-due-label": "Holiadur 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",
|
||||
"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",
|
||||
"consultation-from-an-agent-heading": "Ymateb ymgynghorydd gan Asiant",
|
||||
"representation-from-an-lpa-heading": "Sylwadau gan ACLl",
|
||||
"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",
|
||||
"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-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.",
|
||||
"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",
|
||||
"publish-policy-label": "Sylwch y gall pob sylw gael ei gyhoeddi yn unol â'n ",
|
||||
"publish-policy-link-label": "Polisi Cyhoeddi.",
|
||||
@@ -29,13 +37,18 @@
|
||||
"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-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-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-agent": "Asiant",
|
||||
"capacity-options-arr-interested": "Parti â buddiant",
|
||||
"rep-check-submit-heading": "Gwiriwch eich sylwadau",
|
||||
"consultation-check-submit-heading ": "Gwiriwch eich ymateb i'r ymgynghoriad",
|
||||
"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-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.",
|
||||
|
||||
@@ -95,6 +95,8 @@
|
||||
"summary-no-details-label": "No details currently held",
|
||||
"summary-case-relevant-authoritylabel": "Relevant authority",
|
||||
"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-details": "Name of the company/group/organisation",
|
||||
"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-button": "Sign in to raise representation",
|
||||
"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",
|
||||
"timetable-title": "Timetable",
|
||||
"questionnaire-due-label": "Questionnaire due",
|
||||
"local-impact-report": "Local Impact Report due",
|
||||
"marine-impact-report": "Marine Impact Report due",
|
||||
"statements-due-label": "Statements due",
|
||||
"final-comments-due-label": "Final comments due",
|
||||
"consultation-close-label": "Consultation period end",
|
||||
"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-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",
|
||||
"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-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.",
|
||||
"consultation-comment-label": "You can attach your documents related to your consultation response.",
|
||||
"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-link-label": "Publishing Policy.",
|
||||
@@ -29,13 +37,18 @@
|
||||
"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-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-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-agent": "Agent",
|
||||
"capacity-options-arr-interested": "Interested party",
|
||||
"rep-check-submit-heading": "Check your representation",
|
||||
"consultation-check-submit-heading": "Check your consultation response",
|
||||
"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-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.",
|
||||
|
||||
@@ -266,6 +266,12 @@ export default async function handler(req, res) {
|
||||
case "Local Impact Report":
|
||||
repType = "Impact";
|
||||
break;
|
||||
case "Consultation Response":
|
||||
repType = "Consultation_Response";
|
||||
break;
|
||||
case "Marine Impact Report":
|
||||
repType = "Marine_Impact";
|
||||
break;
|
||||
|
||||
case "Other":
|
||||
repType = "OTHER";
|
||||
|
||||
Reference in New Issue
Block a user