create pdf reps for lpa

This commit is contained in:
2023-09-26 09:12:57 +01:00
parent 34c3e06ee3
commit 41847b3433
55 changed files with 8798 additions and 168 deletions
+48 -8
View File
@@ -782,11 +782,11 @@ export const getAwaitingSubmission = (loggedInUserId) => {
};
export const getAwaitingSubmissionFromBlob = (containerName) => {
// console.log(
// "///////////////////////\ngetAwaitingSubmissionFromBlob: " +
// containerName +
// "\n///////////////////////\n"
// );
console.log(
"///////////////////////\ngetAwaitingSubmissionFromBlob: " +
containerName +
"\n///////////////////////\n"
);
return axios
.get(
BASE_URL +
@@ -807,9 +807,13 @@ export const getAwaitingSubmissionFromBlob = (containerName) => {
export const getRepsFromBlob = (containerName) => {
console.log(
"///////////////////////\ngetRepsFromBlob: " +
"///////////////////////\ngetRepsFromBlob function: " +
containerName +
"\n///////////////////////\n"
"\n///////////////////////\n",
BASE_URL +
"/api/file/getrepsblob?container=" +
containerName +
hashAPIPath("/api/file/getrepsblob?container=" + containerName)
);
return axios
@@ -823,7 +827,12 @@ export const getRepsFromBlob = (containerName) => {
return res.data;
})
.catch((error) => {
//console.log("API call error", error);
console.log(
"///////////////////////\ngetRepsFromBlob error response: " +
error +
"\n///////////////////////\n"
);
console.log("API call error", error);
});
};
@@ -1346,6 +1355,37 @@ export const uploadRepFiles = async (
}
};
export const generateRepPDF = async (formValues, containerID, casefolderID) => {
//let files = filesObj;
console.log("generateRepPDF function: " + formValues);
// var formData = new FormData();
// formValues.append("appealData", JSON.stringify(formValues));
// formValues.append("containerID", containerID);
// formValues.append("casefolderID", casefolderID);
// Object.assign(formValues, {
// "containerID": containerID,
// "casefolderID": casefolderID,
// });
var queryUrl = "/api/file/generatepdf";
const config = {
method: "post",
url: queryUrl,
data: formValues,
headers: { "content-type": "multipart/form-data" },
};
//console.log(config);
try {
const res = await axios(config);
return res.data;
} catch (error) {
console.log("this serror", error);
}
};
export const getFilesFromBlob = (containerName, casefolderID) => {
console.log(
" get files from blob",