path to getbloblistproxy fails csr policy and uncommented saving of appeal progess data
This commit is contained in:
+11
-5
@@ -993,11 +993,17 @@ export const downloadAllProgressFiles = async (
|
|||||||
blobClient = containerClient.getBlobClient(
|
blobClient = containerClient.getBlobClient(
|
||||||
progressBlobObj[prop].caseObj
|
progressBlobObj[prop].caseObj
|
||||||
);
|
);
|
||||||
caseBlob = await blobClient.download(0);
|
|
||||||
caseDownloaded =
|
try {
|
||||||
caseDownloaded +
|
//console.log("===========\nGetting : ", blobClient._name);
|
||||||
(await streamToBuffer(caseBlob.readableStreamBody)) +
|
caseBlob = await blobClient.download(0);
|
||||||
",";
|
caseDownloaded =
|
||||||
|
caseDownloaded +
|
||||||
|
(await streamToBuffer(caseBlob.readableStreamBody)) +
|
||||||
|
",";
|
||||||
|
} catch {
|
||||||
|
console.log("===========\nFAILED : ", blobClient._name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
caseDownloaded = caseDownloaded.substring(0, caseDownloaded.length - 1);
|
caseDownloaded = caseDownloaded.substring(0, caseDownloaded.length - 1);
|
||||||
|
|||||||
+32
-14
@@ -1020,19 +1020,37 @@ export const getPortalModuleDetails = async (appealType, caseReference) => {
|
|||||||
// encodeURI(caseReference)
|
// encodeURI(caseReference)
|
||||||
// );
|
// );
|
||||||
|
|
||||||
return axios
|
// return axios
|
||||||
.get(
|
// .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 +
|
BASE_URL +
|
||||||
"/api/endpoint/getportalmoduledetails_api?appealType=" +
|
"/api/endpoint/getportalmoduledetails_api?appealType=" +
|
||||||
appealType +
|
appealType +
|
||||||
"&caseReference=" +
|
"&caseReference=" +
|
||||||
encodeURI(caseReference)
|
encodeURI(caseReference),
|
||||||
)
|
};
|
||||||
.then((res) => res.data)
|
|
||||||
.catch((error) => {
|
try {
|
||||||
console.log("error case ref:", caseReference);
|
const res = await axios(config);
|
||||||
consoleLogger(error);
|
return res.data;
|
||||||
});
|
} catch (error) {
|
||||||
|
console.log("error case ref:", caseReference);
|
||||||
|
consoleLogger(error);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getPortalModuleDetailsProxy = (appealType, caseReference) => {
|
export const getPortalModuleDetailsProxy = (appealType, caseReference) => {
|
||||||
@@ -1689,8 +1707,8 @@ export const getFilesFromBlob = (containerName, casefolderID) => {
|
|||||||
export const getFilesFromBlobproxy = (containerName, casefolderID) => {
|
export const getFilesFromBlobproxy = (containerName, casefolderID) => {
|
||||||
return axios
|
return axios
|
||||||
.get(
|
.get(
|
||||||
BASE_URL +
|
// BASE_URL +
|
||||||
"/api/file/getbloblistproxy?container=" +
|
"/api/file/getbloblistproxy?container=" +
|
||||||
containerName +
|
containerName +
|
||||||
"&casefolderID=" +
|
"&casefolderID=" +
|
||||||
casefolderID
|
casefolderID
|
||||||
|
|||||||
@@ -2086,6 +2086,7 @@ const RenderFileUpload = (field) => {
|
|||||||
field.containerID,
|
field.containerID,
|
||||||
field.ticketnumber
|
field.ticketnumber
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
|
field.input.value == null;
|
||||||
field.setFilesForAppeal(data);
|
field.setFilesForAppeal(data);
|
||||||
setCompletedUploadFiles(true);
|
setCompletedUploadFiles(true);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ let BuildSection = (props) => {
|
|||||||
setSavingStatus(useSaveStatus);
|
setSavingStatus(useSaveStatus);
|
||||||
|
|
||||||
//not sure we need this here if it does it on drop of file
|
//not sure we need this here if it does it on drop of file
|
||||||
//uploadAppealFiles(values);
|
uploadAppealFiles(values);
|
||||||
|
|
||||||
// console.log(
|
// console.log(
|
||||||
// "\n////////////////////////\n appeal pdf payload",
|
// "\n////////////////////////\n appeal pdf payload",
|
||||||
@@ -484,7 +484,7 @@ let BuildSection = (props) => {
|
|||||||
"_pinswg_appellant_value"
|
"_pinswg_appellant_value"
|
||||||
];
|
];
|
||||||
|
|
||||||
//console.log("on save:", valuesObj);
|
console.log("on save:", valuesObj);
|
||||||
updateCaseProgress(
|
updateCaseProgress(
|
||||||
valuesObj,
|
valuesObj,
|
||||||
false,
|
false,
|
||||||
|
|||||||
+51
-29
@@ -328,6 +328,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
await getDetails(myRepresentations, "myRepresentations"),
|
await getDetails(myRepresentations, "myRepresentations"),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// console.log(
|
||||||
|
// "=================================\nmySubmittedRepsDetails:",
|
||||||
|
// mySubmittedRepsDetails
|
||||||
|
// );
|
||||||
|
|
||||||
store.dispatch(setAccountDetails(accountDetails));
|
store.dispatch(setAccountDetails(accountDetails));
|
||||||
store.dispatch(setLoggedInUserId(loggedInUser));
|
store.dispatch(setLoggedInUserId(loggedInUser));
|
||||||
store.dispatch(setMyCases(myCases));
|
store.dispatch(setMyCases(myCases));
|
||||||
@@ -372,38 +377,55 @@ const getDetails = async (resultsObj, detailsType) => {
|
|||||||
if (detailsType == "myRepresentations") {
|
if (detailsType == "myRepresentations") {
|
||||||
const repsObj = resultsObj.map((searchDetail, index) => {
|
const repsObj = resultsObj.map((searchDetail, index) => {
|
||||||
detailsArr.push(
|
detailsArr.push(
|
||||||
getCase(searchDetail["incidentID"]).then((data) => {
|
getCase(searchDetail["incidentID"])
|
||||||
let caseID = "";
|
.then(async (data) => {
|
||||||
|
let caseID = "";
|
||||||
|
|
||||||
switch (detailsType) {
|
switch (detailsType) {
|
||||||
case "myCases":
|
case "myCases":
|
||||||
caseID = data.pinswg_title;
|
caseID = data.pinswg_title;
|
||||||
break;
|
break;
|
||||||
case "myWatchedCases":
|
case "myWatchedCases":
|
||||||
case "mySubmittedReps":
|
case "mySubmittedReps":
|
||||||
caseID =
|
caseID =
|
||||||
data[
|
data[
|
||||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
case "awaitingSubmission":
|
case "awaitingSubmission":
|
||||||
case "myRepresentations":
|
case "myRepresentations":
|
||||||
caseID = data.ticketnumber;
|
try {
|
||||||
break;
|
caseID = data.ticketnumber;
|
||||||
default:
|
} catch {
|
||||||
caseID = data.pinswg_title;
|
console.log("missing:", data);
|
||||||
}
|
}
|
||||||
return getPortalModuleDetails(
|
|
||||||
getFormCollectionByID(data.pinswg_appealcasetype)
|
break;
|
||||||
.LogicalCollectionName,
|
default:
|
||||||
caseID
|
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
|
||||||
|
);
|
||||||
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//debugger;
|
||||||
const detailsObj = resultsObj.map((searchDetail, index) => {
|
const detailsObj = resultsObj.map(async (searchDetail, index) => {
|
||||||
let caseID = "";
|
let caseID = "";
|
||||||
|
|
||||||
switch (detailsType) {
|
switch (detailsType) {
|
||||||
@@ -431,7 +453,7 @@ const getDetails = async (resultsObj, detailsType) => {
|
|||||||
|
|
||||||
searchDetail.pinswg_appealcasetype != null &&
|
searchDetail.pinswg_appealcasetype != null &&
|
||||||
detailsArr.push(
|
detailsArr.push(
|
||||||
getPortalModuleDetails(
|
await getPortalModuleDetails(
|
||||||
getFormCollectionByID(searchDetail.pinswg_appealcasetype)
|
getFormCollectionByID(searchDetail.pinswg_appealcasetype)
|
||||||
.LogicalCollectionName,
|
.LogicalCollectionName,
|
||||||
caseID
|
caseID
|
||||||
|
|||||||
Reference in New Issue
Block a user