pre prod fixes

This commit is contained in:
2024-07-04 11:29:35 +01:00
parent 8b2dc95e84
commit 07de9705e4
6 changed files with 35 additions and 9 deletions
+14
View File
@@ -1799,6 +1799,20 @@ export const getPortalLogin = async (emailAddress) => {
});
};
export const getPortalLoginProxy = async (emailAddress) => {
var queryUrl =
"/api/endpoint/getportalloginproxy_api?emailAddress=" + emailAddress;
return axios
.get(BASE_URL + queryUrl)
.then((res) => res.data)
.catch((error) => {
consoleLogger(error);
return JSON.stringify(error);
});
};
export const createContainerProxy = (containerName) => {
var queryUrl =
"/api/file/setupcontainer?ident=" +
+1 -1
View File
@@ -6,7 +6,7 @@
"makenewappeal-card-paragraph-one": "Before submitting a new appeal, please ensure you have read all of the guidance",
"makenewappeal-card-link": "relevant to your appeal type.",
"makenewappeal-card-paragraph-two": "Once you click the 'make a new appeal' button below you will be guided through a process to help you select the correct appeal type",
"makenewappeal-card-paragraph-three": "You can only Submit an appeal against a Refusal of planning Permission or Failure to determine within time vai this Casework Portal. All other appeals must be submitted via Email or post.",
"makenewappeal-card-paragraph-three": "You can only Submit an appeal against a Refusal of planning Permission or Failure to determine within time via this Casework Portal. All other appeals must be submitted via Email or post.",
"makenewappeal-card-link-label": "Guidance",
"makenewappeal-card-guidance-link": "https://www.gov.wales/planning-appeals-guidance",
"makenewappeal-card-button-label": "Make a new appeal",
+4 -3
View File
@@ -7,6 +7,7 @@
"debugdev": "NODE_OPTIONS='--inspect' next dev",
"dev:app": "node ./server/server.js",
"build": "NODE_ENV=production node_modules/next/dist/bin/next build",
"start2": "NODE_ENV=production node ./server/server.js",
"start": "node_modules/next/dist/bin/next start",
"lint": "next lint"
},
@@ -43,13 +44,14 @@
"multiparty": "^4.2.3",
"mysql": "^2.18.1",
"nanoid": "^3.2.0",
"next": "^14.0.1",
"next": "14.1.2",
"next-auth": "^4.24.4",
"next-build-id": "^3.0.0",
"next-connect": "^0.12.2",
"next-redux-wrapper": "^7.0.5",
"next-swagger-doc": "^0.4.0",
"next-translate": "^2.6.2",
"next-translate-plugin": "^2.6.2",
"nodemailer": "^6.9.7",
"nookies": "^2.5.2",
"notifications-node-client": "^7.0.6",
@@ -87,7 +89,6 @@
"eslint": "^8.6.0",
"eslint-config-next": "^14.0.1",
"eslint-plugin-jsdoc": "^48.2.3",
"next-translate-plugin": "^2.6.2",
"prisma": "^5.0.0"
}
}
}
+6 -3
View File
@@ -38,8 +38,11 @@ export const getServerSideProps = async (ctx) => {
);
console.log(
"\n\n\n=================================================\n",
"Environment name:" + accountName,
"\n=================================================",
"\nEnvironment name: " + accountName,
"\nStorage account path: " +
`https://${accountName}.blob.core.windows.net`,
"\n creds: " + JSON.stringify(creds),
"\n=================================================\n"
);
@@ -48,7 +51,7 @@ export const getServerSideProps = async (ctx) => {
async function checkDB() {
const allUsers = await prisma.user.findMany();
console.log(
"\n\n\n=================================================\n",
"\n=================================================\n",
"Show users in Auth DB:\n",
allUsers,
"\n=================================================\n"
+6
View File
@@ -146,6 +146,12 @@ export const getServerSideProps = wrapper.getServerSideProps(
}
const accountDetails = await getPersonalAccount(loggedInUser);
const lpaid =
accountDetails[
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
];
store.dispatch(setContainerID(thisSession.user.id));
store.dispatch(setAccountDetails(accountDetails));
store.dispatch(setLoggedInUserId(loggedInUser));
+4 -2
View File
@@ -5,7 +5,7 @@ import { useEffect } from "react";
import { getSession, useSession } from "next-auth/react";
import { useRouter } from "next/router";
import { connect, useDispatch } from "react-redux";
import { getPersonalAccount, getPortalLogin } from "../../actions";
import { getPersonalAccount, getPortalLoginProxy } from "../../actions";
import Breadcrumbs from "../../components/breadcrumbs";
import CookieBanner from "../../components/cookieBanner";
import Footer from "../../components/footer";
@@ -34,7 +34,9 @@ const RepresentationF = (props) => {
const thisSession = await getSession();
if (thisSession) {
let loggedInUser = await getPortalLogin(thisSession.user.email);
let loggedInUser = await getPortalLoginProxy(
thisSession.user.email
);
dispatch(
setAccountDetails(
await getPersonalAccount(