From 1590cd16f6e5eef17b453397a530a1a87eb48a35 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Thu, 12 Dec 2024 14:07:37 +0000 Subject: [PATCH 1/6] two digit date in file name --- actions/azurestorage.js | 8 +++++++- pages/api/file/generateappealpdf.js | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/actions/azurestorage.js b/actions/azurestorage.js index 56526010..b41984a9 100644 --- a/actions/azurestorage.js +++ b/actions/azurestorage.js @@ -341,7 +341,13 @@ export const createAppealPDFBlob = async ( let month = repDate.getMonth() + 1; let year = repDate.getFullYear(); - const pdfFileName = year + "-" + month + "-" + day + "_-_Appeal_Form"; + const pdfFileName = + year + + "-" + + ("0" + month).slice(-2) + + "-" + + ("0" + day).slice(-2) + + "_-_Appeal_Form"; //console.log(content); const blobName = caseID + "/files/" + pdfFileName + ".pdf"; diff --git a/pages/api/file/generateappealpdf.js b/pages/api/file/generateappealpdf.js index 82038f3a..dddb8dd2 100644 --- a/pages/api/file/generateappealpdf.js +++ b/pages/api/file/generateappealpdf.js @@ -187,7 +187,13 @@ export default async function handler(req, res) { let month = repDate.getMonth() + 1; let year = repDate.getFullYear(); - const pdfFileName = year + "-" + month + "-" + day + "_-_Appeal_Form"; + const pdfFileName = + year + + "-" + + ("0" + month).slice(-2) + + "-" + + ("0" + day).slice(-2) + + "_-_Appeal_Form"; await createAppealPDFBlob( renderedPDF, From bfd25b72f5bfef7bd7eb73472f1732bfa15814ec Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Thu, 12 Dec 2024 14:08:43 +0000 Subject: [PATCH 2/6] updated lpa names --- data/lookuptranslations.json | 6 +++--- data/lpa.json | 6 +++--- .../pinswg_hedgeshedgerowstreepreservationreplacem.json | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/data/lookuptranslations.json b/data/lookuptranslations.json index 23ae3d3c..c4961cec 100644 --- a/data/lookuptranslations.json +++ b/data/lookuptranslations.json @@ -284,7 +284,7 @@ "pinswg_lpa": 846040003 }, { - "value": "Cardiff County Council", + "value": "Cardiff Council", "value_cy": "Cyngor Caerdydd", "pinswg_lpa": 846040004 }, @@ -364,7 +364,7 @@ "pinswg_lpa": 846040019 }, { - "value": "Snowdonia National Park Authority", + "value": "Eryri National Park Authority", "value_cy": "Awdurdod Parc Cenedlaethol Eryri", "pinswg_lpa": 846040020 }, @@ -384,7 +384,7 @@ "pinswg_lpa": 846040023 }, { - "value": "Brecon Beacons National Park Authority", + "value": "Bannau Brycheiniog National Park Authority", "value_cy": "Awdurdod Parc Cenedlaethol Bannau Brycheiniog", "pinswg_lpa": 846040024 } diff --git a/data/lpa.json b/data/lpa.json index 664f55e4..848a0bac 100644 --- a/data/lpa.json +++ b/data/lpa.json @@ -6,7 +6,7 @@ "accountid": "01297616-dc16-ec11-a985-00224800f523" }, { - "name": "Brecon Beacons National Park Authority", + "name": "Bannau Brycheiniog National Park Authority", "accountid": "03297616-dc16-ec11-a985-00224800f523" }, { @@ -18,7 +18,7 @@ "accountid": "07297616-dc16-ec11-a985-00224800f523" }, { - "name": "Cardiff County Council", + "name": "Cardiff Council", "accountid": "09297616-dc16-ec11-a985-00224800f523" }, { @@ -90,7 +90,7 @@ "accountid": "29297616-dc16-ec11-a985-00224800f523" }, { - "name": "Snowdonia National Park Authority", + "name": "Eryri National Park Authority", "accountid": "2b297616-dc16-ec11-a985-00224800f523" }, { diff --git a/data/picklistdata/pinswg_hedgeshedgerowstreepreservationreplacem.json b/data/picklistdata/pinswg_hedgeshedgerowstreepreservationreplacem.json index c03c4e22..c02f7538 100644 --- a/data/picklistdata/pinswg_hedgeshedgerowstreepreservationreplacem.json +++ b/data/picklistdata/pinswg_hedgeshedgerowstreepreservationreplacem.json @@ -17722,7 +17722,7 @@ "Label": { "LocalizedLabels": [ { - "Label": "Cardiff County Council", + "Label": "Cardiff Council", "LanguageCode": 1033, "IsManaged": false, "MetadataId": "002c16aa-848c-eb11-aac2-00224800be9c", @@ -17730,7 +17730,7 @@ } ], "UserLocalizedLabel": { - "Label": "Cardiff County Council", + "Label": "Cardiff Council", "LanguageCode": 1033, "IsManaged": false, "MetadataId": "002c16aa-848c-eb11-aac2-00224800be9c", @@ -18410,7 +18410,7 @@ "Label": { "LocalizedLabels": [ { - "Label": "Snowdonia National Park Authority", + "Label": "Eryri National Park Authority", "LanguageCode": 1033, "IsManaged": false, "MetadataId": "302c16aa-848c-eb11-aac2-00224800be9c", @@ -18418,7 +18418,7 @@ } ], "UserLocalizedLabel": { - "Label": "Snowdonia National Park Authority", + "Label": "Eryri National Park Authority", "LanguageCode": 1033, "IsManaged": false, "MetadataId": "302c16aa-848c-eb11-aac2-00224800be9c", From e608a3e55e65be918a06d09842b545ce9e6e1ac0 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Thu, 12 Dec 2024 14:09:13 +0000 Subject: [PATCH 3/6] remove comma in html elements --- components/pdftemplates/appealRow_pdf.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/pdftemplates/appealRow_pdf.js b/components/pdftemplates/appealRow_pdf.js index a4efd46c..c749036c 100644 --- a/components/pdftemplates/appealRow_pdf.js +++ b/components/pdftemplates/appealRow_pdf.js @@ -196,9 +196,7 @@ export const AppealRow_pdf = (props) => { {formatDate( props.props[ @@ -341,7 +339,7 @@ export const AppealRow_pdf = (props) => { {props.props[ datafieldname[0].value - ] || ""}{" "} + ] || ""} From d8e668ff99dea02172383db58ef9bcc60224c9af Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Thu, 12 Dec 2024 14:09:32 +0000 Subject: [PATCH 4/6] removed temporary ref from pdf --- .../pdftemplates/planningappeals78_pdf.js | 77 +++++++++++-------- 1 file changed, 44 insertions(+), 33 deletions(-) diff --git a/components/pdftemplates/planningappeals78_pdf.js b/components/pdftemplates/planningappeals78_pdf.js index 47024d09..0e599d70 100644 --- a/components/pdftemplates/planningappeals78_pdf.js +++ b/components/pdftemplates/planningappeals78_pdf.js @@ -179,46 +179,57 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => { /> - {Object.keys(titles).map((key) => ( - - - - {parseInt(key) + 1} {titles[key].value} - - + {Object.keys(titles).map( + (key) => + key != 0 && ( + - - + + {parseInt(key)} {titles[key].value} + + + + + + + - - - ))} + ) + )} Date: Thu, 12 Dec 2024 14:19:29 +0000 Subject: [PATCH 5/6] welsh update for householder appeal label --- locales/cy/newappeal.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/cy/newappeal.json b/locales/cy/newappeal.json index 5f2b5490..b9d42020 100644 --- a/locales/cy/newappeal.json +++ b/locales/cy/newappeal.json @@ -59,7 +59,7 @@ "new-appeal-introduction-paragraph": "Mae'r ffurflen hon ar gyfer 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-paragraph-two": "Nid yw'n cynnwys ceisiadau Ddeiliaid Tai.", "new-appeal-introduction-warning-paragraph": "Rhaid i chi:", "new-appeal-introduction-warning-bullet-one": "gyflwyno eich apĂȘl o fewn 6 mis o ddyddiad hysbysiad o benderfyniad yr Awdurdod Cynllunio Lleol", "new-appeal-introduction-warning-bullet-two": "darparu'r holl ddogfennau ategol hanfodol o fewn y cyfnod apelio", From 10a507ada6d83ce8ae0c06b01de1759e46368a86 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Thu, 12 Dec 2024 14:19:57 +0000 Subject: [PATCH 6/6] fixes for csr 127.0.0.1 errors --- actions/index.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/actions/index.js b/actions/index.js index dea4c2a2..2513ca08 100644 --- a/actions/index.js +++ b/actions/index.js @@ -813,8 +813,7 @@ export const getMyRepresentations = (loggedInUserId) => { export const getMyRepresentationsProxy = (loggedInUserId) => { return axios .get( - BASE_URL + - "/api/endpoint/getmyrepresentationsproxy_api?loggedInUserId=" + + "/api/endpoint/getmyrepresentationsproxy_api?loggedInUserId=" + loggedInUserId ) .then((res) => res.data) @@ -835,9 +834,7 @@ export const getRepresentations = (incidentID) => { export const getRepresentationsProxy = (incidentID) => { return axios .get( - BASE_URL + - "/api/endpoint/getrepresentationsproxy_api?incidentID=" + - incidentID + "/api/endpoint/getrepresentationsproxy_api?incidentID=" + incidentID ) .then((res) => res.data) .catch((error) => { @@ -873,8 +870,7 @@ export const getWatchedCasesProxy = (loggedInUserId) => { export const getAwaitingSubmissionProxy = (loggedInUserId) => { return axios .get( - BASE_URL + - "/api/endpoint/getawaitingsubmissionproxy_api?loggedInUserId=" + + "/api/endpoint/getawaitingsubmissionproxy_api?loggedInUserId=" + loggedInUserId ) .then((res) => res.data)