lpa portal view

This commit is contained in:
Rob Bond
2023-07-26 11:46:01 +01:00
parent 31375a5999
commit 3ff708737c
8 changed files with 74 additions and 19 deletions
+14 -3
View File
@@ -9,6 +9,7 @@ import {
getAwaitingSubmissionFromBlob,
getAwaitingSubmission,
getMyCases,
getLPACases,
getMyRepresentations,
getPersonalAccount,
getPortalModuleDetails,
@@ -185,15 +186,22 @@ export const getServerSideProps = wrapper.getServerSideProps(
//Create Storage container for logged in user
await createContainerProxy(thisSession.user.id);
const accountDetails = await getPersonalAccount(loggedInUser);
const lpaid = accountDetails(
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
);
const [
accountDetails,
myCases,
myRepresentations,
watchedCases,
awaitingSubmission,
awaitingSubmissionFromBlob,
] = await Promise.all([
await getPersonalAccount(loggedInUser),
accountDetails.pinswg_typeofinvolvment == 846040012
? await getMyLPACases(lpaid)
: await getMyCases(loggedinUser),
await getMyCases(loggedInUser),
await getRepsFromBlob(thisSession.user.id),
await getWatchedCases(loggedInUser),
@@ -375,7 +383,10 @@ const getDetails = (resultsObj, detailsType) => {
);
}
});
return Promise.all(detailsArr);
let detArr = Promise.all(detailsArr);
console.log(detArr);
return detArr;
};
const mapStateToProps = (state) => {