added display of representatons on my portal

This commit is contained in:
2021-11-09 15:19:52 +00:00
parent 05373eab2f
commit 5fef09f76a
14 changed files with 152 additions and 99 deletions
+26 -17
View File
@@ -818,23 +818,32 @@ export const getMyCases = (token, loggedInUserId) => {
};
export const getMyRepresentations = (token, loggedInUserId) => {
return (
axios
// .get(BASE_URL + "/api/lookups/myRepresentations", {
// httpsAgent: new https.Agent({ rejectUnauthorized: false }),
// })
.get(
WEBAPI_URL +
"incidents?$select=ticketnumber,casetypecode,createdon,_customerid_value,description,incidentid,pinswg_appealcasetype,_pinswg_assignedinspectrids_value,statecode,statuscode,title&$filter=_customerid_value eq " +
loggedInUserId +
" and pinswg_appealcasetype ne null&$orderby=createdon desc&$count=true&$top=3",
azureHeaders(token)
)
.then((res) => res.data)
.catch((error) => {
console.log("thi serror", error);
})
);
return axios
.get(
WEBAPI_URL +
"pinswg_representationses?$filter= _pinswg_contact_value eq " +
loggedInUserId +
"&$count=true&$orderby=createdon desc",
azureHeaders(token)
)
.then((res) => res.data)
.catch((error) => {
console.log("this serror", error);
});
};
export const getMyRepresentationsProxy = (token, loggedInUserId) => {
return axios
.get(
"/api/proxy/pinswg_representationses?$filter= _pinswg_contact_value eq " +
loggedInUserId +
"&$count=true&$orderby=createdon desc",
azureHeaders(token)
)
.then((res) => res.data)
.catch((error) => {
console.log("this serror", error);
});
};
export const getWatchedCases = (token, loggedInUserId) => {