added signin workaround for dev
This commit is contained in:
@@ -48,10 +48,10 @@ export const getSelectQuery = (appealTypeName) => {
|
||||
return "&$select=_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_sitepostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_starttimeofevent,pinswg_typeofevent";
|
||||
break;
|
||||
case "pinswg_planningappeals78s":
|
||||
console.log(
|
||||
"///////////////\n path:",
|
||||
process.env.RELAYPATH == "test-pedw-hc"
|
||||
);
|
||||
// console.log(
|
||||
// "///////////////\n path:",
|
||||
// process.env.RELAYPATH == "test-pedw-hc"
|
||||
// );
|
||||
return process.env.RELAYPATH == "dev-pedw-hc"
|
||||
? "&$select=_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_localplanningauthority_value,pinswg_casedecisiondate,pinswg_dicision,pinswg_dateeventrequested,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdatetimeiftheevent,pinswg_representation_period_end_date,pinswg_extend_representation_date,pinswg_typeofevent"
|
||||
: "&$select=_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_localplanningauthority_value,pinswg_casedecisiondate,pinswg_dicision,pinswg_dateeventrequested,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdatetimeiftheevent,pinswg_typeofevent";
|
||||
|
||||
@@ -141,15 +141,17 @@ const authOptions = (locale, req) => {
|
||||
const templateId = "b1b5704b-9bb8-4deb-a75c-d887ca902661";
|
||||
const templateIdcy = "0614ce53-cd5f-421f-a1a5-8c8486a9113a";
|
||||
const emailAddress = email;
|
||||
console.log("verifciation url", url);
|
||||
console.log(
|
||||
"============================================================\n",
|
||||
"verificiation url: " + url + "\n",
|
||||
"============================================================\n"
|
||||
);
|
||||
let newURL =
|
||||
locale == "cy"
|
||||
? process.env.CY_API_ROOT
|
||||
: process.env.NEXTAUTH_URL;
|
||||
|
||||
const csrfToken = await getCsrfToken({ req });
|
||||
|
||||
console.log(newURL, searchParams.get("token"));
|
||||
//console.log(newURL, searchParams.get("token"));
|
||||
const personalisation = {
|
||||
"emailAddress": email,
|
||||
"signInLink": url,
|
||||
@@ -227,7 +229,7 @@ const authOptions = (locale, req) => {
|
||||
locale == "cy"
|
||||
? process.env.CY_API_ROOT
|
||||
: process.env.NEXTAUTH_URL;
|
||||
console.log("baseurl:", newURL);
|
||||
//console.log("baseurl:", newURL);
|
||||
//return baseUrl;
|
||||
return newURL;
|
||||
},
|
||||
|
||||
@@ -91,8 +91,8 @@ const SignIn = (props) => {
|
||||
};
|
||||
|
||||
export async function getServerSideProps(context) {
|
||||
console.log("-1-1-1-1-", context.query.callbackUrl, context.locale);
|
||||
console.log("------ " + context.query.callbackUrl);
|
||||
//console.log("-1-1-1-1-", context.query.callbackUrl, context.locale);
|
||||
//console.log("------ " + context.query.callbackUrl);
|
||||
// setCookie(context, "next-auth.callback-url", context.query.callbackUrl, {
|
||||
// path: "/",
|
||||
// });
|
||||
@@ -113,7 +113,7 @@ export async function getServerSideProps(context) {
|
||||
new URL(callback).port; // +
|
||||
// "/api/auth/signin/email";
|
||||
|
||||
console.log("******", formURL, callback, csrfToken);
|
||||
//console.log("******", formURL, callback, csrfToken);
|
||||
return {
|
||||
props: { csrfToken: csrfToken, callbackUrl: formURL, redirect: true },
|
||||
};
|
||||
|
||||
+17
-12
@@ -188,7 +188,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
|
||||
const accountDetails = await getPersonalAccount(loggedInUser);
|
||||
|
||||
console.log("----------", accountDetails);
|
||||
//console.log("----------", accountDetails);
|
||||
|
||||
const lpaid =
|
||||
accountDetails[
|
||||
@@ -300,7 +300,7 @@ const getDetails = (resultsObj, detailsType) => {
|
||||
resultsObj = resultsObj.value;
|
||||
if (detailsType == "myRepresentations") {
|
||||
const repsObj = resultsObj.map((searchDetail, index) => {
|
||||
console.log(".......... ", searchDetail);
|
||||
//console.log(".......... ", searchDetail);
|
||||
detailsArr.push(
|
||||
getCase(searchDetail["incidentID"]).then((data) => {
|
||||
let caseID = "";
|
||||
@@ -360,17 +360,22 @@ const getDetails = (resultsObj, detailsType) => {
|
||||
//console.log(detailsType, " case id : ", caseID);
|
||||
|
||||
if (searchDetail.pinswg_appealcasetype == null) {
|
||||
// console.log(
|
||||
// "detailsObj:",
|
||||
// detailsType,
|
||||
// detailsType == "myCases" && searchDetail.pinswg_title,
|
||||
// detailsType == "myWatchedCases" &&
|
||||
// searchDetail[
|
||||
// "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
// ],
|
||||
// detailsType == "awaitingSubmission" &&
|
||||
// searchDetail.ticketnumber,
|
||||
// detailsType == "myRepresentations" && searchDetail.casereference
|
||||
// );
|
||||
console.log(
|
||||
"detailsObj:",
|
||||
detailsType,
|
||||
detailsType == "myCases" && searchDetail.pinswg_title,
|
||||
detailsType == "myWatchedCases" &&
|
||||
searchDetail[
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
detailsType == "awaitingSubmission" &&
|
||||
searchDetail.ticketnumber,
|
||||
detailsType == "myRepresentations" && searchDetail.casereference
|
||||
"=====================================\n",
|
||||
detailsType + "\n",
|
||||
"=====================================\n"
|
||||
);
|
||||
} else {
|
||||
detailsArr.push(
|
||||
|
||||
Reference in New Issue
Block a user