@@ -203,6 +203,7 @@ export const getBlobs = async (containerName, casefolderID) => {
|
||||
"caseObj": casefolderID + "/" + casefolderID + "_case.json",
|
||||
"isCurrentVersion": blob.isCurrentVersion,
|
||||
"contentLength": blob.properties.contentLength,
|
||||
"size": blob.properties.contentLength,
|
||||
"contentType": blob.contentType,
|
||||
"lastModified": blob.properties.lastModified,
|
||||
"filepath":
|
||||
|
||||
+6
-6
@@ -1566,12 +1566,12 @@ export const uploadRepFiles = async (
|
||||
|
||||
// files.forEach((file) => formData.append("files", file));
|
||||
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
for (let j = 0; j < files[i].length; j++) {
|
||||
//console.log("upload rep files:", files[i][j].name);
|
||||
formData.append(files[i][j].name, files[i][j]);
|
||||
}
|
||||
}
|
||||
// for (let i = 0; i < files.length; i++) {
|
||||
// for (let j = 0; j < files[i].length; j++) {
|
||||
// //console.log("upload rep files:", files[i][j].name);
|
||||
// formData.append(files[i][j].name, files[i][j]);
|
||||
// }
|
||||
// }
|
||||
|
||||
//console.log(formData);
|
||||
|
||||
|
||||
@@ -129,6 +129,7 @@ let MakeRepresentation = (props) => {
|
||||
repCap = "LO";
|
||||
break;
|
||||
case "lpa":
|
||||
case "LPA":
|
||||
repCap = "LPA";
|
||||
break;
|
||||
|
||||
@@ -204,7 +205,7 @@ let MakeRepresentation = (props) => {
|
||||
return values;
|
||||
};
|
||||
|
||||
isLPA && setRepresentationCapacity("lpa");
|
||||
isLPA && setRepresentationCapacity("LPA");
|
||||
|
||||
currentType == "searchResultsObj"
|
||||
? (casesObj = jsonpath(
|
||||
@@ -248,8 +249,27 @@ let MakeRepresentation = (props) => {
|
||||
? props.props.watchedCases.watchedCasesDetails
|
||||
: props.props.searchResultsObj.searchDetailsObj;
|
||||
|
||||
let setCaseResultsObj = router.query.hasOwnProperty("state")
|
||||
? router.query.state == "edit"
|
||||
? props.props.myRepresentations.myRepresentations
|
||||
: props.props.searchResultsObj.searchResultsObj
|
||||
: props.currentType == "watchedCases"
|
||||
? props.props.watchedCases.watchedCasesDetails
|
||||
: props.props.searchResultsObj.searchResultsObj;
|
||||
|
||||
var detailsObj = {};
|
||||
|
||||
var resultsObj = {};
|
||||
|
||||
resultsObj = jsonpath(
|
||||
'$..[?(@.ticketnumber=="' +
|
||||
currentView.caseReference.currentReference +
|
||||
'")]',
|
||||
setCaseResultsObj
|
||||
);
|
||||
|
||||
resultsObj = resultsObj[0];
|
||||
|
||||
detailsObj = jsonpath(
|
||||
'$..[?(@.pinswg_name=="' +
|
||||
currentView.caseReference.currentReference +
|
||||
@@ -396,7 +416,7 @@ let MakeRepresentation = (props) => {
|
||||
)
|
||||
) {
|
||||
return (
|
||||
//setRepresentationCapacity("lpa"),
|
||||
//setRepresentationCapacity("LPA"),
|
||||
<RepLPACapacitySelection
|
||||
formObj={formObj}
|
||||
capacityOptionsArr={capacityOptionsArr}
|
||||
@@ -474,10 +494,11 @@ let MakeRepresentation = (props) => {
|
||||
);
|
||||
break;
|
||||
case "lpa":
|
||||
case "LPA":
|
||||
//setRepresentationCapacity("appellant");
|
||||
//setRepresentationCapacity("lpa");
|
||||
//setRepresentationCapacity("LPA");
|
||||
// useEffect(() => {
|
||||
// setRepresentationCapacity("lpa");
|
||||
// setRepresentationCapacity("LPA");
|
||||
// }, []);
|
||||
|
||||
// console.log(currentView.caseReference.appealType);
|
||||
@@ -761,6 +782,7 @@ let MakeRepresentation = (props) => {
|
||||
"pinswg_siteaddressline2": detailsObj.pinswg_siteaddressline2,
|
||||
"pinswg_siteaddresstown": detailsObj.pinswg_siteaddresstown,
|
||||
"pinswg_siteaddresspostcode": detailsObj.pinswg_siteaddresspostcode,
|
||||
"pinswg_lpareference": resultsObj.pinswg_lpareference,
|
||||
"_pinswg_appellant_value": detailsObj["_pinswg_appellant_value"],
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue":
|
||||
detailsObj[
|
||||
@@ -777,7 +799,7 @@ let MakeRepresentation = (props) => {
|
||||
? props.props.currentView.representationCapacity
|
||||
: values.representationCapacity
|
||||
: isLPA
|
||||
? "lpa"
|
||||
? "LPA"
|
||||
: values.representationCapacity,
|
||||
"locale": router.locale,
|
||||
});
|
||||
@@ -840,23 +862,15 @@ let MakeRepresentation = (props) => {
|
||||
: "/myportal"
|
||||
))
|
||||
: useSaveStatus
|
||||
? (values.hasOwnProperty("representationDocuments") &&
|
||||
(values.representationDocuments.map((Blob) =>
|
||||
buildFileArray.push({
|
||||
"name": Blob.name,
|
||||
"size": Blob.size,
|
||||
})
|
||||
),
|
||||
(newbuildArr = buildFileArray.concat(values.filesList)),
|
||||
console.log(buildFileArray, newbuildArr),
|
||||
Object.assign(values, {
|
||||
"filesList": newbuildArr,
|
||||
})),
|
||||
generateRepPDF(
|
||||
values,
|
||||
props.props.accountDetails.containerID,
|
||||
currentView.caseReference.currentReference
|
||||
),
|
||||
? (Object.assign(values, {
|
||||
"filesList": props.currentView.fileList,
|
||||
}),
|
||||
// commented out as dont need to create pdf on save
|
||||
// generateRepPDF(
|
||||
// values,
|
||||
// props.props.accountDetails.containerID,
|
||||
// currentView.caseReference.currentReference
|
||||
// ),
|
||||
uploadRepresentationFiles(values),
|
||||
router.replace(
|
||||
router.locale != "en"
|
||||
@@ -874,25 +888,26 @@ let MakeRepresentation = (props) => {
|
||||
// Object.assign(values, {
|
||||
// "filesList": buildFileArray,
|
||||
// })),
|
||||
|
||||
uploadRepresentationFiles(values),
|
||||
generateRepPDF(
|
||||
values,
|
||||
props.props.accountDetails.containerID,
|
||||
currentView.caseReference.currentReference
|
||||
);
|
||||
console.log("updated");
|
||||
uploadRepresentationFiles(values);
|
||||
// generateRepPDF(
|
||||
// values,
|
||||
// props.props.accountDetails.containerID,
|
||||
// currentView.caseReference.currentReference
|
||||
// );
|
||||
};
|
||||
|
||||
const onHandleSubmit = (values) => {
|
||||
window.scrollTo({ top: 0, behavior: "smooth" });
|
||||
values = setRepFileName(values);
|
||||
|
||||
!values.hasOwnProperty("pinswg_lpareference") &&
|
||||
Object.assign(values, {
|
||||
"pinswg_lpareference":
|
||||
searchResultsObj.searchResultsObj.value[0]
|
||||
.pinswg_lpareference,
|
||||
});
|
||||
// values.representationType == "Questionnaire" &&
|
||||
// !values.hasOwnProperty("pinswg_lpareference") &&
|
||||
// Object.assign(values, {
|
||||
// "pinswg_lpareference":
|
||||
// searchResultsObj?.searchResultsObj?.value[0]
|
||||
// ?.pinswg_lpareference,
|
||||
// });
|
||||
|
||||
//console.log("onHandleSubmit form values - ", JSON.stringify(values));
|
||||
|
||||
@@ -973,6 +988,7 @@ let MakeRepresentation = (props) => {
|
||||
"pinswg_siteaddresstown": detailsObj.pinswg_siteaddresstown,
|
||||
"pinswg_siteaddresspostcode":
|
||||
detailsObj.pinswg_siteaddresspostcode,
|
||||
"pinswg_lpareference": resultsObj.pinswg_lpareference,
|
||||
"_pinswg_appellant_value":
|
||||
detailsObj["_pinswg_appellant_value"],
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue":
|
||||
@@ -990,7 +1006,7 @@ let MakeRepresentation = (props) => {
|
||||
? props.props.currentView.representationCapacity
|
||||
: values.representationCapacity
|
||||
: isLPA
|
||||
? "lpa"
|
||||
? "LPA"
|
||||
: values.representationCapacity,
|
||||
"locale": router.locale,
|
||||
}));
|
||||
@@ -998,7 +1014,7 @@ let MakeRepresentation = (props) => {
|
||||
if (currentView.representationSubmit != true) {
|
||||
if (_.isEmpty(currentView.representationCapacity)) {
|
||||
if (isLPA) {
|
||||
setRepresentationCapacity("lpa");
|
||||
setRepresentationCapacity("LPA");
|
||||
} else {
|
||||
setRepresentationCapacity(
|
||||
values.representationCapacity
|
||||
@@ -1055,6 +1071,7 @@ let MakeRepresentation = (props) => {
|
||||
currentView.caseReference.currentReference
|
||||
);
|
||||
uploadRepresentationFiles(values);
|
||||
setRepresentationSubmit(true);
|
||||
setRepresentationSubmitConfirmation(true);
|
||||
} else {
|
||||
console.log("nit updated");
|
||||
@@ -1064,7 +1081,7 @@ let MakeRepresentation = (props) => {
|
||||
// currentView.representationSubmit != true
|
||||
// ? _.isEmpty(currentView.representationCapacity)
|
||||
// ? isLPA
|
||||
// ? setRepresentationCapacity("lpa")
|
||||
// ? setRepresentationCapacity("LPA")
|
||||
// : setRepresentationCapacity(
|
||||
// values.representationCapacity
|
||||
// .replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
|
||||
|
||||
@@ -199,22 +199,24 @@ const RepAgent = (props) => {
|
||||
}
|
||||
hint={"sdsd"}
|
||||
fileList={
|
||||
props.currentView.caseReference.hasOwnProperty(
|
||||
"repDetails"
|
||||
)
|
||||
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||
"filesList"
|
||||
) &&
|
||||
props.currentView
|
||||
.caseReference
|
||||
.repDetails.filesList
|
||||
.length > 0
|
||||
? props.currentView
|
||||
.caseReference
|
||||
.repDetails
|
||||
.filesList
|
||||
: []
|
||||
: []
|
||||
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
|
||||
|
||||
@@ -191,20 +191,21 @@ const RepAppellant = (props) => {
|
||||
ticketnumber={props.props.caseReference}
|
||||
hint={"sdsd"}
|
||||
fileList={
|
||||
props.currentView.caseReference.hasOwnProperty(
|
||||
"repDetails"
|
||||
)
|
||||
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||
"filesList"
|
||||
) &&
|
||||
props.currentView
|
||||
.caseReference.repDetails
|
||||
.filesList.length > 0
|
||||
? props.currentView
|
||||
.caseReference
|
||||
.repDetails.filesList
|
||||
: []
|
||||
: []
|
||||
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
|
||||
|
||||
@@ -7,7 +7,7 @@ import DatePicker from "react-datepicker";
|
||||
import "react-datepicker/dist/react-datepicker.css";
|
||||
import Dropzone from "react-dropzone";
|
||||
import "react-quill-new/dist/quill.snow.css";
|
||||
import { Field } from "redux-form";
|
||||
import { Field, change } from "redux-form";
|
||||
import {
|
||||
uploadSingleFile,
|
||||
deleteBlob,
|
||||
@@ -17,6 +17,7 @@ import {
|
||||
} from "../../../actions";
|
||||
|
||||
const ReactQuill = dynamic(() => import("react-quill-new"), { ssr: false });
|
||||
import { useDispatch } from "react-redux"; // Import the useDispatch hook
|
||||
|
||||
import {
|
||||
addDays,
|
||||
@@ -867,6 +868,8 @@ const rejectStyle = {
|
||||
|
||||
export const RenderFileUpload = (field) => {
|
||||
const files = field.input.value;
|
||||
const dispatch = useDispatch(); // Get dispatch using useDispatch hook
|
||||
|
||||
let { t } = useTranslation();
|
||||
|
||||
const style = useMemo(
|
||||
@@ -929,9 +932,9 @@ export const RenderFileUpload = (field) => {
|
||||
|
||||
const filelistObj = field.fileList || {};
|
||||
|
||||
//let blobList = filelistObj;
|
||||
let blobList = filelistObj;
|
||||
|
||||
let blobList = field.props.currentView.fileList;
|
||||
//let blobList = field.props.currentView.fileList;
|
||||
|
||||
function removeNullObjects(arr) {
|
||||
if (arr.length === 0) {
|
||||
@@ -1063,6 +1066,7 @@ export const RenderFileUpload = (field) => {
|
||||
[".xlsx"],
|
||||
}}
|
||||
onDrop={(filesToUpload, e) => {
|
||||
setCompletedUploadFiles(false);
|
||||
const renamedAcceptedFiles = filesToUpload.map(
|
||||
(file) =>
|
||||
new File(
|
||||
@@ -1150,9 +1154,13 @@ export const RenderFileUpload = (field) => {
|
||||
))
|
||||
).then((data) => {
|
||||
data = data.value || {};
|
||||
field.input.value == null;
|
||||
field.input.value = "";
|
||||
field.setFilesForRepresentations(data[0]);
|
||||
setCompletedUploadFiles(true);
|
||||
|
||||
dispatch(
|
||||
change("representationForm", field.name, null)
|
||||
); // Set the field value to null
|
||||
});
|
||||
});
|
||||
}}
|
||||
@@ -1283,7 +1291,7 @@ export const RenderFileUpload = (field) => {
|
||||
field.ticketnumber +
|
||||
"/" +
|
||||
field.filenamePrefix.representationForm
|
||||
.values.repfile_name
|
||||
?.values?.repfile_name
|
||||
) +
|
||||
"&blobname=" +
|
||||
blob.name +
|
||||
|
||||
@@ -186,22 +186,24 @@ const RepInterestedPartyPerson = (props) => {
|
||||
}
|
||||
hint={"sdsd"}
|
||||
fileList={
|
||||
props.currentView.caseReference.hasOwnProperty(
|
||||
"repDetails"
|
||||
)
|
||||
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||
"filesList"
|
||||
) &&
|
||||
props.currentView
|
||||
.caseReference
|
||||
.repDetails.filesList
|
||||
.length > 0
|
||||
? props.currentView
|
||||
.caseReference
|
||||
.repDetails
|
||||
.filesList
|
||||
: []
|
||||
: []
|
||||
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
|
||||
|
||||
@@ -352,23 +352,24 @@ let RepLPA = (props) => {
|
||||
}
|
||||
hint={"sdsd"}
|
||||
fileList={
|
||||
(props.formObj.hasOwnProperty(
|
||||
"representationForm"
|
||||
) &&
|
||||
props.formObj[
|
||||
"representationForm"
|
||||
].hasOwnProperty(
|
||||
"values"
|
||||
) &&
|
||||
props.formObj[
|
||||
"representationForm"
|
||||
].values.hasOwnProperty(
|
||||
"filesList"
|
||||
) &&
|
||||
props.props.props.form[
|
||||
"representationForm"
|
||||
].values.filesList) ||
|
||||
[]
|
||||
props.currentView.fileList
|
||||
// (props.formObj.hasOwnProperty(
|
||||
// "representationForm"
|
||||
// ) &&
|
||||
// props.formObj[
|
||||
// "representationForm"
|
||||
// ].hasOwnProperty(
|
||||
// "values"
|
||||
// ) &&
|
||||
// props.formObj[
|
||||
// "representationForm"
|
||||
// ].values.hasOwnProperty(
|
||||
// "filesList"
|
||||
// ) &&
|
||||
// props.props.props.form[
|
||||
// "representationForm"
|
||||
// ].values.filesList) ||
|
||||
// []
|
||||
}
|
||||
setFilesForRepresentations={
|
||||
setFilesForRepresentations
|
||||
@@ -505,6 +506,22 @@ let RepLPA = (props) => {
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
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,
|
||||
false
|
||||
);
|
||||
setRepresentationSubmit(true);
|
||||
}}
|
||||
>
|
||||
@@ -604,7 +621,7 @@ const mapStateToProps = (state, props) => {
|
||||
? state.currentView.caseReference.repDetails
|
||||
: state.currentView.caseReference,
|
||||
{
|
||||
"representationCapacity": "lpa",
|
||||
"representationCapacity": "LPA",
|
||||
"onBehalfOfLPA":
|
||||
props.props.props.accountDetails.accountDetails[
|
||||
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
|
||||
|
||||
@@ -332,7 +332,7 @@ const RepresentationProgress_s78 = (props) => {
|
||||
>
|
||||
<span className="js-step-title-text govuk-!-font-size-16">
|
||||
{t(
|
||||
"myrepresentations:s78-section-heading-three"
|
||||
"myrepresentations:s78-section-heading-five-sub"
|
||||
)}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
+13
-12
@@ -1181,18 +1181,19 @@ let Enforcement_Questionnaire = (props) => {
|
||||
ticketnumber={props.props.props.caseReference}
|
||||
hint={"sdsd"}
|
||||
fileList={
|
||||
props.currentView.caseReference.hasOwnProperty(
|
||||
"repDetails"
|
||||
)
|
||||
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||
"filesList"
|
||||
) &&
|
||||
props.currentView.caseReference.repDetails
|
||||
.filesList.length > 0
|
||||
? props.currentView.caseReference
|
||||
.repDetails.filesList
|
||||
: []
|
||||
: []
|
||||
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
|
||||
|
||||
+49
-38
@@ -767,9 +767,11 @@ let S78_Questionnaire = (props) => {
|
||||
aria-describedby="commentBox-hint"
|
||||
>
|
||||
<h2 className="govuk-heading-s ">
|
||||
{t("myrepresentations:s78-section-heading-five")}
|
||||
{t("myrepresentations:s78-section-heading-five-sub")}
|
||||
</h2>
|
||||
|
||||
<p className="govuk-body">
|
||||
{t("myrepresentations:s78-section-heading-five")}
|
||||
</p>
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="copyOfApplicantsCertificate"
|
||||
@@ -785,9 +787,10 @@ let S78_Questionnaire = (props) => {
|
||||
)}
|
||||
component={RenderLPACondtionalRadioList}
|
||||
validate={[required]}
|
||||
legend={t(
|
||||
"myrepresentations:s78-section-question-26"
|
||||
)}
|
||||
legend={
|
||||
"26. " +
|
||||
t("myrepresentations:s78-section-question-26")
|
||||
}
|
||||
hint={t("myrepresentations:s78-footnote-one")}
|
||||
conditionalLabel={t(
|
||||
"myrepresentations:s78-section-question-26-hint"
|
||||
@@ -812,9 +815,10 @@ let S78_Questionnaire = (props) => {
|
||||
)}
|
||||
component={RenderLPACondtionalRadioList}
|
||||
validate={[required]}
|
||||
legend={t(
|
||||
"myrepresentations:s78-section-question-27"
|
||||
)}
|
||||
legend={
|
||||
"27. " +
|
||||
t("myrepresentations:s78-section-question-27")
|
||||
}
|
||||
hint={t("myrepresentations:s78-footnote-two")}
|
||||
conditionalLabel={t(
|
||||
"myrepresentations:s78-section-question-27-hint"
|
||||
@@ -839,9 +843,10 @@ let S78_Questionnaire = (props) => {
|
||||
)}
|
||||
component={RenderLPACondtionalRadioList}
|
||||
validate={[required]}
|
||||
legend={t(
|
||||
"myrepresentations:s78-section-question-28"
|
||||
)}
|
||||
legend={
|
||||
"28. " +
|
||||
t("myrepresentations:s78-section-question-28")
|
||||
}
|
||||
conditionalLabel={t(
|
||||
"myrepresentations:s78-section-question-28-hint"
|
||||
)}
|
||||
@@ -865,9 +870,10 @@ let S78_Questionnaire = (props) => {
|
||||
)}
|
||||
component={RenderLPACondtionalRadioList}
|
||||
validate={[required]}
|
||||
legend={t(
|
||||
"myrepresentations:s78-section-question-29"
|
||||
)}
|
||||
legend={
|
||||
"29. " +
|
||||
t("myrepresentations:s78-section-question-29")
|
||||
}
|
||||
conditionalLabel={t(
|
||||
"myrepresentations:s78-section-question-29-hint"
|
||||
)}
|
||||
@@ -891,9 +897,10 @@ let S78_Questionnaire = (props) => {
|
||||
)}
|
||||
component={RenderLPACondtionalRadioList}
|
||||
validate={[required]}
|
||||
legend={t(
|
||||
"myrepresentations:s78-section-question-30"
|
||||
)}
|
||||
legend={
|
||||
"30. " +
|
||||
t("myrepresentations:s78-section-question-30")
|
||||
}
|
||||
conditionalLabel={t(
|
||||
"myrepresentations:s78-section-question-30-hint"
|
||||
)}
|
||||
@@ -917,9 +924,10 @@ let S78_Questionnaire = (props) => {
|
||||
)}
|
||||
component={RenderLPACondtionalRadioList}
|
||||
validate={[required]}
|
||||
legend={t(
|
||||
"myrepresentations:s78-section-question-31"
|
||||
)}
|
||||
legend={
|
||||
"31. " +
|
||||
t("myrepresentations:s78-section-question-31")
|
||||
}
|
||||
conditionalLabel={t(
|
||||
"myrepresentations:s78-section-question-31-hint"
|
||||
)}
|
||||
@@ -943,9 +951,10 @@ let S78_Questionnaire = (props) => {
|
||||
)}
|
||||
component={RenderLPACondtionalRadioList}
|
||||
validate={[required]}
|
||||
legend={t(
|
||||
"myrepresentations:s78-section-question-32"
|
||||
)}
|
||||
legend={
|
||||
"32. " +
|
||||
t("myrepresentations:s78-section-question-32")
|
||||
}
|
||||
conditionalLabel={t(
|
||||
"myrepresentations:s78-section-question-32-hint"
|
||||
)}
|
||||
@@ -969,9 +978,10 @@ let S78_Questionnaire = (props) => {
|
||||
)}
|
||||
component={RenderLPACondtionalRadioList}
|
||||
validate={[required]}
|
||||
legend={t(
|
||||
"myrepresentations:s78-section-question-33"
|
||||
)}
|
||||
legend={
|
||||
"33. " +
|
||||
t("myrepresentations:s78-section-question-33")
|
||||
}
|
||||
conditionalLabel={t(
|
||||
"myrepresentations:s78-section-question-33-hint"
|
||||
)}
|
||||
@@ -996,18 +1006,19 @@ let S78_Questionnaire = (props) => {
|
||||
ticketnumber={props.props.props.caseReference}
|
||||
hint={"sdsd"}
|
||||
fileList={
|
||||
props.currentView.caseReference.hasOwnProperty(
|
||||
"repDetails"
|
||||
)
|
||||
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||
"filesList"
|
||||
) &&
|
||||
props.currentView.caseReference.repDetails
|
||||
.filesList.length > 0
|
||||
? props.currentView.caseReference
|
||||
.repDetails.filesList
|
||||
: []
|
||||
: []
|
||||
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
|
||||
|
||||
@@ -2158,13 +2158,12 @@ const RenderFileUpload = (field) => {
|
||||
className="govuk-!-margin-bottom-5 fileThumb"
|
||||
>
|
||||
{" "}
|
||||
{}
|
||||
<span
|
||||
{/* <span
|
||||
className="govuk-summary-list__actionLink watched_link govuk-!-margin-right-5 govuk-!-text-align-left"
|
||||
onClick={() => removeFile(file)}
|
||||
>
|
||||
−
|
||||
</span>
|
||||
</span> */}
|
||||
<img
|
||||
src={getThumbnailIcon(
|
||||
file,
|
||||
|
||||
@@ -306,10 +306,7 @@ let AdvancedSearch = (props) => {
|
||||
(router.locale == "cy"
|
||||
? "/fymhorth/canlyniadauchwiliouwch"
|
||||
: "/myportal/advancedsearchresults") + searchString,
|
||||
null,
|
||||
{
|
||||
shallow: true,
|
||||
}
|
||||
null
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ const MyRepresentations = (props) => {
|
||||
"/fymhorth/gweldpopeth"
|
||||
: "/myportal/viewall"
|
||||
}
|
||||
shallow
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
setCurrentView({
|
||||
|
||||
@@ -39,7 +39,6 @@ const MyRepresentations = (props) => {
|
||||
"/fymhorth/gweldpopeth"
|
||||
: "/myportal/viewall"
|
||||
}
|
||||
shallow
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
setCurrentView({
|
||||
|
||||
@@ -98,7 +98,6 @@ let CaseSearch = (props) => {
|
||||
? "/fymhorth/canlyniadauchwilio"
|
||||
: "/myportal/searchresults",
|
||||
query: { q: values.basicSearch },
|
||||
shallow: true,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -219,7 +219,7 @@ const TopThree = (props) => {
|
||||
showTopThreeArr[key].appealType,
|
||||
"repDetails": showTopThreeArr[key],
|
||||
});
|
||||
isLPA && setRepresentationCapacity("lpa");
|
||||
isLPA && setRepresentationCapacity("LPA");
|
||||
}}
|
||||
>
|
||||
{showTopThreeArr[key].pinswg_name}
|
||||
|
||||
@@ -71,19 +71,19 @@ let BuildCheckSection = (props) => {
|
||||
|
||||
let buildAppealFilesArray = [];
|
||||
//console.log("attached docs: - ", buildAppealFilesArray);
|
||||
buildAppealFilesArray = props.props.form.appealForm.values.filesList || [];
|
||||
buildAppealFilesArray = props.props.appealType.fileList?.value[0] || [];
|
||||
//let filesUploadObj = buildAppealFilesArray;
|
||||
// let filesUploadObj = props.appealType.fileList.hasOwnProperty("value")
|
||||
// ? props.appealType.fileList.value[0]
|
||||
// : [];
|
||||
|
||||
let filesUploadObj = props.appealType.fileList.hasOwnProperty("value")
|
||||
? props.appealType.fileList.value[0]
|
||||
: [];
|
||||
|
||||
for (let key in filesUploadObj) {
|
||||
typeof filesUploadObj[key].name != "undefined" &&
|
||||
buildAppealFilesArray.push({
|
||||
"name": filesUploadObj[key].name,
|
||||
"size": filesUploadObj[key].contentLength,
|
||||
});
|
||||
}
|
||||
// for (let key in filesUploadObj) {
|
||||
// typeof filesUploadObj[key].name != "undefined" &&
|
||||
// buildAppealFilesArray.push({
|
||||
// "name": filesUploadObj[key].name,
|
||||
// "size": filesUploadObj[key].contentLength,
|
||||
// });
|
||||
// }
|
||||
|
||||
buildAppealFilesArray.filter(function (item, idx) {
|
||||
return item.name;
|
||||
@@ -108,6 +108,7 @@ let BuildCheckSection = (props) => {
|
||||
let pdfObj = props.props.form.appealForm.values;
|
||||
|
||||
Object.assign(pdfObj, {
|
||||
"filesList": buildAppealFilesArray,
|
||||
"containerID": props.props.accountDetails.containerID,
|
||||
"casefolderID": props.appealType.caseReference.ticketnumber,
|
||||
});
|
||||
|
||||
@@ -104,6 +104,8 @@ let BuildSection = (props) => {
|
||||
return _.includes(key, "pinswg_fileUpload");
|
||||
});
|
||||
|
||||
fileListObj = [];
|
||||
|
||||
//console.log(fileListObj);
|
||||
|
||||
// console.log(
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
} from "../../components/utils";
|
||||
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
||||
|
||||
import { StyleSheet, Text, View } from "@react-pdf/renderer";
|
||||
import { StyleSheet, Text, View, Font } from "@react-pdf/renderer";
|
||||
import Html from "react-pdf-html";
|
||||
|
||||
import { DOMParser, XMLSerializer } from "@xmldom/xmldom";
|
||||
@@ -153,6 +153,16 @@ export const AppealRow_pdf = (props) => {
|
||||
let labelTrans = label;
|
||||
return labelTrans;
|
||||
};
|
||||
Font.registerHyphenationCallback((word) => [word]);
|
||||
|
||||
function CleanHTML(htmlStr) {
|
||||
let cleanStr =
|
||||
typeof htmlStr === "string"
|
||||
? htmlStr.replace(/<p><br><\/p>/g, "")
|
||||
: "";
|
||||
|
||||
return cleanStr;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -187,6 +197,7 @@ export const AppealRow_pdf = (props) => {
|
||||
flexDirection: "row",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<Text
|
||||
style={styles.questionTextWide}
|
||||
@@ -214,6 +225,7 @@ export const AppealRow_pdf = (props) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
wrap={false}
|
||||
@@ -282,6 +294,7 @@ export const AppealRow_pdf = (props) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
wrap={false}
|
||||
@@ -337,9 +350,12 @@ export const AppealRow_pdf = (props) => {
|
||||
}
|
||||
>
|
||||
<Html style={styles.richArea}>
|
||||
{props.props[
|
||||
datafieldname[0].value
|
||||
] || ""}
|
||||
{CleanHTML(
|
||||
props.props[
|
||||
datafieldname[0]
|
||||
.value
|
||||
]
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
@@ -385,6 +401,7 @@ export const AppealRow_pdf = (props) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
wrap={false}
|
||||
@@ -438,6 +455,7 @@ export const AppealRow_pdf = (props) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
wrap={false}
|
||||
@@ -522,22 +540,37 @@ export const AppealRow_pdf = (props) => {
|
||||
case "{67FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}":
|
||||
return (
|
||||
<View
|
||||
wrap={true}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<Text style={styles.questionText}>
|
||||
{rows[0].value}
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
{props.props[
|
||||
datafieldname[0].value
|
||||
] == "true"
|
||||
? "Yes"
|
||||
: "No"}
|
||||
</Text>
|
||||
<View
|
||||
wrap={false}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
>
|
||||
<Text
|
||||
style={styles.questionText}
|
||||
wrap={false}
|
||||
>
|
||||
{rows[0].value}
|
||||
</Text>
|
||||
<Text
|
||||
style={
|
||||
styles.questionAnswer
|
||||
}
|
||||
>
|
||||
{props.props[
|
||||
datafieldname[0].value
|
||||
] == "true"
|
||||
? "Yes"
|
||||
: "No"}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
break;
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
StyleSheet,
|
||||
Text,
|
||||
View,
|
||||
Font,
|
||||
} from "@react-pdf/renderer";
|
||||
import Html from "react-pdf-html";
|
||||
import { getFormCollectionByID, bytesToSize } from "../../components/utils";
|
||||
@@ -98,6 +99,17 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
//console.log("//////////////////////\n docpropseeeee:".docProps);
|
||||
|
||||
//console.log("sdffhjdhjdjdgkj: ", values.procedureType);
|
||||
Font.registerHyphenationCallback((word) => [word]);
|
||||
|
||||
function CleanHTML(htmlStr) {
|
||||
let cleanStr =
|
||||
typeof htmlStr === "string"
|
||||
? htmlStr.replace(/<p><br><\/p>/g, "")
|
||||
: "";
|
||||
|
||||
return cleanStr;
|
||||
}
|
||||
|
||||
return (
|
||||
<Document>
|
||||
<Page size="A4" style={styles.page} wrap>
|
||||
@@ -243,7 +255,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
"Written representations" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.procedureTypeEvidence || ""}
|
||||
{CleanHTML(
|
||||
values.procedureTypeEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -294,8 +308,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
"Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={{ fontSize: 12 }}>
|
||||
{values.enterNeighbouringLandToViewSiteEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.enterNeighbouringLandToViewSiteEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -333,8 +348,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
"Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.enterNeighbouringLandAccessRequiredEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.enterNeighbouringLandAccessRequiredEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -366,8 +382,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.healthAndSafetyIssues == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.healthAndSafetyIssuesEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.healthAndSafetyIssuesEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -395,7 +412,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
</View>
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.LPAcontactDetails || ""}
|
||||
{CleanHTML(values.LPAcontactDetails)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
@@ -468,7 +485,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.feeExempt == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.feeExemptEvidence || ""}
|
||||
{CleanHTML(
|
||||
values.feeExemptEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -509,8 +528,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.previousGrantedCerts == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.previousGrantedCertsEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.previousGrantedCertsEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -533,7 +553,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.stopNoticeServed == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.stopNoticeServedEvidence || ""}
|
||||
{CleanHTML(
|
||||
values.stopNoticeServedEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -558,7 +580,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.relatedCases == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.relatedCasesEvidence || ""}
|
||||
{CleanHTML(values.relatedCasesEvidence)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -581,8 +603,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.previousEnforcement == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.previousEnforcementEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.previousEnforcementEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -605,7 +628,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.subjectArticle4 == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.subjectArticle4Evidence || ""}
|
||||
{CleanHTML(
|
||||
values.subjectArticle4Evidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -629,8 +654,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.previousPDRRestriction == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.previousPDRRestrictionEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.previousPDRRestrictionEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -663,7 +689,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
</Text>
|
||||
<View style={styles.questionAnswer}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.LPAldpAndMap || ""}
|
||||
{CleanHTML(values.LPAldpAndMap)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
@@ -681,7 +707,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
</Text>
|
||||
<View style={styles.questionAnswer}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.LPAlocalGuidance || ""}
|
||||
{CleanHTML(values.LPAlocalGuidance)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
@@ -757,7 +783,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.ROW == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.ROWEvidence || ""}
|
||||
{CleanHTML(values.ROWEvidence)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -788,8 +814,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.conservationArea == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.conservationAreaEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.conservationAreaEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -822,8 +849,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.affectListedBuilding == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.affectListedBuildingEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.affectListedBuildingEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -854,7 +882,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.TPO == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.TPOEvidence || ""}
|
||||
{CleanHTML(values.TPOEvidence)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -887,8 +915,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.natureConservationSite == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.natureConservationSiteEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.natureConservationSiteEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -919,8 +948,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.protectedSpecies == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.protectedSpeciesEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.protectedSpeciesEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -967,7 +997,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.floodingIssue == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.floodingIssueEvidence || ""}
|
||||
{CleanHTML(
|
||||
values.floodingIssueEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -1002,8 +1034,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
"Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.governmentDepartmentCommentsEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.governmentDepartmentCommentsEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -1073,8 +1106,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
"Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.developmentCarriedOutInAccordanceEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.developmentCarriedOutInAccordanceEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -1155,8 +1189,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
"Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.developmentAnyOtherConditionsEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.developmentAnyOtherConditionsEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -1200,8 +1235,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
</View>
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.copyOfEnforcementNoticeEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.copyOfEnforcementNoticeEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
@@ -1231,7 +1267,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.enforcementNoticePlan || ""}
|
||||
{CleanHTML(
|
||||
values.enforcementNoticePlan
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
@@ -1261,8 +1299,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
</View>
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.listOfNotifiedOfEnforcementEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.listOfNotifiedOfEnforcementEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
@@ -1294,8 +1333,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
</View>
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.copyOfLetterOfAppealNotificationEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.copyOfLetterOfAppealNotificationEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
@@ -1327,7 +1367,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.lpaEIAOS == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.lpaEIAOSEvidence || ""}
|
||||
{CleanHTML(values.lpaEIAOSEvidence)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -1360,8 +1400,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.detailsOfOtherAppeals == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.detailsOfOtherAppealsEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.detailsOfOtherAppealsEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -1394,8 +1435,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.detailsOfPreviousAppeals == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.detailsOfPreviousAppealsEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.detailsOfPreviousAppealsEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -1427,8 +1469,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.otherRelevantInformation == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.otherRelevantInformationEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.otherRelevantInformationEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
|
||||
@@ -120,6 +120,17 @@ export const finalComments_pdf = ({ docProps }) => {
|
||||
})
|
||||
: [];
|
||||
|
||||
Font.registerHyphenationCallback((word) => [word]);
|
||||
|
||||
function CleanHTML(htmlStr) {
|
||||
let cleanStr =
|
||||
typeof htmlStr === "string"
|
||||
? htmlStr.replace(/<p><br><\/p>/g, "")
|
||||
: "";
|
||||
|
||||
return cleanStr;
|
||||
}
|
||||
|
||||
return (
|
||||
<Document>
|
||||
<Page size="A4" style={styles.page} wrap>
|
||||
@@ -186,8 +197,7 @@ export const finalComments_pdf = ({ docProps }) => {
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"s78-section-question-1"
|
||||
)}{" "}
|
||||
:
|
||||
)}
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
{values.caseRef}
|
||||
@@ -205,8 +215,7 @@ export const finalComments_pdf = ({ docProps }) => {
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"statement-representation-capacity-label"
|
||||
)}
|
||||
:
|
||||
)}{" "}
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
{values.representationCapacity}
|
||||
@@ -229,8 +238,9 @@ export const finalComments_pdf = ({ docProps }) => {
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.conditional_representationCapacity_Comments ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.conditional_representationCapacity_Comments
|
||||
)}
|
||||
</Html>
|
||||
</Text>
|
||||
</View>
|
||||
@@ -254,7 +264,6 @@ export const finalComments_pdf = ({ docProps }) => {
|
||||
docProps.locale,
|
||||
"s78-section-question-3"
|
||||
)}
|
||||
:
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
{values.siteAddress.replace(/false/gm, " ")}
|
||||
@@ -273,7 +282,6 @@ export const finalComments_pdf = ({ docProps }) => {
|
||||
docProps.locale,
|
||||
"statement-case-type-label"
|
||||
)}
|
||||
:
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
{appealTypeValue.value || ""}
|
||||
@@ -321,7 +329,9 @@ export const finalComments_pdf = ({ docProps }) => {
|
||||
</View>
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.representationComments || ""}
|
||||
{CleanHTML(
|
||||
values.representationComments
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
@@ -345,20 +355,30 @@ export const finalComments_pdf = ({ docProps }) => {
|
||||
<View
|
||||
wrap={false}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
>
|
||||
<Text style={styles.questionBullet}>7.</Text>
|
||||
<Text style={styles.questionText}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"statement-list-of-attached-files-label"
|
||||
)}
|
||||
</Text>
|
||||
<View
|
||||
wrap={false}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
>
|
||||
<Text style={styles.questionBullet}>
|
||||
7.
|
||||
</Text>
|
||||
<Text style={styles.questionTextWide}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"statement-list-of-attached-files-label"
|
||||
)}
|
||||
</Text>
|
||||
</View>
|
||||
<View
|
||||
style={[
|
||||
styles.questionAnswer,
|
||||
styles.questionAnswerWide,
|
||||
{ flexDirection: "column" },
|
||||
]}
|
||||
>
|
||||
@@ -396,7 +416,6 @@ export const finalComments_pdf = ({ docProps }) => {
|
||||
}}
|
||||
>
|
||||
<Text>
|
||||
{" "}
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"statement-declaration-header"
|
||||
@@ -450,7 +469,6 @@ export const finalComments_pdf = ({ docProps }) => {
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
{values.hasOwnProperty(
|
||||
"representationOnBehalfOf_details"
|
||||
) ? (
|
||||
@@ -479,7 +497,7 @@ export const finalComments_pdf = ({ docProps }) => {
|
||||
</Text>
|
||||
</View>
|
||||
) : (
|
||||
""
|
||||
<View />
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
StyleSheet,
|
||||
Text,
|
||||
View,
|
||||
Font,
|
||||
} from "@react-pdf/renderer";
|
||||
import Html from "react-pdf-html";
|
||||
import { getFormCollectionByID, bytesToSize } from "../../components/utils";
|
||||
@@ -40,7 +41,7 @@ const styles = StyleSheet.create({
|
||||
logoImage: { width: "200pt" },
|
||||
questionBullet: { width: "5%", fontSize: 12 },
|
||||
questionText: { width: "30%", fontSize: 12 },
|
||||
questionTextMid: { width: "80%", fontSize: 12 },
|
||||
questionTextMid: { width: "75%", fontSize: 12, marginRight: 10 },
|
||||
questionTextWide: { width: "95%", fontSize: 12, marginBottom: 5 },
|
||||
questionAnswer: {
|
||||
color: "#757575",
|
||||
@@ -52,6 +53,27 @@ const styles = StyleSheet.create({
|
||||
paddingLeft: 10,
|
||||
backgroundColor: "white",
|
||||
},
|
||||
questionAnswerSmall: {
|
||||
color: "#757575",
|
||||
width: "300",
|
||||
fontSize: 12,
|
||||
padding: 5,
|
||||
border: 1,
|
||||
borderColor: "#eee",
|
||||
paddingLeft: 10,
|
||||
backgroundColor: "white",
|
||||
marginRight: 10,
|
||||
},
|
||||
questionAnswerSmaller: {
|
||||
color: "#757575",
|
||||
width: "90",
|
||||
fontSize: 12,
|
||||
padding: 5,
|
||||
border: 1,
|
||||
borderColor: "#eee",
|
||||
paddingLeft: 10,
|
||||
backgroundColor: "white",
|
||||
},
|
||||
questionAnswerMid: {
|
||||
color: "#757575",
|
||||
width: "20%",
|
||||
@@ -73,6 +95,15 @@ const styles = StyleSheet.create({
|
||||
padding: 5,
|
||||
},
|
||||
|
||||
questionAnswerFull: {
|
||||
color: "#757575",
|
||||
width: "100%",
|
||||
fontSize: 10,
|
||||
padding: 5,
|
||||
border: 1,
|
||||
borderColor: "#eee",
|
||||
backgroundColor: "white",
|
||||
},
|
||||
sectionContainer: {
|
||||
backgroundColor: "#F8F8F8",
|
||||
padding: 10,
|
||||
@@ -111,6 +142,18 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
let appealTypeValue = getFormCollectionByID(values.appealType);
|
||||
|
||||
//console.log("sdffhjdhjdjdgkj: ", values.procedureType);
|
||||
|
||||
Font.registerHyphenationCallback((word) => [word]);
|
||||
|
||||
function CleanHTML(htmlStr) {
|
||||
let cleanStr =
|
||||
typeof htmlStr === "string"
|
||||
? htmlStr.replace(/<p><br><\/p>/g, "")
|
||||
: "";
|
||||
|
||||
return cleanStr;
|
||||
}
|
||||
|
||||
return (
|
||||
<Document>
|
||||
<Page size="A4" style={styles.page} wrap>
|
||||
@@ -239,7 +282,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
)}
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
{appealTypeValue.value || ""}
|
||||
{appealTypeValue.value}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
@@ -264,6 +307,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
wrap={false}
|
||||
@@ -282,14 +326,16 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
)}
|
||||
</Text>
|
||||
<Text style={styles.questionAnswerMid}>
|
||||
{values.procedureType || ""}
|
||||
{values.procedureType}
|
||||
</Text>
|
||||
</View>
|
||||
{values.procedureType !=
|
||||
"Written representations" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.procedureTypeEvidence || ""}
|
||||
{CleanHTML(
|
||||
values.procedureTypeEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -309,7 +355,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
)}
|
||||
</Text>
|
||||
<Text style={styles.questionAnswerMid}>
|
||||
{values.enterToView || ""}
|
||||
{values.enterToView}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
@@ -318,6 +364,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -344,8 +391,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
"Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={{ fontSize: 12 }}>
|
||||
{values.enterNeighbouringLandToViewSiteEvidence ||
|
||||
" "}
|
||||
{CleanHTML(
|
||||
values.enterNeighbouringLandToViewSiteEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -355,6 +403,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -380,8 +429,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
"Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.enterNeighbouringLandAccessRequiredEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.enterNeighbouringLandAccessRequiredEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -391,6 +441,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -408,14 +459,15 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
)}
|
||||
</Text>
|
||||
<Text style={styles.questionAnswerMid}>
|
||||
{values.healthAndSafetyIssues || ""}
|
||||
{values.healthAndSafetyIssues}
|
||||
</Text>
|
||||
</View>
|
||||
{values.healthAndSafetyIssues == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.healthAndSafetyIssuesEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.healthAndSafetyIssuesEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -425,6 +477,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -445,7 +498,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
</View>
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.LPAcontactDetails || ""}
|
||||
{CleanHTML(values.LPAcontactDetails)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
@@ -467,62 +520,92 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
</View>
|
||||
<View style={styles.sectionContainer}>
|
||||
<View
|
||||
wrap={false}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<Text style={styles.questionBullet}>11.</Text>
|
||||
<Text style={styles.questionText}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"s78-section-question-11"
|
||||
)}
|
||||
</Text>
|
||||
<View style={styles.questionAnswer}>
|
||||
<View
|
||||
wrap={false}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
>
|
||||
<Text style={styles.questionBullet}>
|
||||
11.
|
||||
</Text>
|
||||
<Text style={styles.questionTextWide}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"s78-section-question-11"
|
||||
)}
|
||||
</Text>
|
||||
</View>
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.LPAcaseFileAndReps || ""}
|
||||
{CleanHTML(values.LPAcaseFileAndReps)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
<View
|
||||
wrap={false}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<Text style={styles.questionBullet}>12.</Text>
|
||||
<Text style={styles.questionText}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"s78-section-question-12"
|
||||
)}
|
||||
</Text>
|
||||
<View style={styles.questionAnswer}>
|
||||
<View
|
||||
wrap={false}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
>
|
||||
<Text style={styles.questionBullet}>
|
||||
12.
|
||||
</Text>
|
||||
<Text style={styles.questionTextWide}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"s78-section-question-12"
|
||||
)}
|
||||
</Text>
|
||||
</View>
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.LPAldpAndMap || ""}
|
||||
{CleanHTML(values.LPAldpAndMap)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
<View
|
||||
wrap={false}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<Text style={styles.questionBullet}>13.</Text>
|
||||
<Text style={styles.questionText}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"s78-section-question-13"
|
||||
)}
|
||||
</Text>
|
||||
<View style={styles.questionAnswer}>
|
||||
<View
|
||||
wrap={false}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
>
|
||||
<Text style={styles.questionBullet}>
|
||||
13.
|
||||
</Text>
|
||||
<Text style={styles.questionTextWide}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"s78-section-question-13"
|
||||
)}
|
||||
</Text>
|
||||
</View>
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.LPAlocalGuidance || ""}
|
||||
{CleanHTML(values.LPAlocalGuidance)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
@@ -585,6 +668,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -608,7 +692,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.ROW == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.ROWEvidence || ""}
|
||||
{CleanHTML(values.ROWEvidence)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -618,6 +702,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -641,8 +726,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.conservationArea == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.conservationAreaEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.conservationAreaEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -652,6 +738,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -675,8 +762,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.affectListedBuilding == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.affectListedBuildingEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.affectListedBuildingEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -686,6 +774,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -709,7 +798,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.TPO == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.TPOEvidence || ""}
|
||||
{CleanHTML(values.TPOEvidence)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -719,6 +808,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -742,8 +832,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.natureConservationSite == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.natureConservationSiteEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.natureConservationSiteEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -753,6 +844,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -776,8 +868,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.protectedSpecies == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.protectedSpeciesEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.protectedSpeciesEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -805,6 +898,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -829,8 +923,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
"Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.governmentDepartmentCommentsEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.governmentDepartmentCommentsEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -874,7 +969,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
marginBottom: 10,
|
||||
}}
|
||||
>
|
||||
<Text style={styles.questionBullet}>a)</Text>
|
||||
<Text style={styles.questionBullet}></Text>
|
||||
<Text style={styles.questionTextMid}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
@@ -892,6 +987,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -899,9 +995,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
marginBottom: 10,
|
||||
}}
|
||||
>
|
||||
<Text style={styles.questionBullet}>
|
||||
b)
|
||||
</Text>
|
||||
<Text style={styles.questionBullet}></Text>
|
||||
<Text style={styles.questionTextMid}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
@@ -918,8 +1012,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
"Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.developmentCarriedOutInAccordanceEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.developmentCarriedOutInAccordanceEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -931,7 +1026,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
marginBottom: 10,
|
||||
}}
|
||||
>
|
||||
<Text style={styles.questionBullet}>c)</Text>
|
||||
<Text style={styles.questionBullet}></Text>
|
||||
<Text style={styles.questionTextMid}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
@@ -949,7 +1044,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
marginBottom: 10,
|
||||
}}
|
||||
>
|
||||
<Text style={styles.questionBullet}>d)</Text>
|
||||
<Text style={styles.questionBullet}></Text>
|
||||
<Text style={styles.questionTextMid}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
@@ -965,6 +1060,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -989,8 +1085,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
"Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.developmentAnyOtherConditionsEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.developmentAnyOtherConditionsEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -1003,11 +1100,12 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
marginTop: 10,
|
||||
fontFamily: "Helvetica-Bold",
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<Text style={{ fontSize: 14 }}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"s78-section-heading-five"
|
||||
"s78-section-heading-five-sub"
|
||||
)}
|
||||
</Text>
|
||||
</View>
|
||||
@@ -1017,6 +1115,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -1037,18 +1136,24 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.copyOfApplicantsCertificate}
|
||||
</Text>
|
||||
</View>
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.copyOfApplicantsCertificateEvidence ||
|
||||
""}
|
||||
</Html>
|
||||
</View>
|
||||
{values.hasOwnProperty(
|
||||
"copyOfApplicantsCertificateEvidence"
|
||||
) && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{CleanHTML(
|
||||
values.copyOfApplicantsCertificateEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -1069,18 +1174,24 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.advertismentGiven}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.advertismentGivenEvidence || ""}
|
||||
</Html>
|
||||
</View>
|
||||
{values.hasOwnProperty(
|
||||
"advertismentGivenEvidence"
|
||||
) && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{CleanHTML(
|
||||
values.advertismentGivenEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -1103,18 +1214,24 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
}
|
||||
</Text>
|
||||
</View>
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.copyOfLetterOfAppealNotificationEvidence ||
|
||||
""}
|
||||
</Html>
|
||||
</View>
|
||||
{values.hasOwnProperty(
|
||||
"copyOfLetterOfAppealNotificationEvidence"
|
||||
) && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{CleanHTML(
|
||||
values.copyOfLetterOfAppealNotificationEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -1138,7 +1255,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.lpaEIAOS == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.lpaEIAOSEvidence || ""}
|
||||
{CleanHTML(values.lpaEIAOSEvidence)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -1148,6 +1265,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -1174,8 +1292,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
"Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.advertismentConsentDiscontinuanceNoticeEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.advertismentConsentDiscontinuanceNoticeEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -1185,6 +1304,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -1208,8 +1328,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.detailsOfOtherAppeals == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.detailsOfOtherAppealsEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.detailsOfOtherAppealsEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -1219,6 +1340,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -1242,8 +1364,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.detailsOfPreviousAppeals == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.detailsOfPreviousAppealsEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.detailsOfPreviousAppealsEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -1253,6 +1376,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
@@ -1276,8 +1400,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
{values.otherRelevantInformation == "Yes" && (
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.otherRelevantInformationEvidence ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.otherRelevantInformationEvidence
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
)}
|
||||
@@ -1315,15 +1440,18 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
}}
|
||||
>
|
||||
<Text
|
||||
style={{ width: "40%", fontSize: 12 }}
|
||||
style={{ width: "20%", fontSize: 12 }}
|
||||
>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"s78-section-question-signed"
|
||||
)}
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
{values.caseOfficer}
|
||||
<Text
|
||||
style={styles.questionAnswerSmall}
|
||||
wrap={false}
|
||||
>
|
||||
w{values.caseOfficer}
|
||||
</Text>
|
||||
</View>
|
||||
<View
|
||||
@@ -1333,13 +1461,13 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<Text style={styles.questionText}>
|
||||
<Text style={{ width: "75", fontSize: 12 }}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"s78-section-question-date"
|
||||
)}
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
<Text style={styles.questionAnswerSmaller}>
|
||||
{formatDates(values.signedDate)}
|
||||
</Text>
|
||||
</View>
|
||||
@@ -1380,20 +1508,27 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
<View
|
||||
wrap={false}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
>
|
||||
<Text style={styles.questionBullet}></Text>
|
||||
<Text style={styles.questionText}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"lpa-list-supporting-documents-list"
|
||||
)}
|
||||
</Text>
|
||||
<View
|
||||
wrap={false}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
>
|
||||
<Text style={styles.questionTextWide}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"lpa-list-supporting-documents-list"
|
||||
)}
|
||||
</Text>
|
||||
</View>
|
||||
<View
|
||||
style={[
|
||||
styles.questionAnswer,
|
||||
styles.questionAnswerFull,
|
||||
{ flexDirection: "column" },
|
||||
]}
|
||||
>
|
||||
@@ -1410,14 +1545,16 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
>
|
||||
<Text
|
||||
styles={
|
||||
styles.questionTextMid
|
||||
styles.questionAnswer
|
||||
}
|
||||
>
|
||||
{p.name} -{" "}
|
||||
{p.name}
|
||||
{"\n"}(
|
||||
{bytesToSize(
|
||||
p.size
|
||||
)}{" "}
|
||||
{"\n"}
|
||||
p.contentLength ||
|
||||
p.size
|
||||
)}
|
||||
){" "}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
|
||||
@@ -113,13 +113,28 @@ export const other_pdf = ({ docProps }) => {
|
||||
|
||||
let datestr = values.pinswg_name.split("-");
|
||||
let signedDate = formatDates(new Date()); // datestr[2] + "/" + datestr[1] + "/" + datestr[0];
|
||||
const isLPA = values.representationCapacity == "lpa" ? true : false;
|
||||
const isLPA =
|
||||
values.representationCapacity == "lpa" ||
|
||||
values.representationCapacity == "LPA"
|
||||
? true
|
||||
: false;
|
||||
let filterFilesList = values.hasOwnProperty("filesList")
|
||||
? values.filesList.filter(function (el) {
|
||||
return el != null;
|
||||
})
|
||||
: [];
|
||||
|
||||
Font.registerHyphenationCallback((word) => [word]);
|
||||
|
||||
function CleanHTML(htmlStr) {
|
||||
let cleanStr =
|
||||
typeof htmlStr === "string"
|
||||
? htmlStr.replace(/<p><br><\/p>/g, "")
|
||||
: "";
|
||||
|
||||
return cleanStr;
|
||||
}
|
||||
|
||||
return (
|
||||
<Document>
|
||||
<Page size="A4" style={styles.page} wrap>
|
||||
@@ -262,7 +277,9 @@ export const other_pdf = ({ docProps }) => {
|
||||
</View>
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.representationComments || ""}
|
||||
{CleanHTML(
|
||||
values.representationComments
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -143,6 +143,8 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
||||
|
||||
//console.log("\n//////////\n The Case:\n", docProps.caseObj);
|
||||
|
||||
Font.registerHyphenationCallback((word) => [word]);
|
||||
|
||||
return (
|
||||
<Document>
|
||||
<Page size="A4" style={styles.page} wrap>
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
StyleSheet,
|
||||
Text,
|
||||
View,
|
||||
Font,
|
||||
} from "@react-pdf/renderer";
|
||||
import Html from "react-pdf-html";
|
||||
import { getFormCollectionByID, bytesToSize } from "../../components/utils";
|
||||
@@ -116,6 +117,17 @@ export const statement_pdf = ({ docProps }) => {
|
||||
})
|
||||
: [];
|
||||
|
||||
Font.registerHyphenationCallback((word) => [word]);
|
||||
|
||||
function CleanHTML(htmlStr) {
|
||||
let cleanStr =
|
||||
typeof htmlStr === "string"
|
||||
? htmlStr.replace(/<p><br><\/p>/g, "")
|
||||
: "";
|
||||
|
||||
return cleanStr;
|
||||
}
|
||||
|
||||
return (
|
||||
<Document>
|
||||
<Page size="A4" style={styles.page} wrap>
|
||||
@@ -200,8 +212,7 @@ export const statement_pdf = ({ docProps }) => {
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"statement-representation-capacity-label"
|
||||
)}
|
||||
:{" "}
|
||||
)}{" "}
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
{values.representationCapacity}
|
||||
@@ -224,8 +235,9 @@ export const statement_pdf = ({ docProps }) => {
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.conditional_representationCapacity_Comments ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.conditional_representationCapacity_Comments
|
||||
)}
|
||||
</Html>
|
||||
</Text>
|
||||
</View>
|
||||
@@ -251,7 +263,7 @@ export const statement_pdf = ({ docProps }) => {
|
||||
)}
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
{values.siteAddress}
|
||||
{values.siteAddress.replace(/false/gm, " ")}
|
||||
</Text>
|
||||
</View>
|
||||
<View
|
||||
@@ -267,7 +279,6 @@ export const statement_pdf = ({ docProps }) => {
|
||||
docProps.locale,
|
||||
"statement-case-type-label"
|
||||
)}
|
||||
:
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
{appealTypeValue.value || ""}
|
||||
@@ -315,7 +326,9 @@ export const statement_pdf = ({ docProps }) => {
|
||||
</View>
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.representationComments || ""}
|
||||
{CleanHTML(
|
||||
values.representationComments
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
@@ -339,20 +352,30 @@ export const statement_pdf = ({ docProps }) => {
|
||||
<View
|
||||
wrap={false}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
>
|
||||
<Text style={styles.questionBullet}>7.</Text>
|
||||
<Text style={styles.questionText}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"statement-list-of-attached-files-label"
|
||||
)}
|
||||
</Text>
|
||||
<View
|
||||
wrap={false}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
>
|
||||
<Text style={styles.questionBullet}>
|
||||
7.
|
||||
</Text>
|
||||
<Text style={styles.questionTextWide}>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"statement-list-of-attached-files-label"
|
||||
)}
|
||||
</Text>
|
||||
</View>
|
||||
<View
|
||||
style={[
|
||||
styles.questionAnswer,
|
||||
styles.questionAnswerWide,
|
||||
{ flexDirection: "column" },
|
||||
]}
|
||||
>
|
||||
@@ -471,7 +494,7 @@ export const statement_pdf = ({ docProps }) => {
|
||||
</Text>
|
||||
</View>
|
||||
) : (
|
||||
""
|
||||
<View />
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
StyleSheet,
|
||||
Text,
|
||||
View,
|
||||
Font,
|
||||
} from "@react-pdf/renderer";
|
||||
import Html from "react-pdf-html";
|
||||
import { getFormCollectionByID, bytesToSize } from "../../components/utils";
|
||||
@@ -104,6 +105,17 @@ export const writtenStatement_pdf = ({ docProps }) => {
|
||||
})
|
||||
: [];
|
||||
|
||||
Font.registerHyphenationCallback((word) => [word]);
|
||||
|
||||
function CleanHTML(htmlStr) {
|
||||
let cleanStr =
|
||||
typeof htmlStr === "string"
|
||||
? htmlStr.replace(/<p><br><\/p>/g, "")
|
||||
: "";
|
||||
|
||||
return cleanStr;
|
||||
}
|
||||
|
||||
return (
|
||||
<Document>
|
||||
<Page size="A4" style={styles.page} wrap>
|
||||
@@ -239,7 +251,9 @@ export const writtenStatement_pdf = ({ docProps }) => {
|
||||
</View>
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.representationComments || ""}
|
||||
{CleanHTML(
|
||||
values.representationComments
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -444,6 +444,9 @@ export const getThumbnailIconByExtension = (blobName) => {
|
||||
return "/assets/images/documenttypes/jpg.png";
|
||||
case "png":
|
||||
return "/assets/images/documenttypes/png.png";
|
||||
case "tiff":
|
||||
case "tif":
|
||||
return "/assets/images/documenttypes/tif.png";
|
||||
break;
|
||||
default:
|
||||
return "/assets/images/documenttypes/default.png";
|
||||
|
||||
@@ -90,7 +90,8 @@
|
||||
"s78-section-question-24d": "Ni chaiff unrhyw waith datblygu ddigwydd hyd nes y bydd cynllun i alluogi darparu seilwaith band eang all drosglwyddo data ar gyfradd gigadid o ffin y safle i’r anheddau/adeiladau a ganiateir drwy hyn wedi cael ei gyflwyno i’r awdurdod cynllunio lleol a’i gytuno ganddo’n ysgrifenedig. Bydd y datblygiad yn cael ei gynnal yn unol â'r manylion cymeradwy. Rheswm: Er mwyn cefnogi’r gwaith o gyflwyno seilwaith cyfathrebu digidol ledled Cymru yn unol â Pholisi 13 Cymru’r Dyfodol.",
|
||||
"s78-section-question-25": "A ydych yn ystyried bod amodau eraill, neu fersiynau diwygiedig o'r amodau safonol uchod, yn angenrheidiol?",
|
||||
"s78-section-question-25-hint": "Os Ydych, rhestrwch nhw yma neu mewn dogfen atodedig. Dylech gynnwys rhesymau a pholisïau perthnasol y cynllun datblygu. Os ydych yn bwriadu anfon amodau awgrymedig gyda’ch datganiad 4 wythnos, nodwch hyn yma.",
|
||||
"s78-section-heading-five": "Cyn llenwi'r ffurflen hon, nodwch a ydych am atodi ffeil(iau) ar gyfer y canlynol, ac os na, darparwch ddolen gwe:",
|
||||
"s78-section-heading-five": "Cyn cwblhau'r Holiadur, nodwch a ydych am atodi ffeil(iau) ar gyfer y canlynol, ac os na, rhowch ddolen gwe neu resymau. Gellir lanlwytho unrhyw ddogfennau gofynnol ar y dudalen nesaf.",
|
||||
"s78-section-heading-five-sub": "Gorffen yr holiadur",
|
||||
"s78-section-question-26": "Copi o dystysgrif yr ymgeisydd sy'n cadarnhau ei fod wedi hysbysu pobl sydd â buddiant yn y tir?",
|
||||
"s78-section-question-26-hint": "Rhowch ddolen we yma os yw ar gael ar-lein. Os Na, rhowch resymau",
|
||||
"s78-section-question-27": "Tystiolaeth o unrhyw gyhoeddusrwydd a roddwyd i'r cais, gan gynnwys hysbysiadau safle a hysbyseb leol?",
|
||||
@@ -206,8 +207,8 @@
|
||||
"s78-heading-para-one": "Ar gyfer ceisiadau/apeliadau Cynllunio, Ardal Gadwraeth, Adeilad Rhestredig a Hysbysebu",
|
||||
"s78-heading-para-two": "Rhaid i'r ACLl anfon yr holiadur wedi'i gwblhau ac unrhyw atodiadau at PEDW.gwaithachos@llyw.cymru a'r apelydd (neu ei asiant) o fewn 5 niwrnod gwaith o'r dyddiad dechrau a nodwyd yn ein llythyr cychwyn. ",
|
||||
"section-heading-zero": "Manylion yr Achos",
|
||||
"s78-footnote-one": "* Erthygl 11 Gorchymyn Cynllunio Gwlad a Thref (Gweithdrefn Rheoli Datblygu) (Cymru) 2012; Rheoliad 7 Rheoliadau Cynllunio Gwlad a Thref (Adeiladau Rhestredig ac Ardaloedd Cadwraeth) (Cymru) 2012",
|
||||
"s78-footnote-two": "** Erthygl 12 Gorchymyn Cynllunio Gwlad a Thref (Gweithdrefn Rheoli Datblygu) (Cymru) 2012; Adran 67/73 Deddf Cynllunio Gwlad a Thref (Adeiladau Rhestredig ac Ardaloedd Cadwraeth) 1990; Rheoliad 10 Rheoliadau Cynllunio Gwlad a Thref (Adeiladau Rhestredig ac Ardaloedd Cadwraeth) (Cymru) 2012",
|
||||
"s78-footnote-one": "Erthygl 11 Gorchymyn Cynllunio Gwlad a Thref (Gweithdrefn Rheoli Datblygu) (Cymru) 2012; Rheoliad 7 Rheoliadau Cynllunio Gwlad a Thref (Adeiladau Rhestredig ac Ardaloedd Cadwraeth) (Cymru) 2012",
|
||||
"s78-footnote-two": "Erthygl 12 Gorchymyn Cynllunio Gwlad a Thref (Gweithdrefn Rheoli Datblygu) (Cymru) 2012; Adran 67/73 Deddf Cynllunio Gwlad a Thref (Adeiladau Rhestredig ac Ardaloedd Cadwraeth) 1990; Rheoliad 10 Rheoliadau Cynllunio Gwlad a Thref (Adeiladau Rhestredig ac Ardaloedd Cadwraeth) (Cymru) 2012",
|
||||
"statement-case-type-label": "Math o achos",
|
||||
"statement-representation-capacity-label": "Rhinwedd y sylw",
|
||||
"statement-representation-capacity-details-label": "Manylion rhinwedd y sylw",
|
||||
|
||||
@@ -90,15 +90,16 @@
|
||||
"s78-section-question-24d": "d) No development shall take place until a scheme to enable the provision of gigabit capable broadband infrastructure from the site boundary to the dwellings/buildings hereby permitted has been submitted to and agreed in writing by the Local Planning Authority. Development shall be carried out in accordance with the approved details. Reason: To support the roll-out of digital communications infrastructure across Wales in accordance with Policy 13 of Future Wales.",
|
||||
"s78-section-question-25": "Do you consider other conditions, or amended versions of the above standard conditions, to be necessary?",
|
||||
"s78-section-question-25-hint": "If Yes, list them here or in an attached document. Include reasons and relevant development plan policies. If you intend to send suggested conditions alongside your 4 week statement, state this here.",
|
||||
"s78-section-heading-five": "Before completing this form, indicate if you are going to attach file(s) for the following, if not, provide a web link:",
|
||||
"s78-section-heading-five": "Before finalising the Questionnaire, indicate if you are going to attach file(s) for the following, and if not, provide a web link or reasons. Any required documents can be uploaded on the next page.",
|
||||
"s78-section-heading-five-sub": "Finalising questionnaire",
|
||||
"s78-section-question-26": "A copy of the applicant’s certificate confirming that they notified persons with an interest in the land?",
|
||||
"s78-section-question-26-hint": "Insert weblink here if available online. If No, give reasons",
|
||||
"s78-section-question-26-hint": "Insert weblink here if available online. If Not, give reasons",
|
||||
"s78-section-question-27": "Evidence of any publicity given to the application, including site notices and local advertisement?",
|
||||
"s78-section-question-27-hint": "Insert weblink here if available online. If No, give reasons",
|
||||
"s78-section-question-27-hint": "Insert weblink here if available online. If Not, give reasons",
|
||||
"s78-section-question-28": "A copy of the letter with which you notified people of the appeal AND a list of the people you notified?",
|
||||
"s78-section-question-28-hint": "Insert weblink here if available online. If No, give reasons",
|
||||
"s78-section-question-28-hint": "Insert weblink here if available online. If Not, give reasons",
|
||||
"s78-section-question-29": "The LPA’s Environmental Impact Assessment Screening Opinion, if applicable?",
|
||||
"s78-section-question-29-hint": "Insert weblink here if available online. If No, give reasons",
|
||||
"s78-section-question-29-hint": "Insert weblink here if available online. If Not, give reasons",
|
||||
"s78-section-question-30": "Advertisement consent proposals only: A true copy of the Discontinuance Notice (if one has been issued)?",
|
||||
"s78-section-question-30-hint": "If Yes, state how the use of the site or the display of the advertisement(s) enjoys the benefit of deemed consent",
|
||||
"s78-section-question-31": "Details of other appeals or applications relating to the site, or a nearby site, which are still being considered by PEDW or the Welsh Ministers?",
|
||||
@@ -179,15 +180,15 @@
|
||||
"enf-section-question-32-hint": "If Yes, list them here or in an attached document. Include reasons and relevant development plan policies. If you intend to send suggested conditions alongside your 4 week statement, state this here.",
|
||||
"enf-section-heading-seven": "Before sending, have you attached or provided a web link to the following:",
|
||||
"enf-section-question-33": "A true copy of the enforcement notice?",
|
||||
"enf-section-question-33-hint": "Insert weblink here if available online. If No, give reasons",
|
||||
"enf-section-question-33-hint": "Insert weblink here if available online. If Not, give reasons",
|
||||
"enf-section-question-34": "The enforcement notice plan.",
|
||||
"enf-section-question-34-hint": "Insert weblink here if available online. If No, give reasons",
|
||||
"enf-section-question-34-hint": "Insert weblink here if available online. If Not, give reasons",
|
||||
"enf-section-question-35": "A list of those served with the enforcement notice.",
|
||||
"enf-section-question-35-hint": "Insert weblink here if available online. If No, give reasons",
|
||||
"enf-section-question-35-hint": "Insert weblink here if available online. If Not, give reasons",
|
||||
"enf-section-question-36": "A copy of the letter with which you notified people of the appeal AND a list of the people you notified?",
|
||||
"enf-section-question-36-hint": "Insert weblink here if available online. If No, give reasons",
|
||||
"enf-section-question-36-hint": "Insert weblink here if available online. If Not, give reasons",
|
||||
"enf-section-question-37": "The LPA’s Environmental Impact Assessment Screening Opinion and ‘Regulation 45 Notice’*, if applicable?",
|
||||
"enf-section-question-37-hint": "Insert weblink here if available online. If No, give reasons",
|
||||
"enf-section-question-37-hint": "Insert weblink here if available online. If Not, give reasons",
|
||||
"enf-section-question-38": "Details of other appeals or applications relating to the site, or a nearby site, which are still being considered by PEDW or the Welsh Ministers?",
|
||||
"enf-section-question-38-hint": "If Yes, provide reference numbers and, if applicable, attach or insert links to relevant documents",
|
||||
"enf-section-question-39": "Details of any previous appeal decision relating to the site or a nearby site referred to by the LPA or applicant?",
|
||||
|
||||
@@ -92,6 +92,10 @@
|
||||
"webpack": "^5.66.0",
|
||||
"xpath": "^0.0.32"
|
||||
},
|
||||
"resolutions": {
|
||||
"@react-pdf/layout": "3.11.5",
|
||||
"@react-pdf/pdfkit": "3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^9.11.1",
|
||||
"eslint-config-next": "^15.0.3",
|
||||
|
||||
@@ -64,7 +64,8 @@ export default async function ApiProxy(req, res) {
|
||||
: "";
|
||||
|
||||
queryString +=
|
||||
_.has(searchString, "lpa") && searchString.lpa != null
|
||||
(_.has(searchString, "lpa") || _.has(searchString, "LPA")) &&
|
||||
searchString.lpa != null
|
||||
? " _pinswg_associatedlpa_value eq " + searchString.lpa + " and"
|
||||
: "";
|
||||
|
||||
|
||||
@@ -99,7 +99,8 @@ export default async function ApiProxy(req, res) {
|
||||
: "";
|
||||
|
||||
queryString +=
|
||||
_.has(searchString, "lpa") && searchString.lpa != null
|
||||
(_.has(searchString, "lpa") || _.has(searchString, "LPA")) &&
|
||||
searchString.lpa != null
|
||||
? " _pinswg_associatedlpa_value eq " + searchString.lpa + " and"
|
||||
: "";
|
||||
|
||||
|
||||
@@ -219,6 +219,7 @@ export default async function handler(req, res) {
|
||||
repCapacity = "LO";
|
||||
break;
|
||||
case "lpa":
|
||||
case "LPA":
|
||||
repCapacity = "LPA";
|
||||
break;
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
? true
|
||||
: false;
|
||||
|
||||
//isLPA && store.dispatch(setRepresentationCapacity("lpa"));
|
||||
//isLPA && store.dispatch(setRepresentationCapacity("LPA"));
|
||||
|
||||
if (query.hasOwnProperty("state")) {
|
||||
console.log("is lpa?:", isLPA);
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 921 B |
Reference in New Issue
Block a user