updated view all

This commit is contained in:
2023-04-21 10:36:19 +01:00
parent 98ed833a47
commit dc43d7f2b4
7 changed files with 180 additions and 44 deletions
+7 -2
View File
@@ -219,10 +219,12 @@ export const getServerSideProps = wrapper.getServerSideProps(
myCasesDetails,
watchedCasesDetails,
awaitingSubmissionDetails,
myRepresentationsDetails,
] = await Promise.all([
await getDetails(myCases, "myCases"),
await getDetails(watchedCases, "myWatchedCases"),
await getDetails(awaitingSubmission, "awaitingSubmission"),
await getDetails(myRepresentations, "myRepresentations"),
]);
store.dispatch(setAccountDetails(accountDetails));
@@ -230,6 +232,9 @@ export const getServerSideProps = wrapper.getServerSideProps(
store.dispatch(setMyCases(myCases));
store.dispatch(setMyCasesDetails(myCasesDetails));
store.dispatch(setMyRepresentations(myRepresentations));
store.dispatch(
setMyRepresentationsDetails(myRepresentationsDetails)
);
store.dispatch(setWatchedCases(watchedCases));
store.dispatch(setWatchedCasesDetails(watchedCasesDetails));
@@ -256,11 +261,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
const getDetails = (resultsObj, detailsType) => {
let detailsArr = [];
resultsObj = resultsObj.value;
if (detailsType == "myRepresentations") {
const repsObj = resultsObj.map((searchDetail, index) => {
console.log("==== ", searchDetail["_pinswg_case_value"]);
detailsArr.push(
getCase(searchDetail["_pinswg_case_value"]).then((data) => {
getCase(searchDetail["incidentID"]).then((data) => {
return getPortalModuleDetails(
getFormCollectionByID(data.pinswg_appealcasetype)
.LogicalCollectionName,