my cases portal module by loggedin user
This commit is contained in:
+31
-18
@@ -425,22 +425,19 @@ export const updateCase = async (
|
||||
});
|
||||
};
|
||||
|
||||
export const getMyCases = () => {
|
||||
return (
|
||||
axios
|
||||
// .get(BASE_URL + "/api/lookups/myCases", {
|
||||
// httpsAgent: new https.Agent({ rejectUnauthorized: false }),
|
||||
// })
|
||||
.get(
|
||||
WEBAPI_URL +
|
||||
"incidents?$select=_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype ne null &$count=true",
|
||||
azureHeaders
|
||||
)
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
console.log("thi serror", error);
|
||||
})
|
||||
);
|
||||
export const getMyCases = (loggedInUserId) => {
|
||||
return axios
|
||||
.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
|
||||
)
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
console.log("thi serror", error);
|
||||
});
|
||||
};
|
||||
|
||||
export const getMyRepresentations = () => {
|
||||
@@ -451,7 +448,7 @@ export const getMyRepresentations = () => {
|
||||
// })
|
||||
.get(
|
||||
WEBAPI_URL +
|
||||
"incidents?$select=_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype ne null &$count=true",
|
||||
"incidents?$select=_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype ne null &$count=true&$top=3",
|
||||
azureHeaders
|
||||
)
|
||||
.then((res) => res.data)
|
||||
@@ -470,7 +467,7 @@ export const getWatchedCases = () => {
|
||||
// })
|
||||
.get(
|
||||
WEBAPI_URL +
|
||||
"incidents?$select=_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype ne null &$count=true",
|
||||
"incidents?$select=_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype ne null &$count=true&$top=3",
|
||||
azureHeaders
|
||||
)
|
||||
.then((res) => res.data)
|
||||
@@ -490,3 +487,19 @@ export const getAwaitingSubmission = () => {
|
||||
console.log("thi serror", error);
|
||||
});
|
||||
};
|
||||
|
||||
export const getPortalModuelDetails = (appealType, caseReference) => {
|
||||
return axios
|
||||
.get(
|
||||
WEBAPI_URL +
|
||||
appealType +
|
||||
"?$filter=pinswg_name eq '" +
|
||||
caseReference +
|
||||
"'&$count=true",
|
||||
azureHeaders
|
||||
)
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
console.log("thiserror", error);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user