Merged PR 1298: corrected topthreetype

corrected topthreetype

Related work items: #12767
This commit is contained in:
Robert Bond
2024-11-20 19:13:34 +00:00
2 changed files with 40 additions and 40 deletions
@@ -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}
+40 -40
View File
@@ -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"
];
break;
case "awaitingSubmission":
caseID = searchDetail.ticketnumber;
break;
case "myRepresentations":
caseID = searchDetail.casereference;
break;
default:
caseID = searchDetail.pinswg_title;
}
console.log(detailsType, " case id : ", caseID);
searchDetail.pinswg_appealcasetype != null &&
detailsArr.push(
getPortalModuleDetails(
getFormCollectionByID(searchDetail.pinswg_appealcasetype)
.LogicalCollectionName,
caseID
// detailsType != "myWatchedCases"
// ? searchDetail.ticketnumber
// : searchDetail[
// "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue" // "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
// ]; // ]
// break; )
// case "awaitingSubmission": );
// caseID = searchDetail.ticketnumber; });
// break;
// case "myRepresentations":
// caseID = searchDetail.casereference;
// break;
// default:
// caseID = searchDetail.pinswg_title;
// }
// console.log(detailsType, " case id : ", caseID);
// searchDetail.pinswg_appealcasetype != null &&
// detailsArr.push(
// getPortalModuleDetails(
// getFormCollectionByID(searchDetail.pinswg_appealcasetype)
// .LogicalCollectionName,
// caseID
// // detailsType != "myWatchedCases"
// // ? searchDetail.ticketnumber
// // : searchDetail[
// // "_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;
}; };