reps defect 19
This commit is contained in:
@@ -449,6 +449,22 @@ const SearchResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
|
{_.has(item, [
|
||||||
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue",
|
||||||
|
])
|
||||||
|
? router.locale == "cy"
|
||||||
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
item[
|
||||||
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] +
|
||||||
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
|
)
|
||||||
|
: item[
|
||||||
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || "N/A"
|
||||||
|
: ""}
|
||||||
{_.has(item, [
|
{_.has(item, [
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -407,9 +407,13 @@ const SearchResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{_.has(detailsObj, [
|
{item.pinswg_appellantagent == 846040001
|
||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
|
? item.pinswg_appellantfirstname +
|
||||||
])
|
" " +
|
||||||
|
item.pinswg_appellantlastname
|
||||||
|
: _.has(detailsObj, [
|
||||||
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
|
||||||
|
])
|
||||||
? detailsObj[
|
? detailsObj[
|
||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
//console.log(queryString);
|
//console.log(queryString);
|
||||||
|
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title,_primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=" +
|
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title,_primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=" +
|
||||||
queryString +
|
queryString +
|
||||||
" 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";
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
: "";
|
: "";
|
||||||
|
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title,_primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=" +
|
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title,_primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=" +
|
||||||
queryString +
|
queryString +
|
||||||
" pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=" +
|
" pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=" +
|
||||||
orderby +
|
orderby +
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
searchString = searchString.replace(/\'/g, "''");
|
searchString = searchString.replace(/\'/g, "''");
|
||||||
|
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
|
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
|
||||||
searchString +
|
searchString +
|
||||||
"') or contains(ticketnumber, '" +
|
"') or contains(ticketnumber, '" +
|
||||||
searchString +
|
searchString +
|
||||||
|
|||||||
@@ -474,7 +474,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
const getIncidentResultsObj = await Promise.all(
|
const getIncidentResultsObj = await Promise.all(
|
||||||
searchResultsObj.map(async (key) => {
|
searchResultsObj.map(async (key) => {
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"incidents?$select=pinswg_publishtoweb,modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=incidentid eq " +
|
"incidents?$select=pinswg_publishtoweb,modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=incidentid eq " +
|
||||||
key.incidentid +
|
key.incidentid +
|
||||||
" and pinswg_appealcasetype ne null &$orderby=createdon desc&$count=true";
|
" and pinswg_appealcasetype ne null &$orderby=createdon desc&$count=true";
|
||||||
|
|
||||||
|
|||||||
@@ -229,16 +229,16 @@ export default async function ApiProxy(req, res) {
|
|||||||
// "appealTypeID": "846040023",
|
// "appealTypeID": "846040023",
|
||||||
// "NavigationProperty": "pinswg_LDPIds",
|
// "NavigationProperty": "pinswg_LDPIds",
|
||||||
// },
|
// },
|
||||||
{
|
// {
|
||||||
"LogicalCollectionName":
|
// "LogicalCollectionName":
|
||||||
"pinswg_enforcementlistedbuildingconservationaps",
|
// "pinswg_enforcementlistedbuildingconservationaps",
|
||||||
"LogicalName": "pinswg_enforcementlistedbuildingandconservationap",
|
// "LogicalName": "pinswg_enforcementlistedbuildingandconservationap",
|
||||||
"PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconseid",
|
// "PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconseid",
|
||||||
"UrlName": "enforcementlistedbuildingconservationap",
|
// "UrlName": "enforcementlistedbuildingconservationap",
|
||||||
"MetadataId": "c697be96-9481-eb11-aac0-00224800be9c",
|
// "MetadataId": "c697be96-9481-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040006",
|
// "appealTypeID": "846040006",
|
||||||
"NavigationProperty": "pinswg_EnforcementListedBuildingConseIds",
|
// "NavigationProperty": "pinswg_EnforcementListedBuildingConseIds",
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_maintenanceoflands217s",
|
"LogicalCollectionName": "pinswg_maintenanceoflands217s",
|
||||||
"LogicalName": "pinswg_maintenanceoflands217",
|
"LogicalName": "pinswg_maintenanceoflands217",
|
||||||
@@ -489,7 +489,39 @@ export default async function ApiProxy(req, res) {
|
|||||||
: "pinswg_dateeventrequested,") +
|
: "pinswg_dateeventrequested,") +
|
||||||
"statuscode,_" +
|
"statuscode,_" +
|
||||||
item.NavigationProperty.toLowerCase() +
|
item.NavigationProperty.toLowerCase() +
|
||||||
"_value";
|
"_value" +
|
||||||
|
(item.LogicalCollectionName == "pinswg_planningappeals78s"
|
||||||
|
? ",_pinswg_localplanningauthority_value"
|
||||||
|
: "") +
|
||||||
|
(item.LogicalCollectionName ==
|
||||||
|
"pinswg_compulsorypurchaseorderses" ||
|
||||||
|
item.LogicalCollectionName ==
|
||||||
|
"pinswg_enforcementnoticeappeals174s" ||
|
||||||
|
item.LogicalCollectionName ==
|
||||||
|
"pinswg_planningconditionss73s79s" ||
|
||||||
|
item.LogicalCollectionName ==
|
||||||
|
"pinswg_planningobligationappeals106s" ||
|
||||||
|
item.LogicalCollectionName ==
|
||||||
|
"pinswg_hedgeshedgerowstreepreservationreplacems" ||
|
||||||
|
item.LogicalCollectionName == "pinswg_householderappealhases" ||
|
||||||
|
item.LogicalCollectionName ==
|
||||||
|
"pinswg_lawfuldevelopmentcertificates" ||
|
||||||
|
item.LogicalCollectionName == "pinswg_adverts" ||
|
||||||
|
item.LogicalCollectionName ==
|
||||||
|
"pinswg_communityinfrastructurelevys117118119s" ||
|
||||||
|
item.LogicalCollectionName == "pinswg_callinss77s" ||
|
||||||
|
item.LogicalCollectionName == "pinswg_wayleaves" ||
|
||||||
|
item.LogicalCollectionName ==
|
||||||
|
"pinswg_environmentalpermittings" ||
|
||||||
|
item.LogicalCollectionName == "pinswg_miscellaneouscaseworks" ||
|
||||||
|
item.LogicalCollectionName == "pinswg_commonlands" ||
|
||||||
|
item.LogicalCollectionName == "pinswg_rows" ||
|
||||||
|
item.LogicalCollectionName == "pinswg_maintenanceoflands217s" ||
|
||||||
|
item.LogicalCollectionName ==
|
||||||
|
"pinswg_enforcementlistedbuildingconservationaps" ||
|
||||||
|
item.LogicalCollectionName == "pinswg_dnses"
|
||||||
|
? ",_pinswg_associatedlpa_value"
|
||||||
|
: "");
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
"\n==========================================\n",
|
"\n==========================================\n",
|
||||||
@@ -536,7 +568,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
const getIncidentResultsObj = await Promise.all(
|
const getIncidentResultsObj = await Promise.all(
|
||||||
searchResultsObj.map(async (key) => {
|
searchResultsObj.map(async (key) => {
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"incidents?$select=ticketnumber,pinswg_publishtoweb,modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=incidentid eq " +
|
"incidents?$select=ticketnumber,pinswg_publishtoweb,modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=incidentid eq " +
|
||||||
key.incidentid +
|
key.incidentid +
|
||||||
" and pinswg_appealcasetype ne null &$orderby=createdon desc&$count=true";
|
" and pinswg_appealcasetype ne null &$orderby=createdon desc&$count=true";
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
searchString = searchString.replace(/\'/g, "''");
|
searchString = searchString.replace(/\'/g, "''");
|
||||||
|
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
|
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
|
||||||
searchString +
|
searchString +
|
||||||
"') or contains(ticketnumber, '" +
|
"') or contains(ticketnumber, '" +
|
||||||
searchString +
|
searchString +
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
searchString = searchString.replace(/\'/g, "''");
|
searchString = searchString.replace(/\'/g, "''");
|
||||||
|
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"incidents?$select=pinswg_publishtoweb,modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=incidentid eq " +
|
"incidents?$select=pinswg_publishtoweb,modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=incidentid eq " +
|
||||||
searchString +
|
searchString +
|
||||||
" and pinswg_appealcasetype ne null &$orderby=createdon desc&$count=true";
|
" and pinswg_appealcasetype ne null &$orderby=createdon desc&$count=true";
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
searchString = searchString.replace(/\'/g, "''");
|
searchString = searchString.replace(/\'/g, "''");
|
||||||
|
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
|
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
|
||||||
searchString +
|
searchString +
|
||||||
"') or contains(ticketnumber, '" +
|
"') or contains(ticketnumber, '" +
|
||||||
searchString +
|
searchString +
|
||||||
|
|||||||
Reference in New Issue
Block a user