update lpa portal

This commit is contained in:
2023-07-27 12:46:02 +01:00
parent 3ff708737c
commit daa8b1c96d
5 changed files with 198 additions and 106 deletions
+10 -6
View File
@@ -9,7 +9,7 @@ import {
getAwaitingSubmissionFromBlob,
getAwaitingSubmission,
getMyCases,
getLPACases,
getMyLPACases,
getMyRepresentations,
getPersonalAccount,
getPortalModuleDetails,
@@ -188,9 +188,12 @@ export const getServerSideProps = wrapper.getServerSideProps(
const accountDetails = await getPersonalAccount(loggedInUser);
const lpaid = accountDetails(
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
);
console.log("----------", accountDetails);
const lpaid =
accountDetails[
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
];
const [
myCases,
@@ -201,8 +204,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
] = await Promise.all([
accountDetails.pinswg_typeofinvolvment == 846040012
? await getMyLPACases(lpaid)
: await getMyCases(loggedinUser),
await getMyCases(loggedInUser),
: await getMyCases(loggedInUser),
await getRepsFromBlob(thisSession.user.id),
await getWatchedCases(loggedInUser),
await getAwaitingSubmission(loggedInUser),
@@ -297,6 +300,7 @@ const getDetails = (resultsObj, detailsType) => {
resultsObj = resultsObj.value;
if (detailsType == "myRepresentations") {
const repsObj = resultsObj.map((searchDetail, index) => {
console.log(".......... ", searchDetail);
detailsArr.push(
getCase(searchDetail["incidentID"]).then((data) => {
let caseID = "";