Merged PR 1191: using id not relying on title variations
using id not relying on title variations Related work items: #8436
This commit is contained in:
@@ -50,6 +50,10 @@ export const getSelectQuery = (appealTypeName) => {
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_sitepostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_starttimeofevent,pinswg_typeofevent";
|
||||
break;
|
||||
case "pinswg_planningappeals78s":
|
||||
//console.log(
|
||||
// "///////////////\n path:",
|
||||
// process.env.RELAYPATH == "test-pedw-hc"
|
||||
// );
|
||||
return process.env.RELAYPATH == "dev-pedw-hc"
|
||||
? "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_localplanningauthority_value,pinswg_casedecisiondate,pinswg_dicision,pinswg_dateeventrequested,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdatetimeiftheevent,pinswg_representation_period_end_date,pinswg_extend_representation_date,pinswg_typeofevent"
|
||||
: "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_localplanningauthority_value,pinswg_casedecisiondate,pinswg_dicision,pinswg_dateeventrequested,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdatetimeiftheevent,pinswg_typeofevent";
|
||||
@@ -63,6 +67,12 @@ export const getSelectQuery = (appealTypeName) => {
|
||||
case "pinswg_rows":
|
||||
return "&$select=pinswg_specialistcaseprocess,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_statementduedate,pinswg_specialistcaseprocess";
|
||||
break;
|
||||
case "pinswg_ldps":
|
||||
return "&$select=modifiedon,pinswg_name";
|
||||
break;
|
||||
case "pinswg_nonvalidations":
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,statuscode";
|
||||
break;
|
||||
default:
|
||||
return "";
|
||||
break;
|
||||
|
||||
@@ -186,12 +186,14 @@ const CaseSummary = (props) => {
|
||||
'$..[?(@.pinswg_name=="' + caseReference + '")]',
|
||||
searchDetailsObj
|
||||
))
|
||||
: currentType == "directResultsObj"
|
||||
? (detailsObj = setCaseDetailsObj[0].value[0])
|
||||
: (detailsObj = jsonpath(
|
||||
'$..[?(@.pinswg_name=="' + caseReference + '")]',
|
||||
setCaseDetailsObj
|
||||
));
|
||||
|
||||
detailsObj = detailsObj[0];
|
||||
detailsObj = typeof detailsObj == "object" ? detailsObj : detailsObj[0];
|
||||
|
||||
let showDetails = typeof detailsObj != "undefined" ? true : false;
|
||||
|
||||
|
||||
@@ -64,7 +64,12 @@ export default async function ApiProxy(req, res) {
|
||||
"&$count=true";
|
||||
//" and statuscode eq 1&$count=true";
|
||||
|
||||
queryUrl = queryUrl + getSelectQuery(appealTypeName);
|
||||
queryUrl =
|
||||
queryUrl +
|
||||
getSelectQuery(appealTypeName) +
|
||||
",_" +
|
||||
primaryIdAttribute +
|
||||
"s_value";
|
||||
|
||||
console.log(
|
||||
"\n==========================================\n",
|
||||
|
||||
Reference in New Issue
Block a user