From 2612b5e7434fb77f9a879e396046aee8a9e28d14 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Thu, 31 Oct 2024 09:48:38 +0000 Subject: [PATCH] finalised copy changes as per gel review --- .env.local | 22 +++++++----- components/azureappinsights.js | 4 ++- components/breadcrumbs.js | 43 ++++++++++++++++++++++- components/case/summary.js | 2 +- components/elements/index.js | 28 +++++++++++++++ components/myportal/topthree.js | 12 ++++--- data/crmfieldlookuptranslations.json | 8 ++--- locales/cy/newappeal.json | 15 +++++--- locales/en/newappeal.json | 13 ++++--- pages/api/endpoint/getwatchedcases_api.js | 9 +++++ pages/case/[ticketnumber].js | 27 ++++++++------ pages/myportal/case/[ticketnumber].js | 8 ++++- 12 files changed, 149 insertions(+), 42 deletions(-) diff --git a/.env.local b/.env.local index 9e58a99d..f47e7a34 100644 --- a/.env.local +++ b/.env.local @@ -21,12 +21,12 @@ RELAYPATH = "ar-hc-lz-pedw-dev-uks-01" CRMURL = "devcrm2016.llcdt.gov.wales/DVPINS" //New Test -CLIENT_ID = d40b9373-96c2-4b04-8bd8-c2a2fe6444c1 -CLIENT_SECRET = 6hT8Q~glL~jloWpGmvXw3UY37QFwjUE0r._jobEM -RELAY_ROOT = https://ar-ns-lz-pedw-test-uks-01.servicebus.windows.net/ar-hc-lz-pedw-test-uks-01/ -RELAYURI = "ar-ns-lz-pedw-test-uks-01.servicebus.windows.net" -RELAYPATH = "ar-hc-lz-pedw-test-uks-01" -CRMURL = "tscrm2016.llcdt.gov.wales/UATPINS" +# CLIENT_ID = d40b9373-96c2-4b04-8bd8-c2a2fe6444c1 +# CLIENT_SECRET = 6hT8Q~glL~jloWpGmvXw3UY37QFwjUE0r._jobEM +# RELAY_ROOT = https://ar-ns-lz-pedw-test-uks-01.servicebus.windows.net/ar-hc-lz-pedw-test-uks-01/ +# RELAYURI = "ar-ns-lz-pedw-test-uks-01.servicebus.windows.net" +# RELAYPATH = "ar-hc-lz-pedw-test-uks-01" +# CRMURL = "tscrm2016.llcdt.gov.wales/UATPINS" //Preprod Oauth WGO //CLIENT_ID = ab6c4678-b31a-4eb3-b429-e039120e488a @@ -103,9 +103,9 @@ AZURE_STORAGE_ACCOUNT_KEY = MmrsrCjBfop9pI2oImsP/+lJUWU2DrXsAB8nq5bOVROTmPovSGxj AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwdevuks.blob.core.windows.net // New test key -AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwtestuks" -AZURE_STORAGE_ACCOUNT_KEY = bqJAz5pYQVGee8dnVhlsqW+xHwinNTjgY2AmojNyB+d4uAotMR20WcO4Op13yB+9dFaXAkkjtIA4+AStHT/IYg== -AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwtestuks.blob.core.windows.net +# AZURE_STORAGE_ACCOUNT_NAME = "sapltpedwtestuks" +# AZURE_STORAGE_ACCOUNT_KEY = bqJAz5pYQVGee8dnVhlsqW+xHwinNTjgY2AmojNyB+d4uAotMR20WcO4Op13yB+9dFaXAkkjtIA4+AStHT/IYg== +# AZURE_PEDW_STORAGE_ENDPOINT = https://sapltpedwtestuks.blob.core.windows.net // preprod key @@ -132,6 +132,10 @@ SHOW_DEBUG = true // DEV Connection string //NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=4b7568b3-70bd-4591-9dc2-267c0a6501d1;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=447d38b5-5d40-4238-8fb3-0ef4741b3db1 + +APPLICATIONINSIGHTS_CONNECTIONSTRING = InstrumentationKey=7a06e24a-793c-47bc-8987-ce80f180e035;IngestionEndpoint=https://uksouth-1.in.applicationinsights.azure.com/;LiveEndpoint=https://uksouth.livediagnostics.monitor.azure.com/;ApplicationId=9906b6d0-b791-4add-8d53-c827a534e1d4 + + // Test Connection string //NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=cc60e8e7-5b30-4c2b-a176-8b96b21b12df;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=2a4094be-6fd1-46ab-a67d-5f241692b129 diff --git a/components/azureappinsights.js b/components/azureappinsights.js index 769130f1..b13cb279 100644 --- a/components/azureappinsights.js +++ b/components/azureappinsights.js @@ -9,7 +9,9 @@ import { let reactPlugin = new ReactPlugin(); let appInsights = new ApplicationInsights({ config: { - connectionString: process.env.NEXT_PUBLIC_APP_INSIGHT, + connectionString: + process.env.APPLICATIONINSIGHTS_CONNECTIONSTRING || + process.env.NEXT_PUBLIC_APP_INSIGHT, enableAutoRouteTracking: true, enableCorsCorrelation: true, enableRequestHeaderTracking: true, diff --git a/components/breadcrumbs.js b/components/breadcrumbs.js index 9f8f0a14..9b1ac7f0 100644 --- a/components/breadcrumbs.js +++ b/components/breadcrumbs.js @@ -504,6 +504,27 @@ const Breadcrumbs = (props) => { )} {router.pathname == "/case/[ticketnumber]" && ( <> +
  • + + {t("common:breadcrumb-search-results")} + +
  • {t("common:breadcrumb-case-reference")}:{" "} { @@ -628,7 +649,6 @@ const Breadcrumbs = (props) => { )} {router.pathname == "/myportal/case/[ticketnumber]" && ( <> - {" "}
  • { {t("common:breadcrumb-my-portal")}
  • +
  • + + {t("common:breadcrumb-search-results")} + +
  • {t("common:breadcrumb-case-reference")}:{" "} { diff --git a/components/case/summary.js b/components/case/summary.js index 44771adb..fa070a61 100644 --- a/components/case/summary.js +++ b/components/case/summary.js @@ -148,7 +148,7 @@ const CaseSummary = (props) => { : props[currentType]; let setCaseDetailsObj = currentType == "directResultsObj" - ? props.searchResultsObj.searchDetailsObj + ? props.searchDetailsObj : props[currentType + "Details"]; var casesObj = {}; diff --git a/components/elements/index.js b/components/elements/index.js index a7748b4c..e0270579 100644 --- a/components/elements/index.js +++ b/components/elements/index.js @@ -120,11 +120,39 @@ export function Textfield(props) {

    {t("newappeal:new-appeal-introduction-paragraph")}

    +
      +
    • + {t( + "newappeal:new-appeal-introduction-paragraph-bullet-one" + )} +
    • +
    • + {t( + "newappeal:new-appeal-introduction-paragraph-bullet-two" + )} +
    • +
    +

    + {t("newappeal:new-appeal-introduction-paragraph-two")} +

    +

    {t( "newappeal:new-appeal-introduction-warning-paragraph" )}

    +
      +
    • + {t( + "newappeal:new-appeal-introduction-warning-bullet-one" + )} +
    • +
    • + {t( + "newappeal:new-appeal-introduction-warning-bullet-two" + )} +
    • +
    ); diff --git a/components/myportal/topthree.js b/components/myportal/topthree.js index babe7644..9747fa94 100644 --- a/components/myportal/topthree.js +++ b/components/myportal/topthree.js @@ -323,11 +323,13 @@ const TopThree = (props) => { ) : ( "" )} -
    - {t("myportal:date-raised")}: - {" "} - {raisedDate(showTopThreeArr[key].createdon)} -
    {" "} + {topThreeType != "watchedCases" && ( +
    + {t("myportal:date-raised")}: + {" "} + {raisedDate(showTopThreeArr[key].createdon)} +
    + )} {topThreeType == "watchedCases" && props.myReps && showTopThreeArr[key].pinswg_representationsubmitted != diff --git a/data/crmfieldlookuptranslations.json b/data/crmfieldlookuptranslations.json index 814c3f5d..17d3b8a7 100644 --- a/data/crmfieldlookuptranslations.json +++ b/data/crmfieldlookuptranslations.json @@ -2169,16 +2169,16 @@ "value_cy": "Tystysgrif perchnogaeth" }, { - "value": "We need to know who owns the appeal site. If you do not own the appeal site or if you own only part of it, we need to know the name(s) of the owner(s) or part owner(s). We also need to be sure that the other owner(s) know that you have made an appeal. Please refer to the guidance notes on completing this section.", - "value_cy": "Mae angen i ni wybod pwy sy'n berchen ar safle'r apźl. Os nad ydych yn berchen ar safle'r apźl neu os mai dim ond rhan ohono rydych yn berchen arno, mae angen i ni wybod enw(au) y perchennog(perchnogion) neu'r rhan-berchennog/perchnogion. Mae angen i ni hefyd fod yn siŵr bod y perchennog/perchnogion eraill yn gwybod eich bod wedi gwneud apêl. Cyfeiriwch at y nodiadau canllaw ar lenwi'r adran hon." + "value": "We need to know who owns the appeal site or part of it, and that all owners know you have made an appeal. Use the guidance notes to complete this section.", + "value_cy": "Mae angen i ni wybod pwy sy'n berchen ar safle'r apźl neu ran ohono, a bod pob perchennog yn gwybod eich bod wedi gwneud apźl. Defnyddiwch y nodiadau canllaw i gwblhau'r adran hon." }, { "value": "Not applicable", "value_cy": "Amherthnasol" }, { - "value": "Certificate A - (If you are the sole owner of the whole appeal site, certificate A applies). I certify that, on the day 21 days before the date of this appeal, nobody except the appellant, was the owner (see the guidance leaflet for a definition) of any part of the land to which the appeal relates", - "value_cy": "Tystysgrif A - (Os mai chi yw unig berchennog safle cyfan yr apźl, mae tystysgrif A yn gymwys). Tystiaf, ar y diwrnod 21 diwrnod cyn dyddiad yr apêl hon, nad oedd neb ac eithrio'r apelydd, yn berchennog (gweler y daflen arweiniad am ddiffiniad) unrhyw ran o'r tir y mae'r apêl yn ymwneud ag ef" + "value": "Certificate A - (for sole owners of the appeal site). I certify that, on the day 21 days before the date of this appeal, nobody except the appellant, was the owner (see the guidance leaflet for a definition) of any part of the land to which the appeal relates", + "value_cy": "Tystysgrif A - (ar gyfer unig berchnogion safle'r apęl). Tystiaf, ar y diwrnod 21 diwrnod cyn dyddiad yr apêl hon, nad oedd neb heblaw’r apelydd yn berchennog (gweler y daflen arweiniad am ddiffiniad) unrhyw ran o’r tir y mae’r apêl yn ymwneud ag ef." }, { "value": "Certificate B - I certify that the appellant (or the agent) has given the requisite notice (see the guidance leaflet) to everyone else who, on the day 21 days before the date of this appeal, was the owner (see the guidance leaflet for a definition) of any part of the land to which the appeal relates, as listed below:", diff --git a/locales/cy/newappeal.json b/locales/cy/newappeal.json index ad6551a6..2f55da74 100644 --- a/locales/cy/newappeal.json +++ b/locales/cy/newappeal.json @@ -52,13 +52,18 @@ "about-you-communication-disclaimer-label": "Bydd cyfathrebu trwy e-bost. Cysylltwch â ni os byddai'n well gennych gyfathrebu drwy'r post.", "new-appeal-progress-nav-label": "Cynnydd", "new-appeal-documentlist-nav": "Angen dogfen", - "new-appeal-introduction-paragraph": "Mae’r ffurflen hon ar gyfer apelio yn erbyn penderfyniad i wrthod cais cynllunio, yn erbyn penderfyniad i ganiatáu cais gydag amodau yr ydych yn eu gwrthwynebu, neu yn erbyn methiant yr Awdurdod Cynllunio Lleol i roi penderfyniad o fewn y cyfnod priodol, heb gynnwys Deiliad Tai. ceisiadau.", - "new-appeal-introduction-warning-paragraph": "RHYBUDD: Rhaid i’ch apêl gyrraedd Penderfyniadau Cynllunio ac Amgylchedd Cymru o fewn 6 mis i ddyddiad hysbysiad o benderfyniad yr awdurdod cynllunio lleol. (NODER: Os na fyddwn yn derbyn unrhyw rai o’r “Dogfennau ategol hanfodol” o fewn y cyfnod apelio, ni fydd yr apêl yn cael ei derbyn).", + "new-appeal-introduction-paragraph": "Mae'r ffurflen hon i apelio yn erbyn:", + "new-appeal-introduction-paragraph-bullet-one": "penderfyniad i wrthod cais cynllunio", + "new-appeal-introduction-paragraph-bullet-two": "methiant yr Awdurdod Cynllunio Lleol i roi penderfyniad o fewn 8 wythnos", + "new-appeal-introduction-paragraph-two": "Nid yw'n cynnwys ceisiadau gan Ddeiliaid Tai.", + "new-appeal-introduction-warning-paragraph": "Rhaid i chi:", + "new-appeal-introduction-warning-bullet-one": "cyflwynwch eich apêl o fewn 6 mis i ddyddiad hysbysiad penderfyniad yr Awdurdod Cynllunio Lleol", + "new-appeal-introduction-warning-bullet-two": "darparu'r holl ddogfennau ategol hanfodol o fewn y cyfnod apelio", "new-appeal-development-description-hint": "Nodwch fanylion y datblygiad arfaethedig o'r ffurflen gais cynllunio. Os cafodd y cais ei ddiwygio tra’r oedd gyda’r ACLl nodwch fanylion y cynllun diwygiedig ac amgaewch gopi o gytundeb yr ACLl i’r newid.", - "new-appeal-ownership-hint": "Mae angen i ni wybod pwy sy'n berchen ar safle'r apźl. Os nad ydych yn berchen ar safle'r apźl neu os mai dim ond rhan ohono rydych yn berchen arno, mae angen i ni wybod enw(au) y perchennog(perchnogion) neu'r rhan-berchennog/perchnogion. Mae angen i ni hefyd fod yn siŵr bod y perchennog/perchnogion eraill yn gwybod eich bod wedi gwneud apêl. Cyfeiriwch at y nodiadau canllaw ar lenwi'r adran hon.", + "new-appeal-ownership-hint": "Mae angen i ni wybod pwy sy'n berchen ar safle'r apźl neu ran ohono, a bod pob perchennog yn gwybod eich bod wedi gwneud apźl. Defnyddiwch y nodiadau canllaw i gwblhau'r adran hon.", "new-appeal-ownership-option-NA": "Amherthnasol", - "new-appeal-ownership-option-A": "Tystysgrif A - (Os mai chi yw unig berchennog safle cyfan yr apźl, mae tystysgrif A yn gymwys). Tystiaf, ar y diwrnod 21 diwrnod cyn dyddiad yr apêl hon, nad oedd neb ac eithrio’r apelydd, yn berchennog (gweler y daflen arweiniad am ddiffiniad) unrhyw ran o’r tir y mae’r apêl yn ymwneud ag ef", - "new-appeal-ownership-option-B": "Tystysgrif B – Tystiaf fod y mae’r apelydd (neu’r asiant) wedi rhoi’r hysbysiad gofynnol (gweler y daflen arweiniad) i bawb arall a oedd, ar y diwrnod 21 diwrnod cyn dyddiad yr apêl hon, yn berchennog (gweler y daflen arweiniad am ddiffiniad) unrhyw ran o y tir y mae'r apźl yn ymwneud ag ef, fel y'i rhestrir isod:", + "new-appeal-ownership-option-A": "Tystysgrif A - (ar gyfer unig berchnogion safle'r apęl). Tystiaf, ar y diwrnod 21 diwrnod cyn dyddiad yr apêl hon, nad oedd neb heblaw’r apelydd yn berchennog (gweler y daflen arweiniad am ddiffiniad) unrhyw ran o’r tir y mae’r apêl yn ymwneud ag ef.", + "new-appeal-ownership-option-B": "Tystysgrif B - Tystiaf fod y mae’r apelydd (neu’r asiant) wedi rhoi’r hysbysiad gofynnol (gweler y daflen arweiniad) i bawb arall a oedd, ar y diwrnod 21 diwrnod cyn dyddiad yr apêl hon, yn berchennog (gweler y daflen arweiniad am ddiffiniad) unrhyw ran o y tir y mae'r apźl yn ymwneud ag ef, fel y'i rhestrir isod:", "new-appeal-ownership-option-CD": "Tystysgrifau C a D - Os nad ydych yn gwybod pwy sy'n berchen ar safle'r apźl i gyd neu ran ohono, cwblhewch naill ai Tystysgrif C neu Dystysgrif D yn Atodiad 1 ein canllaw a'i hatodi i'r ffurflen apelio", "new-appeal-agricultural-hint": "Mae angen inni wybod hefyd a yw safle'r apźl yn rhan o ddaliad amaethyddol. Dewiswch naill ai (a), (b)(i) neu (b)(ii)", "new-appeal-agricultural-holding-option-yes": "(a) Nid oes unrhyw ran o’r tir y mae’r apêl yn ymwneud ag ef yn ddaliad amaethyddol, neu’n rhan o ddaliad amaethyddol", diff --git a/locales/en/newappeal.json b/locales/en/newappeal.json index 75f55fec..00e2ad26 100644 --- a/locales/en/newappeal.json +++ b/locales/en/newappeal.json @@ -51,12 +51,17 @@ "about-you-communication-disclaimer-label": "Communication will be by email. Contact us if you would prefer postal communication.", "new-appeal-progress-nav-label": "Progress", "new-appeal-documentlist-nav": "Documents needed", - "new-appeal-introduction-paragraph": "This form is to appeal against a decision to refuse a planning application, against a decision to grant an application subject to conditions to which you object, or against the failure of the Local Planning Authority to give a decision within the appropriate period, not including Householder applications.", - "new-appeal-introduction-warning-paragraph": "WARNING: Your appeal must reach Planning and Environment Decisions Wales within 6 months of the date of the Local Planning authority’s decision notice. (NOTE: If any of the “Essential supporting documents” are not received by us within the appeal period, the appeal will not be accepted).", + "new-appeal-introduction-paragraph": "This form is to appeal against:", + "new-appeal-introduction-paragraph-bullet-one": "a decision to refuse a planning application", + "new-appeal-introduction-paragraph-bullet-two": "the failure of the Local Planning Authority to give a decision with 8 weeks", + "new-appeal-introduction-paragraph-two": "It does not include Householder applications.", + "new-appeal-introduction-warning-paragraph": "You must:", + "new-appeal-introduction-warning-bullet-one": "submit your appeal within 6 months of the date of the Local Planning Authority's decision notice", + "new-appeal-introduction-warning-bullet-two": "provide all essential supporting documents within the appeal period", "new-appeal-development-description-hint": "Enter details of the proposed development from the planning application form. If the application was revised while it was with the LPA enter details of the revised scheme and enclose a copy of the LPA’s agreement to the change.", - "new-appeal-ownership-hint": "We need to know who owns the appeal site. If you do not own the appeal site or if you own only part of it, we need to know the name(s) of the owner(s) or part owner(s). We also need to be sure that the other owner(s) know that you have made an appeal. Please refer to the guidance notes on completing this section.", + "new-appeal-ownership-hint": "We need to know who owns the appeal site or part of it, and that all owners know you have made an appeal. Use the guidance notes to complete this section.", "new-appeal-ownership-option-NA": "Not applicable", - "new-appeal-ownership-option-A": "Certificate A - (If you are the sole owner of the whole appeal site, certificate A applies). I certify that, on the day 21 days before the date of this appeal, nobody except the appellant, was the owner (see the guidance leaflet for a definition) of any part of the land to which the appeal relates", + "new-appeal-ownership-option-A": "Certificate A - (for sole owners of the appeal site). I certify that, on the day 21 days before the date of this appeal, nobody except the appellant, was the owner (see the guidance leaflet for a definition) of any part of the land to which the appeal relates", "new-appeal-ownership-option-B": "Certificate B - I certify that the appellant (or the agent) has given the requisite notice (see the guidance leaflet) to everyone else who, on the day 21 days before the date of this appeal, was the owner (see the guidance leaflet for a definition) of any part of the land to which the appeal relates, as listed below:", "new-appeal-ownership-option-CD": "Certificates C and D - If you do not know who owns all or part of the appeal site, complete either Certificate C or Certificate D at Annexe 1 of our guidance and attach it to the appeal form", "new-appeal-agricultural-hint": "We also need to know whether the appeal site forms part of an agricultural holding. Please select either (a), (b)(i) or (b)(ii)", diff --git a/pages/api/endpoint/getwatchedcases_api.js b/pages/api/endpoint/getwatchedcases_api.js index 38228d38..aef18259 100644 --- a/pages/api/endpoint/getwatchedcases_api.js +++ b/pages/api/endpoint/getwatchedcases_api.js @@ -77,6 +77,15 @@ export default async function ApiProxy(req, res) { delete element.pinswg_WatchedCase; }); + + // const uniqueItems = Array.from( + // new Map( + // data.value.map((item) => [item.ticketnumber, item]) + // ).values() + // ); + + // data = { "@odata.count": uniqueItems.length, "value": uniqueItems }; + res.status(200).json(data); }) .catch((error) => { diff --git a/pages/case/[ticketnumber].js b/pages/case/[ticketnumber].js index 2ad53a95..176f3ab2 100644 --- a/pages/case/[ticketnumber].js +++ b/pages/case/[ticketnumber].js @@ -44,7 +44,9 @@ const CaseHome = (props) => { Reference:{" "} - {props.currentView.caseReference.currentReference}{" "} + {props.searchResultsObj.searchResultsObj.value[0] + .ticketnumber || + props.currentView.caseReference.currentReference}{" "}
    @@ -60,6 +62,9 @@ const CaseHome = (props) => { // directSearchResultsObj={ // props.searchResultsObj.searchResultsObj // } + searchResultsObj={ + props.searchResultsObj.searchResultsObj + } searchDetailsObj={ props.searchResultsObj.searchDetailsObj } @@ -204,10 +209,10 @@ export const getServerSideProps = wrapper.getServerSideProps( //console.log(searchResultsObj); return { props: { - // searchResultsObj: { - // searchResultsObj: searchResultsObj, - // searchDetailsObj: searchDetailsObj, - // }, + searchResultsObj: { + searchResultsObj: searchResultsObj, + searchDetailsObj: searchDetailsObj, + }, currentType: "directResultsObj", docsOffline: process.env.DOCAPI_OFFLINE || false, messagesObj: await getCaseMessage( @@ -240,12 +245,12 @@ const mapDispatchToProps = (dispatch) => { setCurrentReference: (currentReference) => { dispatch(setCurrentReference(refno)); }, - setSearchResults: (searchResults) => { - dispatch(setSearchResults(searchResults)); - }, - setSearchDetails: (searchDetails) => { - dispatch(setSearchDetails(searchDetails)); - }, + // setSearchResults: (searchResults) => { + // dispatch(setSearchResults(searchResults)); + // }, + // setSearchDetails: (searchDetails) => { + // dispatch(setSearchDetails(searchDetails)); + // }, }; }; diff --git a/pages/myportal/case/[ticketnumber].js b/pages/myportal/case/[ticketnumber].js index 5b644cad..8c331db3 100644 --- a/pages/myportal/case/[ticketnumber].js +++ b/pages/myportal/case/[ticketnumber].js @@ -50,7 +50,13 @@ import ServiceBanner from "../../../components/myportal/servicebanner"; import TimeOut from "../../../components/timeout"; const CaseHome = (props) => { - const { footerLinks, pages, setSearchResults, setSearchDetails } = props; + const { + footerLinks, + pages, + setSearchResults, + setSearchDetails, + searchResultsObj, + } = props; let { t, lang } = useTranslation(); const router = useRouter();