cleared debug, updated new appeal add about you

This commit is contained in:
2022-05-31 10:15:03 +01:00
parent 55a9a15a57
commit f2e71c0b54
49 changed files with 161396 additions and 500 deletions
+104 -90
View File
@@ -41,7 +41,7 @@ export const getToken = () => {
return data;
})
.catch((error) => {
console.log("error :", error.response);
//console.log("error :", error.response);
// return error;
});
};
@@ -130,16 +130,16 @@ export const hashAPIPath = (queryPath) => {
};
export const hashString = (stringToHash) => {
console.log("string to hash", stringToHash);
//console.log("string to hash", stringToHash);
let hashedStr = CryptoJS.AES.encrypt(stringToHash, "pedw");
console.log("hashed String", hashedStr.toString());
//console.log("hashed String", hashedStr.toString());
return hashedStr.toString();
};
export const dehashString = (stringToDeHash) => {
console.log("string to dehash", stringToDeHash);
//console.log("string to dehash", stringToDeHash);
let dehashedStr = CryptoJS.AES.decrypt(decodeURI(stringToDeHash), "pedw");
console.log("dehshed string:", dehashedStr.toString(CryptoJS.enc.Utf8));
//console.log("dehshed string:", dehashedStr.toString(CryptoJS.enc.Utf8));
return dehashedStr.toString(CryptoJS.enc.Utf8);
};
@@ -154,7 +154,7 @@ export const getBasicSearch = (searchString) => {
return res.data;
})
.catch((error) => {
console.log(error);
//console.log(error);
return error.response;
});
};
@@ -170,7 +170,7 @@ export const getPartSavedAppeal = (searchString) => {
return res.data;
})
.catch((error) => {
console.log(error);
//console.log(error);
return error.response;
});
};
@@ -186,7 +186,7 @@ export const getBasicDNSURLSearch = (searchString) => {
return res.data;
})
.catch((error) => {
console.log(error);
//console.log(error);
return error.response;
});
};
@@ -348,7 +348,7 @@ export const getBasicSearchDetails = (
)
.then((res) => res.data)
.catch((error) => {
console.log("this error", error);
console.log("this error", error);
});
};
@@ -358,16 +358,16 @@ export const getBasicPartSavedDetails = (
primaryIdAttribute,
incidentID
) => {
console.log(
"///////api call: ",
BASE_URL +
"/api/endpoint/getbasicpartsaveddetails_api?appealTypeName=" +
appealTypeName +
"&primaryIdAttribute=" +
primaryIdAttribute +
"&incidentID=" +
incidentID
);
// console.log(
// "///////api call: ",
// BASE_URL +
// "/api/endpoint/getbasicpartsaveddetails_api?appealTypeName=" +
// appealTypeName +
// "&primaryIdAttribute=" +
// primaryIdAttribute +
// "&incidentID=" +
// incidentID
// );
return axios
.get(
BASE_URL +
@@ -380,7 +380,7 @@ export const getBasicPartSavedDetails = (
)
.then((res) => res.data)
.catch((error) => {
console.log("this error", error);
console.log("this error", error);
});
};
@@ -403,7 +403,7 @@ export const getBasicSearchDetailsPaged = (
)
.then((res) => res.data)
.catch((error) => {
console.log("this error", error);
console.log("this error", error);
});
};
@@ -415,7 +415,7 @@ export const getSearchDocumentDetails = (incidentID) => {
)
.then((res) => res.data)
.catch((error) => {
console.log("API call error", error);
//console.log("API call error", error);
});
};
@@ -426,7 +426,7 @@ export const getSearchDocumentTypes = (incidentID) => {
)
.then((res) => res.data)
.catch((error) => {
console.log("API call error", error);
//console.log("API call error", error);
});
};
@@ -438,7 +438,7 @@ export const getSearchDocumentDetailsPaged = (
showNumberOfRecords,
documentType
) => {
console.log("to api:", documentType);
//console.log("to api:", documentType);
return axios
.get(
"/api/endpoint/getsearchdocumentdetailspaged_api?incidentid=" +
@@ -456,7 +456,7 @@ export const getSearchDocumentDetailsPaged = (
)
.then((res) => res.data)
.catch((error) => {
console.log("API call error", error);
//console.log("API call error", error);
});
};
@@ -471,7 +471,7 @@ export const getLinkedCases = (parentIncidentid) => {
return res.data;
})
.catch((error) => {
console.log("API call error", error);
//console.log("API call error", error);
});
};
@@ -480,7 +480,7 @@ export const getAppealsTypes = () => {
.get(BASE_URL + "/api/endpoint/getappealtypes_api")
.then((res) => res.data)
.catch((error) => {
console.log(error);
//console.log(error);
let ErrResponse = {
value: [],
errorCode: error.response.status,
@@ -496,7 +496,7 @@ export const getAppealsTypesForNewAppeal = () => {
.get(BASE_URL + "/api/endpoint/getappealtypesfornewappeal_api")
.then((res) => res.data)
.catch((error) => {
console.log(error);
//console.log(error);
let ErrResponse = {
value: [],
errorCode: error.response.status,
@@ -532,7 +532,7 @@ export const getFormData = (whichForm) => {
.get(BASE_URL + "/api/endpoint/getformdata_api?whichForm=" + whichForm)
.then((res) => res.data)
.catch((error) => {
console.log("API call error", error);
//console.log("API call error", error);
});
};
@@ -545,7 +545,7 @@ export const getMandatoryFields = (whichForm) => {
)
.then((res) => res.data)
.catch((error) => {
console.log("API call error", error);
//console.log("API call error", error);
});
};
@@ -554,12 +554,12 @@ export const getPickLists = (whichForm) => {
.get(BASE_URL + "/api/endpoint/getpicklists_api?whichForm=" + whichForm)
.then((res) => res.data)
.catch((error) => {
console.log("API call error", error);
//console.log("API call error", error);
});
};
export const getPersonalAccount = (contactid) => {
console.log(contactid);
//console.log(contactid);
return axios
.get(
BASE_URL +
@@ -567,17 +567,16 @@ export const getPersonalAccount = (contactid) => {
contactid
)
.then((res) => {
console.log(res.data);
//console.log(res.data);
return res.data;
})
.catch((error) => {
console.log("returned:", error);
//console.log("returned:", error);
// let ErrResponse = {
// value: [],
// errorCode: error.response.status,
// errorMsg: error.response.statusText,
// };
// return ErrResponse;
});
};
@@ -587,13 +586,13 @@ export const getAppealID = (
updateFormCollection,
primaryAttribute
) => {
console.log(
"is this the collection?:",
getFormCollection(updateFormCollection)
);
// console.log(
// "is this the collection?:",
// getFormCollection(updateFormCollection)
// )
let formCollectionName = getFormCollection(updateFormCollection);
console.log(formCollectionName);
//console.log(formCollectionName);
return axios
.get(
"/api/endpoint/getappealid_api?updateFormCollection=" +
@@ -612,7 +611,7 @@ export const getAppealID = (
return appealID;
})
.catch((error) => {
console.log("API call error", error);
//console.log("API call error", error);
});
};
@@ -626,32 +625,7 @@ export const getLogin = (emailAddress, pwd) => {
)
.then((res) => res.data)
.catch((error) => {
console.log("API call error", error);
});
};
export const createCase = (appealTypeId, lpaID, contactid) => {
appealTypeId = parseInt(appealTypeId);
var queryUrl =
"/api/endpoint/createcase_api?appealTypeId=" +
appealTypeId +
"&lpaID=" +
lpaID +
"&contactid=" +
contactid;
var config = {
method: "get",
url: BASE_URL + queryUrl,
};
return axios(config)
.then((res) => {
return res.data;
})
.catch((error) => {
console.log("this serror", error);
//console.log("API call error", error);
});
};
@@ -666,7 +640,7 @@ export const getMyCases = (loggedInUserId) => {
return res.data;
})
.catch((error) => {
console.log("API call error", error);
//console.log("API call error", error);
});
};
@@ -753,7 +727,7 @@ export const getAwaitingSubmissionProxy = (loggedInUserId) => {
)
.then((res) => res.data)
.catch((error) => {
console.log("API call error", error);
//console.log("API call error", error);
});
};
@@ -768,18 +742,18 @@ export const getAwaitingSubmission = (loggedInUserId) => {
return res.data;
})
.catch((error) => {
console.log("API call error", error);
//console.log("API call error", error);
});
};
export const getPortalModuleDetails = (appealType, caseReference) => {
console.log(
BASE_URL +
"/api/endpoint/getportalmoduledetails_api?appealType=" +
appealType +
"&caseReference=" +
encodeURI(caseReference)
);
//console.log(
// BASE_URL +
// "/api/endpoint/getportalmoduledetails_api?appealType=" +
// appealType +
// "&caseReference=" +
// encodeURI(caseReference)
// );
return axios
.get(
BASE_URL +
@@ -790,7 +764,7 @@ export const getPortalModuleDetails = (appealType, caseReference) => {
)
.then((res) => res.data)
.catch((error) => {
console.log("API call error", error);
//console.log("API call error", error);
});
};
@@ -805,7 +779,7 @@ export const getPortalModuleDetailsProxy = (appealType, caseReference) => {
)
.then((res) => res.data)
.catch((error) => {
console.log("API call error", error);
//console.log("API call error", error);
});
};
@@ -818,7 +792,7 @@ export const getEmailAccountCheck = (emailAddress) => {
)
.then((res) => res.data)
.catch((error) => {
console.log("API call error", error);
//console.log("API call error", error);
});
};
@@ -855,7 +829,7 @@ export const updateAccount = async (contactId, updateBody) => {
return res.data;
})
.catch((error) => {
console.log("this error:", error);
//console.log("this error:", error);
});
};
@@ -878,6 +852,34 @@ export const createWatchedCases = (formValues) => {
});
};
export const createNewCase = (appealTypeId, lpaID, contactid, createBody) => {
appealTypeId = parseInt(appealTypeId);
var data = createBody;
var queryUrl =
"/api/endpoint/createcase_api?appealTypeId=" +
appealTypeId +
"&lpaID=" +
lpaID +
"&contactid=" +
contactid;
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,
@@ -905,14 +907,14 @@ export const updateCase = async (
data: data,
};
console.log(data);
//console.log(data);
return axios(config)
.then((res) => {
return res.data;
})
.catch((error) => {
console.log("API call error", error);
//console.log("API call error", error);
});
};
@@ -928,7 +930,19 @@ export const patchCase = async (incidentid) => {
return res.data;
})
.catch((error) => {
console.log("this error:", error);
//console.log("this error:", error);
});
};
export const getCase = (incidentID) => {
return axios
.get(BASE_URL + "/api/endpoint/getcase_api?incidentID=" + incidentID)
.then((res) => {
//console.log("//////////----", res.data);
return res.data;
})
.catch((error) => {
console.log("this serror", error);
});
};
@@ -948,7 +962,7 @@ export const deleteMyRepresentations = (myRepresentationsID) => {
"Content-Type": "application/json",
},
};
// console.log(config);
//console.log(config);
return axios(config)
.then((res) => {
//console.log("deleted ", res.data);
@@ -967,7 +981,7 @@ export const deleteAwaitingSubmissions = (incidentID) => {
method: "delete",
url: queryUrl,
};
// console.log(config);
//console.log(config);
return axios(config)
.then((res) => {
//console.log("deleted ", res.data);
@@ -1007,7 +1021,7 @@ export const createAccount = (formValues) => {
return axios(config)
.then((res) => {
// console.log("posted ", res.data);
//console.log("posted ", res.data);
return res.data;
})
.catch((error) => {
@@ -1030,17 +1044,17 @@ export const uploadFiles = (formValues) => {
// data: data,
// headers: { "content-type": "multipart/form-data" },
// onUploadProgress: (event) => {
// console.log(
// //console.log(
// `Current progress:`,
// Math.round((event.loaded * 100) / event.total)
// );
// },
// };
console.log(config);
//console.log(config);
return axios(config)
.then((res) => {
// console.log("posted ", res.data);
//console.log("posted ", res.data);
return res.data;
})
.catch((error) => {