updated language fix and proxy config
This commit is contained in:
+10
-10
@@ -1,8 +1,8 @@
|
|||||||
//RELAY_ROOT = https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/
|
RELAY_ROOT = https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/
|
||||||
//RELAYURI = "dev-pedw-ns.servicebus.windows.net"
|
RELAYURI = "dev-pedw-ns.servicebus.windows.net"
|
||||||
//RELAYPATH = "dev-pedw-hc"
|
RELAYPATH = "dev-pedw-hc"
|
||||||
//SASKEY = "Ml0Y/S/nfRcmIrHFRkO4jNm2J3iH52TSxPiak7+E1+Y="
|
SASKEY = "Ml0Y/S/nfRcmIrHFRkO4jNm2J3iH52TSxPiak7+E1+Y="
|
||||||
//SASKEYNAME = "devpedwnspolicy"
|
SASKEYNAME = "devpedwnspolicy"
|
||||||
|
|
||||||
|
|
||||||
PORT= "3000"
|
PORT= "3000"
|
||||||
@@ -14,8 +14,8 @@ I18N_DOMAIN = "cymru.local"
|
|||||||
//I18N_DOMAIN ="gwaithcynllunio.gwasanaeth.llyw.cymru"
|
//I18N_DOMAIN ="gwaithcynllunio.gwasanaeth.llyw.cymru"
|
||||||
|
|
||||||
|
|
||||||
RELAY_ROOT = https://test-pedw-ns.servicebus.windows.net/test-pedw-hc/
|
//RELAY_ROOT = https://test-pedw-ns.servicebus.windows.net/test-pedw-hc/
|
||||||
RELAYURI = "test-pedw-ns.servicebus.windows.net"
|
//RELAYURI = "test-pedw-ns.servicebus.windows.net"
|
||||||
RELAYPATH = "test-pedw-hc"
|
//RELAYPATH = "test-pedw-hc"
|
||||||
SASKEY = "kTLrs9UHwuW9Msc9uNfjf+89qLYT6ly80lK0zdTYJW4="
|
//SASKEY = "kTLrs9UHwuW9Msc9uNfjf+89qLYT6ly80lK0zdTYJW4="
|
||||||
SASKEYNAME = "testpedwhcpolicy"
|
//SASKEYNAME = "testpedwhcpolicy"
|
||||||
|
|||||||
+8
-3
@@ -166,7 +166,7 @@ export const getBasicDNSSearch = (token, searchString) => {
|
|||||||
return axios
|
return axios
|
||||||
.get(
|
.get(
|
||||||
WEBAPI_URL +
|
WEBAPI_URL +
|
||||||
"accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true",
|
"incidents?$select=_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true",
|
||||||
azureHeaders(token)
|
azureHeaders(token)
|
||||||
)
|
)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
@@ -188,7 +188,7 @@ export const getAdvancedSearch = (token, searchString) => {
|
|||||||
queryString +=
|
queryString +=
|
||||||
searchString.lpa != null
|
searchString.lpa != null
|
||||||
? (typeof searchString.q == "undefined" ? "" : " and ") +
|
? (typeof searchString.q == "undefined" ? "" : " and ") +
|
||||||
"_customerid_value eq " +
|
"_pinswg_associatedlpa_value eq " +
|
||||||
searchString.lpa
|
searchString.lpa
|
||||||
: "";
|
: "";
|
||||||
queryString +=
|
queryString +=
|
||||||
@@ -268,8 +268,13 @@ export const getSearchDocumentHistory = (token, documentID) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getSearchDocumentDetails1 = (incidentID) => {
|
export const getSearchDocumentDetails1 = (incidentID) => {
|
||||||
//console.log(incidentID);
|
console.log(incidentID);
|
||||||
var token = getSASToken();
|
var token = getSASToken();
|
||||||
|
console.log(
|
||||||
|
"/api/proxy/pinswg_documents?$count=true&$filter=pinswg_publishtoweb eq true and _pinswg_documentids_value eq " +
|
||||||
|
incidentID +
|
||||||
|
"&$select=pinswg_isharedocumentlocations,_pinswg_documentids_value,pinswg_isharelabelcasetype,pinswg_isharelabellpaname,pinswg_publishtoweb,pinswg_uploadstatus,pinswg_isharedocumentclassification,pinswg_isharedocumentreference"
|
||||||
|
);
|
||||||
return axios
|
return axios
|
||||||
.get(
|
.get(
|
||||||
"/api/proxy/pinswg_documents?$count=true&$filter=pinswg_publishtoweb eq true and _pinswg_documentids_value eq " +
|
"/api/proxy/pinswg_documents?$count=true&$filter=pinswg_publishtoweb eq true and _pinswg_documentids_value eq " +
|
||||||
|
|||||||
+14
-8
@@ -1,12 +1,18 @@
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
|
||||||
export default function Banner() {
|
export default function Banner() {
|
||||||
return (
|
let { t, lang } = useTranslation();
|
||||||
<div className="govuk-phase-banner">
|
return (
|
||||||
<p className="govuk-phase-banner__content">
|
<div className="govuk-phase-banner">
|
||||||
<span className="govuk-tag govuk-phase-banner__content__tag">beta</span>
|
<p className="govuk-phase-banner__content">
|
||||||
<span className="govuk-phase-banner__text">This is a new service</span>
|
<span className="govuk-tag govuk-phase-banner__content__tag">
|
||||||
</p>
|
beta
|
||||||
</div>
|
</span>
|
||||||
);
|
<span className="govuk-phase-banner__text">
|
||||||
|
{t("common:new-service-beta")}
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import jsonpath from "jsonpath";
|
import jsonpath from "jsonpath";
|
||||||
import { useState, useEffect, useRef } from "react";
|
import { useState, useEffect, useRef } from "react";
|
||||||
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
||||||
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getBasicSearch,
|
getBasicSearch,
|
||||||
@@ -111,11 +112,22 @@ const DocumentDetails = (props) => {
|
|||||||
{t("case:documents-doc-type-label")}
|
{t("case:documents-doc-type-label")}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{
|
|
||||||
detailsObj[
|
{router.locale == "cy"
|
||||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
? jsonpath.query(
|
||||||
]
|
transLookup,
|
||||||
}
|
'$..[?(@.value=="' +
|
||||||
|
detailsObj[
|
||||||
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] +
|
||||||
|
'")].value_cy'
|
||||||
|
)
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||||
<span className="results-visually-hidden">
|
<span className="results-visually-hidden">
|
||||||
@@ -156,6 +168,7 @@ const DocumentDetails = (props) => {
|
|||||||
const docDetailsObj = async () => {
|
const docDetailsObj = async () => {
|
||||||
let docObj = await getSearchDocumentDetails1(incidentid)
|
let docObj = await getSearchDocumentDetails1(incidentid)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
|
console.log(data);
|
||||||
setDocumentDetails(data);
|
setDocumentDetails(data);
|
||||||
return data;
|
return data;
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -366,9 +366,15 @@ const CaseSummary = (props) => {
|
|||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_startdate"
|
"pinswg_startdate"
|
||||||
)
|
)
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
)
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
@@ -386,9 +392,15 @@ const CaseSummary = (props) => {
|
|||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_questionnaireduedate"
|
"pinswg_questionnaireduedate"
|
||||||
)
|
)
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
@@ -406,9 +418,15 @@ const CaseSummary = (props) => {
|
|||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_statementduedate"
|
"pinswg_statementduedate"
|
||||||
)
|
)
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_statementduedate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
@@ -426,9 +444,15 @@ const CaseSummary = (props) => {
|
|||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
)
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
@@ -446,9 +470,15 @@ const CaseSummary = (props) => {
|
|||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_finalcommentsduedate"
|
"pinswg_finalcommentsduedate"
|
||||||
)
|
)
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
@@ -465,9 +495,15 @@ const CaseSummary = (props) => {
|
|||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateeventrequested"
|
"pinswg_dateeventrequested"
|
||||||
)
|
)
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
@@ -485,9 +521,15 @@ const CaseSummary = (props) => {
|
|||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateoflpadecision"
|
"pinswg_dateoflpadecision"
|
||||||
)
|
)
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateoflpadecision
|
detailsObj.pinswg_dateoflpadecision
|
||||||
)
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_dateoflpadecision
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
|
|||||||
+26
-11
@@ -1,7 +1,9 @@
|
|||||||
import CookieConsent from "react-cookie-consent";
|
import CookieConsent from "react-cookie-consent";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
|
||||||
const CookieBanner = () => {
|
const CookieBanner = () => {
|
||||||
|
let { t, lang } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<CookieConsent
|
<CookieConsent
|
||||||
style={{
|
style={{
|
||||||
@@ -13,7 +15,8 @@ const CookieBanner = () => {
|
|||||||
buttonClasses="govuk-button"
|
buttonClasses="govuk-button"
|
||||||
buttonWrapperClasses="govuk-width-container consentBanner"
|
buttonWrapperClasses="govuk-width-container consentBanner"
|
||||||
declineButtonClasses="govuk-button"
|
declineButtonClasses="govuk-button"
|
||||||
buttonText="Accept all cookies"
|
buttonText={t("common:cookie-banner-accept")}
|
||||||
|
declineButtonText={t("common:cookie-banner-decline")}
|
||||||
disableStyles={true}
|
disableStyles={true}
|
||||||
enableDeclineButton={true}
|
enableDeclineButton={true}
|
||||||
flipButtons={true}
|
flipButtons={true}
|
||||||
@@ -33,18 +36,30 @@ const CookieBanner = () => {
|
|||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-grid-column-two-thirds">
|
<div className="govuk-grid-column-two-thirds">
|
||||||
<div className="">
|
<div className="">
|
||||||
<h2 className="govuk-heading-m">
|
|
||||||
Tell us whether you accept cookies
|
|
||||||
</h2>
|
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
GOV.UK uses cookies which are essential
|
{t("common:cookie-banner-line-1")}
|
||||||
for the site to work. We also use
|
|
||||||
non-essential cookies to help us improve
|
|
||||||
government digital services. Any data
|
|
||||||
collected is anonymised. By continuing
|
|
||||||
to use this site, you agree to our use
|
|
||||||
of cookies.
|
|
||||||
</p>
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
{" "}
|
||||||
|
{t(
|
||||||
|
"common:cookie-banner-list-item-1"
|
||||||
|
)}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<p>{t("common:cookie-banner-line-2")}</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
{t(
|
||||||
|
"common:cookie-banner-list-item-2"
|
||||||
|
)}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
{t(
|
||||||
|
"common:cookie-banner-list-item-3"
|
||||||
|
)}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ const Header = (props) => {
|
|||||||
"/advancedsearchresults",
|
"/advancedsearchresults",
|
||||||
"/dnsapplications",
|
"/dnsapplications",
|
||||||
"/dnsdetails",
|
"/dnsdetails",
|
||||||
|
"/404",
|
||||||
];
|
];
|
||||||
const hasContactLink = [
|
const hasContactLink = [
|
||||||
"/dns",
|
"/dns",
|
||||||
|
|||||||
+13
-1
@@ -2,6 +2,7 @@
|
|||||||
"gov-wales-link": "https://llyw.cymru",
|
"gov-wales-link": "https://llyw.cymru",
|
||||||
"gov-wales-label": "LLYW.CYMRU",
|
"gov-wales-label": "LLYW.CYMRU",
|
||||||
"service-name": "Cynllunio gwaith achos",
|
"service-name": "Cynllunio gwaith achos",
|
||||||
|
"new-service-beta": "Mae hwn yn wasanaeth newydd",
|
||||||
"breadcrumb-back-link": "Yn ôl",
|
"breadcrumb-back-link": "Yn ôl",
|
||||||
"error-radio": "Dewiswch opsiwn",
|
"error-radio": "Dewiswch opsiwn",
|
||||||
"error-checkbox": "Enter a value",
|
"error-checkbox": "Enter a value",
|
||||||
@@ -25,5 +26,16 @@
|
|||||||
"breadcrumb-my-portal": "Fy mhorth",
|
"breadcrumb-my-portal": "Fy mhorth",
|
||||||
"breadcrumb-case-reference": "Cyfeirnod Achos",
|
"breadcrumb-case-reference": "Cyfeirnod Achos",
|
||||||
"spinner-loading": "Llwytho...",
|
"spinner-loading": "Llwytho...",
|
||||||
"spinner-searching": "Chwilio..."
|
"spinner-searching": "Chwilio...",
|
||||||
|
"logged-out-title": "Rydych chi wedi allgofnodi",
|
||||||
|
"logged-out-link": "Dychwelwch i'r porth Gwaith Achos Cynllunio",
|
||||||
|
"404-not-found-title": "404 - heb ei ddarganfod",
|
||||||
|
"404-not-found-link": "Ewch yn ôl adref",
|
||||||
|
"cookie-banner-line-1": "Ry'n ni wedi cadw ffeiliau a elwir yn cwcis ar eich dyfais. Mae'r cwcis hyn:",
|
||||||
|
"cookie-banner-list-item-1": "yn hanfodol i'r safle weithio",
|
||||||
|
"cookie-banner-line-2": "Byddem hefyd yn hoffi cadw rhai cwcis i'n helpu ni:",
|
||||||
|
"cookie-banner-list-item-2": "i wella'n gwefan drwy gasglu ac adrodd gwybodaeth ar sut yr ydych yn defnyddio'r safle",
|
||||||
|
"cookie-banner-list-item-3": "i deilwra cyfathrebu",
|
||||||
|
"cookie-banner-decline": "Rwy'n dirywio",
|
||||||
|
"cookie-banner-accept": "Derbyn cwcis"
|
||||||
}
|
}
|
||||||
+13
-1
@@ -2,6 +2,7 @@
|
|||||||
"gov-wales-link": "https://www.gov.wales",
|
"gov-wales-link": "https://www.gov.wales",
|
||||||
"gov-wales-label": "GOV.WALES",
|
"gov-wales-label": "GOV.WALES",
|
||||||
"service-name": "Planning casework",
|
"service-name": "Planning casework",
|
||||||
|
"new-service-beta": "This is a new service",
|
||||||
"breadcrumb-back-link": "Back",
|
"breadcrumb-back-link": "Back",
|
||||||
"error-radio": "Choose an option",
|
"error-radio": "Choose an option",
|
||||||
"error-checkbox": "Choose an option",
|
"error-checkbox": "Choose an option",
|
||||||
@@ -25,5 +26,16 @@
|
|||||||
"breadcrumb-my-portal": "My portal",
|
"breadcrumb-my-portal": "My portal",
|
||||||
"breadcrumb-case-reference": "Case Reference",
|
"breadcrumb-case-reference": "Case Reference",
|
||||||
"spinner-loading": "Loading...",
|
"spinner-loading": "Loading...",
|
||||||
"spinner-searching": "Searching..."
|
"spinner-searching": "Searching...",
|
||||||
|
"logged-out-title": "You have been logged out",
|
||||||
|
"logged-out-link": "Return to Planning Casework portal",
|
||||||
|
"404-not-found-title": "404 - not found",
|
||||||
|
"404-not-found-link": "Go back home",
|
||||||
|
"cookie-banner-line-1": "We've saved some files called cookies on your device. These cookies are:",
|
||||||
|
"cookie-banner-list-item-1": "essential for the site to work",
|
||||||
|
"cookie-banner-line-2": "We would also like to save some cookies to help:",
|
||||||
|
"cookie-banner-list-item-2": "improve our website by collecting and reporting information on how you use it",
|
||||||
|
"cookie-banner-list-item-3": "tailor communications",
|
||||||
|
"cookie-banner-decline": "I decline",
|
||||||
|
"cookie-banner-accept": "Accept cookies"
|
||||||
}
|
}
|
||||||
@@ -41,6 +41,10 @@ module.exports = {
|
|||||||
source: "/achos",
|
source: "/achos",
|
||||||
destination: "/case",
|
destination: "/case",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
source: "/allgofnodi",
|
||||||
|
destination: "/logout",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
source: "/cy:path*",
|
source: "/cy:path*",
|
||||||
destination: "http://cyrmu.local/:path*",
|
destination: "http://cyrmu.local/:path*",
|
||||||
|
|||||||
+4
-3
@@ -15,7 +15,8 @@ const FourOhFour = (props) => {
|
|||||||
<div>
|
<div>
|
||||||
<Head>
|
<Head>
|
||||||
<title>
|
<title>
|
||||||
{t("case:page-title")} - {t("common:service-name")}
|
{t("common:404-not-found-title")} -{" "}
|
||||||
|
{t("common:service-name")}
|
||||||
</title>
|
</title>
|
||||||
</Head>
|
</Head>
|
||||||
<div id="page_wrapper">
|
<div id="page_wrapper">
|
||||||
@@ -25,9 +26,9 @@ const FourOhFour = (props) => {
|
|||||||
<main className="govuk-main-wrapper govuk-!-padding-top-9 govuk-!-padding-bottom-9">
|
<main className="govuk-main-wrapper govuk-!-padding-top-9 govuk-!-padding-bottom-9">
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-grid-column-two-thirds ">
|
<div className="govuk-grid-column-two-thirds ">
|
||||||
<h1>404 - Page Not Found</h1>
|
<h1>{t("common:404-not-found-title")}</h1>
|
||||||
<Link href="/">
|
<Link href="/">
|
||||||
<a>Go back home</a>
|
<a>{t("common:404-not-found-link")}</a>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,15 +2,32 @@ import axios from "axios";
|
|||||||
import https from "https";
|
import https from "https";
|
||||||
import CryptoJS from "crypto-js";
|
import CryptoJS from "crypto-js";
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const PROXY_RELAY_URL =
|
||||||
process.env.RELAY_ROOT ||
|
"https://" +
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
(process.env.RELAYURI || "dev-pedw-ns.servicebus.windows.net") +
|
||||||
|
"/" +
|
||||||
|
(process.env.RELAYPATH || "dev-pedw-hc") +
|
||||||
|
"/";
|
||||||
|
//"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
|
// const azureHeaders = {
|
||||||
|
// headers: {
|
||||||
|
// "OData-MaxVersion": "4.0",
|
||||||
|
// "OData-Version": "4.0",
|
||||||
|
// "Accept": "application/json",
|
||||||
|
// "Prefer": 'odata.include-annotations="*",return=representation',
|
||||||
|
// "Content-Type": "application/json",
|
||||||
|
// "ServiceBusAuthorization": SASToken,
|
||||||
|
// },
|
||||||
|
// };
|
||||||
|
|
||||||
const getSASToken = () => {
|
const getSASToken = () => {
|
||||||
var m_ResourceURI = "dev-pedw-ns.servicebus.windows.net";
|
var m_ResourceURI =
|
||||||
var m_Path = "dev-pedw-hc";
|
process.env.RELAYURI || "dev-pedw-ns.servicebus.windows.net";
|
||||||
var m_SasKey = "Ml0Y/S/nfRcmIrHFRkO4jNm2J3iH52TSxPiak7+E1+Y=";
|
var m_Path = process.env.RELAYPATH || "dev-pedw-hc";
|
||||||
var m_SasKeyName = "devpedwnspolicy";
|
var m_SasKey =
|
||||||
|
process.env.SASKEY || "Ml0Y/S/nfRcmIrHFRkO4jNm2J3iH52TSxPiak7+E1+Y=";
|
||||||
|
var m_SasKeyName = process.env.SASKEYNAME || "devpedwnspolicy";
|
||||||
|
|
||||||
var encodedResourceUri = encodeURIComponent(
|
var encodedResourceUri = encodeURIComponent(
|
||||||
"https://" + m_ResourceURI + "/" + m_Path + "/"
|
"https://" + m_ResourceURI + "/" + m_Path + "/"
|
||||||
@@ -43,7 +60,7 @@ const getSASToken = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
console.log(req.method);
|
// console.log(req.method);
|
||||||
|
|
||||||
var updateBody = {
|
var updateBody = {
|
||||||
"pinswg_areaofsiteinhectaresdec": 21,
|
"pinswg_areaofsiteinhectaresdec": 21,
|
||||||
@@ -65,8 +82,8 @@ export default async function ApiProxy(req, res) {
|
|||||||
|
|
||||||
var configNoData = {
|
var configNoData = {
|
||||||
method: req.method,
|
method: req.method,
|
||||||
//url: WEBAPI_URL + updateFormCollection + "(" + incidentId + ")",
|
//url: PROXY_RELAY_URL + updateFormCollection + "(" + incidentId + ")",
|
||||||
url: WEBAPI_URL + req.url.split("/api/proxy/")[1],
|
url: PROXY_RELAY_URL + req.url.split("/api/proxy/")[1],
|
||||||
headers: {
|
headers: {
|
||||||
"OData-MaxVersion": "4.0",
|
"OData-MaxVersion": "4.0",
|
||||||
"OData-Version": "4.0",
|
"OData-Version": "4.0",
|
||||||
@@ -79,8 +96,8 @@ export default async function ApiProxy(req, res) {
|
|||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
method: req.method,
|
method: req.method,
|
||||||
//url: WEBAPI_URL + updateFormCollection + "(" + incidentId + ")",
|
//url: PROXY_RELAY_URL + updateFormCollection + "(" + incidentId + ")",
|
||||||
url: WEBAPI_URL + req.query.route[0],
|
url: PROXY_RELAY_URL + req.query.route[0],
|
||||||
headers: {
|
headers: {
|
||||||
"OData-MaxVersion": "4.0",
|
"OData-MaxVersion": "4.0",
|
||||||
"OData-Version": "4.0",
|
"OData-Version": "4.0",
|
||||||
@@ -95,14 +112,14 @@ export default async function ApiProxy(req, res) {
|
|||||||
console.log(req.url.split("/api/proxy/")[1]);
|
console.log(req.url.split("/api/proxy/")[1]);
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
//console.log(config);
|
// console.log(config);
|
||||||
axios(req.method == "GET" ? configNoData : config)
|
axios(req.method == "GET" ? configNoData : config)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
res.statusCode = 200;
|
res.statusCode = 200;
|
||||||
res.setHeader("Content-Type", "application/json");
|
res.setHeader("Content-Type", "application/json");
|
||||||
res.setHeader("Cache-Control", "max-age=1800000");
|
res.setHeader("Cache-Control", "max-age=1800000");
|
||||||
res.end(JSON.stringify(response.data));
|
res.end(JSON.stringify(response.data));
|
||||||
//console.log("response data", response.data);
|
// console.log("response data", response.data);
|
||||||
resolve();
|
resolve();
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|||||||
+2
-2
@@ -28,9 +28,9 @@ const LogOut = (props) => {
|
|||||||
<Header courseName="Appeals Casework Portal" />
|
<Header courseName="Appeals Casework Portal" />
|
||||||
<div className="govuk-width-container">
|
<div className="govuk-width-container">
|
||||||
<Banner />
|
<Banner />
|
||||||
<h2>You have been logged out</h2>
|
<h2>{t("common:logged-out-title")}</h2>
|
||||||
<div className="govuk-!-margin-top-9 govuk-!-margin-bottom-9">
|
<div className="govuk-!-margin-top-9 govuk-!-margin-bottom-9">
|
||||||
<Link href="/">Return to Planning Casework portal</Link>
|
<Link href="/">{t("common:logged-out-link")}</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Footer footerLinks={footerLinks} />
|
<Footer footerLinks={footerLinks} />
|
||||||
|
|||||||
@@ -1,27 +1,31 @@
|
|||||||
.app-cookie-banner {
|
.app-cookie-banner {
|
||||||
@include govuk-font(16);
|
@include govuk-font(16);
|
||||||
@include govuk-text-colour;
|
@include govuk-text-colour;
|
||||||
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
padding-top: govuk-spacing(3);
|
padding-top: govuk-spacing(3);
|
||||||
padding-right: govuk-spacing(3);
|
padding-right: govuk-spacing(3);
|
||||||
padding-bottom: govuk-spacing(3);
|
padding-bottom: govuk-spacing(3);
|
||||||
padding-left: govuk-spacing(3);
|
padding-left: govuk-spacing(3);
|
||||||
background-color: lighten(
|
background-color: lighten(
|
||||||
desaturate(govuk-colour("light-blue"), 8.46),
|
desaturate(govuk-colour("light-blue"), 8.46),
|
||||||
42.55
|
42.55
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-cookie-banner {
|
||||||
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-cookie-banner__message {
|
.app-cookie-banner__message {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@include govuk-width-container;
|
@include govuk-width-container;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include govuk-media-query($media-type: print) {
|
@include govuk-media-query($media-type: print) {
|
||||||
.app-cookie-banner {
|
.app-cookie-banner {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user