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")}:{" "}
+7 -3
View File
@@ -258,9 +258,13 @@ const CaseSummary = (props) => {
: t("case:summary-applicant-label")}
</dt>
<dd className="govuk-summary-list__value">
{detailsObj[
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
] || "not entered"}
{casesObj.pinswg_appellantagent == 846040001
? casesObj.pinswg_appellantfirstname +
" " +
casesObj.pinswg_appellantlastname
: detailsObj[
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
] || "not entered"}
</dd>
</div>
{detailsObj.pinswg_agentcontactname != null &&
+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",
])
+7 -3
View File
@@ -407,9 +407,13 @@ const SearchResults = (props) => {
)}
:
</span>
{_.has(detailsObj, [
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
])
{item.pinswg_appellantagent == 846040001
? item.pinswg_appellantfirstname +
" " +
item.pinswg_appellantlastname
: _.has(detailsObj, [
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
])
? detailsObj[
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
]
+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
@@ -2925,4 +2925,9 @@ ul.subFieldList {
width: 100%
}
}
}
.ql-snow .ql-tooltip {
z-index: 1000;
}