Merged PR 1362: UAT defects from 100125

Related work items: #13013
This commit is contained in:
Robert Bond
2025-01-14 08:47:50 +00:00
36 changed files with 781 additions and 426 deletions
+1
View File
@@ -203,6 +203,7 @@ export const getBlobs = async (containerName, casefolderID) => {
"caseObj": casefolderID + "/" + casefolderID + "_case.json", "caseObj": casefolderID + "/" + casefolderID + "_case.json",
"isCurrentVersion": blob.isCurrentVersion, "isCurrentVersion": blob.isCurrentVersion,
"contentLength": blob.properties.contentLength, "contentLength": blob.properties.contentLength,
"size": blob.properties.contentLength,
"contentType": blob.contentType, "contentType": blob.contentType,
"lastModified": blob.properties.lastModified, "lastModified": blob.properties.lastModified,
"filepath": "filepath":
+6 -6
View File
@@ -1566,12 +1566,12 @@ export const uploadRepFiles = async (
// files.forEach((file) => formData.append("files", file)); // files.forEach((file) => formData.append("files", file));
for (let i = 0; i < files.length; i++) { // for (let i = 0; i < files.length; i++) {
for (let j = 0; j < files[i].length; j++) { // for (let j = 0; j < files[i].length; j++) {
//console.log("upload rep files:", files[i][j].name); // //console.log("upload rep files:", files[i][j].name);
formData.append(files[i][j].name, files[i][j]); // formData.append(files[i][j].name, files[i][j]);
} // }
} // }
//console.log(formData); //console.log(formData);
+55 -38
View File
@@ -129,6 +129,7 @@ let MakeRepresentation = (props) => {
repCap = "LO"; repCap = "LO";
break; break;
case "lpa": case "lpa":
case "LPA":
repCap = "LPA"; repCap = "LPA";
break; break;
@@ -204,7 +205,7 @@ let MakeRepresentation = (props) => {
return values; return values;
}; };
isLPA && setRepresentationCapacity("lpa"); isLPA && setRepresentationCapacity("LPA");
currentType == "searchResultsObj" currentType == "searchResultsObj"
? (casesObj = jsonpath( ? (casesObj = jsonpath(
@@ -248,8 +249,27 @@ let MakeRepresentation = (props) => {
? props.props.watchedCases.watchedCasesDetails ? props.props.watchedCases.watchedCasesDetails
: props.props.searchResultsObj.searchDetailsObj; : 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 detailsObj = {};
var resultsObj = {};
resultsObj = jsonpath(
'$..[?(@.ticketnumber=="' +
currentView.caseReference.currentReference +
'")]',
setCaseResultsObj
);
resultsObj = resultsObj[0];
detailsObj = jsonpath( detailsObj = jsonpath(
'$..[?(@.pinswg_name=="' + '$..[?(@.pinswg_name=="' +
currentView.caseReference.currentReference + currentView.caseReference.currentReference +
@@ -396,7 +416,7 @@ let MakeRepresentation = (props) => {
) )
) { ) {
return ( return (
//setRepresentationCapacity("lpa"), //setRepresentationCapacity("LPA"),
<RepLPACapacitySelection <RepLPACapacitySelection
formObj={formObj} formObj={formObj}
capacityOptionsArr={capacityOptionsArr} capacityOptionsArr={capacityOptionsArr}
@@ -474,10 +494,11 @@ let MakeRepresentation = (props) => {
); );
break; break;
case "lpa": case "lpa":
case "LPA":
//setRepresentationCapacity("appellant"); //setRepresentationCapacity("appellant");
//setRepresentationCapacity("lpa"); //setRepresentationCapacity("LPA");
// useEffect(() => { // useEffect(() => {
// setRepresentationCapacity("lpa"); // setRepresentationCapacity("LPA");
// }, []); // }, []);
// console.log(currentView.caseReference.appealType); // console.log(currentView.caseReference.appealType);
@@ -761,6 +782,7 @@ let MakeRepresentation = (props) => {
"pinswg_siteaddressline2": detailsObj.pinswg_siteaddressline2, "pinswg_siteaddressline2": detailsObj.pinswg_siteaddressline2,
"pinswg_siteaddresstown": detailsObj.pinswg_siteaddresstown, "pinswg_siteaddresstown": detailsObj.pinswg_siteaddresstown,
"pinswg_siteaddresspostcode": detailsObj.pinswg_siteaddresspostcode, "pinswg_siteaddresspostcode": detailsObj.pinswg_siteaddresspostcode,
"pinswg_lpareference": resultsObj.pinswg_lpareference,
"_pinswg_appellant_value": detailsObj["_pinswg_appellant_value"], "_pinswg_appellant_value": detailsObj["_pinswg_appellant_value"],
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue": "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue":
detailsObj[ detailsObj[
@@ -777,7 +799,7 @@ let MakeRepresentation = (props) => {
? props.props.currentView.representationCapacity ? props.props.currentView.representationCapacity
: values.representationCapacity : values.representationCapacity
: isLPA : isLPA
? "lpa" ? "LPA"
: values.representationCapacity, : values.representationCapacity,
"locale": router.locale, "locale": router.locale,
}); });
@@ -840,23 +862,15 @@ let MakeRepresentation = (props) => {
: "/myportal" : "/myportal"
)) ))
: useSaveStatus : useSaveStatus
? (values.hasOwnProperty("representationDocuments") && ? (Object.assign(values, {
(values.representationDocuments.map((Blob) => "filesList": props.currentView.fileList,
buildFileArray.push({ }),
"name": Blob.name, // commented out as dont need to create pdf on save
"size": Blob.size, // generateRepPDF(
}) // values,
), // props.props.accountDetails.containerID,
(newbuildArr = buildFileArray.concat(values.filesList)), // currentView.caseReference.currentReference
console.log(buildFileArray, newbuildArr), // ),
Object.assign(values, {
"filesList": newbuildArr,
})),
generateRepPDF(
values,
props.props.accountDetails.containerID,
currentView.caseReference.currentReference
),
uploadRepresentationFiles(values), uploadRepresentationFiles(values),
router.replace( router.replace(
router.locale != "en" router.locale != "en"
@@ -874,25 +888,26 @@ let MakeRepresentation = (props) => {
// Object.assign(values, { // Object.assign(values, {
// "filesList": buildFileArray, // "filesList": buildFileArray,
// })), // })),
console.log("updated");
uploadRepresentationFiles(values), uploadRepresentationFiles(values);
generateRepPDF( // generateRepPDF(
values, // values,
props.props.accountDetails.containerID, // props.props.accountDetails.containerID,
currentView.caseReference.currentReference // currentView.caseReference.currentReference
); // );
}; };
const onHandleSubmit = (values) => { const onHandleSubmit = (values) => {
window.scrollTo({ top: 0, behavior: "smooth" }); window.scrollTo({ top: 0, behavior: "smooth" });
values = setRepFileName(values); values = setRepFileName(values);
!values.hasOwnProperty("pinswg_lpareference") && // values.representationType == "Questionnaire" &&
Object.assign(values, { // !values.hasOwnProperty("pinswg_lpareference") &&
"pinswg_lpareference": // Object.assign(values, {
searchResultsObj.searchResultsObj.value[0] // "pinswg_lpareference":
.pinswg_lpareference, // searchResultsObj?.searchResultsObj?.value[0]
}); // ?.pinswg_lpareference,
// });
//console.log("onHandleSubmit form values - ", JSON.stringify(values)); //console.log("onHandleSubmit form values - ", JSON.stringify(values));
@@ -973,6 +988,7 @@ let MakeRepresentation = (props) => {
"pinswg_siteaddresstown": detailsObj.pinswg_siteaddresstown, "pinswg_siteaddresstown": detailsObj.pinswg_siteaddresstown,
"pinswg_siteaddresspostcode": "pinswg_siteaddresspostcode":
detailsObj.pinswg_siteaddresspostcode, detailsObj.pinswg_siteaddresspostcode,
"pinswg_lpareference": resultsObj.pinswg_lpareference,
"_pinswg_appellant_value": "_pinswg_appellant_value":
detailsObj["_pinswg_appellant_value"], detailsObj["_pinswg_appellant_value"],
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue": "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue":
@@ -990,7 +1006,7 @@ let MakeRepresentation = (props) => {
? props.props.currentView.representationCapacity ? props.props.currentView.representationCapacity
: values.representationCapacity : values.representationCapacity
: isLPA : isLPA
? "lpa" ? "LPA"
: values.representationCapacity, : values.representationCapacity,
"locale": router.locale, "locale": router.locale,
})); }));
@@ -998,7 +1014,7 @@ let MakeRepresentation = (props) => {
if (currentView.representationSubmit != true) { if (currentView.representationSubmit != true) {
if (_.isEmpty(currentView.representationCapacity)) { if (_.isEmpty(currentView.representationCapacity)) {
if (isLPA) { if (isLPA) {
setRepresentationCapacity("lpa"); setRepresentationCapacity("LPA");
} else { } else {
setRepresentationCapacity( setRepresentationCapacity(
values.representationCapacity values.representationCapacity
@@ -1055,6 +1071,7 @@ let MakeRepresentation = (props) => {
currentView.caseReference.currentReference currentView.caseReference.currentReference
); );
uploadRepresentationFiles(values); uploadRepresentationFiles(values);
setRepresentationSubmit(true);
setRepresentationSubmitConfirmation(true); setRepresentationSubmitConfirmation(true);
} else { } else {
console.log("nit updated"); console.log("nit updated");
@@ -1064,7 +1081,7 @@ let MakeRepresentation = (props) => {
// currentView.representationSubmit != true // currentView.representationSubmit != true
// ? _.isEmpty(currentView.representationCapacity) // ? _.isEmpty(currentView.representationCapacity)
// ? isLPA // ? isLPA
// ? setRepresentationCapacity("lpa") // ? setRepresentationCapacity("LPA")
// : setRepresentationCapacity( // : setRepresentationCapacity(
// values.representationCapacity // values.representationCapacity
// .replace(/(\band|[\s\-\+\(\)\,\&])/g, "") // .replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
@@ -199,22 +199,24 @@ const RepAgent = (props) => {
} }
hint={"sdsd"} hint={"sdsd"}
fileList={ fileList={
props.currentView.caseReference.hasOwnProperty( props.currentView.fileList
"repDetails"
) // props.currentView.caseReference.hasOwnProperty(
? props.currentView.caseReference.repDetails.hasOwnProperty( // "repDetails"
"filesList" // )
) && // ? props.currentView.caseReference.repDetails.hasOwnProperty(
props.currentView // "filesList"
.caseReference // ) &&
.repDetails.filesList // props.currentView
.length > 0 // .caseReference
? props.currentView // .repDetails.filesList
.caseReference // .length > 0
.repDetails // ? props.currentView
.filesList // .caseReference
: [] // .repDetails
: [] // .filesList
// : []
// : []
} }
setFilesForRepresentations={ setFilesForRepresentations={
setFilesForRepresentations setFilesForRepresentations
@@ -191,20 +191,21 @@ const RepAppellant = (props) => {
ticketnumber={props.props.caseReference} ticketnumber={props.props.caseReference}
hint={"sdsd"} hint={"sdsd"}
fileList={ fileList={
props.currentView.caseReference.hasOwnProperty( props.currentView.fileList
"repDetails" // props.currentView.caseReference.hasOwnProperty(
) // "repDetails"
? props.currentView.caseReference.repDetails.hasOwnProperty( // )
"filesList" // ? props.currentView.caseReference.repDetails.hasOwnProperty(
) && // "filesList"
props.currentView // ) &&
.caseReference.repDetails // props.currentView
.filesList.length > 0 // .caseReference.repDetails
? props.currentView // .filesList.length > 0
.caseReference // ? props.currentView
.repDetails.filesList // .caseReference
: [] // .repDetails.filesList
: [] // : []
// : []
} }
setFilesForRepresentations={ setFilesForRepresentations={
setFilesForRepresentations setFilesForRepresentations
@@ -7,7 +7,7 @@ import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css"; import "react-datepicker/dist/react-datepicker.css";
import Dropzone from "react-dropzone"; import Dropzone from "react-dropzone";
import "react-quill-new/dist/quill.snow.css"; import "react-quill-new/dist/quill.snow.css";
import { Field } from "redux-form"; import { Field, change } from "redux-form";
import { import {
uploadSingleFile, uploadSingleFile,
deleteBlob, deleteBlob,
@@ -17,6 +17,7 @@ import {
} from "../../../actions"; } from "../../../actions";
const ReactQuill = dynamic(() => import("react-quill-new"), { ssr: false }); const ReactQuill = dynamic(() => import("react-quill-new"), { ssr: false });
import { useDispatch } from "react-redux"; // Import the useDispatch hook
import { import {
addDays, addDays,
@@ -867,6 +868,8 @@ const rejectStyle = {
export const RenderFileUpload = (field) => { export const RenderFileUpload = (field) => {
const files = field.input.value; const files = field.input.value;
const dispatch = useDispatch(); // Get dispatch using useDispatch hook
let { t } = useTranslation(); let { t } = useTranslation();
const style = useMemo( const style = useMemo(
@@ -929,9 +932,9 @@ export const RenderFileUpload = (field) => {
const filelistObj = field.fileList || {}; 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) { function removeNullObjects(arr) {
if (arr.length === 0) { if (arr.length === 0) {
@@ -1063,6 +1066,7 @@ export const RenderFileUpload = (field) => {
[".xlsx"], [".xlsx"],
}} }}
onDrop={(filesToUpload, e) => { onDrop={(filesToUpload, e) => {
setCompletedUploadFiles(false);
const renamedAcceptedFiles = filesToUpload.map( const renamedAcceptedFiles = filesToUpload.map(
(file) => (file) =>
new File( new File(
@@ -1150,9 +1154,13 @@ export const RenderFileUpload = (field) => {
)) ))
).then((data) => { ).then((data) => {
data = data.value || {}; data = data.value || {};
field.input.value == null; field.input.value = "";
field.setFilesForRepresentations(data[0]); field.setFilesForRepresentations(data[0]);
setCompletedUploadFiles(true); 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.ticketnumber +
"/" + "/" +
field.filenamePrefix.representationForm field.filenamePrefix.representationForm
.values.repfile_name ?.values?.repfile_name
) + ) +
"&blobname=" + "&blobname=" +
blob.name + blob.name +
@@ -186,22 +186,24 @@ const RepInterestedPartyPerson = (props) => {
} }
hint={"sdsd"} hint={"sdsd"}
fileList={ fileList={
props.currentView.caseReference.hasOwnProperty( props.currentView.fileList
"repDetails"
) // props.currentView.caseReference.hasOwnProperty(
? props.currentView.caseReference.repDetails.hasOwnProperty( // "repDetails"
"filesList" // )
) && // ? props.currentView.caseReference.repDetails.hasOwnProperty(
props.currentView // "filesList"
.caseReference // ) &&
.repDetails.filesList // props.currentView
.length > 0 // .caseReference
? props.currentView // .repDetails.filesList
.caseReference // .length > 0
.repDetails // ? props.currentView
.filesList // .caseReference
: [] // .repDetails
: [] // .filesList
// : []
// : []
} }
setFilesForRepresentations={ setFilesForRepresentations={
setFilesForRepresentations setFilesForRepresentations
@@ -352,23 +352,24 @@ let RepLPA = (props) => {
} }
hint={"sdsd"} hint={"sdsd"}
fileList={ fileList={
(props.formObj.hasOwnProperty( props.currentView.fileList
"representationForm" // (props.formObj.hasOwnProperty(
) && // "representationForm"
props.formObj[ // ) &&
"representationForm" // props.formObj[
].hasOwnProperty( // "representationForm"
"values" // ].hasOwnProperty(
) && // "values"
props.formObj[ // ) &&
"representationForm" // props.formObj[
].values.hasOwnProperty( // "representationForm"
"filesList" // ].values.hasOwnProperty(
) && // "filesList"
props.props.props.form[ // ) &&
"representationForm" // props.props.props.form[
].values.filesList) || // "representationForm"
[] // ].values.filesList) ||
// []
} }
setFilesForRepresentations={ setFilesForRepresentations={
setFilesForRepresentations setFilesForRepresentations
@@ -505,6 +506,22 @@ let RepLPA = (props) => {
className="govuk-button" className="govuk-button"
data-module="govuk-button" data-module="govuk-button"
onClick={() => { 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); setRepresentationSubmit(true);
}} }}
> >
@@ -604,7 +621,7 @@ const mapStateToProps = (state, props) => {
? state.currentView.caseReference.repDetails ? state.currentView.caseReference.repDetails
: state.currentView.caseReference, : state.currentView.caseReference,
{ {
"representationCapacity": "lpa", "representationCapacity": "LPA",
"onBehalfOfLPA": "onBehalfOfLPA":
props.props.props.accountDetails.accountDetails[ props.props.props.accountDetails.accountDetails[
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue" "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"> <span className="js-step-title-text govuk-!-font-size-16">
{t( {t(
"myrepresentations:s78-section-heading-three" "myrepresentations:s78-section-heading-five-sub"
)} )}
</span> </span>
</a> </a>
@@ -1181,18 +1181,19 @@ let Enforcement_Questionnaire = (props) => {
ticketnumber={props.props.props.caseReference} ticketnumber={props.props.props.caseReference}
hint={"sdsd"} hint={"sdsd"}
fileList={ fileList={
props.currentView.caseReference.hasOwnProperty( props.currentView.fileList
"repDetails" // props.currentView.caseReference.hasOwnProperty(
) // "repDetails"
? props.currentView.caseReference.repDetails.hasOwnProperty( // )
"filesList" // ? props.currentView.caseReference.repDetails.hasOwnProperty(
) && // "filesList"
props.currentView.caseReference.repDetails // ) &&
.filesList.length > 0 // props.currentView.caseReference.repDetails
? props.currentView.caseReference // .filesList.length > 0
.repDetails.filesList // ? props.currentView.caseReference
: [] // .repDetails.filesList
: [] // : []
// : []
} }
setFilesForRepresentations={ setFilesForRepresentations={
setFilesForRepresentations setFilesForRepresentations
@@ -767,9 +767,11 @@ let S78_Questionnaire = (props) => {
aria-describedby="commentBox-hint" aria-describedby="commentBox-hint"
> >
<h2 className="govuk-heading-s "> <h2 className="govuk-heading-s ">
{t("myrepresentations:s78-section-heading-five")} {t("myrepresentations:s78-section-heading-five-sub")}
</h2> </h2>
<p className="govuk-body">
{t("myrepresentations:s78-section-heading-five")}
</p>
<div className="govuk-form-group"> <div className="govuk-form-group">
<Field <Field
name="copyOfApplicantsCertificate" name="copyOfApplicantsCertificate"
@@ -785,9 +787,10 @@ let S78_Questionnaire = (props) => {
)} )}
component={RenderLPACondtionalRadioList} component={RenderLPACondtionalRadioList}
validate={[required]} validate={[required]}
legend={t( legend={
"myrepresentations:s78-section-question-26" "26. " +
)} t("myrepresentations:s78-section-question-26")
}
hint={t("myrepresentations:s78-footnote-one")} hint={t("myrepresentations:s78-footnote-one")}
conditionalLabel={t( conditionalLabel={t(
"myrepresentations:s78-section-question-26-hint" "myrepresentations:s78-section-question-26-hint"
@@ -812,9 +815,10 @@ let S78_Questionnaire = (props) => {
)} )}
component={RenderLPACondtionalRadioList} component={RenderLPACondtionalRadioList}
validate={[required]} validate={[required]}
legend={t( legend={
"myrepresentations:s78-section-question-27" "27. " +
)} t("myrepresentations:s78-section-question-27")
}
hint={t("myrepresentations:s78-footnote-two")} hint={t("myrepresentations:s78-footnote-two")}
conditionalLabel={t( conditionalLabel={t(
"myrepresentations:s78-section-question-27-hint" "myrepresentations:s78-section-question-27-hint"
@@ -839,9 +843,10 @@ let S78_Questionnaire = (props) => {
)} )}
component={RenderLPACondtionalRadioList} component={RenderLPACondtionalRadioList}
validate={[required]} validate={[required]}
legend={t( legend={
"myrepresentations:s78-section-question-28" "28. " +
)} t("myrepresentations:s78-section-question-28")
}
conditionalLabel={t( conditionalLabel={t(
"myrepresentations:s78-section-question-28-hint" "myrepresentations:s78-section-question-28-hint"
)} )}
@@ -865,9 +870,10 @@ let S78_Questionnaire = (props) => {
)} )}
component={RenderLPACondtionalRadioList} component={RenderLPACondtionalRadioList}
validate={[required]} validate={[required]}
legend={t( legend={
"myrepresentations:s78-section-question-29" "29. " +
)} t("myrepresentations:s78-section-question-29")
}
conditionalLabel={t( conditionalLabel={t(
"myrepresentations:s78-section-question-29-hint" "myrepresentations:s78-section-question-29-hint"
)} )}
@@ -891,9 +897,10 @@ let S78_Questionnaire = (props) => {
)} )}
component={RenderLPACondtionalRadioList} component={RenderLPACondtionalRadioList}
validate={[required]} validate={[required]}
legend={t( legend={
"myrepresentations:s78-section-question-30" "30. " +
)} t("myrepresentations:s78-section-question-30")
}
conditionalLabel={t( conditionalLabel={t(
"myrepresentations:s78-section-question-30-hint" "myrepresentations:s78-section-question-30-hint"
)} )}
@@ -917,9 +924,10 @@ let S78_Questionnaire = (props) => {
)} )}
component={RenderLPACondtionalRadioList} component={RenderLPACondtionalRadioList}
validate={[required]} validate={[required]}
legend={t( legend={
"myrepresentations:s78-section-question-31" "31. " +
)} t("myrepresentations:s78-section-question-31")
}
conditionalLabel={t( conditionalLabel={t(
"myrepresentations:s78-section-question-31-hint" "myrepresentations:s78-section-question-31-hint"
)} )}
@@ -943,9 +951,10 @@ let S78_Questionnaire = (props) => {
)} )}
component={RenderLPACondtionalRadioList} component={RenderLPACondtionalRadioList}
validate={[required]} validate={[required]}
legend={t( legend={
"myrepresentations:s78-section-question-32" "32. " +
)} t("myrepresentations:s78-section-question-32")
}
conditionalLabel={t( conditionalLabel={t(
"myrepresentations:s78-section-question-32-hint" "myrepresentations:s78-section-question-32-hint"
)} )}
@@ -969,9 +978,10 @@ let S78_Questionnaire = (props) => {
)} )}
component={RenderLPACondtionalRadioList} component={RenderLPACondtionalRadioList}
validate={[required]} validate={[required]}
legend={t( legend={
"myrepresentations:s78-section-question-33" "33. " +
)} t("myrepresentations:s78-section-question-33")
}
conditionalLabel={t( conditionalLabel={t(
"myrepresentations:s78-section-question-33-hint" "myrepresentations:s78-section-question-33-hint"
)} )}
@@ -996,18 +1006,19 @@ let S78_Questionnaire = (props) => {
ticketnumber={props.props.props.caseReference} ticketnumber={props.props.props.caseReference}
hint={"sdsd"} hint={"sdsd"}
fileList={ fileList={
props.currentView.caseReference.hasOwnProperty( props.currentView.fileList
"repDetails" // props.currentView.caseReference.hasOwnProperty(
) // "repDetails"
? props.currentView.caseReference.repDetails.hasOwnProperty( // )
"filesList" // ? props.currentView.caseReference.repDetails.hasOwnProperty(
) && // "filesList"
props.currentView.caseReference.repDetails // ) &&
.filesList.length > 0 // props.currentView.caseReference.repDetails
? props.currentView.caseReference // .filesList.length > 0
.repDetails.filesList // ? props.currentView.caseReference
: [] // .repDetails.filesList
: [] // : []
// : []
} }
setFilesForRepresentations={ setFilesForRepresentations={
setFilesForRepresentations setFilesForRepresentations
+2 -3
View File
@@ -2158,13 +2158,12 @@ const RenderFileUpload = (field) => {
className="govuk-!-margin-bottom-5 fileThumb" className="govuk-!-margin-bottom-5 fileThumb"
> >
{" "} {" "}
{} {/* <span
<span
className="govuk-summary-list__actionLink watched_link govuk-!-margin-right-5 govuk-!-text-align-left" className="govuk-summary-list__actionLink watched_link govuk-!-margin-right-5 govuk-!-text-align-left"
onClick={() => removeFile(file)} onClick={() => removeFile(file)}
> >
&minus; &minus;
</span> </span> */}
<img <img
src={getThumbnailIcon( src={getThumbnailIcon(
file, file,
+1 -4
View File
@@ -306,10 +306,7 @@ let AdvancedSearch = (props) => {
(router.locale == "cy" (router.locale == "cy"
? "/fymhorth/canlyniadauchwiliouwch" ? "/fymhorth/canlyniadauchwiliouwch"
: "/myportal/advancedsearchresults") + searchString, : "/myportal/advancedsearchresults") + searchString,
null, null
{
shallow: true,
}
); );
}; };
-1
View File
@@ -40,7 +40,6 @@ const MyRepresentations = (props) => {
"/fymhorth/gweldpopeth" "/fymhorth/gweldpopeth"
: "/myportal/viewall" : "/myportal/viewall"
} }
shallow
className="govuk-link--no-underline" className="govuk-link--no-underline"
onClick={() => { onClick={() => {
setCurrentView({ setCurrentView({
@@ -39,7 +39,6 @@ const MyRepresentations = (props) => {
"/fymhorth/gweldpopeth" "/fymhorth/gweldpopeth"
: "/myportal/viewall" : "/myportal/viewall"
} }
shallow
className="govuk-link--no-underline" className="govuk-link--no-underline"
onClick={() => { onClick={() => {
setCurrentView({ setCurrentView({
-1
View File
@@ -98,7 +98,6 @@ let CaseSearch = (props) => {
? "/fymhorth/canlyniadauchwilio" ? "/fymhorth/canlyniadauchwilio"
: "/myportal/searchresults", : "/myportal/searchresults",
query: { q: values.basicSearch }, query: { q: values.basicSearch },
shallow: true,
}); });
} }
}; };
+1 -1
View File
@@ -219,7 +219,7 @@ const TopThree = (props) => {
showTopThreeArr[key].appealType, showTopThreeArr[key].appealType,
"repDetails": showTopThreeArr[key], "repDetails": showTopThreeArr[key],
}); });
isLPA && setRepresentationCapacity("lpa"); isLPA && setRepresentationCapacity("LPA");
}} }}
> >
{showTopThreeArr[key].pinswg_name} {showTopThreeArr[key].pinswg_name}
+13 -12
View File
@@ -71,19 +71,19 @@ let BuildCheckSection = (props) => {
let buildAppealFilesArray = []; let buildAppealFilesArray = [];
//console.log("attached docs: - ", 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") // for (let key in filesUploadObj) {
? props.appealType.fileList.value[0] // typeof filesUploadObj[key].name != "undefined" &&
: []; // buildAppealFilesArray.push({
// "name": filesUploadObj[key].name,
for (let key in filesUploadObj) { // "size": filesUploadObj[key].contentLength,
typeof filesUploadObj[key].name != "undefined" && // });
buildAppealFilesArray.push({ // }
"name": filesUploadObj[key].name,
"size": filesUploadObj[key].contentLength,
});
}
buildAppealFilesArray.filter(function (item, idx) { buildAppealFilesArray.filter(function (item, idx) {
return item.name; return item.name;
@@ -108,6 +108,7 @@ let BuildCheckSection = (props) => {
let pdfObj = props.props.form.appealForm.values; let pdfObj = props.props.form.appealForm.values;
Object.assign(pdfObj, { Object.assign(pdfObj, {
"filesList": buildAppealFilesArray,
"containerID": props.props.accountDetails.containerID, "containerID": props.props.accountDetails.containerID,
"casefolderID": props.appealType.caseReference.ticketnumber, "casefolderID": props.appealType.caseReference.ticketnumber,
}); });
+2
View File
@@ -104,6 +104,8 @@ let BuildSection = (props) => {
return _.includes(key, "pinswg_fileUpload"); return _.includes(key, "pinswg_fileUpload");
}); });
fileListObj = [];
//console.log(fileListObj); //console.log(fileListObj);
// console.log( // console.log(
+49 -16
View File
@@ -8,7 +8,7 @@ import {
} from "../../components/utils"; } from "../../components/utils";
import fieldLookup from "../../data/crmfieldlookuptranslations.json"; 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 Html from "react-pdf-html";
import { DOMParser, XMLSerializer } from "@xmldom/xmldom"; import { DOMParser, XMLSerializer } from "@xmldom/xmldom";
@@ -153,6 +153,16 @@ export const AppealRow_pdf = (props) => {
let labelTrans = label; let labelTrans = label;
return labelTrans; return labelTrans;
}; };
Font.registerHyphenationCallback((word) => [word]);
function CleanHTML(htmlStr) {
let cleanStr =
typeof htmlStr === "string"
? htmlStr.replace(/<p><br><\/p>/g, "")
: "";
return cleanStr;
}
return ( return (
<> <>
@@ -187,6 +197,7 @@ export const AppealRow_pdf = (props) => {
flexDirection: "row", flexDirection: "row",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<Text <Text
style={styles.questionTextWide} style={styles.questionTextWide}
@@ -214,6 +225,7 @@ export const AppealRow_pdf = (props) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
wrap={false} wrap={false}
@@ -282,6 +294,7 @@ export const AppealRow_pdf = (props) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
wrap={false} wrap={false}
@@ -337,9 +350,12 @@ export const AppealRow_pdf = (props) => {
} }
> >
<Html style={styles.richArea}> <Html style={styles.richArea}>
{props.props[ {CleanHTML(
datafieldname[0].value props.props[
] || ""} datafieldname[0]
.value
]
)}
</Html> </Html>
</View> </View>
</View> </View>
@@ -385,6 +401,7 @@ export const AppealRow_pdf = (props) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
wrap={false} wrap={false}
@@ -438,6 +455,7 @@ export const AppealRow_pdf = (props) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
wrap={false} wrap={false}
@@ -522,22 +540,37 @@ export const AppealRow_pdf = (props) => {
case "{67FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}": case "{67FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}":
return ( return (
<View <View
wrap={true}
style={{ style={{
flexDirection: "row", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<Text style={styles.questionText}> <View
{rows[0].value} wrap={false}
</Text> style={{
<Text style={styles.questionAnswer}> flexDirection: "row",
{props.props[ marginBottom: 10,
datafieldname[0].value }}
] == "true" >
? "Yes" <Text
: "No"} style={styles.questionText}
</Text> wrap={false}
>
{rows[0].value}
</Text>
<Text
style={
styles.questionAnswer
}
>
{props.props[
datafieldname[0].value
] == "true"
? "Yes"
: "No"}
</Text>
</View>
</View> </View>
); );
break; break;
+94 -51
View File
@@ -5,6 +5,7 @@ import {
StyleSheet, StyleSheet,
Text, Text,
View, View,
Font,
} from "@react-pdf/renderer"; } from "@react-pdf/renderer";
import Html from "react-pdf-html"; import Html from "react-pdf-html";
import { getFormCollectionByID, bytesToSize } from "../../components/utils"; import { getFormCollectionByID, bytesToSize } from "../../components/utils";
@@ -98,6 +99,17 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
//console.log("//////////////////////\n docpropseeeee:".docProps); //console.log("//////////////////////\n docpropseeeee:".docProps);
//console.log("sdffhjdhjdjdgkj: ", values.procedureType); //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 ( return (
<Document> <Document>
<Page size="A4" style={styles.page} wrap> <Page size="A4" style={styles.page} wrap>
@@ -243,7 +255,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
"Written representations" && ( "Written representations" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.procedureTypeEvidence || ""} {CleanHTML(
values.procedureTypeEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -294,8 +308,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
"Yes" && ( "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={{ fontSize: 12 }}> <Html style={{ fontSize: 12 }}>
{values.enterNeighbouringLandToViewSiteEvidence || {CleanHTML(
""} values.enterNeighbouringLandToViewSiteEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -333,8 +348,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
"Yes" && ( "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.enterNeighbouringLandAccessRequiredEvidence || {CleanHTML(
""} values.enterNeighbouringLandAccessRequiredEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -366,8 +382,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.healthAndSafetyIssues == "Yes" && ( {values.healthAndSafetyIssues == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.healthAndSafetyIssuesEvidence || {CleanHTML(
""} values.healthAndSafetyIssuesEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -395,7 +412,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
</View> </View>
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.LPAcontactDetails || ""} {CleanHTML(values.LPAcontactDetails)}
</Html> </Html>
</View> </View>
</View> </View>
@@ -468,7 +485,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.feeExempt == "Yes" && ( {values.feeExempt == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.feeExemptEvidence || ""} {CleanHTML(
values.feeExemptEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -509,8 +528,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.previousGrantedCerts == "Yes" && ( {values.previousGrantedCerts == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.previousGrantedCertsEvidence || {CleanHTML(
""} values.previousGrantedCertsEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -533,7 +553,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.stopNoticeServed == "Yes" && ( {values.stopNoticeServed == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.stopNoticeServedEvidence || ""} {CleanHTML(
values.stopNoticeServedEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -558,7 +580,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.relatedCases == "Yes" && ( {values.relatedCases == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.relatedCasesEvidence || ""} {CleanHTML(values.relatedCasesEvidence)}
</Html> </Html>
</View> </View>
)} )}
@@ -581,8 +603,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.previousEnforcement == "Yes" && ( {values.previousEnforcement == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.previousEnforcementEvidence || {CleanHTML(
""} values.previousEnforcementEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -605,7 +628,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.subjectArticle4 == "Yes" && ( {values.subjectArticle4 == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.subjectArticle4Evidence || ""} {CleanHTML(
values.subjectArticle4Evidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -629,8 +654,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.previousPDRRestriction == "Yes" && ( {values.previousPDRRestriction == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.previousPDRRestrictionEvidence || {CleanHTML(
""} values.previousPDRRestrictionEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -663,7 +689,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
</Text> </Text>
<View style={styles.questionAnswer}> <View style={styles.questionAnswer}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.LPAldpAndMap || ""} {CleanHTML(values.LPAldpAndMap)}
</Html> </Html>
</View> </View>
</View> </View>
@@ -681,7 +707,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
</Text> </Text>
<View style={styles.questionAnswer}> <View style={styles.questionAnswer}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.LPAlocalGuidance || ""} {CleanHTML(values.LPAlocalGuidance)}
</Html> </Html>
</View> </View>
</View> </View>
@@ -757,7 +783,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.ROW == "Yes" && ( {values.ROW == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.ROWEvidence || ""} {CleanHTML(values.ROWEvidence)}
</Html> </Html>
</View> </View>
)} )}
@@ -788,8 +814,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.conservationArea == "Yes" && ( {values.conservationArea == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.conservationAreaEvidence || {CleanHTML(
""} values.conservationAreaEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -822,8 +849,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.affectListedBuilding == "Yes" && ( {values.affectListedBuilding == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.affectListedBuildingEvidence || {CleanHTML(
""} values.affectListedBuildingEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -854,7 +882,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.TPO == "Yes" && ( {values.TPO == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.TPOEvidence || ""} {CleanHTML(values.TPOEvidence)}
</Html> </Html>
</View> </View>
)} )}
@@ -887,8 +915,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.natureConservationSite == "Yes" && ( {values.natureConservationSite == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.natureConservationSiteEvidence || {CleanHTML(
""} values.natureConservationSiteEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -919,8 +948,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.protectedSpecies == "Yes" && ( {values.protectedSpecies == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.protectedSpeciesEvidence || {CleanHTML(
""} values.protectedSpeciesEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -967,7 +997,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.floodingIssue == "Yes" && ( {values.floodingIssue == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.floodingIssueEvidence || ""} {CleanHTML(
values.floodingIssueEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -1002,8 +1034,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
"Yes" && ( "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.governmentDepartmentCommentsEvidence || {CleanHTML(
""} values.governmentDepartmentCommentsEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -1073,8 +1106,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
"Yes" && ( "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.developmentCarriedOutInAccordanceEvidence || {CleanHTML(
""} values.developmentCarriedOutInAccordanceEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -1155,8 +1189,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
"Yes" && ( "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.developmentAnyOtherConditionsEvidence || {CleanHTML(
""} values.developmentAnyOtherConditionsEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -1200,8 +1235,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
</View> </View>
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.copyOfEnforcementNoticeEvidence || {CleanHTML(
""} values.copyOfEnforcementNoticeEvidence
)}
</Html> </Html>
</View> </View>
</View> </View>
@@ -1231,7 +1267,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.enforcementNoticePlan || ""} {CleanHTML(
values.enforcementNoticePlan
)}
</Html> </Html>
</View> </View>
</View> </View>
@@ -1261,8 +1299,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
</View> </View>
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.listOfNotifiedOfEnforcementEvidence || {CleanHTML(
""} values.listOfNotifiedOfEnforcementEvidence
)}
</Html> </Html>
</View> </View>
</View> </View>
@@ -1294,8 +1333,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
</View> </View>
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.copyOfLetterOfAppealNotificationEvidence || {CleanHTML(
""} values.copyOfLetterOfAppealNotificationEvidence
)}
</Html> </Html>
</View> </View>
</View> </View>
@@ -1327,7 +1367,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.lpaEIAOS == "Yes" && ( {values.lpaEIAOS == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.lpaEIAOSEvidence || ""} {CleanHTML(values.lpaEIAOSEvidence)}
</Html> </Html>
</View> </View>
)} )}
@@ -1360,8 +1400,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.detailsOfOtherAppeals == "Yes" && ( {values.detailsOfOtherAppeals == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.detailsOfOtherAppealsEvidence || {CleanHTML(
""} values.detailsOfOtherAppealsEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -1394,8 +1435,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.detailsOfPreviousAppeals == "Yes" && ( {values.detailsOfPreviousAppeals == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.detailsOfPreviousAppealsEvidence || {CleanHTML(
""} values.detailsOfPreviousAppealsEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -1427,8 +1469,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.otherRelevantInformation == "Yes" && ( {values.otherRelevantInformation == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.otherRelevantInformationEvidence || {CleanHTML(
""} values.otherRelevantInformationEvidence
)}
</Html> </Html>
</View> </View>
)} )}
+39 -21
View File
@@ -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 ( return (
<Document> <Document>
<Page size="A4" style={styles.page} wrap> <Page size="A4" style={styles.page} wrap>
@@ -186,8 +197,7 @@ export const finalComments_pdf = ({ docProps }) => {
{getTrans( {getTrans(
docProps.locale, docProps.locale,
"s78-section-question-1" "s78-section-question-1"
)}{" "} )}
:
</Text> </Text>
<Text style={styles.questionAnswer}> <Text style={styles.questionAnswer}>
{values.caseRef} {values.caseRef}
@@ -205,8 +215,7 @@ export const finalComments_pdf = ({ docProps }) => {
{getTrans( {getTrans(
docProps.locale, docProps.locale,
"statement-representation-capacity-label" "statement-representation-capacity-label"
)} )}{" "}
:
</Text> </Text>
<Text style={styles.questionAnswer}> <Text style={styles.questionAnswer}>
{values.representationCapacity} {values.representationCapacity}
@@ -229,8 +238,9 @@ export const finalComments_pdf = ({ docProps }) => {
</Text> </Text>
<Text style={styles.questionAnswer}> <Text style={styles.questionAnswer}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.conditional_representationCapacity_Comments || {CleanHTML(
""} values.conditional_representationCapacity_Comments
)}
</Html> </Html>
</Text> </Text>
</View> </View>
@@ -254,7 +264,6 @@ export const finalComments_pdf = ({ docProps }) => {
docProps.locale, docProps.locale,
"s78-section-question-3" "s78-section-question-3"
)} )}
:
</Text> </Text>
<Text style={styles.questionAnswer}> <Text style={styles.questionAnswer}>
{values.siteAddress.replace(/false/gm, " ")} {values.siteAddress.replace(/false/gm, " ")}
@@ -273,7 +282,6 @@ export const finalComments_pdf = ({ docProps }) => {
docProps.locale, docProps.locale,
"statement-case-type-label" "statement-case-type-label"
)} )}
:
</Text> </Text>
<Text style={styles.questionAnswer}> <Text style={styles.questionAnswer}>
{appealTypeValue.value || ""} {appealTypeValue.value || ""}
@@ -321,7 +329,9 @@ export const finalComments_pdf = ({ docProps }) => {
</View> </View>
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.representationComments || ""} {CleanHTML(
values.representationComments
)}
</Html> </Html>
</View> </View>
</View> </View>
@@ -345,20 +355,30 @@ export const finalComments_pdf = ({ docProps }) => {
<View <View
wrap={false} wrap={false}
style={{ style={{
flexDirection: "row", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
> >
<Text style={styles.questionBullet}>7.</Text> <View
<Text style={styles.questionText}> wrap={false}
{getTrans( style={{
docProps.locale, flexDirection: "row",
"statement-list-of-attached-files-label" marginBottom: 10,
)} }}
</Text> >
<Text style={styles.questionBullet}>
7.
</Text>
<Text style={styles.questionTextWide}>
{getTrans(
docProps.locale,
"statement-list-of-attached-files-label"
)}
</Text>
</View>
<View <View
style={[ style={[
styles.questionAnswer, styles.questionAnswerWide,
{ flexDirection: "column" }, { flexDirection: "column" },
]} ]}
> >
@@ -396,7 +416,6 @@ export const finalComments_pdf = ({ docProps }) => {
}} }}
> >
<Text> <Text>
{" "}
{getTrans( {getTrans(
docProps.locale, docProps.locale,
"statement-declaration-header" "statement-declaration-header"
@@ -450,7 +469,6 @@ export const finalComments_pdf = ({ docProps }) => {
</Text> </Text>
</View> </View>
</View> </View>
{values.hasOwnProperty( {values.hasOwnProperty(
"representationOnBehalfOf_details" "representationOnBehalfOf_details"
) ? ( ) ? (
@@ -479,7 +497,7 @@ export const finalComments_pdf = ({ docProps }) => {
</Text> </Text>
</View> </View>
) : ( ) : (
"" <View />
)} )}
</View> </View>
</View> </View>
+252 -115
View File
@@ -5,6 +5,7 @@ import {
StyleSheet, StyleSheet,
Text, Text,
View, View,
Font,
} from "@react-pdf/renderer"; } from "@react-pdf/renderer";
import Html from "react-pdf-html"; import Html from "react-pdf-html";
import { getFormCollectionByID, bytesToSize } from "../../components/utils"; import { getFormCollectionByID, bytesToSize } from "../../components/utils";
@@ -40,7 +41,7 @@ const styles = StyleSheet.create({
logoImage: { width: "200pt" }, logoImage: { width: "200pt" },
questionBullet: { width: "5%", fontSize: 12 }, questionBullet: { width: "5%", fontSize: 12 },
questionText: { width: "30%", 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 }, questionTextWide: { width: "95%", fontSize: 12, marginBottom: 5 },
questionAnswer: { questionAnswer: {
color: "#757575", color: "#757575",
@@ -52,6 +53,27 @@ const styles = StyleSheet.create({
paddingLeft: 10, paddingLeft: 10,
backgroundColor: "white", 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: { questionAnswerMid: {
color: "#757575", color: "#757575",
width: "20%", width: "20%",
@@ -73,6 +95,15 @@ const styles = StyleSheet.create({
padding: 5, padding: 5,
}, },
questionAnswerFull: {
color: "#757575",
width: "100%",
fontSize: 10,
padding: 5,
border: 1,
borderColor: "#eee",
backgroundColor: "white",
},
sectionContainer: { sectionContainer: {
backgroundColor: "#F8F8F8", backgroundColor: "#F8F8F8",
padding: 10, padding: 10,
@@ -111,6 +142,18 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
let appealTypeValue = getFormCollectionByID(values.appealType); let appealTypeValue = getFormCollectionByID(values.appealType);
//console.log("sdffhjdhjdjdgkj: ", values.procedureType); //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 ( return (
<Document> <Document>
<Page size="A4" style={styles.page} wrap> <Page size="A4" style={styles.page} wrap>
@@ -239,7 +282,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
)} )}
</Text> </Text>
<Text style={styles.questionAnswer}> <Text style={styles.questionAnswer}>
{appealTypeValue.value || ""} {appealTypeValue.value}
</Text> </Text>
</View> </View>
</View> </View>
@@ -264,6 +307,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
wrap={false} wrap={false}
@@ -282,14 +326,16 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
)} )}
</Text> </Text>
<Text style={styles.questionAnswerMid}> <Text style={styles.questionAnswerMid}>
{values.procedureType || ""} {values.procedureType}
</Text> </Text>
</View> </View>
{values.procedureType != {values.procedureType !=
"Written representations" && ( "Written representations" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.procedureTypeEvidence || ""} {CleanHTML(
values.procedureTypeEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -309,7 +355,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
)} )}
</Text> </Text>
<Text style={styles.questionAnswerMid}> <Text style={styles.questionAnswerMid}>
{values.enterToView || ""} {values.enterToView}
</Text> </Text>
</View> </View>
@@ -318,6 +364,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -344,8 +391,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
"Yes" && ( "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={{ fontSize: 12 }}> <Html style={{ fontSize: 12 }}>
{values.enterNeighbouringLandToViewSiteEvidence || {CleanHTML(
" "} values.enterNeighbouringLandToViewSiteEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -355,6 +403,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -380,8 +429,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
"Yes" && ( "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.enterNeighbouringLandAccessRequiredEvidence || {CleanHTML(
""} values.enterNeighbouringLandAccessRequiredEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -391,6 +441,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -408,14 +459,15 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
)} )}
</Text> </Text>
<Text style={styles.questionAnswerMid}> <Text style={styles.questionAnswerMid}>
{values.healthAndSafetyIssues || ""} {values.healthAndSafetyIssues}
</Text> </Text>
</View> </View>
{values.healthAndSafetyIssues == "Yes" && ( {values.healthAndSafetyIssues == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.healthAndSafetyIssuesEvidence || {CleanHTML(
""} values.healthAndSafetyIssuesEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -425,6 +477,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -445,7 +498,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
</View> </View>
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.LPAcontactDetails || ""} {CleanHTML(values.LPAcontactDetails)}
</Html> </Html>
</View> </View>
</View> </View>
@@ -467,62 +520,92 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
</View> </View>
<View style={styles.sectionContainer}> <View style={styles.sectionContainer}>
<View <View
wrap={false}
style={{ style={{
flexDirection: "row", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<Text style={styles.questionBullet}>11.</Text> <View
<Text style={styles.questionText}> wrap={false}
{getTrans( style={{
docProps.locale, flexDirection: "row",
"s78-section-question-11" marginBottom: 10,
)} }}
</Text> >
<View style={styles.questionAnswer}> <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}> <Html style={styles.richArea}>
{values.LPAcaseFileAndReps || ""} {CleanHTML(values.LPAcaseFileAndReps)}
</Html> </Html>
</View> </View>
</View> </View>
<View <View
wrap={false}
style={{ style={{
flexDirection: "row", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<Text style={styles.questionBullet}>12.</Text> <View
<Text style={styles.questionText}> wrap={false}
{getTrans( style={{
docProps.locale, flexDirection: "row",
"s78-section-question-12" marginBottom: 10,
)} }}
</Text> >
<View style={styles.questionAnswer}> <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}> <Html style={styles.richArea}>
{values.LPAldpAndMap || ""} {CleanHTML(values.LPAldpAndMap)}
</Html> </Html>
</View> </View>
</View> </View>
<View <View
wrap={false}
style={{ style={{
flexDirection: "row", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<Text style={styles.questionBullet}>13.</Text> <View
<Text style={styles.questionText}> wrap={false}
{getTrans( style={{
docProps.locale, flexDirection: "row",
"s78-section-question-13" marginBottom: 10,
)} }}
</Text> >
<View style={styles.questionAnswer}> <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}> <Html style={styles.richArea}>
{values.LPAlocalGuidance || ""} {CleanHTML(values.LPAlocalGuidance)}
</Html> </Html>
</View> </View>
</View> </View>
@@ -585,6 +668,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -608,7 +692,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.ROW == "Yes" && ( {values.ROW == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.ROWEvidence || ""} {CleanHTML(values.ROWEvidence)}
</Html> </Html>
</View> </View>
)} )}
@@ -618,6 +702,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -641,8 +726,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.conservationArea == "Yes" && ( {values.conservationArea == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.conservationAreaEvidence || {CleanHTML(
""} values.conservationAreaEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -652,6 +738,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -675,8 +762,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.affectListedBuilding == "Yes" && ( {values.affectListedBuilding == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.affectListedBuildingEvidence || {CleanHTML(
""} values.affectListedBuildingEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -686,6 +774,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -709,7 +798,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.TPO == "Yes" && ( {values.TPO == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.TPOEvidence || ""} {CleanHTML(values.TPOEvidence)}
</Html> </Html>
</View> </View>
)} )}
@@ -719,6 +808,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -742,8 +832,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.natureConservationSite == "Yes" && ( {values.natureConservationSite == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.natureConservationSiteEvidence || {CleanHTML(
""} values.natureConservationSiteEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -753,6 +844,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -776,8 +868,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.protectedSpecies == "Yes" && ( {values.protectedSpecies == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.protectedSpeciesEvidence || {CleanHTML(
""} values.protectedSpeciesEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -805,6 +898,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -829,8 +923,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
"Yes" && ( "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.governmentDepartmentCommentsEvidence || {CleanHTML(
""} values.governmentDepartmentCommentsEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -874,7 +969,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
marginBottom: 10, marginBottom: 10,
}} }}
> >
<Text style={styles.questionBullet}>a)</Text> <Text style={styles.questionBullet}></Text>
<Text style={styles.questionTextMid}> <Text style={styles.questionTextMid}>
{getTrans( {getTrans(
docProps.locale, docProps.locale,
@@ -892,6 +987,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -899,9 +995,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
marginBottom: 10, marginBottom: 10,
}} }}
> >
<Text style={styles.questionBullet}> <Text style={styles.questionBullet}></Text>
b)
</Text>
<Text style={styles.questionTextMid}> <Text style={styles.questionTextMid}>
{getTrans( {getTrans(
docProps.locale, docProps.locale,
@@ -918,8 +1012,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
"Yes" && ( "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.developmentCarriedOutInAccordanceEvidence || {CleanHTML(
""} values.developmentCarriedOutInAccordanceEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -931,7 +1026,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
marginBottom: 10, marginBottom: 10,
}} }}
> >
<Text style={styles.questionBullet}>c)</Text> <Text style={styles.questionBullet}></Text>
<Text style={styles.questionTextMid}> <Text style={styles.questionTextMid}>
{getTrans( {getTrans(
docProps.locale, docProps.locale,
@@ -949,7 +1044,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
marginBottom: 10, marginBottom: 10,
}} }}
> >
<Text style={styles.questionBullet}>d)</Text> <Text style={styles.questionBullet}></Text>
<Text style={styles.questionTextMid}> <Text style={styles.questionTextMid}>
{getTrans( {getTrans(
docProps.locale, docProps.locale,
@@ -965,6 +1060,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -989,8 +1085,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
"Yes" && ( "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.developmentAnyOtherConditionsEvidence || {CleanHTML(
""} values.developmentAnyOtherConditionsEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -1003,11 +1100,12 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
marginTop: 10, marginTop: 10,
fontFamily: "Helvetica-Bold", fontFamily: "Helvetica-Bold",
}} }}
wrap={false}
> >
<Text style={{ fontSize: 14 }}> <Text style={{ fontSize: 14 }}>
{getTrans( {getTrans(
docProps.locale, docProps.locale,
"s78-section-heading-five" "s78-section-heading-five-sub"
)} )}
</Text> </Text>
</View> </View>
@@ -1017,6 +1115,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -1037,18 +1136,24 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.copyOfApplicantsCertificate} {values.copyOfApplicantsCertificate}
</Text> </Text>
</View> </View>
<View style={styles.questionAnswerWide}> {values.hasOwnProperty(
<Html style={styles.richArea}> "copyOfApplicantsCertificateEvidence"
{values.copyOfApplicantsCertificateEvidence || ) && (
""} <View style={styles.questionAnswerWide}>
</Html> <Html style={styles.richArea}>
</View> {CleanHTML(
values.copyOfApplicantsCertificateEvidence
)}
</Html>
</View>
)}
</View> </View>
<View <View
style={{ style={{
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -1069,18 +1174,24 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.advertismentGiven} {values.advertismentGiven}
</Text> </Text>
</View> </View>
{values.hasOwnProperty(
<View style={styles.questionAnswerWide}> "advertismentGivenEvidence"
<Html style={styles.richArea}> ) && (
{values.advertismentGivenEvidence || ""} <View style={styles.questionAnswerWide}>
</Html> <Html style={styles.richArea}>
</View> {CleanHTML(
values.advertismentGivenEvidence
)}
</Html>
</View>
)}
</View> </View>
<View <View
style={{ style={{
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -1103,18 +1214,24 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
} }
</Text> </Text>
</View> </View>
<View style={styles.questionAnswerWide}> {values.hasOwnProperty(
<Html style={styles.richArea}> "copyOfLetterOfAppealNotificationEvidence"
{values.copyOfLetterOfAppealNotificationEvidence || ) && (
""} <View style={styles.questionAnswerWide}>
</Html> <Html style={styles.richArea}>
</View> {CleanHTML(
values.copyOfLetterOfAppealNotificationEvidence
)}
</Html>
</View>
)}
</View> </View>
<View <View
style={{ style={{
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -1138,7 +1255,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.lpaEIAOS == "Yes" && ( {values.lpaEIAOS == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.lpaEIAOSEvidence || ""} {CleanHTML(values.lpaEIAOSEvidence)}
</Html> </Html>
</View> </View>
)} )}
@@ -1148,6 +1265,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -1174,8 +1292,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
"Yes" && ( "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.advertismentConsentDiscontinuanceNoticeEvidence || {CleanHTML(
""} values.advertismentConsentDiscontinuanceNoticeEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -1185,6 +1304,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -1208,8 +1328,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.detailsOfOtherAppeals == "Yes" && ( {values.detailsOfOtherAppeals == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.detailsOfOtherAppealsEvidence || {CleanHTML(
""} values.detailsOfOtherAppealsEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -1219,6 +1340,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -1242,8 +1364,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.detailsOfPreviousAppeals == "Yes" && ( {values.detailsOfPreviousAppeals == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.detailsOfPreviousAppealsEvidence || {CleanHTML(
""} values.detailsOfPreviousAppealsEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -1253,6 +1376,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
flexDirection: "column", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
wrap={false}
> >
<View <View
style={{ style={{
@@ -1276,8 +1400,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.otherRelevantInformation == "Yes" && ( {values.otherRelevantInformation == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.otherRelevantInformationEvidence || {CleanHTML(
""} values.otherRelevantInformationEvidence
)}
</Html> </Html>
</View> </View>
)} )}
@@ -1315,15 +1440,18 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
}} }}
> >
<Text <Text
style={{ width: "40%", fontSize: 12 }} style={{ width: "20%", fontSize: 12 }}
> >
{getTrans( {getTrans(
docProps.locale, docProps.locale,
"s78-section-question-signed" "s78-section-question-signed"
)} )}
</Text> </Text>
<Text style={styles.questionAnswer}> <Text
{values.caseOfficer} style={styles.questionAnswerSmall}
wrap={false}
>
w{values.caseOfficer}
</Text> </Text>
</View> </View>
<View <View
@@ -1333,13 +1461,13 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
alignItems: "center", alignItems: "center",
}} }}
> >
<Text style={styles.questionText}> <Text style={{ width: "75", fontSize: 12 }}>
{getTrans( {getTrans(
docProps.locale, docProps.locale,
"s78-section-question-date" "s78-section-question-date"
)} )}
</Text> </Text>
<Text style={styles.questionAnswer}> <Text style={styles.questionAnswerSmaller}>
{formatDates(values.signedDate)} {formatDates(values.signedDate)}
</Text> </Text>
</View> </View>
@@ -1380,20 +1508,27 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
<View <View
wrap={false} wrap={false}
style={{ style={{
flexDirection: "row", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
> >
<Text style={styles.questionBullet}></Text> <View
<Text style={styles.questionText}> wrap={false}
{getTrans( style={{
docProps.locale, flexDirection: "row",
"lpa-list-supporting-documents-list" marginBottom: 10,
)} }}
</Text> >
<Text style={styles.questionTextWide}>
{getTrans(
docProps.locale,
"lpa-list-supporting-documents-list"
)}
</Text>
</View>
<View <View
style={[ style={[
styles.questionAnswer, styles.questionAnswerFull,
{ flexDirection: "column" }, { flexDirection: "column" },
]} ]}
> >
@@ -1410,14 +1545,16 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
> >
<Text <Text
styles={ styles={
styles.questionTextMid styles.questionAnswer
} }
> >
{p.name} -{" "} {p.name}
{"\n"}(
{bytesToSize( {bytesToSize(
p.size p.contentLength ||
)}{" "} p.size
{"\n"} )}
){" "}
</Text> </Text>
</View> </View>
); );
+19 -2
View File
@@ -113,13 +113,28 @@ export const other_pdf = ({ docProps }) => {
let datestr = values.pinswg_name.split("-"); let datestr = values.pinswg_name.split("-");
let signedDate = formatDates(new Date()); // datestr[2] + "/" + datestr[1] + "/" + datestr[0]; 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") let filterFilesList = values.hasOwnProperty("filesList")
? values.filesList.filter(function (el) { ? values.filesList.filter(function (el) {
return el != null; return el != null;
}) })
: []; : [];
Font.registerHyphenationCallback((word) => [word]);
function CleanHTML(htmlStr) {
let cleanStr =
typeof htmlStr === "string"
? htmlStr.replace(/<p><br><\/p>/g, "")
: "";
return cleanStr;
}
return ( return (
<Document> <Document>
<Page size="A4" style={styles.page} wrap> <Page size="A4" style={styles.page} wrap>
@@ -262,7 +277,9 @@ export const other_pdf = ({ docProps }) => {
</View> </View>
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.representationComments || ""} {CleanHTML(
values.representationComments
)}
</Html> </Html>
</View> </View>
</View> </View>
@@ -143,6 +143,8 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
//console.log("\n//////////\n The Case:\n", docProps.caseObj); //console.log("\n//////////\n The Case:\n", docProps.caseObj);
Font.registerHyphenationCallback((word) => [word]);
return ( return (
<Document> <Document>
<Page size="A4" style={styles.page} wrap> <Page size="A4" style={styles.page} wrap>
+40 -17
View File
@@ -5,6 +5,7 @@ import {
StyleSheet, StyleSheet,
Text, Text,
View, View,
Font,
} from "@react-pdf/renderer"; } from "@react-pdf/renderer";
import Html from "react-pdf-html"; import Html from "react-pdf-html";
import { getFormCollectionByID, bytesToSize } from "../../components/utils"; 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 ( return (
<Document> <Document>
<Page size="A4" style={styles.page} wrap> <Page size="A4" style={styles.page} wrap>
@@ -200,8 +212,7 @@ export const statement_pdf = ({ docProps }) => {
{getTrans( {getTrans(
docProps.locale, docProps.locale,
"statement-representation-capacity-label" "statement-representation-capacity-label"
)} )}{" "}
:{" "}
</Text> </Text>
<Text style={styles.questionAnswer}> <Text style={styles.questionAnswer}>
{values.representationCapacity} {values.representationCapacity}
@@ -224,8 +235,9 @@ export const statement_pdf = ({ docProps }) => {
</Text> </Text>
<Text style={styles.questionAnswer}> <Text style={styles.questionAnswer}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.conditional_representationCapacity_Comments || {CleanHTML(
""} values.conditional_representationCapacity_Comments
)}
</Html> </Html>
</Text> </Text>
</View> </View>
@@ -251,7 +263,7 @@ export const statement_pdf = ({ docProps }) => {
)} )}
</Text> </Text>
<Text style={styles.questionAnswer}> <Text style={styles.questionAnswer}>
{values.siteAddress} {values.siteAddress.replace(/false/gm, " ")}
</Text> </Text>
</View> </View>
<View <View
@@ -267,7 +279,6 @@ export const statement_pdf = ({ docProps }) => {
docProps.locale, docProps.locale,
"statement-case-type-label" "statement-case-type-label"
)} )}
:
</Text> </Text>
<Text style={styles.questionAnswer}> <Text style={styles.questionAnswer}>
{appealTypeValue.value || ""} {appealTypeValue.value || ""}
@@ -315,7 +326,9 @@ export const statement_pdf = ({ docProps }) => {
</View> </View>
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.representationComments || ""} {CleanHTML(
values.representationComments
)}
</Html> </Html>
</View> </View>
</View> </View>
@@ -339,20 +352,30 @@ export const statement_pdf = ({ docProps }) => {
<View <View
wrap={false} wrap={false}
style={{ style={{
flexDirection: "row", flexDirection: "column",
marginBottom: 10, marginBottom: 10,
}} }}
> >
<Text style={styles.questionBullet}>7.</Text> <View
<Text style={styles.questionText}> wrap={false}
{getTrans( style={{
docProps.locale, flexDirection: "row",
"statement-list-of-attached-files-label" marginBottom: 10,
)} }}
</Text> >
<Text style={styles.questionBullet}>
7.
</Text>
<Text style={styles.questionTextWide}>
{getTrans(
docProps.locale,
"statement-list-of-attached-files-label"
)}
</Text>
</View>
<View <View
style={[ style={[
styles.questionAnswer, styles.questionAnswerWide,
{ flexDirection: "column" }, { flexDirection: "column" },
]} ]}
> >
@@ -471,7 +494,7 @@ export const statement_pdf = ({ docProps }) => {
</Text> </Text>
</View> </View>
) : ( ) : (
"" <View />
)} )}
</View> </View>
</View> </View>
@@ -5,6 +5,7 @@ import {
StyleSheet, StyleSheet,
Text, Text,
View, View,
Font,
} from "@react-pdf/renderer"; } from "@react-pdf/renderer";
import Html from "react-pdf-html"; import Html from "react-pdf-html";
import { getFormCollectionByID, bytesToSize } from "../../components/utils"; 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 ( return (
<Document> <Document>
<Page size="A4" style={styles.page} wrap> <Page size="A4" style={styles.page} wrap>
@@ -239,7 +251,9 @@ export const writtenStatement_pdf = ({ docProps }) => {
</View> </View>
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.representationComments || ""} {CleanHTML(
values.representationComments
)}
</Html> </Html>
</View> </View>
</View> </View>
+3
View File
@@ -444,6 +444,9 @@ export const getThumbnailIconByExtension = (blobName) => {
return "/assets/images/documenttypes/jpg.png"; return "/assets/images/documenttypes/jpg.png";
case "png": case "png":
return "/assets/images/documenttypes/png.png"; return "/assets/images/documenttypes/png.png";
case "tiff":
case "tif":
return "/assets/images/documenttypes/tif.png";
break; break;
default: default:
return "/assets/images/documenttypes/default.png"; return "/assets/images/documenttypes/default.png";
+4 -3
View File
@@ -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 ir anheddau/adeiladau a ganiateir drwy hyn wedi cael ei gyflwyno ir awdurdod cynllunio lleol ai gytuno ganddon ysgrifenedig. Bydd y datblygiad yn cael ei gynnal yn unol â'r manylion cymeradwy. Rheswm: Er mwyn cefnogir gwaith o gyflwyno seilwaith cyfathrebu digidol ledled Cymru yn unol â Pholisi 13 Cymrur Dyfodol.", "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 ir anheddau/adeiladau a ganiateir drwy hyn wedi cael ei gyflwyno ir awdurdod cynllunio lleol ai gytuno ganddon ysgrifenedig. Bydd y datblygiad yn cael ei gynnal yn unol â'r manylion cymeradwy. Rheswm: Er mwyn cefnogir gwaith o gyflwyno seilwaith cyfathrebu digidol ledled Cymru yn unol â Pholisi 13 Cymrur 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": "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 gydach datganiad 4 wythnos, nodwch hyn yma.", "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 gydach 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": "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-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?", "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-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. ", "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", "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-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-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-case-type-label": "Math o achos",
"statement-representation-capacity-label": "Rhinwedd y sylw", "statement-representation-capacity-label": "Rhinwedd y sylw",
"statement-representation-capacity-details-label": "Manylion rhinwedd y sylw", "statement-representation-capacity-details-label": "Manylion rhinwedd y sylw",
+11 -10
View File
@@ -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-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": "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-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 applicants certificate confirming that they notified persons with an interest in the land?", "s78-section-question-26": "A copy of the applicants 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": "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": "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 LPAs Environmental Impact Assessment Screening Opinion, if applicable?", "s78-section-question-29": "The LPAs 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": "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-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?", "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-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-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": "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": "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": "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": "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 LPAs Environmental Impact Assessment Screening Opinion and Regulation 45 Notice*, if applicable?", "enf-section-question-37": "The LPAs 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": "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-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?", "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?",
+4
View File
@@ -92,6 +92,10 @@
"webpack": "^5.66.0", "webpack": "^5.66.0",
"xpath": "^0.0.32" "xpath": "^0.0.32"
}, },
"resolutions": {
"@react-pdf/layout": "3.11.5",
"@react-pdf/pdfkit": "3.1.0"
},
"devDependencies": { "devDependencies": {
"eslint": "^9.11.1", "eslint": "^9.11.1",
"eslint-config-next": "^15.0.3", "eslint-config-next": "^15.0.3",
+2 -1
View File
@@ -64,7 +64,8 @@ export default async function ApiProxy(req, res) {
: ""; : "";
queryString += queryString +=
_.has(searchString, "lpa") && searchString.lpa != null (_.has(searchString, "lpa") || _.has(searchString, "LPA")) &&
searchString.lpa != null
? " _pinswg_associatedlpa_value eq " + searchString.lpa + " and" ? " _pinswg_associatedlpa_value eq " + searchString.lpa + " and"
: ""; : "";
@@ -99,7 +99,8 @@ export default async function ApiProxy(req, res) {
: ""; : "";
queryString += queryString +=
_.has(searchString, "lpa") && searchString.lpa != null (_.has(searchString, "lpa") || _.has(searchString, "LPA")) &&
searchString.lpa != null
? " _pinswg_associatedlpa_value eq " + searchString.lpa + " and" ? " _pinswg_associatedlpa_value eq " + searchString.lpa + " and"
: ""; : "";
+1
View File
@@ -219,6 +219,7 @@ export default async function handler(req, res) {
repCapacity = "LO"; repCapacity = "LO";
break; break;
case "lpa": case "lpa":
case "LPA":
repCapacity = "LPA"; repCapacity = "LPA";
break; break;
+1 -1
View File
@@ -268,7 +268,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
? true ? true
: false; : false;
//isLPA && store.dispatch(setRepresentationCapacity("lpa")); //isLPA && store.dispatch(setRepresentationCapacity("LPA"));
if (query.hasOwnProperty("state")) { if (query.hasOwnProperty("state")) {
console.log("is lpa?:", isLPA); console.log("is lpa?:", isLPA);
Binary file not shown.

After

Width:  |  Height:  |  Size: 921 B