Merged PR 2420: added welsh translations of api endpoints

added welsh translations of api endpoints

Related work items: #23879
This commit is contained in:
Robert Bond
2026-06-23 10:38:24 +00:00
parent d7bb1acb10
commit 6d0bc35612
13 changed files with 171 additions and 119 deletions
+1
View File
@@ -44,6 +44,7 @@ const Case = (props) => {
showLoginCheck={props.showLoginCheck} showLoginCheck={props.showLoginCheck}
eventsObj={props.eventsObj} eventsObj={props.eventsObj}
mediaObj={props.mediaObj} mediaObj={props.mediaObj}
mapTarget={props.mapTarget}
/> />
{showRepresentations == true && ( {showRepresentations == true && (
<RepresentationList <RepresentationList
+6 -3
View File
@@ -66,7 +66,7 @@ import CaseNoticeBanner from "./caseNoticeBanner";
import WatchModal from "./watchmodal"; import WatchModal from "./watchmodal";
import EIADetails from "./eia"; import EIADetails from "./eia";
import GoogleMapComponent from "../mapping"; import MapComponent from "../mapping";
import OSPoint from "ospoint"; import OSPoint from "ospoint";
const CaseSummary = (props) => { const CaseSummary = (props) => {
@@ -95,7 +95,8 @@ const CaseSummary = (props) => {
currentView, currentView,
messagesObj, messagesObj,
docsOffline, docsOffline,
ticketnumber ticketnumber,
mapTarget
} = props; } = props;
const showLoginCheck = const showLoginCheck =
@@ -1533,9 +1534,11 @@ const CaseSummary = (props) => {
width: "100%" width: "100%"
}} }}
> >
<GoogleMapComponent <MapComponent
center={center} center={center}
zoom={zoom} zoom={zoom}
locale={router.locale}
mapTarget={mapTarget}
/> />
{/* <OSMapComponent center={center} zoom={zoom} /> */} {/* <OSMapComponent center={center} zoom={zoom} /> */}
</div> </div>
+2 -6
View File
@@ -7,7 +7,7 @@ import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow"; import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue"; import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
import GoogleMapComponent from "../../mapping/"; import MapComponent from "../../mapping/";
import OSPoint from "ospoint"; import OSPoint from "ospoint";
import { getBilingualText } from "../summary/utils/helpers"; import { getBilingualText } from "../summary/utils/helpers";
@@ -71,11 +71,7 @@ const Pinswg_dnsid = (props) => {
width: "100%" width: "100%"
}} }}
> >
<GoogleMapComponent <MapComponent center={center} zoom={zoom} />
center={center}
zoom={zoom}
/>
{/* <OSMapComponent center={center} zoom={zoom} /> */}
</div> </div>
</div> </div>
)} )}
@@ -7,7 +7,7 @@ import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow"; import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue"; import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
import GoogleMapComponent from "../../mapping"; import MapComponent from "../../mapping";
import OSPoint from "ospoint"; import OSPoint from "ospoint";
+7 -35
View File
@@ -1,7 +1,7 @@
import { he } from "date-fns/locale"; import { he } from "date-fns/locale";
import GoogleMapReact from "google-map-react"; import GoogleMapReact from "google-map-react";
const GoogleMapComponent = (props) => { const MapComponent = (props) => {
const { center, zoom } = props; const { center, zoom, locale, mapTarget } = props;
let data = [center]; let data = [center];
@@ -23,31 +23,8 @@ const GoogleMapComponent = (props) => {
} }
}; };
// console.log(
// "https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
// props.center.lng +
// "," +
// props.center.lat +
// "&zoom=12#/"
// );
return ( return (
// <GoogleMapReact
// options={function (maps) {
// return {
// overviewMapControl: true,
// mapTypeControl: true,
// };
// }}
// bootstrapURLKeys={{
// key: "AIzaSyCzeVrHt544bp_72YCFkw21eDsmI2JEsQo",
// }}
// defaultCenter={center}
// defaultZoom={zoom}
// yesIWantToUseGoogleMapApiInternals
// onGoogleApiLoaded={({ map, maps }) => ModelsMap(map, maps)}
// ></GoogleMapReact>
<> <>
{" "}
<div className="govuk-grid-row"> <div className="govuk-grid-row">
<div className="govuk-grid-column-full"> <div className="govuk-grid-column-full">
<a <a
@@ -62,21 +39,16 @@ const GoogleMapComponent = (props) => {
className="govuk-link govuk-link--no-underline govuk-!-font-size-14 " className="govuk-link govuk-link--no-underline govuk-!-font-size-14 "
target="_blank" target="_blank"
> >
See this map on Datamap Wales {locale === "cy"
? "Gweler y map hwn ar Datamap Cymru"
: "See this map on Datamap Wales "}
</a> </a>
</div> </div>
</div> </div>
<div className="govuk-grid-row"> <div className="govuk-grid-row">
<div className="govuk-grid-column-full"> <div className="govuk-grid-column-full">
<iframe <iframe
src={ src={`https://${locale === "cy" ? "mapdata.llyw.cymru" : "datamap.gov.wales"}/maps/${mapTarget}/embed?center=${center.lng},${center.lat}&zoom=7#/`}
"https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
props.center.lng +
"," +
props.center.lat +
"&zoom=7#/"
}
//src={"https://datamap.gov.wales/maps/pedw-dev/embed#/"}
width={"100%"} width={"100%"}
style={{ maxHeight: "400px" }} style={{ maxHeight: "400px" }}
height={"500px"} height={"500px"}
@@ -88,4 +60,4 @@ const GoogleMapComponent = (props) => {
); );
}; };
export default GoogleMapComponent; export default MapComponent;
+6 -5
View File
@@ -429,7 +429,8 @@ const DNSSearchResults = (props) => {
href={ href={
router.locale == "cy" router.locale == "cy"
? myportal == true ? myportal == true
? "/fymhorth/dns" ? "/fymhorth/dns/" +
item.ticketnumber
: "/dns/" + : "/dns/" +
item.ticketnumber item.ticketnumber
: myportal == true : myportal == true
@@ -913,7 +914,7 @@ const DNSSearchResults = (props) => {
<div className="govuk-grid-column-full"> <div className="govuk-grid-column-full">
<div className="map-container map-container--expanded"> <div className="map-container map-container--expanded">
<iframe <iframe
src={`https://datamap.gov.wales/maps/${mapTarget}/embed?center=-3.6553189192727347,52.214962933659415&zoom=2#/`} src={`https://${locale === "cy" ? "mapdata.llyw.cymru" : "datamap.gov.wales"}/maps/${mapTarget}/embed?center=-3.6553189192727347,52.214962933659415&zoom=2#/`}
width="100%" width="100%"
height="600" height="600"
frameBorder="0" frameBorder="0"
@@ -924,7 +925,7 @@ const DNSSearchResults = (props) => {
className="govuk-link map-expand-link" className="govuk-link map-expand-link"
onClick={() => setIsMapExpanded(false)} onClick={() => setIsMapExpanded(false)}
> >
Reduce map {t("dnsApplications:reduce-map-link")}
</button> </button>
</div> </div>
</div> </div>
@@ -992,7 +993,7 @@ const DNSSearchResults = (props) => {
<div className="govuk-grid-column-one-half"> <div className="govuk-grid-column-one-half">
<div className="map-container"> <div className="map-container">
<iframe <iframe
src={`https://datamap.gov.wales/maps/${mapTarget}/embed?center=-3.6553189192727347,52.214962933659415&zoom=2#/`} src={`https://${locale === "cy" ? "mapdata.llyw.cymru" : "datamap.gov.wales"}/maps/${mapTarget}/embed?center=-3.6553189192727347,52.214962933659415&zoom=2#/`}
width="100%" width="100%"
height="500" height="500"
frameBorder="0" frameBorder="0"
@@ -1005,7 +1006,7 @@ const DNSSearchResults = (props) => {
className="govuk-link map-expand-link mapSizeButton" className="govuk-link map-expand-link mapSizeButton"
onClick={() => setIsMapExpanded(true)} onClick={() => setIsMapExpanded(true)}
> >
Enlarge map {t("dnsApplications:enlarge-map-link")}
</button> </button>
</div> </div>
)} )}
+3 -1
View File
@@ -13,5 +13,7 @@
"result-list-heading-label-application": "Cais", "result-list-heading-label-application": "Cais",
"result-list-heading-label-developer": "Datblygwr", "result-list-heading-label-developer": "Datblygwr",
"result-list-heading-label-type": "Math", "result-list-heading-label-type": "Math",
"result-list-heading-label-status": "Statws" "result-list-heading-label-status": "Statws",
"enlarge-map-link": "Ehangu'r map",
"reduce-map-link": "Lleihau'r map"
} }
+3 -1
View File
@@ -13,5 +13,7 @@
"result-list-heading-label-application": "Application", "result-list-heading-label-application": "Application",
"result-list-heading-label-developer": "Developer", "result-list-heading-label-developer": "Developer",
"result-list-heading-label-type": "Type", "result-list-heading-label-type": "Type",
"result-list-heading-label-status": "Status" "result-list-heading-label-status": "Status",
"enlarge-map-link": "Enlarge map",
"reduce-map-link": "Reduce map"
} }
+7 -7
View File
@@ -14,7 +14,7 @@ export function middleware(request) {
font-src 'self' https://pro.fontawesome.com/ https://fonts.gstatic.com/ ; font-src 'self' https://pro.fontawesome.com/ https://fonts.gstatic.com/ ;
object-src 'none'; object-src 'none';
base-uri 'self'; base-uri 'self';
frame-src https://datamap.gov.wales/ https://www.youtube.com https://www.youtube-nocookie.com; frame-src https://datamap.gov.wales/ https://mapdata.llyw.cymru/ https://www.youtube.com https://www.youtube-nocookie.com;
form-action 'self' ` + form-action 'self' ` +
process.env.NEXTAUTH_URL + process.env.NEXTAUTH_URL +
`; `;
@@ -49,17 +49,17 @@ export function middleware(request) {
// CSP policy // CSP policy
requestHeaders.set( requestHeaders.set(
"Content-Security-Policy", "Content-Security-Policy",
contentSecurityPolicyHeaderValue, contentSecurityPolicyHeaderValue
); );
const response = NextResponse.next({ const response = NextResponse.next({
request: { request: {
headers: requestHeaders, headers: requestHeaders
}, }
}); });
response.headers.set( response.headers.set(
"Content-Security-Policy", "Content-Security-Policy",
contentSecurityPolicyHeaderValue, contentSecurityPolicyHeaderValue
); );
// XSS protection (legacy) // XSS protection (legacy)
@@ -77,13 +77,13 @@ export function middleware(request) {
// Permissions lockdown // Permissions lockdown
response.headers.set( response.headers.set(
"Permissions-Policy", "Permissions-Policy",
"geolocation=(), camera=(), microphone=(), fullscreen=(self)", "geolocation=(), camera=(), microphone=(), fullscreen=(self)"
); );
// Enforce HTTPS via HSTS // Enforce HTTPS via HSTS
response.headers.set( response.headers.set(
"Strict-Transport-Security", "Strict-Transport-Security",
"max-age=63072000; includeSubDomains; preload", "max-age=63072000; includeSubDomains; preload"
); );
return response; return response;
+59 -55
View File
@@ -22,32 +22,32 @@ const nextBuildId = require("next-build-id");
const securityHeaders = [ const securityHeaders = [
{ {
key: "X-DNS-Prefetch-Control", key: "X-DNS-Prefetch-Control",
value: "on", value: "on"
}, },
{ {
key: "X-Frame-Options", key: "X-Frame-Options",
value: "SAMEORIGIN", value: "SAMEORIGIN"
}, },
{ {
key: "X-Content-Type-Options", key: "X-Content-Type-Options",
value: "nosniff", value: "nosniff"
}, },
{ {
key: "X-Permitted-Cross-Domain-Policies", key: "X-Permitted-Cross-Domain-Policies",
value: "none", value: "none"
}, },
{ {
key: "Referrer-Policy", key: "Referrer-Policy",
value: "origin-when-cross-origin", //no-referrer value: "origin-when-cross-origin" //no-referrer
}, },
{ {
key: "Strict-Transport-Security", key: "Strict-Transport-Security",
value: "max-age=63072000; includeSubDomains; preload", value: "max-age=63072000; includeSubDomains; preload"
}, },
{ {
key: "X-XSS-Protection", key: "X-XSS-Protection",
value: "1; mode=block", value: "1; mode=block"
}, }
// { // {
// key: "Content-Security-Policy", // key: "Content-Security-Policy",
// value: "frame-src 'self'; child-src 'self';object-src 'none'; script-src 'self' 'https://www.googletagmanager.com' unsafe-inline", // value: "frame-src 'self'; child-src 'self';object-src 'none'; script-src 'self' 'https://www.googletagmanager.com' unsafe-inline",
@@ -61,11 +61,11 @@ module.exports = {
eslint: { eslint: {
// Warning: This allows production builds to successfully complete even if // Warning: This allows production builds to successfully complete even if
// your project has ESLint errors. // your project has ESLint errors.
ignoreDuringBuilds: true, ignoreDuringBuilds: true
}, },
reactStrictMode: false, reactStrictMode: false,
env: { env: {
BUILD_ID_ENV: buildId, BUILD_ID_ENV: buildId
}, },
swcMinify: false, swcMinify: false,
sassOptions: { sassOptions: {
@@ -73,16 +73,16 @@ module.exports = {
"/styles/sass", "/styles/sass",
"node_modules/govuk-frontend/govuk/all", "node_modules/govuk-frontend/govuk/all",
"/styles/sass/patterns", "/styles/sass/patterns",
"/styles/sass/welshgov", "/styles/sass/welshgov"
], // @import 'variables'; # loads (src/styles/varialbes.scss), you got it.. ] // @import 'variables'; # loads (src/styles/varialbes.scss), you got it..
}, },
async headers() { async headers() {
return [ return [
{ {
// Apply these headers to all routes in your application. // Apply these headers to all routes in your application.
source: "/(.*)?", source: "/(.*)?",
headers: securityHeaders, headers: securityHeaders
}, }
]; ];
}, },
generateBuildId: () => buildId, generateBuildId: () => buildId,
@@ -91,71 +91,75 @@ module.exports = {
return [ return [
{ {
source: "/ceisiadaudns", source: "/ceisiadaudns",
destination: "/dnsapplications", destination: "/dnsapplications"
}, },
{ {
source: "/manyliondns", source: "/manyliondns",
destination: "/dnsdetails", destination: "/dnsdetails"
}, },
{ {
source: "/canlyniadauchwilio", source: "/canlyniadauchwilio",
destination: "/searchresults", destination: "/searchresults"
}, },
{ {
source: "/fymhorth/canlyniadauchwilio", source: "/fymhorth/canlyniadauchwilio",
destination: "/myportal/searchresults", destination: "/myportal/searchresults"
}, },
{ {
source: "/cyswllt", source: "/cyswllt",
destination: "/contactus", destination: "/contactus"
}, },
{ {
source: "/fymhorth/cyswllt", source: "/fymhorth/cyswllt",
destination: "/myportal/contactus", destination: "/myportal/contactus"
}, },
{ {
source: "/chwiliouwch", source: "/chwiliouwch",
destination: "/advancedsearch", destination: "/advancedsearch"
}, },
{ {
source: "/chwiliadcyfeiriadau", source: "/chwiliadcyfeiriadau",
destination: "/addresssearch", destination: "/addresssearch"
}, },
{ {
source: "/fymhorth/chwiliouwch", source: "/fymhorth/chwiliouwch",
destination: "/myportal/advancedsearch", destination: "/myportal/advancedsearch"
}, },
{ {
source: "/fymhorth/chwiliadcyfeiriadau", source: "/fymhorth/chwiliadcyfeiriadau",
destination: "/myportal/addresssearch", destination: "/myportal/addresssearch"
}, },
{ {
source: "/canlyniadauchwiliouwch", source: "/canlyniadauchwiliouwch",
destination: "/advancedsearchresults", destination: "/advancedsearchresults"
}, },
{ {
source: "/canlyniadaucyfeiriadau", source: "/canlyniadaucyfeiriadau",
destination: "/addresssearchresults", destination: "/addresssearchresults"
}, },
{ {
source: "/fymhorth/canlyniadauchwiliouwch", source: "/fymhorth/canlyniadauchwiliouwch",
destination: "/myportal/advancedsearchresults", destination: "/myportal/advancedsearchresults"
}, },
{ {
source: "/fymhorth/canlyniadaucyfeiriadau", source: "/fymhorth/canlyniadaucyfeiriadau",
destination: "/myportal/addresssearchresults", destination: "/myportal/addresssearchresults"
},
{
source: "/fymhorth/dns/:slug",
destination: "/myportal/dns/:slug"
}, },
{ {
source: "/fymhorth", source: "/fymhorth",
destination: "/myportal", destination: "/myportal"
}, },
{ {
source: "/achos", source: "/achos",
destination: "/case", destination: "/case"
}, },
{ {
source: "/achos/:slug", source: "/achos/:slug",
destination: "/case/:slug", destination: "/case/:slug"
}, },
// { // {
// source: "/achos/id/:slug", // source: "/achos/id/:slug",
@@ -163,11 +167,11 @@ module.exports = {
// }, // },
{ {
source: "/fymhorth/achos", source: "/fymhorth/achos",
destination: "/myportal/case", destination: "/myportal/case"
}, },
{ {
source: "/fymhorth/ceisiadaudns", source: "/fymhorth/ceisiadaudns",
destination: "/myportal/dnsapplications", destination: "/myportal/dnsapplications"
}, },
// { // {
// source: "/fymhorth/achos/id/:slug", // source: "/fymhorth/achos/id/:slug",
@@ -175,84 +179,84 @@ module.exports = {
// }, // },
{ {
source: "/fymhorth/achos/:slug", source: "/fymhorth/achos/:slug",
destination: "/myportal/case/:slug", destination: "/myportal/case/:slug"
}, },
{ {
source: "/fymhorth/gweldpopeth", source: "/fymhorth/gweldpopeth",
destination: "/myportal/viewall", destination: "/myportal/viewall"
}, },
{ {
source: "/fymhorth/:slug", source: "/fymhorth/:slug",
destination: "/myportal/:slug", destination: "/myportal/:slug"
}, },
{ {
source: "/fymhorth/cynrychiolaeth", source: "/fymhorth/cynrychiolaeth",
destination: "/myportal/representation", destination: "/myportal/representation"
}, },
{ {
source: "/manylionpellach", source: "/manylionpellach",
destination: "/furtherdetails", destination: "/furtherdetails"
}, },
{ {
source: "/allgofnodi", source: "/allgofnodi",
destination: "/logout", destination: "/logout"
}, },
{ {
source: "/apelnewydd", source: "/apelnewydd",
destination: "/newappeal", destination: "/newappeal"
}, },
{ {
source: "/apelnewydd/:path*", source: "/apelnewydd/:path*",
destination: "/newappeal/:path*", destination: "/newappeal/:path*"
}, },
{ {
source: "/cyfrif/cofrestr", source: "/cyfrif/cofrestr",
destination: "/account/register", destination: "/account/register"
}, },
{ {
source: "/help/cwcis", source: "/help/cwcis",
destination: "/help/cookies", destination: "/help/cookies"
}, },
{ {
source: "/hygyrchedd", source: "/hygyrchedd",
destination: "/accessibility", destination: "/accessibility"
}, },
{ {
source: "/preifatrwydd", source: "/preifatrwydd",
destination: "/privacy", destination: "/privacy"
}, },
{ {
source: "/manylion-am-gwcis", source: "/manylion-am-gwcis",
destination: "/details-about-cookies", destination: "/details-about-cookies"
}, },
{ {
source: "/telerau-ac-amodau", source: "/telerau-ac-amodau",
destination: "/terms-and-conditions", destination: "/terms-and-conditions"
}, },
{ {
source: "/awd/mewngofnodi", source: "/awd/mewngofnodi",
destination: "/auth/signin", destination: "/auth/signin"
}, },
{ {
source: "/awd/mewngofnodi/ebost", source: "/awd/mewngofnodi/ebost",
destination: "/auth/signin/email", destination: "/auth/signin/email"
}, },
{ {
source: "/awd/gwall", source: "/awd/gwall",
destination: "/auth/error", destination: "/auth/error"
}, },
{ {
source: "/awd/gwirio-cais", source: "/awd/gwirio-cais",
destination: "/auth/verify-request", destination: "/auth/verify-request"
}, },
{ {
source: "/cyfrif/cofrestr", source: "/cyfrif/cofrestr",
destination: "/account/register", destination: "/account/register"
}, },
{ {
source: "/awd/gwirio-cais", source: "/awd/gwirio-cais",
destination: "/auth/verify-request", destination: "/auth/verify-request"
}, }
// { // {
// source: "/cy:path*", // source: "/cy:path*",
@@ -260,5 +264,5 @@ module.exports = {
// }, // },
]; ];
}, },
...nextTranslate(), ...nextTranslate()
}; };
+70 -2
View File
@@ -2,6 +2,8 @@ import { consoleLogger } from "../../../actions/core/logger";
import OSPoint from "ospoint"; import OSPoint from "ospoint";
import { respondError, respondSuccess } from "../middleware/apiResponse"; import { respondError, respondSuccess } from "../middleware/apiResponse";
import { relayGetData } from "../middleware/relayForwarding"; import { relayGetData } from "../middleware/relayForwarding";
import transLookup from "../../../data/lookuptranslations.json";
import { JSONPath as jsonpath } from "jsonpath-plus";
const renameKeys = (obj) => { const renameKeys = (obj) => {
const keyMappings = { const keyMappings = {
@@ -52,7 +54,31 @@ const renameKeys = (obj) => {
obj.pinswg_sipscase[ obj.pinswg_sipscase[
"statuscode@OData.Community.Display.V1.FormattedValue" "statuscode@OData.Community.Display.V1.FormattedValue"
]; ];
renamedObj.description = obj.pinswg_sipscase.description; //renamedObj.description = obj.pinswg_sipscase.description;
const descriptionText = obj?.pinswg_sipscase?.description || "";
let description = descriptionText;
let description_cy = null;
// Split on >>> first, otherwise ;
const parts = descriptionText.includes(">>>")
? descriptionText.split(">>>")
: descriptionText.includes(";")
? descriptionText.split(";")
: null;
if (parts && parts.length >= 2) {
description = parts[0].trim();
description_cy = parts.slice(1).join(" ").trim();
}
renamedObj.description = description;
if (description_cy) {
renamedObj.description_cy = description_cy;
}
renamedObj.incidentId = obj.pinswg_sipscase.incidentid; renamedObj.incidentId = obj.pinswg_sipscase.incidentid;
} }
@@ -63,7 +89,31 @@ const renameKeys = (obj) => {
obj.pinswg_DNSIds[ obj.pinswg_DNSIds[
"statuscode@OData.Community.Display.V1.FormattedValue" "statuscode@OData.Community.Display.V1.FormattedValue"
]; ];
renamedObj.description = obj.pinswg_DNSIds.description; //renamedObj.description = obj.pinswg_DNSIds.description;
const descriptionText = obj?.pinswg_DNSIds?.description || "";
let description = descriptionText;
let description_cy = null;
// Split on >>> first, otherwise ;
const parts = descriptionText.includes(">>>")
? descriptionText.split(">>>")
: descriptionText.includes(";")
? descriptionText.split(";")
: null;
if (parts && parts.length >= 2) {
description = parts[0].trim();
description_cy = parts.slice(1).join(" ").trim();
}
renamedObj.description = description;
if (description_cy) {
renamedObj.description_cy = description_cy;
}
renamedObj.incidentId = obj.pinswg_DNSIds.incidentid; renamedObj.incidentId = obj.pinswg_DNSIds.incidentid;
} }
@@ -82,6 +132,24 @@ const renameKeys = (obj) => {
renamedObj.northing = String(renamedObj.northing); renamedObj.northing = String(renamedObj.northing);
} }
renamedObj.lpaDisplayName_cy = jsonpath({
path:
'$..[?(@ && @.value=="' +
renamedObj.lpaDisplayName +
'")].value_cy',
json: transLookup,
eval: true
})[0];
renamedObj.statusCodeDescription_cy = jsonpath({
path:
'$..[?(@ && @.value=="' +
renamedObj.statusCodeDescription +
'")].value_cy',
json: transLookup,
eval: true
})[0];
return renamedObj; return renamedObj;
}; };
@@ -37,7 +37,7 @@ export default async function ApiProxy(req, res) {
const queryUrl = const queryUrl =
"pinswg_watchlists?$filter= _pinswg_contact_value eq " + "pinswg_watchlists?$filter= _pinswg_contact_value eq " +
loggedInUserId + loggedInUserId +
"&$select=modifiedon,pinswg_appealcasetype,pinswg_watchlistid,_pinswg_watchedcase_value,statuscode,pinswg_representationsubmitted,pinswg_representationtype&$count=true&$orderby=createdon desc&$expand=pinswg_WatchedCase($select=pinswg_AssociatedLPA)"; "&$select=pinswg_emailnotifications,modifiedon,pinswg_appealcasetype,pinswg_watchlistid,_pinswg_watchedcase_value,statuscode,pinswg_representationsubmitted,pinswg_representationtype&$count=true&$orderby=createdon desc&$expand=pinswg_WatchedCase($select=pinswg_AssociatedLPA)";
return relayGet({ return relayGet({
queryUrl, queryUrl,
+5 -2
View File
@@ -38,7 +38,8 @@ const CaseHome = (props) => {
pages, pages,
setSearchResults, setSearchResults,
setSearchDetails, setSearchDetails,
searchResultsObj searchResultsObj,
mapTarget
} = props; } = props;
let { t, lang } = useTranslation(); let { t, lang } = useTranslation();
@@ -113,6 +114,7 @@ const CaseHome = (props) => {
showMaps={props.showMaps} showMaps={props.showMaps}
eventsObj={props.searchResultsObj.eventsObj} eventsObj={props.searchResultsObj.eventsObj}
mediaObj={props.searchResultsObj.mediaObj} mediaObj={props.searchResultsObj.mediaObj}
mapTarget={props.mapTarget}
/> />
</div> </div>
<Footer <Footer
@@ -261,7 +263,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
docsOffline: process.env.DOCAPI_OFFLINE || false, docsOffline: process.env.DOCAPI_OFFLINE || false,
messagesObj: messagesObj, messagesObj: messagesObj,
showFilteredDocs: process.env.SHOWFILTERDOCS || false, showFilteredDocs: process.env.SHOWFILTERDOCS || false,
showMaps: process.env.SHOWMAPS showMaps: process.env.SHOWMAPS,
mapTarget: process.env.MAP_TARGET || "pedw-dev"
} }
}; };
} }