-
+ >
+ )}
);
}
diff --git a/i18n.json b/i18n.json
index ca56d3d8..7b60abb8 100644
--- a/i18n.json
+++ b/i18n.json
@@ -4,6 +4,12 @@
"cy"
],
"defaultLocale": "en",
+ "domains": [
+ {
+ "domain": "dev-gwaithcynllunio.gwasanaeth.llyw.cymru",
+ "defaultLocale": "cy"
+ }
+ ],
"pages": {
"*": [
"common"
diff --git a/next.config.js b/next.config.js
index c627d891..5f422840 100644
--- a/next.config.js
+++ b/next.config.js
@@ -3,20 +3,6 @@ const withStyles = require("@webdeb/next-styles");
//const { nextI18NextRewrites } = require("next-i18next/rewrites");
const nextTranslate = require("next-translate");
-//acp
-// module.exports = {
-// poweredByHeader: false,
-// env: {
-// API_ROOT: "http://pel-beta-backend",
-// GRANT_TYPE: "password",
-// USERNAME: "api",
-// PASSWORD: "tJRq4o2ZBQ",
-// CLIENT_ID: "2d3df41b-9b59-4bbd-85a7-9314125c1689",
-// CLIENT_SECRET: "85H8qdrEvKEzbW5",
-// },
-// ...nextTranslate(),
-// };
-
module.exports = withStyles({
sass: true, // use .scss files
modules: true, // style.(m|module).css & style.(m|module).scss for module files
@@ -37,13 +23,29 @@ module.exports = {
return "pinswg-build-id";
},
poweredByHeader: false,
- env: {
- // GRANT_TYPE : 'password',
- // USERNAME : 'api',
- // API_ROOT : "https://api.dev.prevent.internal.rehab",
- // PASSWORD : 'B69eQwv7rzPBNcA',
- // CLIENT_ID : 'fa1f0ef2-f10f-462e-98a5-843359db6066',
- // CLIENT_SECRET : 'B69eQwv7rzPBNcA',
+ async rewrites() {
+ return [
+ {
+ source: "/ceisiadaudns",
+ destination: "/dnsapplications", // The :path parameter isn't used here so will be automatically passed in the query
+ },
+ {
+ source: "/manyliondns",
+ destination: "/dnsdetails", // The :path parameter isn't used here so will be automatically passed in the query
+ },
+ {
+ source: "/canlyniadauchwilio",
+ destination: "/searchresults", // The :path parameter isn't used here so will be automatically passed in the query
+ },
+ {
+ source: "/achos",
+ destination: "/case",
+ },
+ {
+ source: "/cy:path*",
+ destination: "http://cyrmu.local/:path*",
+ },
+ ];
},
...nextTranslate(),
};
diff --git a/package.json b/package.json
index e9a8bc4f..9b3c7b60 100644
--- a/package.json
+++ b/package.json
@@ -26,9 +26,9 @@
"lodash": "^4.17.21",
"moment": "^2.29.1",
"next": "^11.0.1",
- "next-i18next": "^8.5.1",
"next-redux-wrapper": "^7.0.2",
"next-translate": "^1.0.7",
+ "path": "^0.12.7",
"pm2": "^5.1.0",
"react": "17.0.2",
"react-accessible-accordion": "^3.3.5",
diff --git a/pages/_error.js b/pages/_error.js
index 23377c1d..cb0e2547 100644
--- a/pages/_error.js
+++ b/pages/_error.js
@@ -45,6 +45,7 @@ function Error({ statusCode }, props) {
Error.getInitialProps = ({ res, err }) => {
const statusCode = res ? res.statusCode : err ? err.statusCode : 404;
+ console.log(res, err);
return { statusCode };
};
diff --git a/pages/dnsapplications.js b/pages/dnsapplications.js
index 4deb3b54..f303bb5d 100644
--- a/pages/dnsapplications.js
+++ b/pages/dnsapplications.js
@@ -67,8 +67,15 @@ export const getServerSideProps = wrapper.getServerSideProps(
const token = await getSASToken();
- const searchResultsObj = await getBasicDNSSearch(token);
- //console.log(searchResultsObj);
+ let searchResultsObj = await getBasicDNSSearch(token);
+ searchResultsObj =
+ searchResultsObj.status == 502
+ ? {
+ value: [],
+ errorCode: searchResultsObj.status,
+ errorMsg: searchResultsObj.statusText,
+ }
+ : searchResultsObj;
const searchDetailsObj = await getSearchDetails(
token,
diff --git a/pages/dnsdetails.js b/pages/dnsdetails.js
index 11120215..7bc70e5c 100644
--- a/pages/dnsdetails.js
+++ b/pages/dnsdetails.js
@@ -48,6 +48,12 @@ const Home = (props) => {
searchDetailsObj={
props.searchResultsObj.searchDetailsObj
}
+ documentDetailsObj={
+ props.searchResultsObj.documentDetailsObj
+ }
+ documentHistoryObj={
+ props.searchResultsObj.documentHistoryObj
+ }
myRepresentations={
props.myRepresentations.myRepresentations
}
@@ -61,6 +67,7 @@ const Home = (props) => {
currentType={
props.currentView.caseReference.currentType
}
+ incidentid={props.currentView.caseReference.incidentid}
/>