Merge branch 'Development' into get-progress-from-blob
This commit is contained in:
@@ -37,29 +37,32 @@ export default async function ApiProxy(req, res) {
|
||||
searchString.q +
|
||||
"') or contains(ticketnumber,'" +
|
||||
searchString.q +
|
||||
"'))"
|
||||
"')) and"
|
||||
: "";
|
||||
|
||||
queryString +=
|
||||
_.has(searchString, "lpa") && searchString.lpa != null
|
||||
? (typeof searchString.q == "undefined" ? "" : " and ") +
|
||||
"_pinswg_associatedlpa_value eq " +
|
||||
searchString.lpa
|
||||
? " _pinswg_associatedlpa_value eq " + searchString.lpa + " and"
|
||||
: "";
|
||||
|
||||
queryString +=
|
||||
_.has(searchString, "apt") && searchString.apt != null
|
||||
? (typeof searchString.q == "undefined" &&
|
||||
typeof searchString.lpa == "undefined"
|
||||
? ""
|
||||
: " and ") +
|
||||
"pinswg_appealcasetype eq " +
|
||||
searchString.apt
|
||||
? " pinswg_appealcasetype eq " + searchString.apt + " and"
|
||||
: "";
|
||||
|
||||
queryString +=
|
||||
_.has(searchString, "statuscode") && searchString.statuscode != null
|
||||
? " statuscode eq " + searchString.statuscode + " and"
|
||||
: "";
|
||||
|
||||
console.log(queryString);
|
||||
|
||||
var queryUrl =
|
||||
"incidents?$select=description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=" +
|
||||
queryString +
|
||||
" and pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true";
|
||||
" pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true";
|
||||
|
||||
console.log(queryUrl);
|
||||
|
||||
var apiResponse = _.isEmpty(searchString)
|
||||
? res.status(400).json()
|
||||
|
||||
@@ -2,7 +2,11 @@ import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { query } from "jsonpath";
|
||||
import _ from "lodash";
|
||||
import { getToken, azureHeadersPagedCustom } from "../../../actions";
|
||||
import {
|
||||
getToken,
|
||||
azureHeadersPagedCustom,
|
||||
consoleLogger,
|
||||
} from "../../../actions";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
@@ -43,29 +47,28 @@ export default async function ApiProxy(req, res) {
|
||||
searchString.q +
|
||||
"') or contains(ticketnumber,'" +
|
||||
searchString.q +
|
||||
"'))"
|
||||
"')) and"
|
||||
: "";
|
||||
|
||||
queryString +=
|
||||
_.has(searchString, "lpa") && searchString.lpa != null
|
||||
? (typeof searchString.q == "undefined" ? "" : " and ") +
|
||||
"_pinswg_associatedlpa_value eq " +
|
||||
searchString.lpa
|
||||
? " _pinswg_associatedlpa_value eq " + searchString.lpa + " and"
|
||||
: "";
|
||||
|
||||
queryString +=
|
||||
_.has(searchString, "apt") && searchString.apt != null
|
||||
? (typeof searchString.q == "undefined" &&
|
||||
typeof searchString.lpa == "undefined"
|
||||
? ""
|
||||
: " and ") +
|
||||
"pinswg_appealcasetype eq " +
|
||||
searchString.apt
|
||||
? " pinswg_appealcasetype eq " + searchString.apt + " and"
|
||||
: "";
|
||||
|
||||
queryString +=
|
||||
_.has(searchString, "statuscode") && searchString.statuscode != null
|
||||
? " statuscode eq " + searchString.statuscode + " and"
|
||||
: "";
|
||||
|
||||
var queryUrl =
|
||||
"incidents?$select=description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=" +
|
||||
queryString +
|
||||
" and pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=" +
|
||||
" pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=" +
|
||||
orderby +
|
||||
" " +
|
||||
fieldSort +
|
||||
|
||||
Reference in New Issue
Block a user