corrected topthreetype
This commit is contained in:
@@ -26,7 +26,7 @@ const MySubmittedReps = (props) => {
|
|||||||
showDetails={
|
showDetails={
|
||||||
props.mySubmittedReps.mySubmittedRepsDetails
|
props.mySubmittedReps.mySubmittedRepsDetails
|
||||||
}
|
}
|
||||||
topThreeType={"watchedCases"}
|
topThreeType={"mySubmittedReps"}
|
||||||
showLoginCheck={props.showLoginCheck}
|
showLoginCheck={props.showLoginCheck}
|
||||||
currentView={props.currentView}
|
currentView={props.currentView}
|
||||||
myReps={props.myReps}
|
myReps={props.myReps}
|
||||||
|
|||||||
+39
-39
@@ -361,7 +361,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const getDetails = (resultsObj, detailsType) => {
|
const getDetails = async (resultsObj, detailsType) => {
|
||||||
let detailsArr = [];
|
let detailsArr = [];
|
||||||
|
|
||||||
resultsObj =
|
resultsObj =
|
||||||
@@ -401,49 +401,49 @@ const getDetails = (resultsObj, detailsType) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// const detailsObj = resultsObj.map(async (searchDetail, index) => {
|
const detailsObj = resultsObj.map((searchDetail, index) => {
|
||||||
// let caseID = "";
|
let caseID = "";
|
||||||
|
|
||||||
// switch (detailsType) {
|
switch (detailsType) {
|
||||||
// case "myCases":
|
case "myCases":
|
||||||
// caseID = searchDetail.pinswg_title;
|
caseID = searchDetail.pinswg_title;
|
||||||
// break;
|
break;
|
||||||
// case "myWatchedCases":
|
case "myWatchedCases":
|
||||||
// case "mySubmittedReps":
|
case "mySubmittedReps":
|
||||||
// caseID =
|
caseID =
|
||||||
// searchDetail[
|
searchDetail[
|
||||||
// "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||||
// ];
|
];
|
||||||
// break;
|
break;
|
||||||
// case "awaitingSubmission":
|
case "awaitingSubmission":
|
||||||
// caseID = searchDetail.ticketnumber;
|
caseID = searchDetail.ticketnumber;
|
||||||
// break;
|
break;
|
||||||
// case "myRepresentations":
|
case "myRepresentations":
|
||||||
// caseID = searchDetail.casereference;
|
caseID = searchDetail.casereference;
|
||||||
// break;
|
break;
|
||||||
// default:
|
default:
|
||||||
// caseID = searchDetail.pinswg_title;
|
caseID = searchDetail.pinswg_title;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// console.log(detailsType, " case id : ", caseID);
|
console.log(detailsType, " case id : ", caseID);
|
||||||
|
|
||||||
// searchDetail.pinswg_appealcasetype != null &&
|
searchDetail.pinswg_appealcasetype != null &&
|
||||||
// detailsArr.push(
|
detailsArr.push(
|
||||||
// getPortalModuleDetails(
|
getPortalModuleDetails(
|
||||||
// getFormCollectionByID(searchDetail.pinswg_appealcasetype)
|
getFormCollectionByID(searchDetail.pinswg_appealcasetype)
|
||||||
// .LogicalCollectionName,
|
.LogicalCollectionName,
|
||||||
// caseID
|
caseID
|
||||||
// // detailsType != "myWatchedCases"
|
// detailsType != "myWatchedCases"
|
||||||
// // ? searchDetail.ticketnumber
|
// ? searchDetail.ticketnumber
|
||||||
// // : searchDetail[
|
// : searchDetail[
|
||||||
// // "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
// "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||||
// // ]
|
// ]
|
||||||
// )
|
)
|
||||||
// );
|
);
|
||||||
// });
|
});
|
||||||
|
|
||||||
let detArr = Promise.all(detailsArr);
|
let detArr = Promise.all(detailsArr);
|
||||||
console.log(detArr);
|
// console.log(detArr);
|
||||||
return detArr;
|
return detArr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user