From 5b34cdeb1c6527fcabbebed19c183de155e684ba Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Mon, 20 Jan 2025 09:57:40 +0000 Subject: [PATCH 1/8] questionnaire defect 66 & enf defect 18 --- styles/sass/welshgov/_application.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/styles/sass/welshgov/_application.scss b/styles/sass/welshgov/_application.scss index 419d2e32..6de95886 100644 --- a/styles/sass/welshgov/_application.scss +++ b/styles/sass/welshgov/_application.scss @@ -2925,4 +2925,9 @@ ul.subFieldList { width: 100% } } +} + + +.ql-snow .ql-tooltip { + z-index: 1000; } \ No newline at end of file From 5dbde51f7f021a6ac89e04392eeaeb41d473d9a1 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Mon, 20 Jan 2025 16:33:22 +0000 Subject: [PATCH 2/8] uat defect 132 --- data/picklistLookups.json | 4 ++-- data/picklistdata/pinswg_planningappeals78.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/picklistLookups.json b/data/picklistLookups.json index 4fc27598..eee9cd43 100644 --- a/data/picklistLookups.json +++ b/data/picklistLookups.json @@ -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", diff --git a/data/picklistdata/pinswg_planningappeals78.json b/data/picklistdata/pinswg_planningappeals78.json index f1c2fcb1..2b500668 100644 --- a/data/picklistdata/pinswg_planningappeals78.json +++ b/data/picklistdata/pinswg_planningappeals78.json @@ -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", From 133353361163ed05771e2cd4ae20d0a46fdd85c1 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Mon, 20 Jan 2025 16:35:53 +0000 Subject: [PATCH 3/8] enf defect 13 --- locales/en/myrepresentations.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locales/en/myrepresentations.json b/locales/en/myrepresentations.json index a138d31e..4d58fa7b 100644 --- a/locales/en/myrepresentations.json +++ b/locales/en/myrepresentations.json @@ -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:", From 5708db003a9e9e0366689aeb5da7ee43105f7c70 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Mon, 20 Jan 2025 16:36:37 +0000 Subject: [PATCH 4/8] enf defect 19 --- ...tationLPAQuestionnaireCheck_enforcement.js | 4464 ++++++++--------- 1 file changed, 2170 insertions(+), 2294 deletions(-) diff --git a/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement.js b/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement.js index 98ef2fd1..a4691883 100644 --- a/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement.js +++ b/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement.js @@ -23,1971 +23,16 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {

{t("myrepresentations:enf-section-heading-one")}

