16003 Sips Documents, 16010 Role baes reps for sips
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user