From c7e13f84e70950f0eb652994a54d79ced352a503 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Tue, 3 Dec 2024 11:46:59 +0000 Subject: [PATCH 1/2] limit to three on portal cards --- components/myportal/topthree.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/myportal/topthree.js b/components/myportal/topthree.js index a1ccd21d..f151fc08 100644 --- a/components/myportal/topthree.js +++ b/components/myportal/topthree.js @@ -167,7 +167,7 @@ const TopThree = (props) => { } }; - let topThreeOnlyArr = showTopThreeArr; //.slice(0, 3); + let topThreeOnlyArr = showTopThreeArr.slice(0, 3); Object.keys(topThreeOnlyArr).map((key, index) => { topthreeRow.push(
From 49d39e052eef820f3a3b9ca458e332052f934b83 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Tue, 3 Dec 2024 18:27:51 +0000 Subject: [PATCH 2/2] questionnaire for callins and uploads --- actions/selectQueryTypes.js | 2 +- components/breadcrumbs.js | 87 +++++++++++-- components/case/representation/index.js | 26 ++-- .../representationCompleteSubmit.js | 121 ++++++++++-------- .../representation/representationElements.js | 67 ++-------- .../case/representation/representationLPA.js | 4 + ...resentationLPAQuestionnaire_enforcement.js | 4 +- .../case/summaryTypes/pinswg_callinss77id.js | 6 +- components/representation.js | 6 + data/formsxml/planningappeals78.xml | 2 +- locales/en/myrepresentations.json | 30 ++--- pages/myportal/representation.js | 19 ++- store/currentView/action.js | 2 +- store/currentView/reducer.js | 4 +- 14 files changed, 220 insertions(+), 160 deletions(-) diff --git a/actions/selectQueryTypes.js b/actions/selectQueryTypes.js index 491e47f1..b39755bf 100644 --- a/actions/selectQueryTypes.js +++ b/actions/selectQueryTypes.js @@ -4,7 +4,7 @@ export const getSelectQuery = (appealTypeName) => { return "&$select=pinswg_speacialistcaseprocess,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_procedure,pinswg_questionnaireduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_startdate,pinswg_otherpartiesstatement,pinswg_finalcommentsduedate,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_speacialistcaseprocess,pinswg_statementduedate"; break; case "pinswg_callinss77s": - return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_startdate,statuscode,pinswg_dateexportedtoiss,pinswg_startdateofevent,pinswg_typeofevent"; + return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_startdate,statuscode,pinswg_dateexportedtoiss,pinswg_startdateofevent,pinswg_typeofevent,pinswg_statementsduedate"; break; case "pinswg_commonlands": return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_starttimeoftheevent,pinswg_typeofevent,pinswg_statementsduedate"; diff --git a/components/breadcrumbs.js b/components/breadcrumbs.js index ae801038..eacd6089 100644 --- a/components/breadcrumbs.js +++ b/components/breadcrumbs.js @@ -27,6 +27,23 @@ const Breadcrumbs = (props) => { const { data: session, status } = useSession(); + const qcount = + currentView.caseReference.appealType == 846040000 || + currentView.caseReference.appealType == 846040001 || + currentView.caseReference.appealType == 846040006 || + currentView.caseReference.appealType == 846040025 || + currentView.caseReference.appealType == 846040004 || + currentView.caseReference.appealType == 846040018 || + currentView.caseReference.appealType == 846040003 || + currentView.caseReference.appealType == 846040009 || + currentView.caseReference.appealType == 846040008 + ? 7 + : currentView.caseReference.appealType == 846040005 || + currentView.caseReference.appealType == 846040006 || + currentView.caseReference.appealType == 846040007 + ? 9 + : ""; + return ( <>
- {whichQuestionnaireCheck()} + {repFormData.representationType == + "Questionnaire" + ? whichQuestionnaireCheck() + : ""}

{t( diff --git a/components/case/representation/representationElements.js b/components/case/representation/representationElements.js index 4e42dd4f..bf45b64c 100644 --- a/components/case/representation/representationElements.js +++ b/components/case/representation/representationElements.js @@ -494,7 +494,9 @@ export const RenderPickList = ({ disabled={custom.disabled} // onChange={onChange} > - + {Object.keys(optionsArr).map((key, index) => { return (

- )} */} + )} {blobList.map((blob, i) => (
{ case 846040003: case 846040009: case 846040008: + case 846040010: case 846040017: return ( { type="submit" className="govuk-button" data-module="govuk-button" + onClick={() => { + setRepresentationSubmit(true); + }} > {t("common:continue-button")} diff --git a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js index 7783a88a..b0fc7a30 100644 --- a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js +++ b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js @@ -87,7 +87,9 @@ let Enforcement_Questionnaire = (props) => { aria-describedby="commentBox-hint" >

- Enforcement_Questionnaire{" "} + Enforcement Questionnaire +

+

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

diff --git a/components/case/summaryTypes/pinswg_callinss77id.js b/components/case/summaryTypes/pinswg_callinss77id.js index fe03ca96..bb649b14 100644 --- a/components/case/summaryTypes/pinswg_callinss77id.js +++ b/components/case/summaryTypes/pinswg_callinss77id.js @@ -313,13 +313,13 @@ const Pinswg_callinss77id = (props) => {
{_.has( detailsObj, - "pinswg_statementduedate" + "pinswg_statementsduedate" ) ? !_.isEmpty( - detailsObj.pinswg_statementduedate + detailsObj.pinswg_statementsduedate ) ? formatDates( - detailsObj.pinswg_statementduedate + detailsObj.pinswg_statementsduedate ) : t( "case:summary-no-date-entered-label" diff --git a/components/representation.js b/components/representation.js index 8cc7d005..0f4495b1 100644 --- a/components/representation.js +++ b/components/representation.js @@ -27,6 +27,12 @@ const CaseRepresentation = (props) => { searchDetailsObj={props.searchDetailsObj} searchString={props.searchString} props={props.props} + showQuestionnaireSection={ + props.showQuestionnaireSection + } + setShowQuestionnaireSection={ + props.setShowQuestionnaireSection + } />
diff --git a/data/formsxml/planningappeals78.xml b/data/formsxml/planningappeals78.xml index afb9a268..33a5df56 100644 --- a/data/formsxml/planningappeals78.xml +++ b/data/formsxml/planningappeals78.xml @@ -148,7 +148,7 @@ - + diff --git a/locales/en/myrepresentations.json b/locales/en/myrepresentations.json index 5fd5ee1a..7f5aca3c 100644 --- a/locales/en/myrepresentations.json +++ b/locales/en/myrepresentations.json @@ -40,10 +40,10 @@ "rep-complete-para-three": "You will shortly receive confirmation to the email address you have provided.", "lpa-capacity-para-one": "This form enables you to submit statements, comments and questionaires on a case to Planning and Environment Decisions Wales.", "s78-section-heading-one": "Appeal procedure and site visit", - "s78-section-question-1": "PEDW Reference: ", - "s78-section-question-2": "LPA reference:", - "s78-section-question-4": "Appeal type:", - "s78-section-question-3": "Site Address: ", + "s78-section-question-1": "PEDW Reference", + "s78-section-question-2": "LPA reference", + "s78-section-question-4": "Appeal type", + "s78-section-question-3": "Site Address", "s78-section-question-5": "Which procedure do you consider the appeal should follow?", "s78-section-question-6": "Will the Inspector need to enter the appeal site/property?", "s78-section-question-7": "Do you consider that the Inspector needs to enter neighbouring private land/property to view the site?", @@ -52,11 +52,11 @@ "s78-section-question-8-hint": "If No, give reasons for why you consider an Accompanied Site Visit to be necessary", "s78-section-question-9": "Are you aware of any health and safety issues which would need to be considered when the Inspector visits the site?", "s78-section-question-9-hint": "If Yes, describe the health and safety issues to be considered", - "s78-section-question-10": "LPA contact for site visit, hearing or inquiry arrangements:", + "s78-section-question-10": "LPA contact for site visit, hearing or inquiry arrangements", "s78-section-heading-two": "Supporting documents", "s78-section-question-11": "LPA case file and representations", "s78-section-question-11-hint": "Insert weblink(s) to case file and representations on the LPA’s public portal. This must include all documents which were before the LPA at the time of its decision or when the appeal was made. Ensure that you link directly to the case documents list, not to a generic page on the LPA’s portal. If web-based comments were also made, insert a second link to that page. Alternatively, state here if you are sending relevant case file documents under separate cover.", - "s78-section-question-12": "LPA’s adopted local development plan and Proposals Map:", + "s78-section-question-12": "LPA’s adopted local development plan and Proposals Map", "s78-section-question-12-hint": "Insert weblinks to the Written Statement of the adopted LDP/UDP, and the accompanying Proposals Map (including map key). Alternatively, list relevant policies here and attach excerpts.", "s78-section-question-13": "Adopted local guidance relevant to the proposal", "s78-section-question-13-hint": "Insert weblink(s) to any relevant any local guidance (e.g. Supplementary Planning Guidance, Conservation Area appraisals) which the LPA considers relevant, specifying the document name before the web link. Alternatively, list the relevant guidance and attach copies/excerpts.", @@ -79,7 +79,7 @@ "s78-section-question-23": "Have you received comments or directions from any government department/agency or statutory undertaker, including in response to a statutory notification or consultation?", "s78-section-question-23-hint": "If Yes, specify which and attach any relevant details", "s78-section-heading-four": "Suggested conditions", - "s78-section-question-24": "Review the following standard conditions and advise whether they would be necessary if permission/consent is granted (not applicable to Advertisement consent proposals):", + "s78-section-question-24": "Review the following standard conditions and advise whether they would be necessary if permission/consent is granted (not applicable to Advertisement consent proposals)", "s78-section-question-24a": "a) The development shall begin not later than five years from the date of this decision. Reason: To comply with Section 91 of the Town and Country Planning Act 1990 / Section 18 of the Town and Country Planning (Listed Building and Conservation Areas) Act 1990.", "s78-section-question-24b": "b) 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.", "s78-section-question-24b-hint": "If Yes, list the approved plans, documents and drawings here or list them in an attached document", @@ -87,7 +87,7 @@ "s78-section-question-24d": "d) No development shall take place until a scheme to enable the provision of gigabit capable broadband infrastructure from the site boundary to the dwellings/buildings hereby permitted has been submitted to and agreed in writing by the local planning authority. Development shall be carried out in accordance with the approved details. Reason: To support the roll-out of digital communications infrastructure across Wales in accordance with Policy 13 of Future Wales.", "s78-section-question-25": "Do you consider other conditions, or amended versions of the above standard conditions, to be necessary?", "s78-section-question-25-hint": "If Yes, list them here or in an attached document. Include reasons and relevant development plan policies. If you intend to send suggested conditions alongside your 4 week statement, state this here.", - "s78-section-heading-five": "Before sending, have you attached or provided a web link to:", + "s78-section-heading-five": "Before sending, have you attached or provided a web link to", "s78-section-question-26": "A copy of the applicant’s certificate confirming that they notified persons with an interest in the land?", "s78-section-question-26-hint": "Insert weblink here if available online. If No, give reasons", "s78-section-question-27": "Evidence of any publicity given to the application, including site notices and local advertisement?**", @@ -110,9 +110,9 @@ "s78-section-question-onbehalf": "On behalf of", "s78-section-question-date": "Date", "enf-section-heading-one": "Appeal procedure and site visit", - "enf-section-question-1": "PEDW Reference: ", - "enf-section-question-2": "LPA reference:", - "enf-section-question-3": "Site Address: ", + "enf-section-question-1": "PEDW Reference", + "enf-section-question-2": "LPA reference", + "enf-section-question-3": "Site Address", "enf-section-question-4": "Which procedure do you consider the appeal should follow?", "enf-section-question-4-hint": "If Hearing or Inquiry, provide reasons here for why you consider this to be justified. If you consider an Inquiry is necessary, please state your estimated number of sitting days.", "enf-section-question-5": "Will the Inspector need to enter the appeal site/property?", @@ -122,7 +122,7 @@ "enf-section-question-7-hint": "If No, give reasons for why you consider an Accompanied Site Visit to be necessary", "enf-section-question-8": "Are you aware of any health and safety issues which would need to be considered when the Inspector visits the site?", "enf-section-question-8-hint": "If Yes, describe the health and safety issues to be considered", - "enf-section-question-9": "LPA contact for site visit, hearing or inquiry arrangements:", + "enf-section-question-9": "LPA contact for site visit, hearing or inquiry arrangements", "enf-section-question-9-hint": "If Yes, describe the health and safety issues to be considered", "enf-section-heading-two": "Deemed Application Fee", "enf-section-question-10": "Has the local planning authority received the correct fee payable in relation to this appeal for the deemed planning application/ground (a) to be considered?", @@ -142,7 +142,7 @@ "enf-section-question-17": "Have permitted development rights been restricted by any previous planning condition?", "enf-section-question-17-hint": "If Yes, please provide details and submit any relevant documents, listing them here.", "enf-section-heading-four": "Supporting Documents", - "enf-section-question-18": "LPA’s adopted local development plan and Proposals Map:", + "enf-section-question-18": "LPA’s adopted local development plan and Proposals Map", "enf-section-question-18-hint": "Insert weblinks to the Written Statement of the adopted LDP/UDP, and the accompanying Proposals Map (including map key). Alternatively, list relevant policies here and attach excerpts.", "enf-section-question-19": "Adopted local guidance relevant to the proposal", "enf-section-question-19-hint": "Insert weblink(s) to any relevant any local guidance (e.g. Supplementary Planning Guidance, Conservation Area appraisals) which the LPA considers relevant, specifying the document name before the web link. Alternatively, list the relevant guidance and attach copies/excerpts.", @@ -167,14 +167,14 @@ "enf-section-question-30": "Have you received comments or directions from any government department/agency or statutory undertaker, including in response to a statutory notification or consultation?", "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-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-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-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:", + "enf-section-heading-seven": "Before sending, have you attached or provided a web link to", "enf-section-question-33": "A true copy of the enforcement notice?", "enf-section-question-33-hint": "Insert weblink here if available online. If No, give reasons", "enf-section-question-34": "The enforcement notice plan.", diff --git a/pages/myportal/representation.js b/pages/myportal/representation.js index d8b417fe..56e54c9a 100644 --- a/pages/myportal/representation.js +++ b/pages/myportal/representation.js @@ -1,6 +1,6 @@ import useTranslation from "next-translate/useTranslation"; import Head from "next/head"; -import { useEffect } from "react"; +import { useEffect, useState } from "react"; import { getSession, useSession } from "next-auth/react"; import { useRouter } from "next/router"; @@ -60,6 +60,8 @@ const RepresentationF = (props) => { const dispatch = useDispatch(); + const [showQuestionnaireSection, setShowQuestionnaireSection] = useState(1); + // useEffect(() => { // const updateAccountStore = async () => { // const thisSession = await getSession(); @@ -158,7 +160,14 @@ const RepresentationF = (props) => {
- + { props.searchResultsObj.representationsObj } props={props} + setShowQuestionnaireSection={ + setShowQuestionnaireSection + } + showQuestionnaireSection={showQuestionnaireSection} />