reps defect 19
This commit is contained in:
@@ -449,6 +449,22 @@ const SearchResults = (props) => {
|
||||
)}
|
||||
:
|
||||
</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, [
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
|
||||
])
|
||||
|
||||
@@ -407,9 +407,13 @@ const SearchResults = (props) => {
|
||||
)}
|
||||
:
|
||||
</span>
|
||||
{_.has(detailsObj, [
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
|
||||
])
|
||||
{item.pinswg_appellantagent == 846040001
|
||||
? item.pinswg_appellantfirstname +
|
||||
" " +
|
||||
item.pinswg_appellantlastname
|
||||
: _.has(detailsObj, [
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
|
||||
])
|
||||
? detailsObj[
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
|
||||
@@ -82,7 +82,7 @@ export default async function ApiProxy(req, res) {
|
||||
//console.log(queryString);
|
||||
|
||||
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 +
|
||||
" 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 =
|
||||
"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 +
|
||||
" pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=" +
|
||||
orderby +
|
||||
|
||||
@@ -45,7 +45,7 @@ export default async function ApiProxy(req, res) {
|
||||
searchString = searchString.replace(/\'/g, "''");
|
||||
|
||||
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 +
|
||||
"') or contains(ticketnumber, '" +
|
||||
searchString +
|
||||
|
||||
@@ -474,7 +474,7 @@ export default async function ApiProxy(req, res) {
|
||||
const getIncidentResultsObj = await Promise.all(
|
||||
searchResultsObj.map(async (key) => {
|
||||
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 +
|
||||
" and pinswg_appealcasetype ne null &$orderby=createdon desc&$count=true";
|
||||
|
||||
|
||||
@@ -229,16 +229,16 @@ export default async function ApiProxy(req, res) {
|
||||
// "appealTypeID": "846040023",
|
||||
// "NavigationProperty": "pinswg_LDPIds",
|
||||
// },
|
||||
{
|
||||
"LogicalCollectionName":
|
||||
"pinswg_enforcementlistedbuildingconservationaps",
|
||||
"LogicalName": "pinswg_enforcementlistedbuildingandconservationap",
|
||||
"PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconseid",
|
||||
"UrlName": "enforcementlistedbuildingconservationap",
|
||||
"MetadataId": "c697be96-9481-eb11-aac0-00224800be9c",
|
||||
"appealTypeID": "846040006",
|
||||
"NavigationProperty": "pinswg_EnforcementListedBuildingConseIds",
|
||||
},
|
||||
// {
|
||||
// "LogicalCollectionName":
|
||||
// "pinswg_enforcementlistedbuildingconservationaps",
|
||||
// "LogicalName": "pinswg_enforcementlistedbuildingandconservationap",
|
||||
// "PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconseid",
|
||||
// "UrlName": "enforcementlistedbuildingconservationap",
|
||||
// "MetadataId": "c697be96-9481-eb11-aac0-00224800be9c",
|
||||
// "appealTypeID": "846040006",
|
||||
// "NavigationProperty": "pinswg_EnforcementListedBuildingConseIds",
|
||||
// },
|
||||
{
|
||||
"LogicalCollectionName": "pinswg_maintenanceoflands217s",
|
||||
"LogicalName": "pinswg_maintenanceoflands217",
|
||||
@@ -489,7 +489,39 @@ export default async function ApiProxy(req, res) {
|
||||
: "pinswg_dateeventrequested,") +
|
||||
"statuscode,_" +
|
||||
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(
|
||||
"\n==========================================\n",
|
||||
@@ -536,7 +568,7 @@ export default async function ApiProxy(req, res) {
|
||||
const getIncidentResultsObj = await Promise.all(
|
||||
searchResultsObj.map(async (key) => {
|
||||
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 +
|
||||
" 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, "''");
|
||||
|
||||
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 +
|
||||
"') or contains(ticketnumber, '" +
|
||||
searchString +
|
||||
|
||||
@@ -45,7 +45,7 @@ export default async function ApiProxy(req, res) {
|
||||
searchString = searchString.replace(/\'/g, "''");
|
||||
|
||||
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 +
|
||||
" 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, "''");
|
||||
|
||||
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 +
|
||||
"') or contains(ticketnumber, '" +
|
||||
searchString +
|
||||
|
||||
Reference in New Issue
Block a user