path to getbloblistproxy fails csr policy and uncommented saving of appeal progess data
This commit is contained in:
+51
-29
@@ -328,6 +328,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
await getDetails(myRepresentations, "myRepresentations"),
|
||||
]);
|
||||
|
||||
// console.log(
|
||||
// "=================================\nmySubmittedRepsDetails:",
|
||||
// mySubmittedRepsDetails
|
||||
// );
|
||||
|
||||
store.dispatch(setAccountDetails(accountDetails));
|
||||
store.dispatch(setLoggedInUserId(loggedInUser));
|
||||
store.dispatch(setMyCases(myCases));
|
||||
@@ -372,38 +377,55 @@ const getDetails = async (resultsObj, detailsType) => {
|
||||
if (detailsType == "myRepresentations") {
|
||||
const repsObj = resultsObj.map((searchDetail, index) => {
|
||||
detailsArr.push(
|
||||
getCase(searchDetail["incidentID"]).then((data) => {
|
||||
let caseID = "";
|
||||
getCase(searchDetail["incidentID"])
|
||||
.then(async (data) => {
|
||||
let caseID = "";
|
||||
|
||||
switch (detailsType) {
|
||||
case "myCases":
|
||||
caseID = data.pinswg_title;
|
||||
break;
|
||||
case "myWatchedCases":
|
||||
case "mySubmittedReps":
|
||||
caseID =
|
||||
data[
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
];
|
||||
break;
|
||||
case "awaitingSubmission":
|
||||
case "myRepresentations":
|
||||
caseID = data.ticketnumber;
|
||||
break;
|
||||
default:
|
||||
caseID = data.pinswg_title;
|
||||
}
|
||||
return getPortalModuleDetails(
|
||||
getFormCollectionByID(data.pinswg_appealcasetype)
|
||||
.LogicalCollectionName,
|
||||
caseID
|
||||
);
|
||||
})
|
||||
switch (detailsType) {
|
||||
case "myCases":
|
||||
caseID = data.pinswg_title;
|
||||
break;
|
||||
case "myWatchedCases":
|
||||
case "mySubmittedReps":
|
||||
caseID =
|
||||
data[
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
];
|
||||
break;
|
||||
case "awaitingSubmission":
|
||||
case "myRepresentations":
|
||||
try {
|
||||
caseID = data.ticketnumber;
|
||||
} catch {
|
||||
console.log("missing:", data);
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
caseID = data.pinswg_title;
|
||||
}
|
||||
return await getPortalModuleDetails(
|
||||
getFormCollectionByID(data.pinswg_appealcasetype)
|
||||
.LogicalCollectionName,
|
||||
caseID
|
||||
).catch((error) => {
|
||||
console.log(
|
||||
"=============================\ngetPortalModuleDetails error",
|
||||
error
|
||||
);
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(
|
||||
"=============================\ngetCase error",
|
||||
error
|
||||
);
|
||||
})
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
const detailsObj = resultsObj.map((searchDetail, index) => {
|
||||
//debugger;
|
||||
const detailsObj = resultsObj.map(async (searchDetail, index) => {
|
||||
let caseID = "";
|
||||
|
||||
switch (detailsType) {
|
||||
@@ -431,7 +453,7 @@ const getDetails = async (resultsObj, detailsType) => {
|
||||
|
||||
searchDetail.pinswg_appealcasetype != null &&
|
||||
detailsArr.push(
|
||||
getPortalModuleDetails(
|
||||
await getPortalModuleDetails(
|
||||
getFormCollectionByID(searchDetail.pinswg_appealcasetype)
|
||||
.LogicalCollectionName,
|
||||
caseID
|
||||
|
||||
Reference in New Issue
Block a user