Merged PR 1337: path to getbloblistproxy fails csr policy and uncommented saving of appeal p...
path to getbloblistproxy fails csr policy and uncommented saving of appeal progess data Related work items: #12956
This commit is contained in:
+11
-5
@@ -993,11 +993,17 @@ export const downloadAllProgressFiles = async (
|
||||
blobClient = containerClient.getBlobClient(
|
||||
progressBlobObj[prop].caseObj
|
||||
);
|
||||
caseBlob = await blobClient.download(0);
|
||||
caseDownloaded =
|
||||
caseDownloaded +
|
||||
(await streamToBuffer(caseBlob.readableStreamBody)) +
|
||||
",";
|
||||
|
||||
try {
|
||||
//console.log("===========\nGetting : ", blobClient._name);
|
||||
caseBlob = await blobClient.download(0);
|
||||
caseDownloaded =
|
||||
caseDownloaded +
|
||||
(await streamToBuffer(caseBlob.readableStreamBody)) +
|
||||
",";
|
||||
} catch {
|
||||
console.log("===========\nFAILED : ", blobClient._name);
|
||||
}
|
||||
}
|
||||
|
||||
caseDownloaded = caseDownloaded.substring(0, caseDownloaded.length - 1);
|
||||
|
||||
+32
-14
@@ -1020,19 +1020,37 @@ export const getPortalModuleDetails = async (appealType, caseReference) => {
|
||||
// encodeURI(caseReference)
|
||||
// );
|
||||
|
||||
return axios
|
||||
.get(
|
||||
// return axios
|
||||
// .get(
|
||||
// BASE_URL +
|
||||
// "/api/endpoint/getportalmoduledetails_api?appealType=" +
|
||||
// appealType +
|
||||
// "&caseReference=" +
|
||||
// encodeURI(caseReference)
|
||||
// )
|
||||
// .then((res) => res.data)
|
||||
// .catch((error) => {
|
||||
// console.log("error case ref:", caseReference);
|
||||
// consoleLogger(error);
|
||||
// });
|
||||
|
||||
var config = {
|
||||
method: "get",
|
||||
url:
|
||||
BASE_URL +
|
||||
"/api/endpoint/getportalmoduledetails_api?appealType=" +
|
||||
appealType +
|
||||
"&caseReference=" +
|
||||
encodeURI(caseReference)
|
||||
)
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
console.log("error case ref:", caseReference);
|
||||
consoleLogger(error);
|
||||
});
|
||||
"/api/endpoint/getportalmoduledetails_api?appealType=" +
|
||||
appealType +
|
||||
"&caseReference=" +
|
||||
encodeURI(caseReference),
|
||||
};
|
||||
|
||||
try {
|
||||
const res = await axios(config);
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
console.log("error case ref:", caseReference);
|
||||
consoleLogger(error);
|
||||
}
|
||||
};
|
||||
|
||||
export const getPortalModuleDetailsProxy = (appealType, caseReference) => {
|
||||
@@ -1689,8 +1707,8 @@ export const getFilesFromBlob = (containerName, casefolderID) => {
|
||||
export const getFilesFromBlobproxy = (containerName, casefolderID) => {
|
||||
return axios
|
||||
.get(
|
||||
BASE_URL +
|
||||
"/api/file/getbloblistproxy?container=" +
|
||||
// BASE_URL +
|
||||
"/api/file/getbloblistproxy?container=" +
|
||||
containerName +
|
||||
"&casefolderID=" +
|
||||
casefolderID
|
||||
|
||||
@@ -2086,6 +2086,7 @@ const RenderFileUpload = (field) => {
|
||||
field.containerID,
|
||||
field.ticketnumber
|
||||
).then((data) => {
|
||||
field.input.value == null;
|
||||
field.setFilesForAppeal(data);
|
||||
setCompletedUploadFiles(true);
|
||||
});
|
||||
|
||||
@@ -174,7 +174,7 @@ let BuildSection = (props) => {
|
||||
setSavingStatus(useSaveStatus);
|
||||
|
||||
//not sure we need this here if it does it on drop of file
|
||||
//uploadAppealFiles(values);
|
||||
uploadAppealFiles(values);
|
||||
|
||||
// console.log(
|
||||
// "\n////////////////////////\n appeal pdf payload",
|
||||
@@ -484,7 +484,7 @@ let BuildSection = (props) => {
|
||||
"_pinswg_appellant_value"
|
||||
];
|
||||
|
||||
//console.log("on save:", valuesObj);
|
||||
console.log("on save:", valuesObj);
|
||||
updateCaseProgress(
|
||||
valuesObj,
|
||||
false,
|
||||
|
||||
+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