From e3bb321eaeedc515526450d4d478a49977d0d0fb Mon Sep 17 00:00:00 2001 From: robbond Date: Wed, 18 Mar 2026 14:10:54 +0000 Subject: [PATCH 1/2] 22081 welsh signin flow --- pages/api/auth/[...nextauth].js | 180 +++++++++----------------------- pages/auth/signin.js | 92 ++++------------ 2 files changed, 70 insertions(+), 202 deletions(-) diff --git a/pages/api/auth/[...nextauth].js b/pages/api/auth/[...nextauth].js index dfd544c0..75939546 100644 --- a/pages/api/auth/[...nextauth].js +++ b/pages/api/auth/[...nextauth].js @@ -15,67 +15,34 @@ import { PrismaClient } from "@prisma/client"; import NextAuth from "next-auth"; import EmailProvider from "next-auth/providers/email"; import { consoleLogger } from "../../../actions/core/logger"; -import { getPreferredLanguage } from "../../../actions/services/accountService"; const prisma = new PrismaClient(); -const parseUrl = (url) => { - const defaultUrl = new URL( - $( - (locale == "cy" - ? process.env.CY_API_ROOT - : process.env.NEXTAUTH_URL) + `/api/auth` - ) - ); - - if (url && !url.startsWith("http")) { - url = `https://${url}`; - } - - const _url = new URL(url ?? defaultUrl); - const path = (_url.pathname === "/" ? defaultUrl.pathname : _url.pathname) - // Remove trailing slash - .replace(/\/$/, ""); - - const base = `${_url.origin}${path}`; - - return { - origin: _url.origin, - host: _url.host, - path, - base, - toString: () => base - }; -}; - const appendParamsAndPathToNewUrl = (fromUrl, toUrl) => { - const fromUrlObj = new URL(fromUrl); // Parse the source URL - const params = fromUrlObj.searchParams; // Extract the query parameters + const fromUrlObj = new URL(fromUrl); + const params = fromUrlObj.searchParams; - const toUrlObj = new URL(toUrl); // Parse the new domain URL - toUrlObj.pathname = fromUrlObj.pathname; // Copy the path from the source URL + const toUrlObj = new URL(toUrl); + toUrlObj.pathname = fromUrlObj.pathname; - // Append only the parameters that don't already exist in the destination URL params.forEach((value, key) => { if (!toUrlObj.searchParams.has(key)) { - // Check if the parameter already exists toUrlObj.searchParams.append(key, value); } }); - return toUrlObj.toString(); // Return the full new URL as a string + return toUrlObj.toString(); }; -const authOptions = (locale, req, res) => { - //console.log(req.query.callbackUrl); - // let newURL = parseUrl( - // locale == "cy" - // ? "https://" + process.env.I18N_DOMAIN + ":3000" - // : process.env.NEXTAUTH_URL - // ); - // console.log("which locale", locale); - // console.log("which referer", req.body); - // console.log("cookie locale", req.cookies["pedw_locale"]); +const resolveLocale = (req) => + req?.query?.locale || + req?.body?.locale || + req?.cookies?.pedw_locale || + "en"; + +const authOptions = (req, res) => { + const locale = resolveLocale(req); + return { providers: [ { @@ -83,29 +50,19 @@ const authOptions = (locale, req, res) => { name: "emailAPI", type: "email", async sendVerificationRequest({ identifier: email, url }) { - const { host, port, protocol, token, searchParams } = - new URL(url); + const { host, protocol, searchParams } = new URL(url); + console.log( "============================================================\n", "verification url API: " + url + "\n", "============================================================\n" ); + const baseDomain = `${protocol}//${host}`; - const emailAddress = email; - const prefLang = await getPreferredLanguage(emailAddress); + const effectiveLocale = resolveLocale(req); - const registeredPrefLanguage = - prefLang.value.length > 0 - ? prefLang.value[0].pinswg_preferredlanguage === - 846040000 - ? "cy" - : "en" - : "en"; - - const effectiveLocale = registeredPrefLanguage ?? locale; - - let newURL = - effectiveLocale == "cy" + const newURL = + effectiveLocale === "cy" ? baseDomain + "/api/auth/callback/email?callbackUrl=" + encodeURIComponent(baseDomain + "/cy") + @@ -117,7 +74,7 @@ const authOptions = (locale, req, res) => { effectiveLocale : url; - let formURL = appendParamsAndPathToNewUrl(url, newURL); + const formURL = appendParamsAndPathToNewUrl(url, newURL); console.log( "============================================================\n", @@ -131,19 +88,14 @@ const authOptions = (locale, req, res) => { } }, EmailProvider({ - maxAge: 2 * 60 * 60, //10 * 60, // Magic links are valid for 10 min only + maxAge: 2 * 60 * 60, async sendVerificationRequest({ identifier: email, url }) { - const { host, port, protocol, token, searchParams } = - new URL(url); + const { host, protocol, searchParams } = new URL(url); const baseDomain = `${protocol}//${host}`; const templateId = "b1b5704b-9bb8-4deb-a75c-d887ca902661"; const templateIdcy = "0614ce53-cd5f-421f-a1a5-8c8486a9113a"; - const emailAddress = email; - - const queryLocale = req?.query?.locale || req?.body?.locale; - const cookieLocale = req.cookies["pedw_locale"]; - let locale = queryLocale || cookieLocale || "en"; + const effectiveLocale = resolveLocale(req); console.log( "============================================================\n", @@ -151,19 +103,8 @@ const authOptions = (locale, req, res) => { "============================================================\n" ); - const prefLang = await getPreferredLanguage(emailAddress); - - const registeredPrefLanguage = - prefLang.value.length > 0 - ? prefLang.value[0].pinswg_preferredlanguage === - 846040000 - ? "cy" - : "en" - : "en"; - - const effectiveLocale = registeredPrefLanguage ?? locale; - let newURL = - effectiveLocale == "cy" + const newURL = + effectiveLocale === "cy" ? baseDomain + "/api/auth/callback/email?callbackUrl=" + encodeURIComponent(baseDomain + "/cy") + @@ -175,7 +116,7 @@ const authOptions = (locale, req, res) => { effectiveLocale : url; - let formURL = appendParamsAndPathToNewUrl(url, newURL); + const formURL = appendParamsAndPathToNewUrl(url, newURL); console.log( "============================================================\n", @@ -184,16 +125,11 @@ const authOptions = (locale, req, res) => { ); const personalisation = { - "emailAddress": email, - "signInLink": formURL, - // locale == "cy" - // ? url.split("&token")[0] + - // "/cy&token" + - // url.split("&token")[1] - // : url, - - "linkExpiry": 2 * 60 * 60 + emailAddress: email, + signInLink: formURL, + linkExpiry: 2 * 60 * 60 }; + const reference = "PEDW-SIGNIN"; var NotifyClient = @@ -205,15 +141,15 @@ const authOptions = (locale, req, res) => { await notifyClient .sendEmail( - effectiveLocale == "cy" ? templateIdcy : templateId, - emailAddress, + effectiveLocale === "cy" + ? templateIdcy + : templateId, + email, { - personalisation: personalisation, - reference: reference - // emailReplyToId: emailReplyToId, + personalisation, + reference } ) - //.then((response) => console.log(response)) .catch((error) => consoleLogger(error)); } }) @@ -227,7 +163,7 @@ const authOptions = (locale, req, res) => { theme: "dark", debug: true, maxAge: 30 * 60, - updateAge: 5 * 60 // 24 hours + updateAge: 5 * 60 }, cookies: { callbackUrl: { @@ -240,11 +176,11 @@ const authOptions = (locale, req, res) => { } }, pages: { - signIn: (locale == "cy" ? "/cy" : "") + "/auth/signin", - error: (locale == "cy" ? "/cy" : "") + "/auth/error", // Error code passed in query string as ?error= + signIn: (locale === "cy" ? "/cy" : "") + "/auth/signin", + error: (locale === "cy" ? "/cy" : "") + "/auth/error", verifyRequest: - (locale == "cy" ? "/cy" : "") + "/auth/verify-request", // (used for check email message) - newUser: (locale == "cy" ? "/cy" : "") + "/account/register" // New users will be directed here on first sign in (leave the property out if not of interest) + (locale === "cy" ? "/cy" : "") + "/auth/verify-request", + newUser: (locale === "cy" ? "/cy" : "") + "/account/register" }, callbacks: { session: async (session, user) => { @@ -253,28 +189,19 @@ const authOptions = (locale, req, res) => { }, redirect({ url, baseUrl }) { - //debugger; console.log("baseurl:", url, baseUrl); - // Allows relative callback URLs - if (url.startsWith("/")) return `${baseUrl}${url}`; - // Allows callback URLs on the same origin - else if (new URL(url).origin === baseUrl) return url; - const originalUrl = url; - let newUrl = - locale == "cy" + if (url.startsWith("/")) return `${baseUrl}${url}`; + if (new URL(url).origin === baseUrl) return url; + + const effectiveLocale = resolveLocale(req); + const newUrl = + effectiveLocale === "cy" ? process.env.CY_API_ROOT : process.env.NEXTAUTH_URL; - const updatedUrl = appendParamsAndPathToNewUrl( - originalUrl, - newUrl - ); + const updatedUrl = appendParamsAndPathToNewUrl(url, newUrl); console.log(updatedUrl); - - //return baseUrl; - - console.log("the url:", updatedUrl); return updatedUrl; } } @@ -282,14 +209,7 @@ const authOptions = (locale, req, res) => { }; const NextAuthPEDW = (req, res) => { - //console.log("----------", authOptions(req.cookies["pedw_locale"])); - - //console.log("----------", - return NextAuth( - req, - res, - authOptions(req.cookies["pedw_locale"], req, res) - ); + return NextAuth(req, res, authOptions(req, res)); }; export default NextAuthPEDW; diff --git a/pages/auth/signin.js b/pages/auth/signin.js index 941e2775..b0113660 100644 --- a/pages/auth/signin.js +++ b/pages/auth/signin.js @@ -7,55 +7,28 @@ import CookieBanner from "../../components/cookieBanner"; import Footer from "../../components/footer"; import Header from "../../components/header"; import ServiceBanner from "../../components/servicebanner"; -import { getPreferredLanguage } from "../../actions/services/accountService"; import { setCookie } from "nookies"; const SignIn = (props) => { let { t, lang } = useTranslation(); const { footerLinks, pages, csrfToken, callbackUrl } = props; - let formURL = - new URL(window.location.href).protocol + - "//" + - new URL(window.location.href).hostname + - ":" + - new URL(window.location.href).port + - "/api/auth/signin/email"; - const [buttonDisabled, setButtonDisabled] = useState(false); const handleSubmit = async (event) => { event.preventDefault(); setButtonDisabled(true); - const email = event.target.email.value; + const currentLocale = lang || "en"; + const url = new URL(event.target.callbackUrl.value); + url.searchParams.set("locale", currentLocale); - try { - const res = await getPreferredLanguage(encodeURIComponent(email)); - const data = await res; + setCookie(null, "pedw_locale", currentLocale, { + path: "/", + maxAge: 60 * 60 * 24 * 365 + }); - const userLang = - data.value.length > 0 - ? data.value[0].pinswg_preferredlanguage === 846040000 - ? "cy" - : "en" - : "en"; - - // Modify callbackUrl hidden input to add/update lang param - const url = new URL(event.target.callbackUrl.value); - url.searchParams.set("locale", userLang); - - setCookie(null, "pedw_locale", userLang, { - path: "/", - maxAge: 60 * 60 * 24 * 365 - }); - - event.target.callbackUrl.value = url.toString(); - } catch (error) { - console.error("Failed to get preferred language", error); - } - - // Submit form after updating callbackUrl + event.target.callbackUrl.value = url.toString(); event.target.submit(); }; @@ -97,11 +70,7 @@ const SignIn = (props) => { action="/api/auth/signin/email" onSubmit={handleSubmit} > -
+
{ { - const fromUrlObj = new URL(fromUrl); // Parse the source URL - const params = fromUrlObj.searchParams; // Extract the query parameters + const fromUrlObj = new URL(fromUrl); + const params = fromUrlObj.searchParams; - const toUrlObj = new URL(toUrl); // Parse the new domain URL - toUrlObj.pathname = fromUrlObj.pathname; // Copy the path from the source URL + const toUrlObj = new URL(toUrl); + toUrlObj.pathname = fromUrlObj.pathname; - // Append the query parameters to the new URL params.forEach((value, key) => toUrlObj.searchParams.append(key, value) ); - return toUrlObj.toString(); // Return the full new URL as a string + return toUrlObj.toString(); }; typeof context.query.callbackUrl != "undefined" && @@ -221,19 +177,11 @@ export async function getServerSideProps(context) { formURL )); - //formURL = appendParamsAndPathToNewUrl(context.query.callbackUrl, formURL); - - const url = new URL(formURL); // base URL - - const params = new URLSearchParams(url.search); - params.append("locale", context.locale); - - url.search = params.toString(); - - console.log("========== callback: ", url.toString()); + const url = new URL(formURL); + url.searchParams.set("locale", context.locale || "en"); return { - props: { csrfToken: csrfToken, callbackUrl: url.toString() } + props: { csrfToken, callbackUrl: url.toString() } }; } From 20b07ec3d5fa207cb22f1118a8a8e53270531a7d Mon Sep 17 00:00:00 2001 From: robbond Date: Wed, 18 Mar 2026 14:11:37 +0000 Subject: [PATCH 2/2] 22079 mockup --- components/homepage/casesearch.js | 18 +++--- components/myportal.js | 13 ++-- components/myportal/advancedsearch.js | 85 ++++++++++++++------------- components/myportal/makenewappeal.js | 3 + components/myportal/searchcases.js | 18 +++--- locales/cy/home.json | 3 +- locales/cy/myportal.json | 6 +- locales/en/home.json | 3 +- locales/en/myportal.json | 6 +- 9 files changed, 88 insertions(+), 67 deletions(-) diff --git a/components/homepage/casesearch.js b/components/homepage/casesearch.js index 40d54017..73d0c823 100644 --- a/components/homepage/casesearch.js +++ b/components/homepage/casesearch.js @@ -37,7 +37,7 @@ const RenderTextfield = ({ htmlFor={id} id={id + "_label"} > - {hint1} +

{hint1}

  • {hint2}
  • @@ -90,7 +90,7 @@ let CaseSearch = (props) => { throw new SubmissionError({ basicSearch: t("home:casesearch-search-validation-required"), - _error: "required", + _error: "required" }); } else { router.push({ @@ -98,7 +98,7 @@ let CaseSearch = (props) => { router.locale == "cy" ? "/canlyniadauchwilio" : "/searchresults", - query: { q: values.basicSearch }, + query: { q: values.basicSearch } }); } }; @@ -111,14 +111,16 @@ let CaseSearch = (props) => {

    {t("home:casesearch-card-title")}

    - +

    + {t("home:casesearch-card-paragraph")} +

    { "event", "SearchButtonClicked", { - searchTerm: basicSearch.value, + searchTerm: basicSearch.value } ); }} @@ -193,7 +195,7 @@ const mapStateToProps = (state) => { myCases: state.myCases, watchedCases: state.watchedCases, myRepresentations: state.myRepresentations, - awaitingSubmission: state.awaitingSubmission, + awaitingSubmission: state.awaitingSubmission }; }; @@ -207,6 +209,6 @@ export default connect( )( reduxForm({ form: "basicSearchForm", - destroyOnUnmount: false, + destroyOnUnmount: false })(CaseSearch) ); diff --git a/components/myportal.js b/components/myportal.js index 7c8bdfc3..526df56a 100644 --- a/components/myportal.js +++ b/components/myportal.js @@ -27,14 +27,14 @@ const MyPortal = (props) => { const handleLogout = () => { console.info("////////////\n" + "logout" + "\n////////////"); - window.localStorage.clear(), + (window.localStorage.clear(), destroyCookie(null, "next-auth.csrf-token", { path: "/" }), destroyCookie(null, "next-auth.callback-url", { path: "/" }), destroyCookie(null, "pedw_locale", { path: "/" }), destroyCookie(null, "pinsUser", { path: "/" }), signOut({ - callbackUrl: locale == "cy" ? "/cy/allgofnodi" : "/logout", - }); + callbackUrl: locale == "cy" ? "/cy/allgofnodi" : "/logout" + })); }; const isLPA = @@ -114,7 +114,7 @@ const MyPortal = (props) => { ] + '")].value_cy', json: transLookup, - eval: true, + eval: true }) : props.accountDetails.accountDetails[ "pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue" @@ -126,10 +126,11 @@ const MyPortal = (props) => {
    + {!isLPA && ( )} - + {/* {props.awaitingSubmission.awaitingSubmission[ "@odata.count" ] > 0 && ( @@ -143,7 +144,7 @@ const MyPortal = (props) => { {!isLPA && _.has(props.awaitingSubmission, [ "awaitingSubmissionFromBlob", - "@odata.count", + "@odata.count" ]) && props.awaitingSubmission .awaitingSubmissionFromBlob[ diff --git a/components/myportal/advancedsearch.js b/components/myportal/advancedsearch.js index 1525acbf..7e52a6ca 100644 --- a/components/myportal/advancedsearch.js +++ b/components/myportal/advancedsearch.js @@ -88,7 +88,7 @@ let AdvancedSearch = (props) => { optionsObj, meta: { touched, error }, label, - errormsg, + errormsg }) => { return ( <> @@ -143,7 +143,7 @@ let AdvancedSearch = (props) => { .name + '")].value_cy', json: transLookup, - eval: true, + eval: true }) : optionsObj[key].name || t( @@ -166,7 +166,7 @@ let AdvancedSearch = (props) => { optionsObj, meta: { touched, error }, label, - errormsg, + errormsg }) => { return ( <> @@ -213,47 +213,52 @@ let AdvancedSearch = (props) => { _.isEmpty(optionsObj[key]) ? "" : _.isEmpty( - optionsObj[key] - ) - ? "" - : _.isEmpty( - optionsObj[key] - .value - ) - ? "" - : optionsObj[key] - .attributevalue + - "," + - optionsObj[key].value - .replace( - /(\band|[\s\-\+\(\)\,\&])/g, - "" + optionsObj[key] + ) + ? "" + : _.isEmpty( + optionsObj[key] + .value ) - .toLowerCase() + ? "" + : optionsObj[key] + .attributevalue + + "," + + optionsObj[ + key + ].value + .replace( + /(\band|[\s\-\+\(\)\,\&])/g, + "" + ) + .toLowerCase() } > {_.isEmpty(optionsObj[key]) ? "" : _.isEmpty(optionsObj[key]) - ? "" - : _.isEmpty( - optionsObj[key].value - ) - ? "" - : router.locale == "cy" - ? jsonpath({ - path: - '$..[?(@ && @.value=="' + + ? "" + : _.isEmpty( optionsObj[key] - .value + - '")].value_cy', - json: transLookup, - eval: true, - }) - : optionsObj[key].value || - t( - "case:summary-no-date-entered-label" - )} + .value + ) + ? "" + : router.locale == "cy" + ? jsonpath({ + path: + '$..[?(@ && @.value=="' + + optionsObj[ + key + ].value + + '")].value_cy', + json: transLookup, + eval: true + }) + : optionsObj[key] + .value || + t( + "case:summary-no-date-entered-label" + )} ); })} @@ -325,7 +330,7 @@ let AdvancedSearch = (props) => { t( "myportal:searchcases-validation-minlength" ) - ), + ) ]} className="govuk-input govuk-!-width-two-thirds" component={RenderTextfield} @@ -475,7 +480,7 @@ const mapStateToProps = (state) => { myCases: state.myCases, watchedCases: state.watchedCases, myRepresentations: state.myRepresentations, - awaitingSubmission: state.awaitingSubmission, + awaitingSubmission: state.awaitingSubmission }; }; @@ -491,6 +496,6 @@ export default connect( )( reduxForm({ form: "advancedSearchForm", - destroyOnUnmount: false, + destroyOnUnmount: false })(AdvancedSearch) ); diff --git a/components/myportal/makenewappeal.js b/components/myportal/makenewappeal.js index a2ceedd7..70ceee0d 100644 --- a/components/myportal/makenewappeal.js +++ b/components/myportal/makenewappeal.js @@ -19,6 +19,9 @@ export default function MakeNewAppeal(props) {

    {t("myportal:makenewappeal-card-title")}

    +

    + {t("myportal:makenewappeal-card-paragraph-zero")} +

    {t("myportal:makenewappeal-card-paragraph-one")}{" "} diff --git a/components/myportal/searchcases.js b/components/myportal/searchcases.js index 38609674..8f71d36a 100644 --- a/components/myportal/searchcases.js +++ b/components/myportal/searchcases.js @@ -36,7 +36,7 @@ const RenderTextfield = ({ htmlFor={id} id={id + "_label"} > - {hint1} +

    {hint1}

    • {hint2}
    • @@ -89,7 +89,7 @@ let CaseSearch = (props) => { throw new SubmissionError({ basicSearch: t("myportal:searchcases-validation-required"), - _error: "required", + _error: "required" }); } else { router.push({ @@ -97,7 +97,7 @@ let CaseSearch = (props) => { router.locale == "cy" ? "/fymhorth/canlyniadauchwilio" : "/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-paragraph")} +

      + { "event", "MyPortalSearchButtonClicked", { - searchTerm: basicSearch.value, + searchTerm: basicSearch.value } ); }} @@ -201,7 +205,7 @@ const mapStateToProps = (state) => { myCases: state.myCases, watchedCases: state.watchedCases, myRepresentations: state.myRepresentations, - awaitingSubmission: state.awaitingSubmission, + awaitingSubmission: state.awaitingSubmission }; }; @@ -215,6 +219,6 @@ export default connect( )( reduxForm({ form: "basicSearchForm", - destroyOnUnmount: false, + destroyOnUnmount: false })(CaseSearch) ); diff --git a/locales/cy/home.json b/locales/cy/home.json index 616862ef..1903e6c8 100644 --- a/locales/cy/home.json +++ b/locales/cy/home.json @@ -24,7 +24,8 @@ "login-card-forgotten-link": "Cliciwch yma", "login-via-gov-gateway-label": "Mewngofnodwch drwy Borth y Llywodraeth", "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-example-label-1": "APP-A12345-A-21-1234567", "casesearch-card-search-example-label-2": "CAS-12345-A1B2C3", diff --git a/locales/cy/myportal.json b/locales/cy/myportal.json index e3b966d6..ba33b3cd 100644 --- a/locales/cy/myportal.json +++ b/locales/cy/myportal.json @@ -3,7 +3,8 @@ "viewall-link-count": "Gweld pob un o'r {{count}} o achosion", "page-title": "Fy Mhorth", "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-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.", @@ -15,7 +16,8 @@ "makenewappeal-card-guidance-link": "https://www.llyw.cymru/arweiniad-ar-apeliadau-cheisiadau", "makenewappeal-card-button-label": "Gwneud apêl newydd", "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-example-label-1": "APP-A12345-A-21-1234567", "searchcases-card-search-example-label-2": "CAS-12345-A1B2C3", diff --git a/locales/en/home.json b/locales/en/home.json index 4f1dcf59..34ba1dfb 100644 --- a/locales/en/home.json +++ b/locales/en/home.json @@ -24,7 +24,8 @@ "login-card-forgotten-link": "Click here", "login-via-gov-gateway-label": "Log in via Government Gateway", "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-example-label-1": "APP-A12345-A-21-1234567", "casesearch-card-search-example-label-2": "CAS-12345-A1B2C3", diff --git a/locales/en/myportal.json b/locales/en/myportal.json index 098ca87b..ee74c92b 100644 --- a/locales/en/myportal.json +++ b/locales/en/myportal.json @@ -3,7 +3,8 @@ "viewall-link-count": "View all {{count}} cases", "page-title": "My 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-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.", @@ -15,7 +16,8 @@ "makenewappeal-card-guidance-link": "https://www.gov.wales/planning-appeals-guidance", "makenewappeal-card-button-label": "Make a new appeal", "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-example-label-1": "APP-A12345-A-21-1234567", "searchcases-card-search-example-label-2": "CAS-12345-A1B2C3",