- {_.has(repFormData, "procedureType") && ( - <> -
-
- {"4. " + - t( - "myrepresentations:enf-section-question-4" - )} -
-
- {repFormData.procedureType} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(1); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.representationOnBehalfOf == "Yes" && ( -
-
- {t( - "case:representation-onbehalfof-details" - )} -
- -
- { - repFormData.representationOnBehalfOf_details - } -
- -
- {/* { - setRepresentationSubmit(false); - setShowQuestionnaireSection(1); - }} - > - {t("common:change-link-label")} - - {" "} - {FieldsTranslations( - rows[0].value - )} - - */} -
-
- )} - - )} - {_.has(repFormData, "enterToView") && ( - <> -
-
- {"5. " + - t( - "myrepresentations:enf-section-question-5" - )} -
- -
- {repFormData.enterToView} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(1); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- - )} - {_.has(repFormData, "enterNeighbouringLandToViewSite") && ( - <> -
-
- {"6. " + - t( - "myrepresentations:enf-section-question-6" - )} -
- -
- {repFormData.enterNeighbouringLandToViewSite} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(1); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.enterNeighbouringLandToViewSite == - "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- {/* { - setRepresentationSubmit(false); - setShowQuestionnaireSection(1); - }} - > - {t("common:change-link-label")} - - {" "} - {FieldsTranslations( - rows[0].value - )} - - */} -
-
- )} - - )} - {_.has(repFormData, "enterNeighbouringLandAccessRequired") && ( - <> -
-
- {"7. " + - t( - "myrepresentations:enf-section-question-7" - )} -
- -
- { - repFormData.enterNeighbouringLandAccessRequired - } -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(1); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.enterNeighbouringLandAccessRequired != - "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(1); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - {_.has(repFormData, "healthAndSafetyIssues") && ( - <> -
-
- {"8. " + - t( - "myrepresentations:enf-section-question-8" - )} -
- -
- {repFormData.healthAndSafetyIssues} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(1); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.healthAndSafetyIssues == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(1); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - {_.has(repFormData, "LPAcontactDetails") && ( - <> -
-
- {"9. " + - t( - "myrepresentations:enf-section-question-9" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(1); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- - )} - - {/* Section 2 Deemed Application Fee */} - <> -

- {t("myrepresentations:enf-section-heading-two")} -

- {_.has(repFormData, "feePaid") && ( - <> -
-
- {"10. " + - t( - "myrepresentations:enf-section-question-10" - )} -
- -
- {repFormData.feePaid} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(2); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- - )} - {_.has(repFormData, "feeExempt") && ( - <> -
-
- {"11. " + - t( - "myrepresentations:enf-section-question-11" - )} -
- -
- {repFormData.feeExempt} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(2); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- - )} - - {/* Section 3 Planning History and Current Status */} - <> -

- {t("myrepresentations:enf-section-heading-three")} -

- {_.has(repFormData, "previousGrantedCerts") && ( - <> -
-
- {"12. " + - t( - "myrepresentations:enf-section-question-12" - )}{" "} -
- -
- {repFormData.previousGrantedCerts} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(3); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.previousGrantedCerts == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(3); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - {_.has(repFormData, "stopNoticeServed") && ( - <> -
-
- {"13. " + - t( - "myrepresentations:enf-section-question-13" - )} -
- -
- {repFormData.stopNoticeServed} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(3); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.stopNoticeServed == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(3); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - {_.has(repFormData, "relatedCases") && ( - <> -
-
- {"14. " + - t( - "myrepresentations:enf-section-question-14" - )} -
- -
- {repFormData.relatedCases} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(3); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.relatedCases == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(3); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - {_.has(repFormData, "previousEnforcement") && ( - <> -
-
- {"15. " + - t( - "myrepresentations:enf-section-question-15" - )} -
- -
- {repFormData.previousEnforcement} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(3); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.previousEnforcement == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(3); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - {_.has(repFormData, "subjectArticle4") && ( - <> -
-
- {"16. " + - t( - "myrepresentations:enf-section-question-16" - )} -
- -
- {repFormData.subjectArticle4} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(3); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.subjectArticle4 == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(3); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - {_.has(repFormData, "previousPDRRestriction") && ( - <> -
-
- {"17. " + - t( - "myrepresentations:enf-section-question-17" - )} -
- -
- {repFormData.previousPDRRestriction} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(3); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.previousPDRRestriction == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(3); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - - {/* Section 4 Supporting Documents */} - <> -

- {t("myrepresentations:enf-section-heading-four")} -

- {_.has(repFormData, "LPAldpAndMap") && ( - <> -
-
- {"18. " + - t( - "myrepresentations:enf-section-question-18" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(4); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- - )} - {_.has(repFormData, "LPAlocalGuidance") && ( - <> -
-
- {"19. " + - t( - "myrepresentations:enf-section-question-19" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(4); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- - )} - {_.has(repFormData, "LPAintentionToSubmitFullStatement") && ( - <> -
-
- {"20. " + - t( - "myrepresentations:enf-section-question-20" - )} -
- -
- {repFormData.LPAintentionToSubmitFullStatement} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(4); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- - )} - - {/* Section 5 */} - <> -

- {t("myrepresentations:enf-section-heading-five")} -

- {_.has(repFormData, "AONB") && ( - <> -
-
- {"21. " + - t( - "myrepresentations:enf-section-question-21" - )} -
- -
- {repFormData.AONB} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- - )} - {_.has(repFormData, "ROW") && ( - <> -
-
- {"22. " + - t( - "myrepresentations:enf-section-question-22" - )} -
- -
- {repFormData.ROW} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.ROW == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - {_.has(repFormData, "conservationArea") && ( - <> -
-
- {"23. " + - t( - "myrepresentations:enf-section-question-23" - )} -
- -
- {repFormData.conservationArea} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.conservationArea == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - {_.has(repFormData, "affectListedBuilding") && ( - <> -
-
- {"24. " + - t( - "myrepresentations:enf-section-question-24" - )} -
- -
- {repFormData.affectListedBuilding} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.affectListedBuilding == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - {_.has(repFormData, "TPO") && ( - <> -
-
- {"25. " + - t( - "myrepresentations:enf-section-question-25" - )} -
- -
- {repFormData.affectListedBuilding} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.TPO == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - {_.has(repFormData, "natureConservationSite") && ( - <> -
-
- {"26. " + - t( - "myrepresentations:enf-section-question-26" - )} -
- -
- {repFormData.natureConservationSite} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.natureConservationSite == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - {_.has(repFormData, "protectedSpecies") && ( - <> -
-
- {"27. " + - t( - "myrepresentations:enf-section-question-27" - )} -
- -
- {repFormData.protectedSpecies} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.protectedSpecies == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - {_.has(repFormData, "gypsyTravellerInvolvment") && ( - <> -
-
- {"28. " + - t( - "myrepresentations:enf-section-question-28" - )} -
- -
- {repFormData.gypsyTravellerInvolvment} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- - )} - {_.has(repFormData, "floodingIssue") && ( - <> -
-
- {"29. " + - t( - "myrepresentations:enf-section-question-29" - )} -
- -
- {repFormData.floodingIssue} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.floodingIssue == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - {_.has(repFormData, "governmentDepartmentComments") && ( - <> -
-
- {"30. " + - t( - "myrepresentations:enf-section-question-30" - )} -
- -
- {repFormData.governmentDepartmentComments} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.governmentDepartmentComments == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(5); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - - - {/* Section 6 */} - <> -

- {t("myrepresentations:enf-section-heading-six")} -

- {_.has( - repFormData, - "developmentNotBeginLaterThanFiveYears" - ) && ( - <> -
-
- {t( - "myrepresentations:enf-section-question-31a" - )} -
- -
- { - repFormData.developmentNotBeginLaterThanFiveYears - } -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(6); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- - )} - - {_.has(repFormData, "developmentCarriedOutInAccordance") && ( - <> -
-
- 31 - {t( - "myrepresentations:enf-section-question-31a" - )} -
- -
- {repFormData.developmentCarriedOutInAccordance} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(6); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.developmentCarriedOutInAccordance == - "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(6); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - {_.has(repFormData, "developmentNotTakePlaceBiodiversity") && ( - <> -
-
- 31 - {t( - "myrepresentations:enf-section-question-31b" - )} -
- -
- { - repFormData.developmentNotTakePlaceBiodiversity - } -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(6); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- - )} - - {_.has(repFormData, "developmentNotTakePlaceBroadband") && ( - <> -
-
- 31 - {t( - "myrepresentations:enf-section-question-31c" - )} -
- -
- {repFormData.developmentNotTakePlaceBroadband} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(6); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.developmentNotTakePlaceBroadband == - "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
- { - repFormData.developmentNotTakePlaceBroadbandEvidence - } -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(6); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - {_.has(repFormData, "developmentAnyOtherConditions") && ( - <> -
-
- 32.{" "} - {t("myrepresentations:enf-section-question-32")} -
- -
- {repFormData.developmentAnyOtherConditions} -
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(6); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- {repFormData.developmentAnyOtherConditions == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
- -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(6); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} - - - {/* Section 7 Before sending, have you attached or provided a web link to: */} -

- {t("myrepresentations:s78-section-heading-five-sub")} -

- {_.has(repFormData, "copyOfEnforcementNotice") && ( <>
- {"33. " + - t("myrepresentations:enf-section-question-33")} + {"4. " + + t("myrepresentations:enf-section-question-4")}
- {repFormData.copyOfEnforcementNotice} + {repFormData.procedureType}
@@ -1996,7 +41,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { href="#" onClick={() => { setRepresentationSubmit(false); - setShowQuestionnaireSection(7); + setShowQuestionnaireSection(1); }} > {t("common:change-link-label")} @@ -2009,7 +54,101 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
- {repFormData.copyOfEnforcementNotice == "No" && ( + {repFormData.representationOnBehalfOf == "Yes" && ( +
+
+ {t("case:representation-onbehalfof-details")} +
+ +
+ {repFormData.representationOnBehalfOf_details} +
+ +
+ {/* { + setRepresentationSubmit(false); + setShowQuestionnaireSection(1); + }} + > + {t("common:change-link-label")} + + {" "} + {FieldsTranslations( + rows[0].value + )} + + */} +
+
+ )} + + + <> +
+
+ {"5. " + + t("myrepresentations:enf-section-question-5")} +
+ +
+ {repFormData.enterToView} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(1); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ + + <> +
+
+ {"6. " + + t("myrepresentations:enf-section-question-6")} +
+ +
+ {repFormData.enterNeighbouringLandToViewSite} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(1); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.enterNeighbouringLandToViewSite == "Yes" && (
{t( @@ -2021,7 +160,77 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
+ + +
+ {/* { + setRepresentationSubmit(false); + setShowQuestionnaireSection(1); + }} + > + {t("common:change-link-label")} + + {" "} + {FieldsTranslations( + rows[0].value + )} + + */} +
+
+ )} + + + <> +
+
+ {"7. " + + t("myrepresentations:enf-section-question-7")} +
+ +
+ {repFormData.enterNeighbouringLandAccessRequired} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(1); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.enterNeighbouringLandAccessRequired != + "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
@@ -2032,7 +241,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { href="#" onClick={() => { setRepresentationSubmit(false); - setShowQuestionnaireSection(7); + setShowQuestionnaireSection(1); }} > {t("common:change-link-label")} @@ -2047,17 +256,1662 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
)} - )} - {_.has(repFormData, "enforcementNoticePlan") && ( + <>
- {"34. " + - t("myrepresentations:enf-section-question-34")} + {"8. " + + t("myrepresentations:enf-section-question-8")}
- {repFormData.enforcementNoticePlan} + {repFormData.healthAndSafetyIssues} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(1); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.healthAndSafetyIssues == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(1); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + <> +
+
+ {"9. " + + t("myrepresentations:enf-section-question-9")} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(1); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ + + {/* Section 2 Deemed Application Fee */} + <> +

+ {t("myrepresentations:enf-section-heading-two")} +

+ + <> +
+
+ {"10. " + + t("myrepresentations:enf-section-question-10")} +
+ +
+ {repFormData.feePaid} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(2); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ + + <> +
+
+ {"11. " + + t("myrepresentations:enf-section-question-11")} +
+ +
+ {repFormData.feeExempt} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(2); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ + + {/* Section 3 Planning History and Current Status */} + <> +

+ {t("myrepresentations:enf-section-heading-three")} +

+ + <> +
+
+ {"12. " + + t( + "myrepresentations:enf-section-question-12" + )}{" "} +
+ +
+ {repFormData.previousGrantedCerts} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(3); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.previousGrantedCerts == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(3); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + <> +
+
+ {"13. " + + t("myrepresentations:enf-section-question-13")} +
+ +
+ {repFormData.stopNoticeServed} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(3); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.stopNoticeServed == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(3); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + <> +
+
+ {"14. " + + t("myrepresentations:enf-section-question-14")} +
+ +
+ {repFormData.relatedCases} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(3); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.relatedCases == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(3); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + <> +
+
+ {"15. " + + t("myrepresentations:enf-section-question-15")} +
+ +
+ {repFormData.previousEnforcement} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(3); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.previousEnforcement == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(3); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + <> +
+
+ {"16. " + + t("myrepresentations:enf-section-question-16")} +
+ +
+ {repFormData.subjectArticle4} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(3); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.subjectArticle4 == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(3); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + <> +
+
+ {"17. " + + t("myrepresentations:enf-section-question-17")} +
+ +
+ {repFormData.previousPDRRestriction} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(3); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.previousPDRRestriction == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(3); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + {/* Section 4 Supporting Documents */} + <> +

+ {t("myrepresentations:enf-section-heading-four")} +

+ + <> +
+
+ {"18. " + + t("myrepresentations:enf-section-question-18")} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(4); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ + + <> +
+
+ {"19. " + + t("myrepresentations:enf-section-question-19")} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(4); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ + + <> +
+
+ {"20. " + + t("myrepresentations:enf-section-question-20")} +
+ +
+ {repFormData.LPAintentionToSubmitFullStatement} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(4); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ + + {/* Section 5 */} + <> +

+ {t("myrepresentations:enf-section-heading-five")} +

+ + <> +
+
+ {"21. " + + t("myrepresentations:enf-section-question-21")} +
+ +
+ {repFormData.AONB} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ + + <> +
+
+ {"22. " + + t("myrepresentations:enf-section-question-22")} +
+ +
+ {repFormData.ROW} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.ROW == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + <> +
+
+ {"23. " + + t("myrepresentations:enf-section-question-23")} +
+ +
+ {repFormData.conservationArea} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.conservationArea == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + <> +
+
+ {"24. " + + t("myrepresentations:enf-section-question-24")} +
+ +
+ {repFormData.affectListedBuilding} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.affectListedBuilding == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + <> +
+
+ {"25. " + + t("myrepresentations:enf-section-question-25")} +
+ +
+ {repFormData.affectListedBuilding} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.TPO == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + <> +
+
+ {"26. " + + t("myrepresentations:enf-section-question-26")} +
+ +
+ {repFormData.natureConservationSite} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.natureConservationSite == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + <> +
+
+ {"27. " + + t("myrepresentations:enf-section-question-27")} +
+ +
+ {repFormData.protectedSpecies} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.protectedSpecies == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + <> +
+
+ {"28. " + + t("myrepresentations:enf-section-question-28")} +
+ +
+ {repFormData.gypsyTravellerInvolvment} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ + + <> +
+
+ {"29. " + + t("myrepresentations:enf-section-question-29")} +
+ +
+ {repFormData.floodingIssue} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.floodingIssue == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + <> +
+
+ {"30. " + + t("myrepresentations:enf-section-question-30")} +
+ +
+ {repFormData.governmentDepartmentComments} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.governmentDepartmentComments == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(5); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + + {/* Section 6 */} + <> +

+ {t("myrepresentations:enf-section-heading-six")} +

+ + <> +
+
+ {t("myrepresentations:enf-section-question-31a")} +
+ +
+ {repFormData.developmentNotBeginLaterThanFiveYears} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(6); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ + + <> +
+
+ 31 + {t("myrepresentations:enf-section-question-31a")} +
+ +
+ {repFormData.developmentCarriedOutInAccordance} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(6); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.developmentCarriedOutInAccordance == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(6); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + <> +
+
+ 31 + {t("myrepresentations:enf-section-question-31b")} +
+ +
+ {repFormData.developmentNotTakePlaceBiodiversity} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(6); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ + + <> +
+
+ 31 + {t("myrepresentations:enf-section-question-31c")} +
+ +
+ {repFormData.developmentNotTakePlaceBroadband} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(6); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.developmentNotTakePlaceBroadband == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+ { + repFormData.developmentNotTakePlaceBroadbandEvidence + } +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(6); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + <> +
+
+ 32. {t("myrepresentations:enf-section-question-32")} +
+ +
+ {repFormData.developmentAnyOtherConditions} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(6); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.developmentAnyOtherConditions == "Yes" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
+
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(6); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ )} + + + + {/* Section 7 Before sending, have you attached or provided a web link to: */} +

+ {t("myrepresentations:s78-section-heading-five-sub")} +

+ <> +
+
+ {"33. " + + t("myrepresentations:enf-section-question-33")} +
+ +
+ {repFormData.copyOfEnforcementNotice} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(7); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.copyOfEnforcementNotice == "No" && ( +
+
+ {t( + "myrepresentations:questionnaire-evidence-label" + )} +
+ +
+
@@ -2079,7 +1933,41 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
- {repFormData.enforcementNoticePlan != "Yes" && ( + )} + + + <> +
+
+ {"34. " + + t("myrepresentations:enf-section-question-34")} +
+ +
+ {repFormData.enforcementNoticePlan} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(7); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.enforcementNoticePlan != "Yes" && + repFormData.enforcementNoticePlan != null && (
{t( @@ -2116,40 +2004,40 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
)} - - )} - {_.has(repFormData, "listOfNotifiedOfEnforcement") && ( - <> -
-
- {"35. " + - t("myrepresentations:enf-section-question-35")} -
+ -
- {repFormData.enforcementNoticePlan} -
+ <> + - {repFormData.listOfNotifiedOfEnforcement != "Yes" && ( + + + +
+ {repFormData.listOfNotifiedOfEnforcement != "Yes" && + repFormData.enforcementNoticePlan != null && (
{t( @@ -2186,18 +2074,53 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
)} - - )} - {_.has(repFormData, "copyOfLetterOfAppealNotification") && ( - <> + + + <> +
+
+ {"36. " + + t("myrepresentations:enf-section-question-36")} +
+ +
+ {repFormData.copyOfLetterOfAppealNotification} +
+ +
+ { + setRepresentationSubmit(false); + setShowQuestionnaireSection(7); + }} + > + {t("common:change-link-label")} + + {" "} + {/* {FieldsTranslations( + rows[0].value + )} */} + + +
+
+ {repFormData.copyOfLetterOfAppealNotification == "No" && (
- {"36. " + - t("myrepresentations:enf-section-question-36")} + {t( + "myrepresentations:questionnaire-evidence-label" + )}
- {repFormData.copyOfLetterOfAppealNotification} +
@@ -2219,55 +2142,54 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
- {repFormData.copyOfLetterOfAppealNotification == "No" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
+ )} + -
-
-
+ <> + - )} - - )} - {_.has(repFormData, "lpaEIAOS") && ( - <> + + + +
+ {repFormData.lpaEIAOS == "No" && (
- {"37. " + - t("myrepresentations:enf-section-question-37")} + {t( + "myrepresentations:questionnaire-evidence-label" + )}
- {repFormData.lpaEIAOS} +
@@ -2289,55 +2211,54 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
- {repFormData.lpaEIAOS == "No" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
+ )} + -
-
-
+ <> + - )} - - )} - {_.has(repFormData, "detailsOfOtherAppeals") && ( - <> + + + +
+ {repFormData.detailsOfOtherAppeals == "Yes" && (
- {"38. " + - t("myrepresentations:enf-section-question-38")} + {t( + "myrepresentations:questionnaire-evidence-label" + )}
- {repFormData.detailsOfOtherAppeals} +
@@ -2359,55 +2280,54 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
- {repFormData.detailsOfOtherAppeals == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
+ )} + -
-
-
+ <> + - )} - - )} - {_.has(repFormData, "detailsOfPreviousAppeals") && ( - <> + + + +
+ {repFormData.detailsOfPreviousAppeals == "Yes" && (
- {"39. " + - t("myrepresentations:enf-section-question-39")} + {t( + "myrepresentations:questionnaire-evidence-label" + )}
- {repFormData.detailsOfPreviousAppeals} +
@@ -2429,55 +2349,54 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
- {repFormData.detailsOfPreviousAppeals == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
+ )} + -
-
-
+ <> + - )} - - )} - {_.has(repFormData, "otherRelevantInformation") && ( - <> + + + +
+ {repFormData.otherRelevantInformation == "Yes" && (
- {"40. " + - t("myrepresentations:enf-section-question-40")} + {t( + "myrepresentations:questionnaire-evidence-label" + )}
- {repFormData.otherRelevantInformation} +
@@ -2486,7 +2405,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { href="#" onClick={() => { setRepresentationSubmit(false); - setShowQuestionnaireSection(7); + setShowQuestionnaireSection(); }} > {t("common:change-link-label")} @@ -2499,152 +2418,109 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
- {repFormData.otherRelevantInformation == "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
+ )} + -
-
-
- -
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
-
- )} - - )} {/* Section 9 Declaration */} <>

{t("myrepresentations:enf-section-heading-eight")}

- {_.has(repFormData, "signedDate") && ( - <> -
-
- {t( - "myrepresentations:enf-section-question-signed" - )} -
-
- {repFormData.caseOfficer} -
+ <> + - - )} - {_.has(repFormData, "caseOfficer") && ( - <> -
-
- {t( - "myrepresentations:s78-section-heading-date" - )} -
+ + + +
+ -
- {formatDates(repFormData.signedDate)} -
+ <> + - - )} - {_.has(repFormData, "onBehalfOfLPA") && ( - <> -
-
- {t( - "myrepresentations:enf-section-question-onbehalf" - )} -
+ + + +
+ -
- {repFormData.onBehalfOfLPA} -
+ <> + - - )} + + + +
+ ); From 597488641160621e14617b3cef93cbe2e048b515 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Mon, 20 Jan 2025 17:50:25 +0000 Subject: [PATCH 5/8] enf 17 --- ...resentationLPAQuestionnaire_enforcement.js | 86 +++++---- ...tationLPAQuestionnaireCheck_enforcement.js | 170 ++++++++---------- components/pdftemplates/enforcement_pdf.js | 92 ++++++---- 3 files changed, 179 insertions(+), 169 deletions(-) diff --git a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js index 097d44be..aa6155f8 100644 --- a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js +++ b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js @@ -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, @@ -124,10 +126,20 @@ let Enforcement_Questionnaire = (props) => { detailsObj.pinswg_siteaddresspostcode} +
+
+ 4. {t("myrepresentations:s78-section-question-4")}:{" "} + { + getFormCollectionByID( + currentView.caseReference.appealType + ).value + } +
+
{ { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "6. " + + "7. " + t( "myrepresentations:enf-section-question-6" ) @@ -225,7 +237,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "7. " + + "8. " + t( "myrepresentations:enf-section-question-7" ) @@ -254,7 +266,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "8. " + + "9. " + t( "myrepresentations:enf-section-question-8" ) @@ -278,7 +290,7 @@ let Enforcement_Questionnaire = (props) => { type="text" component={RenderRichMultiline} label={ - "9. " + + "10. " + t( "myrepresentations:enf-section-question-9" ) @@ -299,7 +311,7 @@ let Enforcement_Questionnaire = (props) => {
{ component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "11. " + + "12. " + t("myrepresentations:enf-section-question-11") } conditionalLabel={t( @@ -368,7 +380,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "12. " + + "13. " + t("myrepresentations:enf-section-question-12") } conditionalLabel={t( @@ -395,7 +407,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "13. " + + "14. " + t("myrepresentations:enf-section-question-13") } conditionalLabel={t( @@ -422,7 +434,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "14. " + + "15. " + t("myrepresentations:enf-section-question-14") } conditionalLabel={t( @@ -449,7 +461,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "15. " + + "16. " + t("myrepresentations:enf-section-question-15") } conditionalLabel={t( @@ -476,7 +488,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "16. " + + "17. " + t("myrepresentations:enf-section-question-16") } conditionalLabel={t( @@ -503,7 +515,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "17. " + + "18. " + t("myrepresentations:enf-section-question-17") } conditionalLabel={t( @@ -528,7 +540,7 @@ let Enforcement_Questionnaire = (props) => {
{
{
{ { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "22. " + + "23. " + t("myrepresentations:enf-section-question-22") } conditionalLabel={t( @@ -651,7 +663,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "23. " + + "24. " + t("myrepresentations:enf-section-question-23") } conditionalLabel={t( @@ -678,7 +690,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "24. " + + "25. " + t("myrepresentations:enf-section-question-24") } conditionalLabel={t( @@ -705,7 +717,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "25. " + + "26. " + t("myrepresentations:enf-section-question-25") } conditionalLabel={t( @@ -732,7 +744,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "26. " + + "27. " + t("myrepresentations:enf-section-question-26") } conditionalLabel={t( @@ -759,7 +771,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "27. " + + "28. " + t("myrepresentations:enf-section-question-27") } conditionalLabel={t( @@ -773,7 +785,7 @@ let Enforcement_Questionnaire = (props) => {
{ component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "29. " + + "30. " + t("myrepresentations:enf-section-question-29") } conditionalLabel={t( @@ -832,7 +844,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "30. " + + "31. " + t("myrepresentations:enf-section-question-30") } conditionalLabel={t( @@ -854,7 +866,7 @@ let Enforcement_Questionnaire = (props) => { {t("myrepresentations:enf-section-heading-six")}
- 31. {t("myrepresentations:enf-section-question-31")} + 32. {t("myrepresentations:enf-section-question-31")}
@@ -928,7 +940,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "32. " + + "33. " + t("myrepresentations:enf-section-question-32") } conditionalLabel={t( @@ -969,7 +981,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "33. " + + "34. " + t("myrepresentations:enf-section-question-33") } conditionalLabel={t( @@ -996,7 +1008,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "34. " + + "35. " + t("myrepresentations:enf-section-question-34") } conditionalLabel={t( @@ -1023,7 +1035,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "35. " + + "36. " + t("myrepresentations:enf-section-question-35") } conditionalLabel={t( @@ -1050,7 +1062,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "36. " + + "37. " + t("myrepresentations:enf-section-question-36") } conditionalLabel={t( @@ -1077,7 +1089,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "37. " + + "38. " + t("myrepresentations:enf-section-question-37") } conditionalLabel={t( @@ -1107,7 +1119,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "38. " + + "39. " + t("myrepresentations:enf-section-question-38") } conditionalLabel={t( @@ -1134,7 +1146,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "39. " + + "40. " + t("myrepresentations:enf-section-question-39") } conditionalLabel={t( @@ -1161,7 +1173,7 @@ let Enforcement_Questionnaire = (props) => { component={RenderLPACondtionalRadioList} validate={[required]} legend={ - "40. " + + "41. " + t("myrepresentations:enf-section-question-40") } conditionalLabel={t( diff --git a/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement.js b/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement.js index a4691883..6236ba0c 100644 --- a/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement.js +++ b/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement.js @@ -27,7 +27,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"4. " + + {"5. " + t("myrepresentations:enf-section-question-4")}
@@ -89,7 +89,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"5. " + + {"6. " + t("myrepresentations:enf-section-question-5")}
@@ -121,7 +121,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"6. " + + {"7. " + t("myrepresentations:enf-section-question-6")}
@@ -190,7 +190,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"7. " + + {"8. " + t("myrepresentations:enf-section-question-7")}
@@ -217,50 +217,50 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
- {repFormData.enterNeighbouringLandAccessRequired != - "Yes" && ( -
-
- {t( - "myrepresentations:questionnaire-evidence-label" - )} -
+ {repFormData.enterNeighbouringLandAccessRequired != "Yes" && + repFormData.enforcementNoticePlan != null && ( + - )} + + + +
+ )} <>
- {"8. " + + {"9. " + t("myrepresentations:enf-section-question-8")}
@@ -329,7 +329,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"9. " + + {"10. " + t("myrepresentations:enf-section-question-9")}
@@ -372,7 +372,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"10. " + + {"11. " + t("myrepresentations:enf-section-question-10")}
@@ -404,7 +404,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"11. " + + {"12. " + t("myrepresentations:enf-section-question-11")}
@@ -442,7 +442,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"12. " + + {"13. " + t( "myrepresentations:enf-section-question-12" )}{" "} @@ -513,7 +513,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"13. " + + {"14. " + t("myrepresentations:enf-section-question-13")}
@@ -582,7 +582,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"14. " + + {"15. " + t("myrepresentations:enf-section-question-14")}
@@ -651,7 +651,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"15. " + + {"16. " + t("myrepresentations:enf-section-question-15")}
@@ -720,7 +720,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"16. " + + {"17. " + t("myrepresentations:enf-section-question-16")}
@@ -789,7 +789,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"17. " + + {"18. " + t("myrepresentations:enf-section-question-17")}
@@ -864,7 +864,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"18. " + + {"19. " + t("myrepresentations:enf-section-question-18")}
@@ -901,7 +901,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"19. " + + {"20. " + t("myrepresentations:enf-section-question-19")}
@@ -938,7 +938,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"20. " + + {"21. " + t("myrepresentations:enf-section-question-20")}
@@ -976,7 +976,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"21. " + + {"22. " + t("myrepresentations:enf-section-question-21")}
@@ -1008,7 +1008,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"22. " + + {"23. " + t("myrepresentations:enf-section-question-22")}
@@ -1077,7 +1077,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"23. " + + {"24. " + t("myrepresentations:enf-section-question-23")}
@@ -1146,7 +1146,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"24. " + + {"25. " + t("myrepresentations:enf-section-question-24")}
@@ -1215,7 +1215,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"25. " + + {"26. " + t("myrepresentations:enf-section-question-25")}
@@ -1284,7 +1284,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"26. " + + {"27. " + t("myrepresentations:enf-section-question-26")}
@@ -1353,7 +1353,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"27. " + + {"28. " + t("myrepresentations:enf-section-question-27")}
@@ -1422,7 +1422,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"28. " + + {"29. " + t("myrepresentations:enf-section-question-28")}
@@ -1454,7 +1454,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"29. " + + {"30. " + t("myrepresentations:enf-section-question-29")}
@@ -1523,7 +1523,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"30. " + + {"31. " + t("myrepresentations:enf-section-question-30")}
@@ -1599,39 +1599,21 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {t("myrepresentations:enf-section-question-31a")} + 32. {t("myrepresentations:enf-section-question-31")}
{repFormData.developmentNotBeginLaterThanFiveYears}
-
- { - setRepresentationSubmit(false); - setShowQuestionnaireSection(6); - }} - > - {t("common:change-link-label")} - - {" "} - {/* {FieldsTranslations( - rows[0].value - )} */} - - -
+
<>
- 31 - {t("myrepresentations:enf-section-question-31a")} + a) {t("myrepresentations:enf-section-question-31a")}
@@ -1699,8 +1681,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- 31 - {t("myrepresentations:enf-section-question-31b")} + b) {t("myrepresentations:enf-section-question-31b")}
@@ -1731,8 +1712,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- 31 - {t("myrepresentations:enf-section-question-31c")} + c) {t("myrepresentations:enf-section-question-31c")}
@@ -1797,7 +1777,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- 32. {t("myrepresentations:enf-section-question-32")} + 33. {t("myrepresentations:enf-section-question-32")}
@@ -1870,7 +1850,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"33. " + + {"34. " + t("myrepresentations:enf-section-question-33")}
@@ -1939,7 +1919,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"34. " + + {"35. " + t("myrepresentations:enf-section-question-34")}
@@ -2009,7 +1989,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"35. " + + {"36. " + t("myrepresentations:enf-section-question-35")}
@@ -2079,7 +2059,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"36. " + + {"37. " + t("myrepresentations:enf-section-question-36")}
@@ -2148,7 +2128,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"37. " + + {"38. " + t("myrepresentations:enf-section-question-37")}
@@ -2217,7 +2197,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"38. " + + {"39. " + t("myrepresentations:enf-section-question-38")}
@@ -2286,7 +2266,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"39. " + + {"40. " + t("myrepresentations:enf-section-question-39")}
@@ -2355,7 +2335,7 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => { <>
- {"40. " + + {"41. " + t("myrepresentations:enf-section-question-40")}
diff --git a/components/pdftemplates/enforcement_pdf.js b/components/pdftemplates/enforcement_pdf.js index 20ce4a38..725aebf7 100644 --- a/components/pdftemplates/enforcement_pdf.js +++ b/components/pdftemplates/enforcement_pdf.js @@ -271,6 +271,24 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { {values.siteAddress} + + 4. + + {getTrans( + docProps.locale, + "s78-section-question-4" + )} + + + {appealTypeValue.value} + + @@ -302,7 +320,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 4. + 5. {getTrans( @@ -332,7 +350,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { marginBottom: 10, }} > - 5. + 6. {getTrans( docProps.locale, @@ -357,7 +375,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 6. + 7. {getTrans( @@ -394,7 +412,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 7. + 8. {getTrans( @@ -432,7 +450,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 8. + 9. {getTrans( @@ -467,7 +485,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 9. + 10. @@ -515,7 +533,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 10. + 11. {getTrans( @@ -542,7 +560,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 11. + 12. {getTrans( @@ -589,7 +607,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { marginBottom: 10, }} > - 12. + 13. {getTrans( docProps.locale, @@ -616,7 +634,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { marginBottom: 10, }} > - 13. + 14. {getTrans( docProps.locale, @@ -643,7 +661,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { marginBottom: 10, }} > - 14. + 15. {getTrans( docProps.locale, @@ -668,7 +686,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { marginBottom: 10, }} > - 15. + 16. {getTrans( docProps.locale, @@ -695,7 +713,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { marginBottom: 10, }} > - 16. + 17. {getTrans( docProps.locale, @@ -722,7 +740,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { marginBottom: 10, }} > - 17. + 18. {getTrans( docProps.locale, @@ -774,7 +792,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 18. + 19. {getTrans( @@ -803,7 +821,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 19. + 20. {getTrans( @@ -825,7 +843,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { marginBottom: 10, }} > - 20. + 21. {getTrans( docProps.locale, @@ -860,7 +878,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { marginBottom: 10, }} > - 21. + 22. {getTrans( docProps.locale, @@ -884,7 +902,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 22. + 23. {getTrans( @@ -917,7 +935,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 23. + 24. {getTrans( @@ -952,7 +970,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 24. + 25. {getTrans( @@ -987,7 +1005,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 25. + 26. {getTrans( @@ -1020,7 +1038,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 26. + 27. {getTrans( @@ -1055,7 +1073,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 27. + 28. {getTrans( @@ -1084,7 +1102,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { marginBottom: 10, }} > - 28. + 29. {getTrans( docProps.locale, @@ -1108,7 +1126,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 29. + 30. {getTrans( @@ -1143,7 +1161,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 30. + 31. {getTrans( @@ -1190,7 +1208,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { marginBottom: 10, }} > - 31. + 32. {getTrans( docProps.locale, @@ -1286,7 +1304,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 32. + 33. {getTrans( @@ -1339,7 +1357,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 33. + 34. {getTrans( @@ -1373,7 +1391,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 34. + 35. {getTrans( @@ -1408,7 +1426,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 35. + 36. {getTrans( @@ -1441,7 +1459,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 36. + 37. {getTrans( @@ -1477,7 +1495,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 37. + 38. {getTrans( @@ -1510,7 +1528,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 38. + 39. {getTrans( @@ -1546,7 +1564,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 39. + 40. {getTrans( @@ -1582,7 +1600,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { }} > - 40. + 41. {getTrans( From 89c7525ce9e77e053465356b9e858b78e5157910 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Tue, 21 Jan 2025 15:58:04 +0000 Subject: [PATCH 6/8] reps defect 19 --- components/search/addresssearchresults.js | 16 ++++++ components/search/searchresults.js | 10 +++- pages/api/endpoint/getadvancedsearch_api.js | 2 +- .../endpoint/getadvancedsearchpaged_api.js | 2 +- pages/api/endpoint/getbasicsearch_api.js | 2 +- .../getbasicsearch_by_address_api copy.js | 2 +- .../endpoint/getbasicsearch_by_address_api.js | 56 +++++++++++++++---- pages/api/endpoint/getbasicsearchpaged_api.js | 2 +- pages/api/endpoint/getincidentbyid_api.js | 2 +- pages/api/endpoint/getpartsavedappeal_api.js | 2 +- 10 files changed, 74 insertions(+), 22 deletions(-) diff --git a/components/search/addresssearchresults.js b/components/search/addresssearchresults.js index 88bcec57..ae86a26f 100644 --- a/components/search/addresssearchresults.js +++ b/components/search/addresssearchresults.js @@ -449,6 +449,22 @@ const SearchResults = (props) => { )} : + {_.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", ]) diff --git a/components/search/searchresults.js b/components/search/searchresults.js index 3fa9bc7d..fe0df954 100644 --- a/components/search/searchresults.js +++ b/components/search/searchresults.js @@ -407,9 +407,13 @@ const SearchResults = (props) => { )} : - {_.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" ] diff --git a/pages/api/endpoint/getadvancedsearch_api.js b/pages/api/endpoint/getadvancedsearch_api.js index 6ca190aa..46f9d442 100644 --- a/pages/api/endpoint/getadvancedsearch_api.js +++ b/pages/api/endpoint/getadvancedsearch_api.js @@ -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"; diff --git a/pages/api/endpoint/getadvancedsearchpaged_api.js b/pages/api/endpoint/getadvancedsearchpaged_api.js index 2c4697c9..26626c19 100644 --- a/pages/api/endpoint/getadvancedsearchpaged_api.js +++ b/pages/api/endpoint/getadvancedsearchpaged_api.js @@ -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 + diff --git a/pages/api/endpoint/getbasicsearch_api.js b/pages/api/endpoint/getbasicsearch_api.js index a9717514..0c5567a5 100644 --- a/pages/api/endpoint/getbasicsearch_api.js +++ b/pages/api/endpoint/getbasicsearch_api.js @@ -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 + diff --git a/pages/api/endpoint/getbasicsearch_by_address_api copy.js b/pages/api/endpoint/getbasicsearch_by_address_api copy.js index 6f02c6e8..e1486ddf 100644 --- a/pages/api/endpoint/getbasicsearch_by_address_api copy.js +++ b/pages/api/endpoint/getbasicsearch_by_address_api copy.js @@ -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"; diff --git a/pages/api/endpoint/getbasicsearch_by_address_api.js b/pages/api/endpoint/getbasicsearch_by_address_api.js index 674d4965..e2536d88 100644 --- a/pages/api/endpoint/getbasicsearch_by_address_api.js +++ b/pages/api/endpoint/getbasicsearch_by_address_api.js @@ -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"; diff --git a/pages/api/endpoint/getbasicsearchpaged_api.js b/pages/api/endpoint/getbasicsearchpaged_api.js index 055421d3..55c2266a 100644 --- a/pages/api/endpoint/getbasicsearchpaged_api.js +++ b/pages/api/endpoint/getbasicsearchpaged_api.js @@ -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 + diff --git a/pages/api/endpoint/getincidentbyid_api.js b/pages/api/endpoint/getincidentbyid_api.js index b74e1c93..2f2f7d7d 100644 --- a/pages/api/endpoint/getincidentbyid_api.js +++ b/pages/api/endpoint/getincidentbyid_api.js @@ -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"; diff --git a/pages/api/endpoint/getpartsavedappeal_api.js b/pages/api/endpoint/getpartsavedappeal_api.js index 6823a08e..1da8e3ee 100644 --- a/pages/api/endpoint/getpartsavedappeal_api.js +++ b/pages/api/endpoint/getpartsavedappeal_api.js @@ -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 + From 32a3542f79c7f7c958e4da98f3f30778c4726cb2 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Tue, 21 Jan 2025 16:04:52 +0000 Subject: [PATCH 7/8] rep defect 42,questioinnaire defect 67, enf defect 16 --- components/case/representation/index.js | 4 +- .../representation/representationElements.js | 11 +++- components/case/summary.js | 10 ++- components/newappeal/buildsection.js | 4 +- components/utils/index.js | 64 +++++++++++++++++++ 5 files changed, 87 insertions(+), 6 deletions(-) diff --git a/components/case/representation/index.js b/components/case/representation/index.js index 0a8f8245..bd8b4a37 100644 --- a/components/case/representation/index.js +++ b/components/case/representation/index.js @@ -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"); diff --git a/components/case/representation/representationElements.js b/components/case/representation/representationElements.js index 0ada8933..fd97ae60 100644 --- a/components/case/representation/representationElements.js +++ b/components/case/representation/representationElements.js @@ -16,7 +16,16 @@ import { getFilesFromBlobproxy, } from "../../../actions"; -const ReactQuill = dynamic(() => import("react-quill-new"), { ssr: false }); +const LoadingMessage = () =>
Loading the editor...
; + +// Dynamically import ReactQuill with a proper loading state +const ReactQuill = dynamic( + () => import("react-quill-new").then((mod) => mod.default), + { + ssr: false, + loading: () => , // This is valid as long as it's a valid React component + } +); import { useDispatch } from "react-redux"; // Import the useDispatch hook import { diff --git a/components/case/summary.js b/components/case/summary.js index 4c838f75..44f0201e 100644 --- a/components/case/summary.js +++ b/components/case/summary.js @@ -258,9 +258,13 @@ const CaseSummary = (props) => { : t("case:summary-applicant-label")}
- {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"}
{detailsObj.pinswg_agentcontactname != null && diff --git a/components/newappeal/buildsection.js b/components/newappeal/buildsection.js index 98c000c2..91498eb0 100644 --- a/components/newappeal/buildsection.js +++ b/components/newappeal/buildsection.js @@ -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; diff --git a/components/utils/index.js b/components/utils/index.js index a684a3a7..51280560 100644 --- a/components/utils/index.js +++ b/components/utils/index.js @@ -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 tag, return it as is + if (match.includes(' tag + return `${match}`; + } + ) + .replace( + /]*>]*>(.*?)<\/a><\/a>/g, + (match, innerContent) => { + return `${innerContent}`; + } + ); + }; + // Helper function to ensure that any href attributes in tags have https/http + const ensureHttpsInLinks = (inputString) => { + // Match tags with href attributes and check if they lack a scheme (http:// or https://) + return inputString.replace( + /]*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; +}; From 7d1d34fc4fd9c4f1f76442acf491ac20151ce8bd Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Tue, 21 Jan 2025 16:16:02 +0000 Subject: [PATCH 8/8] enf defect 22,questionnaire defect 68 --- .../representationLPAQuestionnaire_enforcement.js | 5 +++++ .../representationLPAQuestionnaire_s78.js | 5 +++++ locales/cy/myrepresentations.json | 3 ++- locales/en/myrepresentations.json | 3 ++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js index aa6155f8..6eab993f 100644 --- a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js +++ b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js @@ -97,6 +97,11 @@ let Enforcement_Questionnaire = (props) => {

Enforcement Questionnaire

+ +

+ {t("myrepresentations:questionnaire-hint-para")} +

+

{t("myrepresentations:enf-section-heading-one")}{" "}

diff --git a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js index c60b81f8..3eaf275d 100644 --- a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js +++ b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js @@ -115,9 +115,14 @@ let S78_Questionnaire = (props) => { className="govuk-fieldset" aria-describedby="commentBox-hint" > +

+ {t("myrepresentations:questionnaire-hint-para")} +

+

{t("myrepresentations:s78-section-heading-one")}{" "}

+
1. {t("myrepresentations:s78-section-question-1")}:{" "} diff --git a/locales/cy/myrepresentations.json b/locales/cy/myrepresentations.json index 75cf766a..5a6e4fd8 100644 --- a/locales/cy/myrepresentations.json +++ b/locales/cy/myrepresentations.json @@ -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'." } \ No newline at end of file diff --git a/locales/en/myrepresentations.json b/locales/en/myrepresentations.json index 4d58fa7b..dad58c6c 100644 --- a/locales/en/myrepresentations.json +++ b/locales/en/myrepresentations.json @@ -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." } \ No newline at end of file