From f7654119920b8288f2e4800791acfce0ff9aef42 Mon Sep 17 00:00:00 2001
From: rdbsolutions
Date: Fri, 7 Feb 2025 12:44:03 +0000
Subject: [PATCH 1/6] rep defect 45
---
.../representation/representationAgent.js | 14 ++++++++---
.../representation/representationElements.js | 25 +++++++++++++------
.../representationInterestedPartyPerson.js | 14 ++++++++---
components/elements/index.js | 17 ++++++++++---
locales/cy/home.json | 6 ++++-
locales/cy/myrepresentations.json | 4 ++-
locales/en/home.json | 6 ++++-
locales/en/myrepresentations.json | 4 ++-
8 files changed, 66 insertions(+), 24 deletions(-)
diff --git a/components/case/representation/representationAgent.js b/components/case/representation/representationAgent.js
index f29115e2..1aad6080 100644
--- a/components/case/representation/representationAgent.js
+++ b/components/case/representation/representationAgent.js
@@ -124,7 +124,12 @@ const RepAgent = (props) => {
name="representationOnBehalfOf"
datafieldname="representationOnBehalfOf"
// label={t("myrepresentations:capacity-select-what-capacity-label")}
- options={["Yes", "No"]}
+ options={[
+ t(
+ "myrepresentations:questionnaire-yes"
+ ),
+ t("myrepresentations:questionnaire-no"),
+ ]}
id="representationOnBehalfOf"
className="govuk-radios__input"
errorMsg={t(
@@ -132,9 +137,10 @@ const RepAgent = (props) => {
)}
component={RenderCondtionalRadioList}
validate={[required]}
- legend={
- "Are you acting on behalf of a company, group or organisation?"
- }
+ legend={t("case:representation-onbehalfof")}
+ hint={t(
+ "myrepresentations:representation-onbehalfof-hint"
+ )}
/>
diff --git a/components/case/representation/representationElements.js b/components/case/representation/representationElements.js
index 93c75517..422844f7 100644
--- a/components/case/representation/representationElements.js
+++ b/components/case/representation/representationElements.js
@@ -301,8 +301,7 @@ export const RenderCondtionalRadioList = ({
- e.g. "Owners of Numbers 1-5 High Street", or "Mr and Mrs
- Smith" or "The executors of Mr Evans' estate"
+ {custom.hint}
{Object.keys(options).map((key, index) => (
@@ -346,8 +345,9 @@ export const RenderCondtionalRadioList = ({
className="govuk-label"
htmlFor={id + "_details"}
>
- Enter the name of the
- company/group/organisation
+ {t(
+ "myrepresentations:representation-onbehalfof-label"
+ )}
{
{uploadCountMessage > 0 &&
completedUploadFiles == false && (
- Uploading {uploadCountMessage} files{" "}
+ {t("home:uploading-files-label", {
+ number: uploadCountMessage,
+ })}
)}
{completedUploadFiles > 0 &&
uploadCountMessage > 0 && (
- {uploadCountMessage} files uploaded{" "}
+ {t(
+ "home:completed-uploading-files-label",
+ {
+ number: uploadCountMessage,
+ }
+ )}
)}
@@ -1261,7 +1268,9 @@ export const RenderFileUpload = (field) => {
) : (
- Uploading...
+ {t(
+ "home:uploading-files-progress-label"
+ )}
)}
@@ -1290,7 +1299,7 @@ export const RenderFileUpload = (field) => {
blob.path.split("/")[1]
);
}}
- title="Remove this file"
+ title={t("home:remove-this-file-label")}
>
−
diff --git a/components/case/representation/representationInterestedPartyPerson.js b/components/case/representation/representationInterestedPartyPerson.js
index 3649b418..6967c61d 100644
--- a/components/case/representation/representationInterestedPartyPerson.js
+++ b/components/case/representation/representationInterestedPartyPerson.js
@@ -127,7 +127,12 @@ const RepInterestedPartyPerson = (props) => {
name="representationOnBehalfOf"
datafieldname="representationOnBehalfOf"
// label="In what capacity do you wish to make representations on this case?"
- options={["Yes", "No"]}
+ options={[
+ t(
+ "myrepresentations:questionnaire-yes"
+ ),
+ t("myrepresentations:questionnaire-no"),
+ ]}
id="representationOnBehalfOf"
className="govuk-radios__input"
errorMsg={t(
@@ -135,9 +140,10 @@ const RepInterestedPartyPerson = (props) => {
)}
component={RenderCondtionalRadioList}
validate={[required]}
- legend={
- "Are you acting on behalf of a company, group or organisation?"
- }
+ legend={t("case:representation-onbehalfof")}
+ hint={t(
+ "myrepresentations:representation-onbehalfof-hint"
+ )}
/>
diff --git a/components/elements/index.js b/components/elements/index.js
index 1502943e..dfd8038d 100644
--- a/components/elements/index.js
+++ b/components/elements/index.js
@@ -2126,13 +2126,20 @@ const RenderFileUpload = (field) => {
{uploadCountMessage > 0 &&
completedUploadFiles == false && (
- Uploading {uploadCountMessage} files{" "}
+ {t("home:uploading-files-label", {
+ number: uploadCountMessage,
+ })}
)}
{completedUploadFiles > 0 &&
uploadCountMessage > 0 && (
- {uploadCountMessage} files uploaded{" "}
+ {t(
+ "home:completed-uploading-files-label",
+ {
+ number: uploadCountMessage,
+ }
+ )}
)}
@@ -2188,7 +2195,9 @@ const RenderFileUpload = (field) => {
) : (
- Uploading...
+ {t(
+ "home:uploading-files-progress-label"
+ )}{" "}
)}
@@ -2223,7 +2232,7 @@ const RenderFileUpload = (field) => {
field.ticketnumber
);
}}
- title="Remove this file "
+ title={t("home:remove-this-file-label")}
>
−
diff --git a/locales/cy/home.json b/locales/cy/home.json
index d85df95d..9b31e35a 100644
--- a/locales/cy/home.json
+++ b/locales/cy/home.json
@@ -42,5 +42,9 @@
"dns-card-paragraph": "Mae Datblygiad o Arwyddocâd Cenedlaethol yn fath o gais cynllunio ar gyfer prosiect seilwaith mawr sydd o bwysigrwydd cenedlaethol.",
"dns-card-button": "Gweld pob cais",
"logging-in-heading": "Rydym yn dilysu eich cyfrif. Arhoswch a pheidiwch ag adnewyddu'r dudalen",
- "logging-in-paragraph": "Arhoswch os gwelwch yn dda..."
+ "logging-in-paragraph": "Arhoswch os gwelwch yn dda...",
+ "uploading-files-progress-label": "Wrthi'n llwytho i fyny...",
+ "uploading-files-label": "Wrthi'n uwchlwytho {{number}} ffeil",
+ "completed-uploading-files-label": "{{number}} ffeil wedi'u huwchlwytho",
+ "remove-this-file-label": "Tynnu'r ffeil hon"
}
\ No newline at end of file
diff --git a/locales/cy/myrepresentations.json b/locales/cy/myrepresentations.json
index c6dc140e..92c402d6 100644
--- a/locales/cy/myrepresentations.json
+++ b/locales/cy/myrepresentations.json
@@ -237,5 +237,7 @@
"rep-finalising-label": "Wrthi'n uwchlwytho ffeiliau ar hyn o bryd ac yn cwblhau eich cyflwyniad cynrychioliad ",
"rep-wait-label": "Arhoswch os gwelwch yn dda",
"rep-period-passed-heading": "Mae'r cyfnod cynrychioli wedi mynd heibio",
- "rep-period-notice-label": "Aeth y dyddiad dyledus ar gyfer y sylw hwn heibio. Ni allwch gyflwyno'r wybodaeth a ddarparwyd gennych mwyach."
+ "rep-period-notice-label": "Aeth y dyddiad dyledus ar gyfer y sylw hwn heibio. Ni allwch gyflwyno'r wybodaeth a ddarparwyd gennych mwyach.",
+ "representation-onbehalfof-hint": " e.e. \"Perchnogion Rhifau 1-5 Stryd Fawr\", neu \"Mr a Mrs Smith\" neu \"ysgutorion ystâd Mr Evans\"",
+ "representation-onbehalfof-label": "Rhowch enw'r cwmni/grŵp/sefydliad"
}
\ No newline at end of file
diff --git a/locales/en/home.json b/locales/en/home.json
index a81d094e..9f83d698 100644
--- a/locales/en/home.json
+++ b/locales/en/home.json
@@ -42,5 +42,9 @@
"dns-card-paragraph": "A Development of National Significance is a type of planning application for a large infrastructure project of national importance.",
"dns-card-button": "View all applications",
"logging-in-heading": "We are authenticating your account please wait and don't refresh",
- "logging-in-paragraph": "Please wait..."
+ "logging-in-paragraph": "Please wait...",
+ "uploading-files-progress-label": "Uploading...",
+ "uploading-files-label": "Uploading {{number}} files",
+ "completed-uploading-files-label": "{{number}} files uploaded",
+ "remove-this-file-label": "Remove this file"
}
\ No newline at end of file
diff --git a/locales/en/myrepresentations.json b/locales/en/myrepresentations.json
index 9493003a..e0723fe7 100644
--- a/locales/en/myrepresentations.json
+++ b/locales/en/myrepresentations.json
@@ -237,5 +237,7 @@
"rep-finalising-label": "Currently uploading files and finalising your representation submission",
"rep-wait-label": "Please wait",
"rep-period-passed-heading": "Representation period has passed",
- "rep-period-notice-label": "The due date for this representation passed. You can no longer submit the information you have provided."
+ "rep-period-notice-label": "The due date for this representation passed. You can no longer submit the information you have provided.",
+ "representation-onbehalfof-hint": "e.g. \"Owners of Numbers 1-5 High Street\", or \"Mr and Mrs Smith\" or \"The executors of Mr Evans' estate\"",
+ "representation-onbehalfof-label": "Enter the name of the company/group/organisation"
}
\ No newline at end of file
From ff83456d033410ac60bc9e9611ef8106234c5644 Mon Sep 17 00:00:00 2001
From: rdbsolutions
Date: Fri, 7 Feb 2025 12:44:49 +0000
Subject: [PATCH 2/6] rep defect 50
---
components/pdftemplates/enforcement_pdf.js | 10 ++++++++--
components/pdftemplates/finalComments_pdf.js | 10 ++++++++--
components/pdftemplates/lpaQuestionnaire_pdf.js | 10 ++++++++--
components/pdftemplates/statement_pdf.js | 11 +++++++++--
4 files changed, 33 insertions(+), 8 deletions(-)
diff --git a/components/pdftemplates/enforcement_pdf.js b/components/pdftemplates/enforcement_pdf.js
index 725aebf7..b0b64d05 100644
--- a/components/pdftemplates/enforcement_pdf.js
+++ b/components/pdftemplates/enforcement_pdf.js
@@ -1664,7 +1664,10 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{
>
{
{
>
{
{
>
{
{
}}
>
Date: Fri, 7 Feb 2025 12:45:30 +0000
Subject: [PATCH 3/6] rep defect 46
---
components/case/representation/index.js | 4 ++--
.../case/representation/representationCompleteSubmit.js | 7 ++++++-
components/newappeal/buildsection.js | 2 +-
i18n.js | 7 ++++++-
4 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/components/case/representation/index.js b/components/case/representation/index.js
index f4134a93..5f290696 100644
--- a/components/case/representation/index.js
+++ b/components/case/representation/index.js
@@ -873,7 +873,7 @@ let MakeRepresentation = (props) => {
useSaveStatus &&
router.replace(
router.locale != "en"
- ? router.locale + "/myportal"
+ ? "/" + router.locale + "/fymhorth"
: "/myportal"
))
: useSaveStatus
@@ -884,7 +884,7 @@ let MakeRepresentation = (props) => {
uploadRepresentationFiles(values),
router.replace(
router.locale != "en"
- ? router.locale + "/myportal"
+ ? "/" + router.locale + "/fymhorth"
: "/myportal"
))
: Object.assign(values, {
diff --git a/components/case/representation/representationCompleteSubmit.js b/components/case/representation/representationCompleteSubmit.js
index 5be1e836..52bc71c8 100644
--- a/components/case/representation/representationCompleteSubmit.js
+++ b/components/case/representation/representationCompleteSubmit.js
@@ -220,7 +220,12 @@ const RepCompleteSubmit = (props) => {
function showRepsEnded(endDate) {
let date = new Date();
date = new Date(date.toDateString());
- const end = new Date(endDate);
+ let end = new Date(endDate);
+ end.setUTCHours(23);
+ end.setUTCMinutes(59);
+ end.setUTCSeconds(59);
+ end.toISOString();
+
return end > date ? false : true;
}
diff --git a/components/newappeal/buildsection.js b/components/newappeal/buildsection.js
index 91498eb0..2cf10ef7 100644
--- a/components/newappeal/buildsection.js
+++ b/components/newappeal/buildsection.js
@@ -292,7 +292,7 @@ let BuildSection = (props) => {
useSaveStatus &&
router.replace(
router.locale != "en"
- ? "/" + router.locale + "/myportal"
+ ? "/" + router.locale + "/fymhorth"
: "/myportal"
);
};
diff --git a/i18n.js b/i18n.js
index 9c2243af..bfe06a35 100644
--- a/i18n.js
+++ b/i18n.js
@@ -39,7 +39,12 @@ module.exports = {
"/case/*": ["case", "home"],
"/case/[ticketnumber]": ["case", "home"],
"/case/id/[incident]": ["case", "home"],
- "/myportal/representation": ["case", "myrepresentations", "common"],
+ "/myportal/representation": [
+ "case",
+ "myrepresentations",
+ "common",
+ "home",
+ ],
"/myportal/error": ["myportal", "common"],
"/myportal/case/id/[incident]": ["case", "home"],
"/myportal/addresssearch": ["search", "case", "myportal"],
From 130102ad302357b0fc2fc9447a415cba38de8e9b Mon Sep 17 00:00:00 2001
From: rdbsolutions
Date: Mon, 10 Feb 2025 14:13:39 +0000
Subject: [PATCH 4/6] welsh text amends on reps
---
.../representation/representationElements.js | 67 ++++++++++---------
components/myportal/topthree_reps.js | 21 +++++-
locales/cy/myrepresentations.json | 8 +--
3 files changed, 57 insertions(+), 39 deletions(-)
diff --git a/components/case/representation/representationElements.js b/components/case/representation/representationElements.js
index 422844f7..06799dee 100644
--- a/components/case/representation/representationElements.js
+++ b/components/case/representation/representationElements.js
@@ -324,45 +324,46 @@ export const RenderCondtionalRadioList = ({
className="govuk-label govuk-radios__label"
htmlFor={id + "_" + index}
>
- {options[key]}
+ {options[key] == "Yes"
+ ? t(
+ "myrepresentations:questionnaire-yes"
+ )
+ : t(
+ "myrepresentations:questionnaire-no"
+ )}
- {value ==
- t("myrepresentations:questionnaire-yes") &&
- options[key] ==
- t(
- "myrepresentations:questionnaire-yes"
- ) && (
+ {value == "Yes" && options[key] == "Yes" && (
+
-
-
-
-
+ {t(
+ "myrepresentations:representation-onbehalfof-label"
+ )}
+
+
- )}
+
+ )}
))}
diff --git a/components/myportal/topthree_reps.js b/components/myportal/topthree_reps.js
index f2249e3b..42930b34 100644
--- a/components/myportal/topthree_reps.js
+++ b/components/myportal/topthree_reps.js
@@ -285,10 +285,27 @@ const TopThree = (props) => {
'$..[?(@.value=="' +
showTopThreeArr[key]
.representationCapacity +
- '")].value_cy',
+ '" ||@.value_cy=="' +
+ showTopThreeArr[key]
+ .representationCapacity +
+ '" )].value_cy',
transLookup
)
- : showTopThreeArr[key].representationCapacity || ""}
+ : jsonpath(
+ '$..[?(@.value_cy=="' +
+ showTopThreeArr[key]
+ .representationCapacity +
+ '")].value',
+ transLookup
+ ).length > 0
+ ? jsonpath(
+ '$..[?(@.value_cy=="' +
+ showTopThreeArr[key]
+ .representationCapacity +
+ '")].value',
+ transLookup
+ )
+ : showTopThreeArr[key].representationCapacity}
{t("myportal:date-raised")}:
diff --git a/locales/cy/myrepresentations.json b/locales/cy/myrepresentations.json
index 92c402d6..63e755cc 100644
--- a/locales/cy/myrepresentations.json
+++ b/locales/cy/myrepresentations.json
@@ -46,10 +46,10 @@
"rep-complete-para-three": "Byddwch yn derbyn cadarnhad yn fuan a anfonir at y cyfeiriad e-bost a roddwyd gennych.",
"lpa-capacity-para-one": "Mae’r ffurflen hon yn eich galluogi i gyflwyno datganiadau, sylwadau a holiaduron ar achos i Benderfyniadau Cynllunio ac Amgylchedd Cymru.",
"s78-section-heading-one": "Y weithdrefn apelio ac ymweliad safle",
- "s78-section-question-1": "Cyfeirnod PCAC:",
- "s78-section-question-2": "Cyfeirnod yr ACLl:",
- "s78-section-question-4": "Math o apêl:",
- "s78-section-question-3": "Cyfeiriad y Safle:",
+ "s78-section-question-1": "Cyfeirnod PCAC",
+ "s78-section-question-2": "Cyfeirnod yr ACLl",
+ "s78-section-question-4": "Math o apêl",
+ "s78-section-question-3": "Cyfeiriad y Safle",
"s78-section-question-5": "Pa weithdrefn ydych chi'n credu y dylai'r apêl ei dilyn?",
"s78-section-question-6": "A fydd angen i'r Arolygydd fynd i mewn i safle/eiddo'r apêl?",
"s78-section-question-7": "A ydych chi'n credu bod angen i'r Arolygydd fynd ar dir/eiddo preifat cyfagos i weld y safle?",
From e23cdef338beefa38881cd2ce050dbf70e081649 Mon Sep 17 00:00:00 2001
From: rdbsolutions
Date: Tue, 11 Feb 2025 08:54:26 +0000
Subject: [PATCH 5/6] partial updates for welsh in myportal
---
.../myportal/awaitingsubmissionfromblob.js | 5 +++-
components/myportal/topthree.js | 2 +-
components/myportal/topthree_reps.js | 2 +-
components/utils/index.js | 27 +++++++++++++++++++
data/lookuptranslations.json | 4 +++
5 files changed, 37 insertions(+), 3 deletions(-)
diff --git a/components/myportal/awaitingsubmissionfromblob.js b/components/myportal/awaitingsubmissionfromblob.js
index f4a26c87..be32e0eb 100644
--- a/components/myportal/awaitingsubmissionfromblob.js
+++ b/components/myportal/awaitingsubmissionfromblob.js
@@ -288,7 +288,10 @@ const AwaitingSubmissionFromBlob = (props) => {
)}
- LPA:
+
+ {router.locale == "cy" ? "ACLl" : "LPA"}
+ :
+
{router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
diff --git a/components/myportal/topthree.js b/components/myportal/topthree.js
index 6eb25afe..9c33cdbb 100644
--- a/components/myportal/topthree.js
+++ b/components/myportal/topthree.js
@@ -394,7 +394,7 @@ const TopThree = (props) => {
)}
- LPA:
+ {router.locale == "cy" ? "ACLl" : "LPA"}:
{router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
diff --git a/components/myportal/topthree_reps.js b/components/myportal/topthree_reps.js
index 42930b34..8ebbbaff 100644
--- a/components/myportal/topthree_reps.js
+++ b/components/myportal/topthree_reps.js
@@ -313,7 +313,7 @@ const TopThree = (props) => {
{repRaisedDate(showTopThreeArr[key].repfile_name)}
{" "}
-
LPA:
+
{router.locale == "cy" ? "ACLl" : "LPA"}:
{" "}
{router.locale == "cy"
diff --git a/components/utils/index.js b/components/utils/index.js
index 67841c5b..f3d07bde 100644
--- a/components/utils/index.js
+++ b/components/utils/index.js
@@ -8,6 +8,7 @@ import {
getPortalModuleDetails,
} from "../../actions";
import data from "../../data/collections.json";
+import { useRouter } from "next/router";
import xpath from "xpath";
@@ -644,3 +645,29 @@ export const updateLinks = (jsonObj) => {
return jsonObj;
};
+
+export const whichRepType = (props) => {
+ const router = useRouter();
+ const { locale } = router;
+ let repType;
+ let whichBaseType =
+ props.currentView?.caseReference.repDetails.representationType ||
+ formObj.representationForm.values.representationType;
+
+ switch (whichBaseType) {
+ case "Statement":
+ repType = router.locale == "cy" ? "Datganiad" : "Statment";
+ break;
+ case "Questionnaire":
+ repType = router.locale == "cy" ? "Holiadur" : "Questionnaire";
+ break;
+ case "Final comments":
+ repType =
+ router.locale == "cy" ? "Sylwadau terfynol" : "Final comments";
+ break;
+ default:
+ // code block
+ }
+
+ return repType;
+};
diff --git a/data/lookuptranslations.json b/data/lookuptranslations.json
index 1eb991fc..7a5e3f46 100644
--- a/data/lookuptranslations.json
+++ b/data/lookuptranslations.json
@@ -611,6 +611,10 @@
{
"value": "Interested Party",
"value_cy": "Parti â Buddiant"
+ },
+ {
+ "value": "LPA",
+ "value_cy": "ACLl"
}
],
"representation-type": [
From 4bc4edf537771a2d69e274d8608fe6b3b981ce57 Mon Sep 17 00:00:00 2001
From: rdbsolutions
Date: Tue, 11 Feb 2025 10:18:26 +0000
Subject: [PATCH 6/6] welsh lang for yes no
---
components/case/representation/index.js | 5 +++++
components/case/representation/representationAgent.js | 7 +------
components/case/representation/representationElements.js | 7 +++++++
components/case/representation/representationLPA.js | 3 ++-
4 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/components/case/representation/index.js b/components/case/representation/index.js
index 5f290696..c694ea84 100644
--- a/components/case/representation/index.js
+++ b/components/case/representation/index.js
@@ -479,6 +479,8 @@ let MakeRepresentation = (props) => {
/>;
break;
case "appellant":
+ case "apelydd":
+ case "Apelydd":
case t(
"myrepresentations:capacity-options-arr-appellant"
).toLocaleLowerCase():
@@ -543,6 +545,8 @@ let MakeRepresentation = (props) => {
);
break;
case "agent":
+ case "Asiant":
+ case "asiant":
case t(
"myrepresentations:capacity-options-arr-agent"
).toLowerCase():
@@ -1188,6 +1192,7 @@ let MakeRepresentation = (props) => {