22079 mockup

This commit is contained in:
2026-03-18 14:11:37 +00:00
parent e3bb321eae
commit 20b07ec3d5
9 changed files with 88 additions and 67 deletions
+10 -8
View File
@@ -37,7 +37,7 @@ const RenderTextfield = ({
htmlFor={id} htmlFor={id}
id={id + "_label"} id={id + "_label"}
> >
<span className="govuk-body-s">{hint1}</span> <p className="govuk-body-s">{hint1}</p>
</label> </label>
<ul className="govuk-body-s govuk-!-margin-top-3"> <ul className="govuk-body-s govuk-!-margin-top-3">
<li>{hint2} </li> <li>{hint2} </li>
@@ -90,7 +90,7 @@ let CaseSearch = (props) => {
throw new SubmissionError({ throw new SubmissionError({
basicSearch: t("home:casesearch-search-validation-required"), basicSearch: t("home:casesearch-search-validation-required"),
_error: "required", _error: "required"
}); });
} else { } else {
router.push({ router.push({
@@ -98,7 +98,7 @@ let CaseSearch = (props) => {
router.locale == "cy" router.locale == "cy"
? "/canlyniadauchwilio" ? "/canlyniadauchwilio"
: "/searchresults", : "/searchresults",
query: { q: values.basicSearch }, query: { q: values.basicSearch }
}); });
} }
}; };
@@ -111,14 +111,16 @@ let CaseSearch = (props) => {
<h2 className="heading-small card-heading"> <h2 className="heading-small card-heading">
{t("home:casesearch-card-title")} {t("home:casesearch-card-title")}
</h2> </h2>
<p className="govuk-body-s">
{t("home:casesearch-card-paragraph")}
</p>
<Field <Field
validate={[ validate={[
minLength( minLength(
t( t(
"home:casesearch-search-validation-minlength" "home:casesearch-search-validation-minlength"
) )
), )
]} ]}
className="govuk-input" className="govuk-input"
component={RenderTextfield} component={RenderTextfield}
@@ -144,7 +146,7 @@ let CaseSearch = (props) => {
"event", "event",
"SearchButtonClicked", "SearchButtonClicked",
{ {
searchTerm: basicSearch.value, searchTerm: basicSearch.value
} }
); );
}} }}
@@ -193,7 +195,7 @@ const mapStateToProps = (state) => {
myCases: state.myCases, myCases: state.myCases,
watchedCases: state.watchedCases, watchedCases: state.watchedCases,
myRepresentations: state.myRepresentations, myRepresentations: state.myRepresentations,
awaitingSubmission: state.awaitingSubmission, awaitingSubmission: state.awaitingSubmission
}; };
}; };
@@ -207,6 +209,6 @@ export default connect(
)( )(
reduxForm({ reduxForm({
form: "basicSearchForm", form: "basicSearchForm",
destroyOnUnmount: false, destroyOnUnmount: false
})(CaseSearch) })(CaseSearch)
); );
+7 -6
View File
@@ -27,14 +27,14 @@ const MyPortal = (props) => {
const handleLogout = () => { const handleLogout = () => {
console.info("////////////\n" + "logout" + "\n////////////"); console.info("////////////\n" + "logout" + "\n////////////");
window.localStorage.clear(), (window.localStorage.clear(),
destroyCookie(null, "next-auth.csrf-token", { path: "/" }), destroyCookie(null, "next-auth.csrf-token", { path: "/" }),
destroyCookie(null, "next-auth.callback-url", { path: "/" }), destroyCookie(null, "next-auth.callback-url", { path: "/" }),
destroyCookie(null, "pedw_locale", { path: "/" }), destroyCookie(null, "pedw_locale", { path: "/" }),
destroyCookie(null, "pinsUser", { path: "/" }), destroyCookie(null, "pinsUser", { path: "/" }),
signOut({ signOut({
callbackUrl: locale == "cy" ? "/cy/allgofnodi" : "/logout", callbackUrl: locale == "cy" ? "/cy/allgofnodi" : "/logout"
}); }));
}; };
const isLPA = const isLPA =
@@ -114,7 +114,7 @@ const MyPortal = (props) => {
] + ] +
'")].value_cy', '")].value_cy',
json: transLookup, json: transLookup,
eval: true, eval: true
}) })
: props.accountDetails.accountDetails[ : props.accountDetails.accountDetails[
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue" "pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
@@ -126,10 +126,11 @@ const MyPortal = (props) => {
<div className="govuk-grid-row"> <div className="govuk-grid-row">
<div className="govuk-grid-column-full"> <div className="govuk-grid-column-full">
<div className="flex-container grid-row govuk-body "> <div className="flex-container grid-row govuk-body ">
<SearchCases />
{!isLPA && ( {!isLPA && (
<MakeNewAppeal docsOffline={docsOffline} /> <MakeNewAppeal docsOffline={docsOffline} />
)} )}
<SearchCases />
{/* {props.awaitingSubmission.awaitingSubmission[ {/* {props.awaitingSubmission.awaitingSubmission[
"@odata.count" "@odata.count"
] > 0 && ( ] > 0 && (
@@ -143,7 +144,7 @@ const MyPortal = (props) => {
{!isLPA && {!isLPA &&
_.has(props.awaitingSubmission, [ _.has(props.awaitingSubmission, [
"awaitingSubmissionFromBlob", "awaitingSubmissionFromBlob",
"@odata.count", "@odata.count"
]) && ]) &&
props.awaitingSubmission props.awaitingSubmission
.awaitingSubmissionFromBlob[ .awaitingSubmissionFromBlob[
+17 -12
View File
@@ -88,7 +88,7 @@ let AdvancedSearch = (props) => {
optionsObj, optionsObj,
meta: { touched, error }, meta: { touched, error },
label, label,
errormsg, errormsg
}) => { }) => {
return ( return (
<> <>
@@ -143,7 +143,7 @@ let AdvancedSearch = (props) => {
.name + .name +
'")].value_cy', '")].value_cy',
json: transLookup, json: transLookup,
eval: true, eval: true
}) })
: optionsObj[key].name || : optionsObj[key].name ||
t( t(
@@ -166,7 +166,7 @@ let AdvancedSearch = (props) => {
optionsObj, optionsObj,
meta: { touched, error }, meta: { touched, error },
label, label,
errormsg, errormsg
}) => { }) => {
return ( return (
<> <>
@@ -224,7 +224,9 @@ let AdvancedSearch = (props) => {
: optionsObj[key] : optionsObj[key]
.attributevalue + .attributevalue +
"," + "," +
optionsObj[key].value optionsObj[
key
].value
.replace( .replace(
/(\band|[\s\-\+\(\)\,\&])/g, /(\band|[\s\-\+\(\)\,\&])/g,
"" ""
@@ -237,20 +239,23 @@ let AdvancedSearch = (props) => {
: _.isEmpty(optionsObj[key]) : _.isEmpty(optionsObj[key])
? "" ? ""
: _.isEmpty( : _.isEmpty(
optionsObj[key].value optionsObj[key]
.value
) )
? "" ? ""
: router.locale == "cy" : router.locale == "cy"
? jsonpath({ ? jsonpath({
path: path:
'$..[?(@ && @.value=="' + '$..[?(@ && @.value=="' +
optionsObj[key] optionsObj[
.value + key
].value +
'")].value_cy', '")].value_cy',
json: transLookup, json: transLookup,
eval: true, eval: true
}) })
: optionsObj[key].value || : optionsObj[key]
.value ||
t( t(
"case:summary-no-date-entered-label" "case:summary-no-date-entered-label"
)} )}
@@ -325,7 +330,7 @@ let AdvancedSearch = (props) => {
t( t(
"myportal:searchcases-validation-minlength" "myportal:searchcases-validation-minlength"
) )
), )
]} ]}
className="govuk-input govuk-!-width-two-thirds" className="govuk-input govuk-!-width-two-thirds"
component={RenderTextfield} component={RenderTextfield}
@@ -475,7 +480,7 @@ const mapStateToProps = (state) => {
myCases: state.myCases, myCases: state.myCases,
watchedCases: state.watchedCases, watchedCases: state.watchedCases,
myRepresentations: state.myRepresentations, myRepresentations: state.myRepresentations,
awaitingSubmission: state.awaitingSubmission, awaitingSubmission: state.awaitingSubmission
}; };
}; };
@@ -491,6 +496,6 @@ export default connect(
)( )(
reduxForm({ reduxForm({
form: "advancedSearchForm", form: "advancedSearchForm",
destroyOnUnmount: false, destroyOnUnmount: false
})(AdvancedSearch) })(AdvancedSearch)
); );
+3
View File
@@ -19,6 +19,9 @@ export default function MakeNewAppeal(props) {
<h2 className="govuk-heading-s"> <h2 className="govuk-heading-s">
{t("myportal:makenewappeal-card-title")} {t("myportal:makenewappeal-card-title")}
</h2> </h2>
<p className="govuk-body-s">
{t("myportal:makenewappeal-card-paragraph-zero")}
</p>
<p className="govuk-body-s"> <p className="govuk-body-s">
{t("myportal:makenewappeal-card-paragraph-one")}{" "} {t("myportal:makenewappeal-card-paragraph-one")}{" "}
<Link href={t("myportal:makenewappeal-card-guidance-link")}> <Link href={t("myportal:makenewappeal-card-guidance-link")}>
+11 -7
View File
@@ -36,7 +36,7 @@ const RenderTextfield = ({
htmlFor={id} htmlFor={id}
id={id + "_label"} id={id + "_label"}
> >
<span className="govuk-body-s">{hint1}</span> <p className="govuk-body-s">{hint1}</p>
</label> </label>
<ul className="govuk-body-s govuk-!-margin-top-3"> <ul className="govuk-body-s govuk-!-margin-top-3">
<li>{hint2} </li> <li>{hint2} </li>
@@ -89,7 +89,7 @@ let CaseSearch = (props) => {
throw new SubmissionError({ throw new SubmissionError({
basicSearch: t("myportal:searchcases-validation-required"), basicSearch: t("myportal:searchcases-validation-required"),
_error: "required", _error: "required"
}); });
} else { } else {
router.push({ router.push({
@@ -97,7 +97,7 @@ let CaseSearch = (props) => {
router.locale == "cy" router.locale == "cy"
? "/fymhorth/canlyniadauchwilio" ? "/fymhorth/canlyniadauchwilio"
: "/myportal/searchresults", : "/myportal/searchresults",
query: { q: values.basicSearch }, query: { q: values.basicSearch }
}); });
} }
}; };
@@ -111,13 +111,17 @@ let CaseSearch = (props) => {
{t("myportal:searchcases-card-title")} {t("myportal:searchcases-card-title")}
</h3> </h3>
<p className="govuk-body-s">
{t("myportal:searchcases-card-paragraph")}
</p>
<Field <Field
validate={[ validate={[
minLength( minLength(
t( t(
"myportal:searchcases-validation-minlength" "myportal:searchcases-validation-minlength"
) )
), )
]} ]}
className="govuk-input" className="govuk-input"
component={RenderTextfield} component={RenderTextfield}
@@ -143,7 +147,7 @@ let CaseSearch = (props) => {
"event", "event",
"MyPortalSearchButtonClicked", "MyPortalSearchButtonClicked",
{ {
searchTerm: basicSearch.value, searchTerm: basicSearch.value
} }
); );
}} }}
@@ -201,7 +205,7 @@ const mapStateToProps = (state) => {
myCases: state.myCases, myCases: state.myCases,
watchedCases: state.watchedCases, watchedCases: state.watchedCases,
myRepresentations: state.myRepresentations, myRepresentations: state.myRepresentations,
awaitingSubmission: state.awaitingSubmission, awaitingSubmission: state.awaitingSubmission
}; };
}; };
@@ -215,6 +219,6 @@ export default connect(
)( )(
reduxForm({ reduxForm({
form: "basicSearchForm", form: "basicSearchForm",
destroyOnUnmount: false, destroyOnUnmount: false
})(CaseSearch) })(CaseSearch)
); );
+2 -1
View File
@@ -24,7 +24,8 @@
"login-card-forgotten-link": "Cliciwch yma", "login-card-forgotten-link": "Cliciwch yma",
"login-via-gov-gateway-label": "Mewngofnodwch drwy Borth y Llywodraeth", "login-via-gov-gateway-label": "Mewngofnodwch drwy Borth y Llywodraeth",
"login-via-nextuth-label": "Mewngofnodwch gyda'ch cyfeiriad e-bost", "login-via-nextuth-label": "Mewngofnodwch gyda'ch cyfeiriad e-bost",
"casesearch-card-title": "Chwilio am achos", "casesearch-card-title": "Angen gwybodaeth am apêl neu gais?",
"casesearch-card-paragraph": "Mae ein gwybodaeth yn dangos manylion am apêl ac a allwch chi gyflwyno sylwadau yn ei herbyn.",
"casesearch-card-search-hint": "Defnyddiwch gyfeirnod yr achos, y prosiect Seilwaith neu gyfeirnod cais yr Awdurdod Cynllunio Lleol i chwilio. Bydd cyfeirnod yr achos yn debyg i un o'r canlynol:", "casesearch-card-search-hint": "Defnyddiwch gyfeirnod yr achos, y prosiect Seilwaith neu gyfeirnod cais yr Awdurdod Cynllunio Lleol i chwilio. Bydd cyfeirnod yr achos yn debyg i un o'r canlynol:",
"casesearch-card-search-example-label-1": "APP-A12345-A-21-1234567", "casesearch-card-search-example-label-1": "APP-A12345-A-21-1234567",
"casesearch-card-search-example-label-2": "CAS-12345-A1B2C3", "casesearch-card-search-example-label-2": "CAS-12345-A1B2C3",
+4 -2
View File
@@ -3,7 +3,8 @@
"viewall-link-count": "Gweld pob un o'r {{count}} o achosion", "viewall-link-count": "Gweld pob un o'r {{count}} o achosion",
"page-title": "Fy Mhorth", "page-title": "Fy Mhorth",
"lpa-portal-heading": "Porth LPA", "lpa-portal-heading": "Porth LPA",
"makenewappeal-card-title": "Gwneud apêl newydd", "makenewappeal-card-title": "A gafodd cais cynllunio ei wrthod?",
"makenewappeal-card-paragraph-zero": "Os yw eich cais cynllunio wedi cael ei wrthod gan eich Awdurdod Cynllunio Lleol, gallwch gyflwyno apêl yn erbyn eu penderfyniad.",
"makenewappeal-card-paragraph-one": "Cyn cyflwyno apêl newydd, gwnewch yn siŵr eich bod wedi darllen yr holl", "makenewappeal-card-paragraph-one": "Cyn cyflwyno apêl newydd, gwnewch yn siŵr eich bod wedi darllen yr holl",
"makenewappeal-card-link": "sy'n berthnasol i'r math o apêl sydd gennych.", "makenewappeal-card-link": "sy'n berthnasol i'r math o apêl sydd gennych.",
"makenewappeal-card-paragraph-two": "Unwaith y byddwch wedi dewis y botwm 'Gwneud apêl newydd', cewch eich arwain trwy broses i'ch helpu i ddewis yr apêl gywir.", "makenewappeal-card-paragraph-two": "Unwaith y byddwch wedi dewis y botwm 'Gwneud apêl newydd', cewch eich arwain trwy broses i'ch helpu i ddewis yr apêl gywir.",
@@ -15,7 +16,8 @@
"makenewappeal-card-guidance-link": "https://www.llyw.cymru/arweiniad-ar-apeliadau-cheisiadau", "makenewappeal-card-guidance-link": "https://www.llyw.cymru/arweiniad-ar-apeliadau-cheisiadau",
"makenewappeal-card-button-label": "Gwneud apêl newydd", "makenewappeal-card-button-label": "Gwneud apêl newydd",
"mycases-card-title": "Fy achosion", "mycases-card-title": "Fy achosion",
"searchcases-card-title": "Chwilio am achos", "searchcases-card-title": "Angen gwybodaeth am apêl neu gais?",
"searchcases-card-paragraph": "Mae ein gwybodaeth yn dangos manylion am apêl ac a allwch chi gyflwyno sylwadau yn ei herbyn.",
"searchcases-card-search-hint": "Defnyddiwch gyfeirnod yr achos, y prosiect Seilwaith neu gyfeirnod cais yr Awdurdod Cynllunio Lleol i chwilio. Bydd cyfeirnod yr achos yn debyg i un o'r canlynol:", "searchcases-card-search-hint": "Defnyddiwch gyfeirnod yr achos, y prosiect Seilwaith neu gyfeirnod cais yr Awdurdod Cynllunio Lleol i chwilio. Bydd cyfeirnod yr achos yn debyg i un o'r canlynol:",
"searchcases-card-search-example-label-1": "APP-A12345-A-21-1234567", "searchcases-card-search-example-label-1": "APP-A12345-A-21-1234567",
"searchcases-card-search-example-label-2": "CAS-12345-A1B2C3", "searchcases-card-search-example-label-2": "CAS-12345-A1B2C3",
+2 -1
View File
@@ -24,7 +24,8 @@
"login-card-forgotten-link": "Click here", "login-card-forgotten-link": "Click here",
"login-via-gov-gateway-label": "Log in via Government Gateway", "login-via-gov-gateway-label": "Log in via Government Gateway",
"login-via-nextuth-label": "Sign in with your email address", "login-via-nextuth-label": "Sign in with your email address",
"casesearch-card-title": "Search for a case", "casesearch-card-title": "Need information on an appeal or application?",
"casesearch-card-paragraph": "Our information shows details on an appeal and whether you can raise representations against it.",
"casesearch-card-search-hint": "Use the case reference, Infrastructure project or Local Planning Authority application reference to search. Case reference will be similar to one of the following:", "casesearch-card-search-hint": "Use the case reference, Infrastructure project or Local Planning Authority application reference to search. Case reference will be similar to one of the following:",
"casesearch-card-search-example-label-1": "APP-A12345-A-21-1234567", "casesearch-card-search-example-label-1": "APP-A12345-A-21-1234567",
"casesearch-card-search-example-label-2": "CAS-12345-A1B2C3", "casesearch-card-search-example-label-2": "CAS-12345-A1B2C3",
+4 -2
View File
@@ -3,7 +3,8 @@
"viewall-link-count": "View all {{count}} cases", "viewall-link-count": "View all {{count}} cases",
"page-title": "My Portal", "page-title": "My Portal",
"lpa-portal-heading": "LPA Portal", "lpa-portal-heading": "LPA Portal",
"makenewappeal-card-title": "Make a new appeal", "makenewappeal-card-title": "Had a planning application refused?",
"makenewappeal-card-paragraph-zero": "If you have had a planning application turned down by your Local Planning Authority, you can submit an appeal against their decision.",
"makenewappeal-card-paragraph-one": "Before submitting a new appeal, please ensure you have read all of the", "makenewappeal-card-paragraph-one": "Before submitting a new appeal, please ensure you have read all of the",
"makenewappeal-card-link": "relevant to your appeal type.", "makenewappeal-card-link": "relevant to your appeal type.",
"makenewappeal-card-paragraph-two": "Once you have selected the 'Make a new appeal' button, you will be guided through a process to help you choose the right type of appeal.", "makenewappeal-card-paragraph-two": "Once you have selected the 'Make a new appeal' button, you will be guided through a process to help you choose the right type of appeal.",
@@ -15,7 +16,8 @@
"makenewappeal-card-guidance-link": "https://www.gov.wales/planning-appeals-guidance", "makenewappeal-card-guidance-link": "https://www.gov.wales/planning-appeals-guidance",
"makenewappeal-card-button-label": "Make a new appeal", "makenewappeal-card-button-label": "Make a new appeal",
"mycases-card-title": "My cases", "mycases-card-title": "My cases",
"searchcases-card-title": "Search for a case", "searchcases-card-title": "Need information on an appeal or application?",
"searchcases-card-paragraph": "Our information shows details on an appeal and whether you can raise representations against it.",
"searchcases-card-search-hint": "Use the case reference, Infrastructure project or Local Planning Authority application reference to search. Case reference will be similar to one of the following:", "searchcases-card-search-hint": "Use the case reference, Infrastructure project or Local Planning Authority application reference to search. Case reference will be similar to one of the following:",
"searchcases-card-search-example-label-1": "APP-A12345-A-21-1234567", "searchcases-card-search-example-label-1": "APP-A12345-A-21-1234567",
"searchcases-card-search-example-label-2": "CAS-12345-A1B2C3", "searchcases-card-search-example-label-2": "CAS-12345-A1B2C3",