pagination for documents seo head meta refactor
This commit is contained in:
+102
-12
@@ -137,9 +137,11 @@ export const getBasicSearch = (token, searchString) => {
|
||||
return axios
|
||||
.get(
|
||||
WEBAPI_URL +
|
||||
"incidents?$select=numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=contains(title, '" +
|
||||
"incidents?$select=numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
|
||||
searchString +
|
||||
"') and pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true",
|
||||
"') or contains(ticketnumber, '" +
|
||||
searchString +
|
||||
"')) and pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true",
|
||||
azureHeadersPaged(token)
|
||||
)
|
||||
.then((res) => {
|
||||
@@ -163,9 +165,11 @@ export const getBasicSearchPaged = (searchString, pageNumber) => {
|
||||
console.log(typeof pageNumber != "undefined");
|
||||
return axios
|
||||
.get(
|
||||
"/api/proxy/incidents?$select=numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=contains(title, '" +
|
||||
"/api/proxy/incidents?$select=numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
|
||||
searchString +
|
||||
"') and pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true" +
|
||||
"') or contains(ticketnumber, '" +
|
||||
searchString +
|
||||
"')) and pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true" +
|
||||
(typeof pageNumber != "undefined"
|
||||
? "&$skiptoken=" +
|
||||
encodeURI('<cookie pagenumber="' + pageNumber + '" />')
|
||||
@@ -218,13 +222,17 @@ export const getBasicDNSSearchPaged = (pageNumber) => {
|
||||
};
|
||||
|
||||
export const getAdvancedSearch = (token, searchString) => {
|
||||
//console.log(searchString.caseReference);
|
||||
console.log(searchString.caseReference);
|
||||
|
||||
var queryString = "";
|
||||
|
||||
queryString +=
|
||||
searchString.q != null
|
||||
? "contains(title, '" + searchString.q + "') "
|
||||
? "(contains(title, '" +
|
||||
searchString.q +
|
||||
"') or contains(ticketnumber,'" +
|
||||
searchString.q +
|
||||
"'))"
|
||||
: "";
|
||||
|
||||
queryString +=
|
||||
@@ -248,7 +256,7 @@ export const getAdvancedSearch = (token, searchString) => {
|
||||
WEBAPI_URL +
|
||||
"incidents?$select=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&$top=201",
|
||||
" and pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true",
|
||||
|
||||
azureHeadersPaged(token)
|
||||
)
|
||||
@@ -265,14 +273,18 @@ export const getAdvancedSearch = (token, searchString) => {
|
||||
};
|
||||
|
||||
export const getAdvancedSearchPaged = (searchString, pageNumber) => {
|
||||
console.log(searchString);
|
||||
//console.log(searchString);
|
||||
var token = getSASToken();
|
||||
|
||||
var queryString = "";
|
||||
|
||||
queryString +=
|
||||
searchString.q != null
|
||||
? "contains(title, '" + searchString.q + "') "
|
||||
? "(contains(title, '" +
|
||||
searchString.q +
|
||||
"') or contains(ticketnumber,'" +
|
||||
searchString.q +
|
||||
"'))"
|
||||
: "";
|
||||
|
||||
queryString +=
|
||||
@@ -373,7 +385,7 @@ export const getSearchDocumentDetails = (token, incidentID) => {
|
||||
"pinswg_documents?$count=true&$filter=_pinswg_documentids_value eq " +
|
||||
incidentID +
|
||||
" and pinswg_publishtoweb eq true&$select=pinswg_isharedocumentlocations,_pinswg_documentids_value,pinswg_isharelabelcasetype,pinswg_isharelabellpaname,pinswg_publishtoweb,pinswg_uploadstatus,pinswg_isharedocumentclassification,pinswg_isharedocumentreference",
|
||||
azureHeaders(token)
|
||||
azureHeadersPaged(token)
|
||||
)
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
@@ -387,7 +399,47 @@ export const getSearchDocumentHistory = (token, documentID) => {
|
||||
WEBAPI_URL +
|
||||
"pinswg_documenthistories?$count=true&$select=_pinswg_documentid_value,pinswg_createddate,pinswg_state,pinswg_fileexists,statecode,pinswg_publisheddate&$filter=_pinswg_documentid_value eq " +
|
||||
documentID,
|
||||
azureHeaders(token)
|
||||
azureHeadersPaged(token)
|
||||
)
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
console.log("thiserror", error);
|
||||
});
|
||||
};
|
||||
|
||||
export const getSearchDocumentDetailsPaged = (incidentID, pageNumber) => {
|
||||
console.log(incidentID);
|
||||
var token = getSASToken();
|
||||
|
||||
return axios
|
||||
.get(
|
||||
"/api/proxy/pinswg_documents?$count=true&$filter=_pinswg_documentids_value eq " +
|
||||
incidentID +
|
||||
" and pinswg_publishtoweb eq true&$select=pinswg_isharedocumentlocations,_pinswg_documentids_value,pinswg_isharelabelcasetype,pinswg_isharelabellpaname,pinswg_publishtoweb,pinswg_uploadstatus,pinswg_isharedocumentclassification,pinswg_isharedocumentreference" +
|
||||
(typeof pageNumber != "undefined"
|
||||
? "&$skiptoken=" +
|
||||
encodeURI('<cookie pagenumber="' + pageNumber + '" />')
|
||||
: ""),
|
||||
azureHeadersPaged(token)
|
||||
)
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
console.log("thiserror", error);
|
||||
});
|
||||
};
|
||||
|
||||
export const getSearchDocumentHistoryPaged = (documentID, pageNumber) => {
|
||||
var token = getSASToken();
|
||||
|
||||
return axios
|
||||
.get(
|
||||
"/api/proxy/pinswg_documenthistories?$count=true&$select=_pinswg_documentid_value,pinswg_createddate,pinswg_state,pinswg_fileexists,statecode,pinswg_publisheddate&$filter=_pinswg_documentid_value eq " +
|
||||
documentID +
|
||||
(typeof pageNumber != "undefined"
|
||||
? "&$skiptoken=" +
|
||||
encodeURI('<cookie pagenumber="' + pageNumber + '" />')
|
||||
: ""),
|
||||
azureHeadersPaged(token)
|
||||
)
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
@@ -409,9 +461,27 @@ export const getSearchDocumentDetails1 = (incidentID) => {
|
||||
console.log("thiserror", error);
|
||||
});
|
||||
};
|
||||
export const getSearchDocumentDetails1Paged = (incidentID, pageNumber) => {
|
||||
//console.log(incidentID);
|
||||
var token = getSASToken();
|
||||
return axios
|
||||
.get(
|
||||
"/api/proxy/pinswg_documents?$count=true&$filter=pinswg_publishtoweb eq true and _pinswg_documentids_value eq " +
|
||||
incidentID +
|
||||
"&$select=pinswg_isharedocumentlocations,_pinswg_documentids_value,pinswg_isharelabelcasetype,pinswg_isharelabellpaname,pinswg_publishtoweb,pinswg_uploadstatus,pinswg_isharedocumentclassification,pinswg_isharedocumentreference" +
|
||||
(typeof pageNumber != "undefined"
|
||||
? "&$skiptoken=" +
|
||||
encodeURI('<cookie pagenumber="' + pageNumber + '" />')
|
||||
: "")
|
||||
)
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
console.log("thiserror", error);
|
||||
});
|
||||
};
|
||||
|
||||
export const getSearchDocumentHistory1 = (documentID) => {
|
||||
// console.log(documentID);
|
||||
//console.log(documentID);
|
||||
var token = getSASToken();
|
||||
return axios
|
||||
.get(
|
||||
@@ -426,6 +496,26 @@ export const getSearchDocumentHistory1 = (documentID) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const getSearchDocumentHistory1Paged = (documentID, pageNumber) => {
|
||||
//console.log(documentID);
|
||||
var token = getSASToken();
|
||||
return axios
|
||||
.get(
|
||||
"/api/proxy/pinswg_documenthistories?$count=true&$select=_pinswg_documentid_value,pinswg_createddate,pinswg_state,pinswg_fileexists,statecode,pinswg_publisheddate&$filter=_pinswg_documentid_value eq " +
|
||||
documentID +
|
||||
(typeof pageNumber != "undefined"
|
||||
? "&$skiptoken=" +
|
||||
encodeURI('<cookie pagenumber="' + pageNumber + '" />')
|
||||
: "")
|
||||
)
|
||||
.then((res) => {
|
||||
return res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("thiserror", error);
|
||||
});
|
||||
};
|
||||
|
||||
export const getBasicDNSSearchDetails = (token, appealType, caseReference) => {
|
||||
return axios
|
||||
.get(
|
||||
|
||||
Reference in New Issue
Block a user