advances search on case lpa and appeal
This commit is contained in:
@@ -143,6 +143,52 @@ export const getBasicDNSSearch = (searchString) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const getAdvancedSearch = (searchString) => {
|
||||
console.log(searchString.caseReference);
|
||||
|
||||
var queryString = "";
|
||||
|
||||
queryString +=
|
||||
searchString.q != null
|
||||
? "contains(title, '" + searchString.q + "') "
|
||||
: "";
|
||||
|
||||
queryString +=
|
||||
searchString.lpa != null
|
||||
? (typeof searchString.q == "undefined" ? "" : " and ") +
|
||||
"_customerid_value eq " +
|
||||
searchString.lpa
|
||||
: "";
|
||||
queryString +=
|
||||
searchString.apt != null
|
||||
? (typeof searchString.q == "undefined" &&
|
||||
typeof searchString.lpa == "undefined"
|
||||
? ""
|
||||
: " and ") +
|
||||
"pinswg_appealcasetype eq " +
|
||||
searchString.apt
|
||||
: "";
|
||||
|
||||
console.log(
|
||||
"incidents?$select=_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title&$filter=" +
|
||||
queryString +
|
||||
" &$count=true"
|
||||
);
|
||||
return axios
|
||||
.get(
|
||||
WEBAPI_URL +
|
||||
"incidents?$select=_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title&$filter=" +
|
||||
queryString +
|
||||
" &$count=true",
|
||||
|
||||
azureHeaders
|
||||
)
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
console.log("thiserror", error);
|
||||
});
|
||||
};
|
||||
|
||||
export const getBasicSearchDetails = (appealType, caseReference) => {
|
||||
return axios
|
||||
.get(
|
||||
|
||||
Reference in New Issue
Block a user