decopled crm for new appeals - all made on storage

This commit is contained in:
2022-09-28 10:13:36 +01:00
parent bfcd0329c6
commit 745b51839a
15 changed files with 451 additions and 99 deletions
+93 -16
View File
@@ -743,21 +743,6 @@ export const getAwaitingSubmissionProxy = (loggedInUserId) => {
});
};
export const getAwaitingSubmissionFromBlobProxy = (containerName) => {
return axios
.get(
BASE_URL +
"/api/file/getawaitingsubmissionfromblob?container=" +
containerName
)
.then((res) => {
return res.data;
})
.catch((error) => {
//console.log("API call error", error);
});
};
export const getAwaitingSubmission = (loggedInUserId) => {
return axios
.get(
@@ -792,6 +777,21 @@ export const getAwaitingSubmissionFromBlob = (containerName) => {
});
};
export const getAwaitingSubmissionFromBlobProxy = (containerName) => {
return axios
.get(
BASE_URL +
"/api/file/getawaitingsubmissionfromblob?container=" +
containerName
)
.then((res) => {
return res.data;
})
.catch((error) => {
//console.log("API call error", error);
});
};
export const getPortalModuleDetails = (appealType, caseReference) => {
//console.log(
// BASE_URL +
@@ -934,6 +934,45 @@ export const createNewCase = (
});
};
export const createNewCaseBlob = (
appealTypeId,
lpaID,
contactid,
createBody,
containerName,
lpaName
) => {
appealTypeId = parseInt(appealTypeId);
var data = createBody;
data.pinswg_lpaname = lpaName;
var queryUrl =
"/api/file/createcase_api?appealTypeId=" +
appealTypeId +
"&lpaID=" +
lpaID +
"&contactid=" +
contactid +
"&containername=" +
containerName;
var config = {
method: "post",
url: BASE_URL + queryUrl,
data: data,
};
return axios(config)
.then((res) => {
return res.data;
})
.catch((error) => {
console.log("this serror", error);
});
};
export const updateCase = async (
incidentId,
updateBody,
@@ -972,6 +1011,44 @@ export const updateCase = async (
});
};
export const updateCaseBlob = async (
incidentId,
updateBody,
updateFormCollection,
primaryAttribute,
caseReference
) => {
var data = updateBody;
var appealObj = await getAppealID(
caseReference,
updateFormCollection,
primaryAttribute
);
var queryUrl =
"/api/file/updatecase_api?updateFormCollection=" +
updateFormCollection +
"&appealObj=" +
appealObj;
var config = {
method: "post",
url: queryUrl,
data: updateBody,
};
//console.log(data);
return axios(config)
.then((res) => {
return res.data;
})
.catch((error) => {
//console.log("API call error", error);
});
};
export const patchCase = async (incidentid) => {
var queryUrl = "/api/endpoint/patchcase_api?incidentid=" + incidentid;
var config = {
@@ -1232,7 +1309,7 @@ export const downloadBlob = (containerName, blobName) => {
{ responseType: "blob" }
)
.then((response) => {
console.log("Downloaded blob content:");
//console.log("Downloaded blob content:");
res.setHeader(
"content-disposition",