update create appeal and pinsuser cookie

This commit is contained in:
2021-11-02 11:40:11 +00:00
parent 80860d68a9
commit b790228454
19 changed files with 138 additions and 110 deletions
+10 -11
View File
@@ -657,7 +657,7 @@ export const getLPA = (token) => {
};
export const getPersonalAccount = (token, contactid) => {
console.log("getting personal details:", contactid);
//console.log("getting personal details:", contactid);
return axios
.get(
WEBAPI_URL +
@@ -682,7 +682,6 @@ export const getPersonalAccount = (token, contactid) => {
};
export const getAppealID = (
token,
caseReference,
updateFormCollection,
primaryAttribute
@@ -696,9 +695,9 @@ export const getAppealID = (
caseReference +
"'";
console.log("proxy url", weburl);
console.log("proxy url ", weburl);
return axios
.get(weburl, azureHeaders(token))
.get(weburl, azureHeaders(getSASToken()))
.then((res) => {
var appealID = res.data.value[0][primaryAttribute];
return appealID;
@@ -723,13 +722,14 @@ export const getLogin = (emailAddress, pwd) => {
});
};
export const createCase = (token, appealTypeId, contactid) => {
export const createCase = (token, appealTypeId, lpaID, contactid) => {
appealTypeId = parseInt(appealTypeId);
var data = JSON.stringify({
"title": "insertion test case",
"caseorigincode": 3,
"customerid_contact@odata.bind": "/contacts(" + contactid + ")",
"pinswg_appealcasetype": appealTypeId,
"pinswg_AssociatedLPA@odata.bind": "/accounts(" + lpaID + ")",
});
var config = {
@@ -757,7 +757,6 @@ export const createCase = (token, appealTypeId, contactid) => {
};
export const updateCase = async (
token,
incidentId,
updateBody,
updateFormCollection,
@@ -784,15 +783,15 @@ export const updateCase = async (
"Accept": "application/json",
"Prefer": 'odata.include-annotations="*",return=representation',
"Content-Type": "application/json",
"ServiceBusAuthorization": token,
"ServiceBusAuthorization": getSASToken(),
},
data: data,
};
console.log(config);
//console.log(config);
return axios(config)
.then((res) => {
console.log("patched ", res.data);
//console.log("patched ", res.data);
return res.data;
})
.catch((error) => {
@@ -801,7 +800,7 @@ export const updateCase = async (
};
export const getMyCases = (token, loggedInUserId) => {
console.log("in action ", loggedInUserId);
//console.log("in action ", loggedInUserId);
return axios
.get(
WEBAPI_URL +
@@ -870,7 +869,7 @@ export const getAwaitingSubmission = (token) => {
});
};
export const getPortalModuelDetails = (token, appealType, caseReference) => {
export const getPortalModuleDetails = (token, appealType, caseReference) => {
return axios
.get(
WEBAPI_URL +