Added service stage status and delete functions

This commit is contained in:
2022-01-25 10:09:11 +00:00
parent 10f2baa7be
commit f347a0d73b
27 changed files with 575 additions and 125 deletions
+58 -6
View File
@@ -464,7 +464,7 @@ export const createCase = (appealTypeId, lpaID, contactid) => {
contactid;
var config = {
method: "post",
method: "get",
url: BASE_URL + queryUrl,
};
@@ -566,17 +566,34 @@ export const getWatchedCasesProxy = (loggedInUserId) => {
});
};
export const getAwaitingSubmission = () => {
export const getAwaitingSubmissionProxy = (loggedInUserId) => {
return axios
.get(BASE_URL + "/api/lookups/awaitingSubmission", {
httpsAgent: new https.Agent({ rejectUnauthorized: false }),
})
.get(
BASE_URL +
"/api/endpoint/getawaitingsubmissionproxy_api?loggedInUserId=" +
loggedInUserId
)
.then((res) => res.data)
.catch((error) => {
console.log("API call error", error);
});
};
export const getAwaitingSubmission = (loggedInUserId) => {
return axios
.get(
BASE_URL +
"/api/endpoint/getawaitingsubmission_api?loggedInUserId=" +
loggedInUserId
)
.then((res) => {
return res.data;
})
.catch((error) => {
console.log("API call error", error);
});
};
export const getPortalModuleDetails = (appealType, caseReference) => {
return axios
.get(
@@ -699,7 +716,7 @@ export const updateCase = async (
var config = {
method: "post",
url: queryUrl + hashAPIPath(queryUrl),
url: queryUrl,
data: data,
};
@@ -712,6 +729,22 @@ export const updateCase = async (
});
};
export const patchCase = async (incidentid) => {
var queryUrl = "/api/endpoint/patchcase_api?incidentid=" + incidentid;
var config = {
method: "get",
url: queryUrl,
};
return axios(config)
.then((res) => {
return res.data;
})
.catch((error) => {
console.log("this error:", error);
});
};
export const deleteMyRepresentations = (myRepresentationsID) => {
var queryUrl =
"/api/endpoint/deletemyrepresentations_api?myRepresentationsID=" +
@@ -739,6 +772,25 @@ export const deleteMyRepresentations = (myRepresentationsID) => {
});
};
export const deleteAwaitingSubmissions = (incidentID) => {
var queryUrl =
"/api/endpoint/deleteawaitingsubmissions_api?incidentID=" + incidentID;
var config = {
method: "delete",
url: queryUrl,
};
// console.log(config);
return axios(config)
.then((res) => {
//console.log("deleted ", res.data);
return res.data;
})
.catch((error) => {
console.log("this serror", error);
});
};
export const deleteWatchedCases = (watchedCaseID) => {
var queryUrl =
"/api/endpoint/deletewatchedcases_api?watchedCaseID=" + watchedCaseID;