Merged PR 1420: PII-UAT 070225

Related work items: #12956
This commit is contained in:
Robert Bond
2025-02-11 12:36:30 +00:00
22 changed files with 213 additions and 76 deletions
+7 -2
View File
@@ -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():
@@ -873,7 +877,7 @@ let MakeRepresentation = (props) => {
useSaveStatus &&
router.replace(
router.locale != "en"
? router.locale + "/myportal"
? "/" + router.locale + "/fymhorth"
: "/myportal"
))
: useSaveStatus
@@ -884,7 +888,7 @@ let MakeRepresentation = (props) => {
uploadRepresentationFiles(values),
router.replace(
router.locale != "en"
? router.locale + "/myportal"
? "/" + router.locale + "/fymhorth"
: "/myportal"
))
: Object.assign(values, {
@@ -1188,6 +1192,7 @@ let MakeRepresentation = (props) => {
</h1>
<div id="rep-form">
<div className="govuk-grid-column-three-quarters wgForm">
www
{whichControl()}
</div>
@@ -132,9 +132,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"
)}
/>
</div>
</div>
@@ -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;
}
@@ -301,8 +301,7 @@ export const RenderCondtionalRadioList = ({
</legend>
<div id={id + "-hint"} className="govuk-hint">
e.g. "Owners of Numbers 1-5 High Street", or "Mr and Mrs
Smith" or "The executors of Mr Evans' estate"
{custom.hint}
</div>
<div className="govuk-radios">
{Object.keys(options).map((key, index) => (
@@ -325,44 +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"
)}
</label>
</div>
{value ==
t("myrepresentations:questionnaire-yes") &&
options[key] ==
t(
"myrepresentations:questionnaire-yes"
) && (
{value == "Yes" && options[key] == "Yes" && (
<div
className="govuk-radios__conditional "
id={"conditional-" + id}
>
<div
className="govuk-radios__conditional "
id={"conditional-" + id}
className="govuk-form-group"
key={"yes_group_" + key}
>
<div
className="govuk-form-group"
key={"yes_group_" + key}
<label
className="govuk-label"
htmlFor={id + "_details"}
>
<label
className="govuk-label"
htmlFor={id + "_details"}
>
Enter the name of the
company/group/organisation
</label>
<Field
className="govuk-input govuk-!-width-one-half"
id={id + "_details"}
name={id + "_details"}
component={RenderTextfield}
type="text"
validate={[required]}
errorMsg={t(
"myrepresentations:is-required-label"
)}
/>
</div>
{t(
"myrepresentations:representation-onbehalfof-label"
)}
</label>
<Field
className="govuk-input govuk-!-width-one-half"
id={id + "_details"}
name={id + "_details"}
component={RenderTextfield}
type="text"
validate={[required]}
errorMsg={t(
"myrepresentations:is-required-label"
)}
/>
</div>
)}
</div>
)}
</div>
))}
</div>
@@ -540,6 +541,13 @@ export const RenderPickList = ({
: optionsArr[key] ==
"Final comments"
? "Sylwadau terfynol"
: optionsArr[key] ==
"Written representations"
? "Sylwadau ysgrifenedig"
: optionsArr[key] == "Inquiry"
? "Ymchwiliad"
: optionsArr[key] == "Hearing"
? "Gwrandawiad"
: optionsArr[key]
: optionsArr[key]}
</option>
@@ -1211,13 +1219,20 @@ export const RenderFileUpload = (field) => {
{uploadCountMessage > 0 &&
completedUploadFiles == false && (
<div className="govuk-body govuk-!-font-size-14">
Uploading {uploadCountMessage} files{" "}
{t("home:uploading-files-label", {
number: uploadCountMessage,
})}
</div>
)}
{completedUploadFiles > 0 &&
uploadCountMessage > 0 && (
<div className="govuk-body govuk-!-font-size-14">
{uploadCountMessage} files uploaded{" "}
{t(
"home:completed-uploading-files-label",
{
number: uploadCountMessage,
}
)}
</div>
)}
</section>
@@ -1261,7 +1276,9 @@ export const RenderFileUpload = (field) => {
</p>
) : (
<p className="govuk-body textloading govuk-!-font-size-14">
Uploading...
{t(
"home:uploading-files-progress-label"
)}
</p>
)}
</div>
@@ -1290,7 +1307,7 @@ export const RenderFileUpload = (field) => {
blob.path.split("/")[1]
);
}}
title="Remove this file"
title={t("home:remove-this-file-label")}
>
&minus;
</span>
@@ -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"
)}
/>
</div>
</div>
@@ -225,7 +225,8 @@ let RepLPA = (props) => {
{!_.has(
formObj["representationForm"],
["values", "representationType"] ||
typeof props.representationType != "undefined"
typeof props.currentView.caseReference.repDetails !=
"undefined"
) ? (
<>
<label
+13 -4
View File
@@ -2126,13 +2126,20 @@ const RenderFileUpload = (field) => {
{uploadCountMessage > 0 &&
completedUploadFiles == false && (
<div className="govuk-body govuk-!-font-size-14">
Uploading {uploadCountMessage} files{" "}
{t("home:uploading-files-label", {
number: uploadCountMessage,
})}
</div>
)}
{completedUploadFiles > 0 &&
uploadCountMessage > 0 && (
<div className="govuk-body govuk-!-font-size-14">
{uploadCountMessage} files uploaded{" "}
{t(
"home:completed-uploading-files-label",
{
number: uploadCountMessage,
}
)}
</div>
)}
</section>
@@ -2188,7 +2195,9 @@ const RenderFileUpload = (field) => {
</p>
) : (
<p className="govuk-body textloading govuk-!-font-size-14">
Uploading...
{t(
"home:uploading-files-progress-label"
)}{" "}
</p>
)}
</div>
@@ -2223,7 +2232,7 @@ const RenderFileUpload = (field) => {
field.ticketnumber
);
}}
title="Remove this file "
title={t("home:remove-this-file-label")}
>
&minus;
</span>
@@ -288,7 +288,10 @@ const AwaitingSubmissionFromBlob = (props) => {
</div>
)}
<div className="cardModuleReference">
<b>LPA:</b>
<b>
{router.locale == "cy" ? "ACLl" : "LPA"}
:
</b>
{router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
+1 -1
View File
@@ -394,7 +394,7 @@ const TopThree = (props) => {
</div>
)}
<div className="cardModuleReference">
<b>LPA:</b>
<b>{router.locale == "cy" ? "ACLl" : "LPA"}:</b>
{router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
+20 -3
View File
@@ -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}
</div>
<div className="cardModuleReference">
<b>{t("myportal:date-raised")}:</b>
@@ -296,7 +313,7 @@ const TopThree = (props) => {
{repRaisedDate(showTopThreeArr[key].repfile_name)}
</div>{" "}
<div className="cardModuleReference">
<b>LPA:</b>
<b>{router.locale == "cy" ? "ACLl" : "LPA"}:</b>
{" "}
{router.locale == "cy"
+1 -1
View File
@@ -292,7 +292,7 @@ let BuildSection = (props) => {
useSaveStatus &&
router.replace(
router.locale != "en"
? "/" + router.locale + "/myportal"
? "/" + router.locale + "/fymhorth"
: "/myportal"
);
};
+8 -2
View File
@@ -1664,7 +1664,10 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
<Text
style={{
color: "#757575",
width: "310",
width:
docProps.locale == "cy"
? "290"
: "310",
fontSize: 12,
padding: 5,
border: 1,
@@ -1686,7 +1689,10 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
>
<Text
style={{
width: "40",
width:
docProps.locale == "cy"
? "60"
: "40",
fontSize: 12,
marginLeft: 10,
}}
+8 -2
View File
@@ -473,7 +473,10 @@ export const finalComments_pdf = ({ docProps }) => {
<Text
style={{
color: "#757575",
width: "310",
width:
docProps.locale == "cy"
? "290"
: "310",
fontSize: 12,
padding: 5,
border: 1,
@@ -494,7 +497,10 @@ export const finalComments_pdf = ({ docProps }) => {
>
<Text
style={{
width: "40",
width:
docProps.locale == "cy"
? "60"
: "40",
fontSize: 12,
marginLeft: 10,
}}
@@ -1450,7 +1450,10 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
<Text
style={{
color: "#757575",
width: "310",
width:
docProps.locale == "cy"
? "290"
: "310",
fontSize: 12,
padding: 5,
border: 1,
@@ -1472,7 +1475,10 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
>
<Text
style={{
width: "40",
width:
docProps.locale == "cy"
? "60"
: "40",
fontSize: 12,
marginLeft: 10,
}}
+9 -2
View File
@@ -473,7 +473,10 @@ export const statement_pdf = ({ docProps }) => {
<Text
style={{
color: "#757575",
width: "310",
width:
docProps.locale == "cy"
? "290"
: "310",
fontSize: 12,
padding: 5,
border: 1,
@@ -493,8 +496,12 @@ export const statement_pdf = ({ docProps }) => {
}}
>
<Text
wrap={true}
style={{
width: "40",
width:
docProps.locale == "cy"
? "60"
: "40",
fontSize: 12,
marginLeft: 10,
}}
+27
View File
@@ -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;
};
+4
View File
@@ -611,6 +611,10 @@
{
"value": "Interested Party",
"value_cy": "Parti â Buddiant"
},
{
"value": "LPA",
"value_cy": "ACLl"
}
],
"representation-type": [
+6 -1
View File
@@ -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"],
+5 -1
View File
@@ -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"
}
+7 -5
View File
@@ -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": "Maer 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?",
@@ -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"
}
+5 -1
View File
@@ -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"
}
+3 -1
View File
@@ -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"
}