Merged PR 1375: UAT defect 200125

Related work items: #12956
This commit is contained in:
Robert Bond
2025-01-21 16:18:09 +00:00
24 changed files with 2357 additions and 2321 deletions
+3 -1
View File
@@ -9,7 +9,7 @@ import { formValueSelector, reduxForm } from "redux-form";
import { signIn, useSession } from "next-auth/react";
import { generateRepPDF, sendEmail, uploadRepFiles } from "../../../actions";
import { formatDates } from "../../../components/utils";
import { formatDates, updateLinks } from "../../../components/utils";
import {
setRepresentationCapacity,
setRepresentationMessageSent,
@@ -1100,6 +1100,8 @@ let MakeRepresentation = (props) => {
? cleanFilesList(values)
: values;
values = updateLinks(values);
// get filelists from values object
let fileListObj = _.filter(values, function (v, key) {
return _.includes(key, "representationDocuments");
@@ -16,7 +16,16 @@ import {
getFilesFromBlobproxy,
} from "../../../actions";
const ReactQuill = dynamic(() => import("react-quill-new"), { ssr: false });
const LoadingMessage = () => <div>Loading the editor...</div>;
// Dynamically import ReactQuill with a proper loading state
const ReactQuill = dynamic(
() => import("react-quill-new").then((mod) => mod.default),
{
ssr: false,
loading: () => <LoadingMessage />, // This is valid as long as it's a valid React component
}
);
import { useDispatch } from "react-redux"; // Import the useDispatch hook
import {
@@ -4,6 +4,8 @@ import { useRouter } from "next/router";
import { useDropzone } from "react-dropzone";
import { connect } from "react-redux";
import { Field, formValueSelector, reduxForm } from "redux-form";
import { getFormCollectionByID } from "../../../../components/utils";
import {
FileUploadField,
RenderDatePicker,
@@ -95,6 +97,11 @@ let Enforcement_Questionnaire = (props) => {
<h3 className="govuk-heading-s ">
Enforcement Questionnaire
</h3>
<p className="govuk-body">
{t("myrepresentations:questionnaire-hint-para")}
</p>
<h3 className="govuk-heading-s ">
{t("myrepresentations:enf-section-heading-one")}{" "}
</h3>
@@ -124,10 +131,20 @@ let Enforcement_Questionnaire = (props) => {
detailsObj.pinswg_siteaddresspostcode}
</div>
</div>
<div className="govuk-form-group">
<div className="govuk-label">
4. {t("myrepresentations:s78-section-question-4")}:{" "}
{
getFormCollectionByID(
currentView.caseReference.appealType
).value
}
</div>
</div>
<div className="govuk-form-group">
<Field
label={
"4." +
"5." +
t("myrepresentations:enf-section-question-4")
}
name="procedureType"
@@ -161,7 +178,7 @@ let Enforcement_Questionnaire = (props) => {
<Field
label={
"5. " +
"6. " +
t("myrepresentations:enf-section-question-5")
}
name="enterToView"
@@ -196,7 +213,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"6. " +
"7. " +
t(
"myrepresentations:enf-section-question-6"
)
@@ -225,7 +242,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"7. " +
"8. " +
t(
"myrepresentations:enf-section-question-7"
)
@@ -254,7 +271,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"8. " +
"9. " +
t(
"myrepresentations:enf-section-question-8"
)
@@ -278,7 +295,7 @@ let Enforcement_Questionnaire = (props) => {
type="text"
component={RenderRichMultiline}
label={
"9. " +
"10. " +
t(
"myrepresentations:enf-section-question-9"
)
@@ -299,7 +316,7 @@ let Enforcement_Questionnaire = (props) => {
<div className="govuk-form-group">
<Field
label={
"10. " +
"11. " +
t("myrepresentations:enf-section-question-10")
}
name="feePaid"
@@ -331,7 +348,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"11. " +
"12. " +
t("myrepresentations:enf-section-question-11")
}
conditionalLabel={t(
@@ -368,7 +385,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"12. " +
"13. " +
t("myrepresentations:enf-section-question-12")
}
conditionalLabel={t(
@@ -395,7 +412,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"13. " +
"14. " +
t("myrepresentations:enf-section-question-13")
}
conditionalLabel={t(
@@ -422,7 +439,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"14. " +
"15. " +
t("myrepresentations:enf-section-question-14")
}
conditionalLabel={t(
@@ -449,7 +466,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"15. " +
"16. " +
t("myrepresentations:enf-section-question-15")
}
conditionalLabel={t(
@@ -476,7 +493,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"16. " +
"17. " +
t("myrepresentations:enf-section-question-16")
}
conditionalLabel={t(
@@ -503,7 +520,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"17. " +
"18. " +
t("myrepresentations:enf-section-question-17")
}
conditionalLabel={t(
@@ -528,7 +545,7 @@ let Enforcement_Questionnaire = (props) => {
<div className="govuk-form-group">
<Field
label={
"18. " +
"19. " +
t("myrepresentations:enf-section-question-18")
}
name="LPAldpAndMap"
@@ -547,7 +564,7 @@ let Enforcement_Questionnaire = (props) => {
<div className="govuk-form-group">
<Field
label={
"19. " +
"20. " +
t("myrepresentations:enf-section-question-19")
}
name="LPAlocalGuidance"
@@ -565,7 +582,7 @@ let Enforcement_Questionnaire = (props) => {
</div>
<Field
label={
"20. " +
"21. " +
t("myrepresentations:enf-section-question-20")
}
name="LPAintentionToSubmitFullStatement"
@@ -592,7 +609,7 @@ let Enforcement_Questionnaire = (props) => {
</h3>
<Field
label={
"21. " +
"22. " +
t("myrepresentations:enf-section-question-21")
}
name="AONB"
@@ -624,7 +641,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"22. " +
"23. " +
t("myrepresentations:enf-section-question-22")
}
conditionalLabel={t(
@@ -651,7 +668,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"23. " +
"24. " +
t("myrepresentations:enf-section-question-23")
}
conditionalLabel={t(
@@ -678,7 +695,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"24. " +
"25. " +
t("myrepresentations:enf-section-question-24")
}
conditionalLabel={t(
@@ -705,7 +722,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"25. " +
"26. " +
t("myrepresentations:enf-section-question-25")
}
conditionalLabel={t(
@@ -732,7 +749,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"26. " +
"27. " +
t("myrepresentations:enf-section-question-26")
}
conditionalLabel={t(
@@ -759,7 +776,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"27. " +
"28. " +
t("myrepresentations:enf-section-question-27")
}
conditionalLabel={t(
@@ -773,7 +790,7 @@ let Enforcement_Questionnaire = (props) => {
<div className="govuk-form-group">
<Field
label={
"28. " +
"29. " +
t("myrepresentations:enf-section-question-28")
}
name="gypsyTravellerInvolvment"
@@ -805,7 +822,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"29. " +
"30. " +
t("myrepresentations:enf-section-question-29")
}
conditionalLabel={t(
@@ -832,7 +849,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"30. " +
"31. " +
t("myrepresentations:enf-section-question-30")
}
conditionalLabel={t(
@@ -854,7 +871,7 @@ let Enforcement_Questionnaire = (props) => {
{t("myrepresentations:enf-section-heading-six")}
</h3>
<div className="govuk-form-group govuk-body-m">
31. {t("myrepresentations:enf-section-question-31")}
32. {t("myrepresentations:enf-section-question-31")}
</div>
<div className="govuk-form-group">
@@ -928,7 +945,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"32. " +
"33. " +
t("myrepresentations:enf-section-question-32")
}
conditionalLabel={t(
@@ -969,7 +986,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"33. " +
"34. " +
t("myrepresentations:enf-section-question-33")
}
conditionalLabel={t(
@@ -996,7 +1013,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"34. " +
"35. " +
t("myrepresentations:enf-section-question-34")
}
conditionalLabel={t(
@@ -1023,7 +1040,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"35. " +
"36. " +
t("myrepresentations:enf-section-question-35")
}
conditionalLabel={t(
@@ -1050,7 +1067,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"36. " +
"37. " +
t("myrepresentations:enf-section-question-36")
}
conditionalLabel={t(
@@ -1077,7 +1094,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"37. " +
"38. " +
t("myrepresentations:enf-section-question-37")
}
conditionalLabel={t(
@@ -1107,7 +1124,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"38. " +
"39. " +
t("myrepresentations:enf-section-question-38")
}
conditionalLabel={t(
@@ -1134,7 +1151,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"39. " +
"40. " +
t("myrepresentations:enf-section-question-39")
}
conditionalLabel={t(
@@ -1161,7 +1178,7 @@ let Enforcement_Questionnaire = (props) => {
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
"40. " +
"41. " +
t("myrepresentations:enf-section-question-40")
}
conditionalLabel={t(
@@ -115,9 +115,14 @@ let S78_Questionnaire = (props) => {
className="govuk-fieldset"
aria-describedby="commentBox-hint"
>
<p className="govuk-body">
{t("myrepresentations:questionnaire-hint-para")}
</p>
<h2 className="govuk-heading-s ">
{t("myrepresentations:s78-section-heading-one")}{" "}
</h2>
<div className="govuk-form-group">
<div className="govuk-label">
1. {t("myrepresentations:s78-section-question-1")}:{" "}
@@ -23,14 +23,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
<h3 className="govuk-heading-s govuk-!-margin-top-9">
{t("myrepresentations:enf-section-heading-one")}
</h3>
{_.has(repFormData, "procedureType") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"4. " +
t(
"myrepresentations:enf-section-question-4"
)}
{"5. " +
t("myrepresentations:enf-section-question-4")}
</dt>
<dd className="govuk-summary-list__value">
@@ -59,15 +57,11 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
{repFormData.representationOnBehalfOf == "Yes" && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:representation-onbehalfof-details"
)}
{t("case:representation-onbehalfof-details")}
</dt>
<dd className="govuk-summary-list__value">
{
repFormData.representationOnBehalfOf_details
}
{repFormData.representationOnBehalfOf_details}
</dd>
<dd className="govuk-summary-list__actions">
@@ -91,15 +85,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "enterToView") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"5. " +
t(
"myrepresentations:enf-section-question-5"
)}
{"6. " +
t("myrepresentations:enf-section-question-5")}
</dt>
<dd className="govuk-summary-list__value">
@@ -126,15 +117,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</dd>
</div>
</>
)}
{_.has(repFormData, "enterNeighbouringLandToViewSite") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"6. " +
t(
"myrepresentations:enf-section-question-6"
)}
{"7. " +
t("myrepresentations:enf-section-question-6")}
</dt>
<dd className="govuk-summary-list__value">
@@ -160,8 +148,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</a>
</dd>
</div>
{repFormData.enterNeighbouringLandToViewSite ==
"Yes" && (
{repFormData.enterNeighbouringLandToViewSite == "Yes" && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
@@ -199,21 +186,16 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "enterNeighbouringLandAccessRequired") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"7. " +
t(
"myrepresentations:enf-section-question-7"
)}
{"8. " +
t("myrepresentations:enf-section-question-7")}
</dt>
<dd className="govuk-summary-list__value">
{
repFormData.enterNeighbouringLandAccessRequired
}
{repFormData.enterNeighbouringLandAccessRequired}
</dd>
<dd className="govuk-summary-list__actions">
@@ -235,8 +217,8 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</a>
</dd>
</div>
{repFormData.enterNeighbouringLandAccessRequired !=
"Yes" && (
{repFormData.enterNeighbouringLandAccessRequired != "Yes" &&
repFormData.enforcementNoticePlan != null && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
@@ -274,15 +256,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "healthAndSafetyIssues") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"8. " +
t(
"myrepresentations:enf-section-question-8"
)}
{"9. " +
t("myrepresentations:enf-section-question-8")}
</dt>
<dd className="govuk-summary-list__value">
@@ -346,15 +325,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "LPAcontactDetails") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"9. " +
t(
"myrepresentations:enf-section-question-9"
)}
{"10. " +
t("myrepresentations:enf-section-question-9")}
</dt>
<dd className="govuk-summary-list__value">
@@ -386,21 +362,18 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</dd>
</div>
</>
)}
</>
{/* Section 2 Deemed Application Fee */}
<>
<h3 className="govuk-heading-s govuk-!-margin-top-9">
{t("myrepresentations:enf-section-heading-two")}
</h3>
{_.has(repFormData, "feePaid") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"10. " +
t(
"myrepresentations:enf-section-question-10"
)}
{"11. " +
t("myrepresentations:enf-section-question-10")}
</dt>
<dd className="govuk-summary-list__value">
@@ -427,15 +400,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</dd>
</div>
</>
)}
{_.has(repFormData, "feeExempt") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"11. " +
t(
"myrepresentations:enf-section-question-11"
)}
{"12. " +
t("myrepresentations:enf-section-question-11")}
</dt>
<dd className="govuk-summary-list__value">
@@ -462,18 +432,17 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</dd>
</div>
</>
)}
</>
{/* Section 3 Planning History and Current Status */}
<>
<h3 className="govuk-heading-s govuk-!-margin-top-9">
{t("myrepresentations:enf-section-heading-three")}
</h3>
{_.has(repFormData, "previousGrantedCerts") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"12. " +
{"13. " +
t(
"myrepresentations:enf-section-question-12"
)}{" "}
@@ -540,15 +509,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "stopNoticeServed") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"13. " +
t(
"myrepresentations:enf-section-question-13"
)}
{"14. " +
t("myrepresentations:enf-section-question-13")}
</dt>
<dd className="govuk-summary-list__value">
@@ -612,15 +578,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "relatedCases") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"14. " +
t(
"myrepresentations:enf-section-question-14"
)}
{"15. " +
t("myrepresentations:enf-section-question-14")}
</dt>
<dd className="govuk-summary-list__value">
@@ -684,15 +647,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "previousEnforcement") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"15. " +
t(
"myrepresentations:enf-section-question-15"
)}
{"16. " +
t("myrepresentations:enf-section-question-15")}
</dt>
<dd className="govuk-summary-list__value">
@@ -756,15 +716,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "subjectArticle4") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"16. " +
t(
"myrepresentations:enf-section-question-16"
)}
{"17. " +
t("myrepresentations:enf-section-question-16")}
</dt>
<dd className="govuk-summary-list__value">
@@ -828,15 +785,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "previousPDRRestriction") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"17. " +
t(
"myrepresentations:enf-section-question-17"
)}
{"18. " +
t("myrepresentations:enf-section-question-17")}
</dt>
<dd className="govuk-summary-list__value">
@@ -900,21 +854,18 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
</>
{/* Section 4 Supporting Documents */}
<>
<h3 className="govuk-heading-s govuk-!-margin-top-9">
{t("myrepresentations:enf-section-heading-four")}
</h3>
{_.has(repFormData, "LPAldpAndMap") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"18. " +
t(
"myrepresentations:enf-section-question-18"
)}
{"19. " +
t("myrepresentations:enf-section-question-18")}
</dt>
<dd className="govuk-summary-list__value">
@@ -946,15 +897,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</dd>
</div>
</>
)}
{_.has(repFormData, "LPAlocalGuidance") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"19. " +
t(
"myrepresentations:enf-section-question-19"
)}
{"20. " +
t("myrepresentations:enf-section-question-19")}
</dt>
<dd className="govuk-summary-list__value">
@@ -986,15 +934,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</dd>
</div>
</>
)}
{_.has(repFormData, "LPAintentionToSubmitFullStatement") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"20. " +
t(
"myrepresentations:enf-section-question-20"
)}
{"21. " +
t("myrepresentations:enf-section-question-20")}
</dt>
<dd className="govuk-summary-list__value">
@@ -1021,21 +966,18 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</dd>
</div>
</>
)}
</>
{/* Section 5 */}
<>
<h3 className="govuk-heading-s govuk-!-margin-top-9">
{t("myrepresentations:enf-section-heading-five")}
</h3>
{_.has(repFormData, "AONB") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"21. " +
t(
"myrepresentations:enf-section-question-21"
)}
{"22. " +
t("myrepresentations:enf-section-question-21")}
</dt>
<dd className="govuk-summary-list__value">
@@ -1062,15 +1004,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</dd>
</div>
</>
)}
{_.has(repFormData, "ROW") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"22. " +
t(
"myrepresentations:enf-section-question-22"
)}
{"23. " +
t("myrepresentations:enf-section-question-22")}
</dt>
<dd className="govuk-summary-list__value">
@@ -1134,15 +1073,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "conservationArea") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"23. " +
t(
"myrepresentations:enf-section-question-23"
)}
{"24. " +
t("myrepresentations:enf-section-question-23")}
</dt>
<dd className="govuk-summary-list__value">
@@ -1206,15 +1142,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "affectListedBuilding") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"24. " +
t(
"myrepresentations:enf-section-question-24"
)}
{"25. " +
t("myrepresentations:enf-section-question-24")}
</dt>
<dd className="govuk-summary-list__value">
@@ -1278,15 +1211,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "TPO") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"25. " +
t(
"myrepresentations:enf-section-question-25"
)}
{"26. " +
t("myrepresentations:enf-section-question-25")}
</dt>
<dd className="govuk-summary-list__value">
@@ -1350,15 +1280,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "natureConservationSite") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"26. " +
t(
"myrepresentations:enf-section-question-26"
)}
{"27. " +
t("myrepresentations:enf-section-question-26")}
</dt>
<dd className="govuk-summary-list__value">
@@ -1422,15 +1349,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "protectedSpecies") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"27. " +
t(
"myrepresentations:enf-section-question-27"
)}
{"28. " +
t("myrepresentations:enf-section-question-27")}
</dt>
<dd className="govuk-summary-list__value">
@@ -1494,15 +1418,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "gypsyTravellerInvolvment") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"28. " +
t(
"myrepresentations:enf-section-question-28"
)}
{"29. " +
t("myrepresentations:enf-section-question-28")}
</dt>
<dd className="govuk-summary-list__value">
@@ -1529,15 +1450,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</dd>
</div>
</>
)}
{_.has(repFormData, "floodingIssue") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"29. " +
t(
"myrepresentations:enf-section-question-29"
)}
{"30. " +
t("myrepresentations:enf-section-question-29")}
</dt>
<dd className="govuk-summary-list__value">
@@ -1601,15 +1519,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "governmentDepartmentComments") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"30. " +
t(
"myrepresentations:enf-section-question-30"
)}
{"31. " +
t("myrepresentations:enf-section-question-30")}
</dt>
<dd className="govuk-summary-list__value">
@@ -1673,7 +1588,6 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
</>
{/* Section 6 */}
@@ -1681,54 +1595,25 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
<h3 className="govuk-heading-s govuk-!-margin-top-9">
{t("myrepresentations:enf-section-heading-six")}
</h3>
{_.has(
repFormData,
"developmentNotBeginLaterThanFiveYears"
) && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"myrepresentations:enf-section-question-31a"
)}
32. {t("myrepresentations:enf-section-question-31")}
</dt>
<dd className="govuk-summary-list__value">
{
repFormData.developmentNotBeginLaterThanFiveYears
}
{repFormData.developmentNotBeginLaterThanFiveYears}
</dd>
<dd className="govuk-summary-list__actions">
<a
className="govuk-link"
href="#"
onClick={() => {
setRepresentationSubmit(false);
setShowQuestionnaireSection(6);
}}
>
{t("common:change-link-label")}
<span className="govuk-visually-hidden">
{" "}
{/* {FieldsTranslations(
rows[0].value
)} */}
</span>
</a>
</dd>
<dd className="govuk-summary-list__actions"></dd>
</div>
</>
)}
{_.has(repFormData, "developmentCarriedOutInAccordance") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
31
{t(
"myrepresentations:enf-section-question-31a"
)}
a) {t("myrepresentations:enf-section-question-31a")}
</dt>
<dd className="govuk-summary-list__value">
@@ -1754,8 +1639,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</a>
</dd>
</div>
{repFormData.developmentCarriedOutInAccordance ==
"Yes" && (
{repFormData.developmentCarriedOutInAccordance == "Yes" && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
@@ -1793,21 +1677,15 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "developmentNotTakePlaceBiodiversity") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
31
{t(
"myrepresentations:enf-section-question-31b"
)}
b) {t("myrepresentations:enf-section-question-31b")}
</dt>
<dd className="govuk-summary-list__value">
{
repFormData.developmentNotTakePlaceBiodiversity
}
{repFormData.developmentNotTakePlaceBiodiversity}
</dd>
<dd className="govuk-summary-list__actions">
@@ -1830,16 +1708,11 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</dd>
</div>
</>
)}
{_.has(repFormData, "developmentNotTakePlaceBroadband") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
31
{t(
"myrepresentations:enf-section-question-31c"
)}
c) {t("myrepresentations:enf-section-question-31c")}
</dt>
<dd className="govuk-summary-list__value">
@@ -1865,8 +1738,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</a>
</dd>
</div>
{repFormData.developmentNotTakePlaceBroadband ==
"Yes" && (
{repFormData.developmentNotTakePlaceBroadband == "Yes" && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
@@ -1901,13 +1773,11 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "developmentAnyOtherConditions") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
32.{" "}
{t("myrepresentations:enf-section-question-32")}
33. {t("myrepresentations:enf-section-question-32")}
</dt>
<dd className="govuk-summary-list__value">
@@ -1971,18 +1841,16 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
</>
{/* Section 7 Before sending, have you attached or provided a web link to: */}
<h3 className="govuk-heading-s govuk-!-margin-top-9">
{t("myrepresentations:s78-section-heading-five-sub")}
</h3>
{_.has(repFormData, "copyOfEnforcementNotice") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"33. " +
{"34. " +
t("myrepresentations:enf-section-question-33")}
</dt>
@@ -2047,12 +1915,11 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "enforcementNoticePlan") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"34. " +
{"35. " +
t("myrepresentations:enf-section-question-34")}
</dt>
@@ -2079,7 +1946,8 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</a>
</dd>
</div>
{repFormData.enforcementNoticePlan != "Yes" && (
{repFormData.enforcementNoticePlan != "Yes" &&
repFormData.enforcementNoticePlan != null && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
@@ -2117,12 +1985,11 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "listOfNotifiedOfEnforcement") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"35. " +
{"36. " +
t("myrepresentations:enf-section-question-35")}
</dt>
@@ -2149,7 +2016,8 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</a>
</dd>
</div>
{repFormData.listOfNotifiedOfEnforcement != "Yes" && (
{repFormData.listOfNotifiedOfEnforcement != "Yes" &&
repFormData.enforcementNoticePlan != null && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
@@ -2187,12 +2055,11 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "copyOfLetterOfAppealNotification") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"36. " +
{"37. " +
t("myrepresentations:enf-section-question-36")}
</dt>
@@ -2257,12 +2124,11 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "lpaEIAOS") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"37. " +
{"38. " +
t("myrepresentations:enf-section-question-37")}
</dt>
@@ -2327,12 +2193,11 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "detailsOfOtherAppeals") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"38. " +
{"39. " +
t("myrepresentations:enf-section-question-38")}
</dt>
@@ -2397,12 +2262,11 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "detailsOfPreviousAppeals") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"39. " +
{"40. " +
t("myrepresentations:enf-section-question-39")}
</dt>
@@ -2467,12 +2331,11 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{_.has(repFormData, "otherRelevantInformation") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{"40. " +
{"41. " +
t("myrepresentations:enf-section-question-40")}
</dt>
@@ -2537,19 +2400,17 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</div>
)}
</>
)}
{/* Section 9 Declaration */}
<>
<h3 className="govuk-heading-s govuk-!-margin-top-9">
{t("myrepresentations:enf-section-heading-eight")}
</h3>
{_.has(repFormData, "signedDate") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"myrepresentations:enf-section-question-signed"
)}
{t("myrepresentations:enf-section-question-signed")}
</dt>
<dd className="govuk-summary-list__value">
@@ -2576,14 +2437,11 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</dd>
</div>
</>
)}
{_.has(repFormData, "caseOfficer") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"myrepresentations:s78-section-heading-date"
)}
{t("myrepresentations:s78-section-question-date")}
</dt>
<dd className="govuk-summary-list__value">
@@ -2610,8 +2468,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</dd>
</div>
</>
)}
{_.has(repFormData, "onBehalfOfLPA") && (
<>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
@@ -2644,7 +2501,6 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
</dd>
</div>
</>
)}
</>
</>
);
+5 -1
View File
@@ -258,7 +258,11 @@ const CaseSummary = (props) => {
: t("case:summary-applicant-label")}
</dt>
<dd className="govuk-summary-list__value">
{detailsObj[
{casesObj.pinswg_appellantagent == 846040001
? casesObj.pinswg_appellantfirstname +
" " +
casesObj.pinswg_appellantlastname
: detailsObj[
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
] || "not entered"}
</dd>
+3 -1
View File
@@ -13,7 +13,7 @@ import {
setNewAppealProgress,
setFileCount,
} from "../../store/appealType/action";
import { getFormCollectionByID, getProgressObj } from "../utils";
import { getFormCollectionByID, getProgressObj, updateLinks } from "../utils";
import BuildRow from "./buildrow";
import { FieldsTranslations } from "../elements";
@@ -141,6 +141,8 @@ let BuildSection = (props) => {
let buildAppealFilesArray = [];
//console.log("attached docs: - ", buildAppealFilesArray);
values = updateLinks(values);
let filesUploadObj = Object.keys(values)
.filter(function (k) {
return k.indexOf("pinswg_fileUpload") == 0;
+55 -37
View File
@@ -271,6 +271,24 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.siteAddress}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionBullet}>4.</Text>
<Text style={styles.questionText}>
{getTrans(
docProps.locale,
"s78-section-question-4"
)}
</Text>
<Text style={styles.questionAnswer}>
{appealTypeValue.value}
</Text>
</View>
</View>
</View>
<View>
@@ -302,7 +320,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
4.
5.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -332,7 +350,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
marginBottom: 10,
}}
>
<Text style={styles.questionBullet}>5.</Text>
<Text style={styles.questionBullet}>6.</Text>
<Text style={styles.questionTextMid}>
{getTrans(
docProps.locale,
@@ -357,7 +375,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
6.
7.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -394,7 +412,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
7.
8.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -432,7 +450,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
8.
9.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -467,7 +485,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
9.
10.
</Text>
<Text style={styles.questionTextWide}>
@@ -515,7 +533,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
10.
11.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -542,7 +560,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
11.
12.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -589,7 +607,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
marginBottom: 10,
}}
>
<Text style={styles.questionBullet}>12.</Text>
<Text style={styles.questionBullet}>13.</Text>
<Text style={styles.questionTextMid}>
{getTrans(
docProps.locale,
@@ -616,7 +634,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
marginBottom: 10,
}}
>
<Text style={styles.questionBullet}>13.</Text>
<Text style={styles.questionBullet}>14.</Text>
<Text style={styles.questionTextMid}>
{getTrans(
docProps.locale,
@@ -643,7 +661,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
marginBottom: 10,
}}
>
<Text style={styles.questionBullet}>14.</Text>
<Text style={styles.questionBullet}>15.</Text>
<Text style={styles.questionTextMid}>
{getTrans(
docProps.locale,
@@ -668,7 +686,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
marginBottom: 10,
}}
>
<Text style={styles.questionBullet}>15.</Text>
<Text style={styles.questionBullet}>16.</Text>
<Text style={styles.questionTextMid}>
{getTrans(
docProps.locale,
@@ -695,7 +713,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
marginBottom: 10,
}}
>
<Text style={styles.questionBullet}>16.</Text>
<Text style={styles.questionBullet}>17.</Text>
<Text style={styles.questionTextMid}>
{getTrans(
docProps.locale,
@@ -722,7 +740,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
marginBottom: 10,
}}
>
<Text style={styles.questionBullet}>17.</Text>
<Text style={styles.questionBullet}>18.</Text>
<Text style={styles.questionTextMid}>
{getTrans(
docProps.locale,
@@ -774,7 +792,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
18.
19.
</Text>
<Text style={styles.questionTextWide}>
{getTrans(
@@ -803,7 +821,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
19.
20.
</Text>
<Text style={styles.questionTextWide}>
{getTrans(
@@ -825,7 +843,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
marginBottom: 10,
}}
>
<Text style={styles.questionBullet}>20.</Text>
<Text style={styles.questionBullet}>21.</Text>
<Text style={styles.questionTextMid}>
{getTrans(
docProps.locale,
@@ -860,7 +878,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
marginBottom: 10,
}}
>
<Text style={styles.questionBullet}>21.</Text>
<Text style={styles.questionBullet}>22.</Text>
<Text style={styles.questionTextMid}>
{getTrans(
docProps.locale,
@@ -884,7 +902,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
22.
23.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -917,7 +935,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
23.
24.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -952,7 +970,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
24.
25.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -987,7 +1005,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
25.
26.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -1020,7 +1038,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
26.
27.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -1055,7 +1073,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
27.
28.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -1084,7 +1102,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
marginBottom: 10,
}}
>
<Text style={styles.questionBullet}>28.</Text>
<Text style={styles.questionBullet}>29.</Text>
<Text style={styles.questionTextMid}>
{getTrans(
docProps.locale,
@@ -1108,7 +1126,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
29.
30.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -1143,7 +1161,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
30.
31.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -1190,7 +1208,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
marginBottom: 10,
}}
>
<Text style={styles.questionBullet}>31.</Text>
<Text style={styles.questionBullet}>32.</Text>
<Text style={styles.questionTextWide}>
{getTrans(
docProps.locale,
@@ -1286,7 +1304,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
32.
33.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -1339,7 +1357,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
33.
34.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -1373,7 +1391,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
34.
35.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -1408,7 +1426,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
35.
36.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -1441,7 +1459,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
36.
37.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -1477,7 +1495,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
37.
38.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -1510,7 +1528,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
38.
39.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -1546,7 +1564,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
39.
40.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
@@ -1582,7 +1600,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
}}
>
<Text style={styles.questionBullet}>
40.
41.
</Text>
<Text style={styles.questionTextMid}>
{getTrans(
+16
View File
@@ -449,6 +449,22 @@ const SearchResults = (props) => {
)}
:
</span>
{_.has(item, [
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue",
])
? router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
item[
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
transLookup
)
: item[
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
] || "N/A"
: ""}
{_.has(item, [
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
])
+5 -1
View File
@@ -407,7 +407,11 @@ const SearchResults = (props) => {
)}
:
</span>
{_.has(detailsObj, [
{item.pinswg_appellantagent == 846040001
? item.pinswg_appellantfirstname +
" " +
item.pinswg_appellantlastname
: _.has(detailsObj, [
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
])
? detailsObj[
+64
View File
@@ -550,3 +550,67 @@ export const getDocumentTypeFromFilename = (filename) => {
return doctypeCode;
};
export const updateLinks = (jsonObject) => {
const wrapPlainUrlsInAnchorTags = (htmlString) => {
return htmlString
.replace(
/(?<=^|>|\s)(?=\S)(?:https?:\/\/)?(?:www\.)?[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}(?:\/[^\s]*)?(?=\s|<|$)/g,
(match) => {
// If the match is already wrapped in <a> tag, return it as is
if (match.includes('<a href="') || match.includes("<a ")) {
return match;
}
// Check if the URL starts with http:// or https://, else prepend http://
const url =
match.startsWith("http://") ||
match.startsWith("https://")
? match
: "https://" + match;
// Return the URL wrapped in <a> tag
return `<a href="${url}" rel="noopener noreferrer" target="_blank">${match}</a>`;
}
)
.replace(
/<a [^>]*><a [^>]*>(.*?)<\/a><\/a>/g,
(match, innerContent) => {
return `<a href="${innerContent}" rel="noopener noreferrer" target="_blank">${innerContent}</a>`;
}
);
};
// Helper function to ensure that any href attributes in <a> tags have https/http
const ensureHttpsInLinks = (inputString) => {
// Match <a> tags with href attributes and check if they lack a scheme (http:// or https://)
return inputString.replace(
/<a [^>]*href=["']([^"']*)["'][^>]*>/g,
(match, url) => {
// If the URL doesn't already have a scheme (http:// or https://), add https://
if (!/^https?:\/\//.test(url)) {
const newUrl = `https://${url}`;
return match.replace(url, newUrl);
}
return match; // Return the unchanged anchor tag if it already has a scheme
}
);
};
// Iterate through all properties of the JSON object
Object.keys(jsonObject).forEach((key) => {
const value = jsonObject[key];
// If the value is a string and contains plain URLs that are not wrapped
if (typeof value === "string") {
// Step 1: Wrap plain URLs in anchor tags if not already wrapped
let updatedValue = wrapPlainUrlsInAnchorTags(value);
// Step 2: Ensure that hrefs in anchor tags have https:// or http://
updatedValue = ensureHttpsInLinks(updatedValue);
// Assign the updated value back to the key
jsonObject[key] = updatedValue;
}
});
return jsonObject;
};
+2 -2
View File
@@ -1123,8 +1123,8 @@
"value_cy": "MOL - (c) bod gofynion yr hysbysiad yn fwy na'r hyn sy'n angenrheidiol i atal cyflwr y tir rhag effeithio'n andwyol ar amwynder unrhyw ran o ardal yr awdurdod cynllunio lleol a gyflwynodd yr hysbysiad, neu unrhyw ardal gyfagos."
},
{
"value": "NA",
"value_cy": "NA"
"value": "N/A",
"value_cy": "N/A"
},
{
"value": "No",
@@ -11875,7 +11875,7 @@
"Label": {
"LocalizedLabels": [
{
"Label": "NA",
"Label": "N/A",
"LanguageCode": 1033,
"IsManaged": false,
"MetadataId": "1696db12-3087-eb11-aac2-00224800be9c",
@@ -11883,7 +11883,7 @@
}
],
"UserLocalizedLabel": {
"Label": "NA",
"Label": "N/A",
"LanguageCode": 1033,
"IsManaged": false,
"MetadataId": "1696db12-3087-eb11-aac2-00224800be9c",
+2 -1
View File
@@ -228,5 +228,6 @@
"previously-added-files": "Ffeiliau wedi'u llwytho i fyny",
"is-required-label": "Yn ofynnol",
"select-a-date-label": "Dewiswch ddyddiad",
"questionnaire-evidence-label": "Tystiolaeth"
"questionnaire-evidence-label": "Tystiolaeth",
"questionnaire-hint-para": "Cwblhewch yr Holiadur sy'n dilyn. Os oes angen atodi dogfennau mewn ymateb i unrhyw gwestiynau, gallwch eu huwchlwytho yn y cam 'Ychwanegu ffeiliau'."
}
+5 -4
View File
@@ -172,10 +172,10 @@
"enf-section-question-30-hint": "If Yes, specify which and attach any relevant details",
"enf-section-heading-six": "Suggested conditions",
"enf-section-question-31": "Review the following standard conditions and advise whether they would be necessary if permission/consent is granted (not applicable to Advertisement consent proposals)",
"enf-section-question-31a": "a) The development shall be carried out in accordance with the following approved plans and documents: ............................ Reason: To ensure the development is carried out in accordance with the approved documents, plans and drawings submitted with the application.",
"enf-section-question-31a": "The development shall be carried out in accordance with the following approved plans and documents: ............................ Reason: To ensure the development is carried out in accordance with the approved documents, plans and drawings submitted with the application.",
"enf-section-question-31a-hint": "If Yes, list the approved plans, documents and drawings here or list them in an attached document",
"enf-section-question-31b": "b) No development shall take place until a scheme for biodiversity enhancement 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: In the interests of maintaining and enhancing biodiversity, in accordance with Future Wales Policy 9.",
"enf-section-question-31c": "c) 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.",
"enf-section-question-31b": "No development shall take place until a scheme for biodiversity enhancement 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: In the interests of maintaining and enhancing biodiversity, in accordance with Future Wales Policy 9.",
"enf-section-question-31c": "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.",
"enf-section-question-32": "Do you consider other conditions, or amended versions of the above standard conditions, to be necessary?",
"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:",
@@ -228,5 +228,6 @@
"previously-added-files": "Uploaded files",
"is-required-label": "Is required",
"select-a-date-label": "Select a date",
"questionnaire-evidence-label": "Evidence"
"questionnaire-evidence-label": "Evidence",
"questionnaire-hint-para": "Please complete the follwoing Questionnaire. If you need to attach documents in response to any questions, you can upload them in the 'Add you files' step."
}
+1 -1
View File
@@ -82,7 +82,7 @@ export default async function ApiProxy(req, res) {
//console.log(queryString);
var queryUrl =
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title,_primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=" +
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title,_primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=" +
queryString +
" pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true";
@@ -115,7 +115,7 @@ export default async function ApiProxy(req, res) {
: "";
var queryUrl =
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title,_primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=" +
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title,_primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=" +
queryString +
" pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=" +
orderby +
+1 -1
View File
@@ -45,7 +45,7 @@ export default async function ApiProxy(req, res) {
searchString = searchString.replace(/\'/g, "''");
var queryUrl =
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
searchString +
"') or contains(ticketnumber, '" +
searchString +
@@ -474,7 +474,7 @@ export default async function ApiProxy(req, res) {
const getIncidentResultsObj = await Promise.all(
searchResultsObj.map(async (key) => {
var queryUrl =
"incidents?$select=pinswg_publishtoweb,modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=incidentid eq " +
"incidents?$select=pinswg_publishtoweb,modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=incidentid eq " +
key.incidentid +
" and pinswg_appealcasetype ne null &$orderby=createdon desc&$count=true";
@@ -229,16 +229,16 @@ export default async function ApiProxy(req, res) {
// "appealTypeID": "846040023",
// "NavigationProperty": "pinswg_LDPIds",
// },
{
"LogicalCollectionName":
"pinswg_enforcementlistedbuildingconservationaps",
"LogicalName": "pinswg_enforcementlistedbuildingandconservationap",
"PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconseid",
"UrlName": "enforcementlistedbuildingconservationap",
"MetadataId": "c697be96-9481-eb11-aac0-00224800be9c",
"appealTypeID": "846040006",
"NavigationProperty": "pinswg_EnforcementListedBuildingConseIds",
},
// {
// "LogicalCollectionName":
// "pinswg_enforcementlistedbuildingconservationaps",
// "LogicalName": "pinswg_enforcementlistedbuildingandconservationap",
// "PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconseid",
// "UrlName": "enforcementlistedbuildingconservationap",
// "MetadataId": "c697be96-9481-eb11-aac0-00224800be9c",
// "appealTypeID": "846040006",
// "NavigationProperty": "pinswg_EnforcementListedBuildingConseIds",
// },
{
"LogicalCollectionName": "pinswg_maintenanceoflands217s",
"LogicalName": "pinswg_maintenanceoflands217",
@@ -489,7 +489,39 @@ export default async function ApiProxy(req, res) {
: "pinswg_dateeventrequested,") +
"statuscode,_" +
item.NavigationProperty.toLowerCase() +
"_value";
"_value" +
(item.LogicalCollectionName == "pinswg_planningappeals78s"
? ",_pinswg_localplanningauthority_value"
: "") +
(item.LogicalCollectionName ==
"pinswg_compulsorypurchaseorderses" ||
item.LogicalCollectionName ==
"pinswg_enforcementnoticeappeals174s" ||
item.LogicalCollectionName ==
"pinswg_planningconditionss73s79s" ||
item.LogicalCollectionName ==
"pinswg_planningobligationappeals106s" ||
item.LogicalCollectionName ==
"pinswg_hedgeshedgerowstreepreservationreplacems" ||
item.LogicalCollectionName == "pinswg_householderappealhases" ||
item.LogicalCollectionName ==
"pinswg_lawfuldevelopmentcertificates" ||
item.LogicalCollectionName == "pinswg_adverts" ||
item.LogicalCollectionName ==
"pinswg_communityinfrastructurelevys117118119s" ||
item.LogicalCollectionName == "pinswg_callinss77s" ||
item.LogicalCollectionName == "pinswg_wayleaves" ||
item.LogicalCollectionName ==
"pinswg_environmentalpermittings" ||
item.LogicalCollectionName == "pinswg_miscellaneouscaseworks" ||
item.LogicalCollectionName == "pinswg_commonlands" ||
item.LogicalCollectionName == "pinswg_rows" ||
item.LogicalCollectionName == "pinswg_maintenanceoflands217s" ||
item.LogicalCollectionName ==
"pinswg_enforcementlistedbuildingconservationaps" ||
item.LogicalCollectionName == "pinswg_dnses"
? ",_pinswg_associatedlpa_value"
: "");
console.log(
"\n==========================================\n",
@@ -536,7 +568,7 @@ export default async function ApiProxy(req, res) {
const getIncidentResultsObj = await Promise.all(
searchResultsObj.map(async (key) => {
var queryUrl =
"incidents?$select=ticketnumber,pinswg_publishtoweb,modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=incidentid eq " +
"incidents?$select=ticketnumber,pinswg_publishtoweb,modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=incidentid eq " +
key.incidentid +
" and pinswg_appealcasetype ne null &$orderby=createdon desc&$count=true";
@@ -79,7 +79,7 @@ export default async function ApiProxy(req, res) {
searchString = searchString.replace(/\'/g, "''");
var queryUrl =
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
searchString +
"') or contains(ticketnumber, '" +
searchString +
+1 -1
View File
@@ -45,7 +45,7 @@ export default async function ApiProxy(req, res) {
searchString = searchString.replace(/\'/g, "''");
var queryUrl =
"incidents?$select=pinswg_publishtoweb,modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=incidentid eq " +
"incidents?$select=pinswg_publishtoweb,modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=incidentid eq " +
searchString +
" and pinswg_appealcasetype ne null &$orderby=createdon desc&$count=true";
+1 -1
View File
@@ -28,7 +28,7 @@ export default async function ApiProxy(req, res) {
searchString = searchString.replace(/\'/g, "''");
var queryUrl =
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
searchString +
"') or contains(ticketnumber, '" +
searchString +
+5
View File
@@ -2926,3 +2926,8 @@ ul.subFieldList {
}
}
}
.ql-snow .ql-tooltip {
z-index: 1000;
}