From 53515afc49e572d96bcf68c34d1bbcef1f04cd39 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Tue, 18 Feb 2025 13:23:11 +0000 Subject: [PATCH 1/8] 13928 update select query --- actions/selectQueryTypes.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/actions/selectQueryTypes.js b/actions/selectQueryTypes.js index 936ad6a8..34009b41 100644 --- a/actions/selectQueryTypes.js +++ b/actions/selectQueryTypes.js @@ -73,6 +73,10 @@ export const getSelectQuery = (appealTypeName) => { case "pinswg_nonvalidations": return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,statuscode"; break; + case "pinswg_sipses": + // return "&$select=pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,_pinswg_dnsids_value,pinswg_startdateofevent,pinswg_typeofevent"; + return "&$select=pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_choiceofprocedure,pinswg_decision,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_webaddress,statuscode,pinswg_casestage,_pinswg_sipscase_value"; + break; default: return ""; break; From f9df42f36177405778f89493b7c4f3065a77fdba Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Tue, 18 Feb 2025 14:16:09 +0000 Subject: [PATCH 2/8] 13931 upodate DNS list inc sips --- components/search/dnssearchresults.js | 36 +++++++++++++++++-- pages/api/endpoint/getbasicdnssearch_api.js | 2 +- .../endpoint/getbasicdnssearchpaged_api.js | 2 +- .../api/endpoint/getbasicdnsurlsearch_api.js | 4 +-- pages/api/endpoint/getdnslist_api.js | 2 +- 5 files changed, 39 insertions(+), 7 deletions(-) diff --git a/components/search/dnssearchresults.js b/components/search/dnssearchresults.js index ed4cb11a..c0c03d2e 100644 --- a/components/search/dnssearchresults.js +++ b/components/search/dnssearchresults.js @@ -273,7 +273,9 @@ const DNSSearchResults = (props) => { -
+
+ Type +
{showSpinnerState == true ? ( @@ -301,6 +303,28 @@ const DNSSearchResults = (props) => { ); detailsObj = detailsObj[0]; + var appType = + router.locale == "cy" + ? jsonpath( + '$..[?(@.value=="' + + item[ + "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" + ] + + '")].value_cy', + transLookup + ) + : item[ + "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" + ] || "N/A"; + + appType = + appType == + "Datblygiadau o Arwyddocâd Cenedlaethol" || + appType == + "Developments of National Significance" + ? "DNS" + : "SIPs"; + return (
{ )} : - {router.locale == "cy" ? jsonpath( '$..[?(@.value=="' + @@ -486,6 +509,15 @@ const DNSSearchResults = (props) => { "statuscode@OData.Community.Display.V1.FormattedValue" ] || "N/A"} +
+ + {t( + "search:searchresults-status-label" + )} + : + + {appType} +
{myportal == true && (
{isWatchedCase(item.incidentid) diff --git a/pages/api/endpoint/getbasicdnssearch_api.js b/pages/api/endpoint/getbasicdnssearch_api.js index 10daaed3..cae27932 100644 --- a/pages/api/endpoint/getbasicdnssearch_api.js +++ b/pages/api/endpoint/getbasicdnssearch_api.js @@ -43,7 +43,7 @@ export default async function ApiProxy(req, res) { var token = await getToken(); 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=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true"; + "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=(pinswg_appealcasetype eq 846040011 or pinswg_appealcasetype eq 846040002)and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true"; //console.log(queryUrl); diff --git a/pages/api/endpoint/getbasicdnssearchpaged_api.js b/pages/api/endpoint/getbasicdnssearchpaged_api.js index 60c321b4..8359b65a 100644 --- a/pages/api/endpoint/getbasicdnssearchpaged_api.js +++ b/pages/api/endpoint/getbasicdnssearchpaged_api.js @@ -78,7 +78,7 @@ export default async function ApiProxy(req, res) { var showNumberOfRecords = req.query.showNumberOfRecords; 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=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=" + + "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=(pinswg_appealcasetype eq 846040011 or pinswg_appealcasetype eq 846040002) and pinswg_publishtoweb eq true&$orderby=" + orderby + " " + fieldSort + diff --git a/pages/api/endpoint/getbasicdnsurlsearch_api.js b/pages/api/endpoint/getbasicdnsurlsearch_api.js index e7c6996e..083a97ce 100644 --- a/pages/api/endpoint/getbasicdnsurlsearch_api.js +++ b/pages/api/endpoint/getbasicdnsurlsearch_api.js @@ -50,9 +50,9 @@ export default async function ApiProxy(req, res) { searchString + "') or contains(ticketnumber, '" + searchString + - "')) and pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true"; + "')) and (pinswg_appealcasetype eq 846040011 or pinswg_appealcasetype eq 846040002 ) and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true"; - //console.log("basic search ", queryUrl); + console.log("basic search ", queryUrl); var apiResponse = _.isEmpty(req.query) ? res.status(400).json() diff --git a/pages/api/endpoint/getdnslist_api.js b/pages/api/endpoint/getdnslist_api.js index fa598c6f..66872103 100644 --- a/pages/api/endpoint/getdnslist_api.js +++ b/pages/api/endpoint/getdnslist_api.js @@ -25,7 +25,7 @@ export default async function ApiProxy(req, res) { var token = await getToken(); var queryUrl = - "incidents?$select=pinswg_appealcasetype,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,statuscode,ticketnumber,title &$filter=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true"; + "incidents?$select=pinswg_appealcasetype,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,statuscode,ticketnumber,title &$filter=(pinswg_appealcasetype eq 846040011 or pinswg_appealcasetype eq 846040002) and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true"; console.log(queryUrl); From 4d6ed2d38db23f5b0c46c03d2cfd4842f4b6e1fa Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Tue, 18 Feb 2025 14:17:26 +0000 Subject: [PATCH 3/8] 13930 Update address search for SIPS --- .../endpoint/getbasicsearch_by_address_api.js | 83 +++++++++++++------ 1 file changed, 57 insertions(+), 26 deletions(-) diff --git a/pages/api/endpoint/getbasicsearch_by_address_api.js b/pages/api/endpoint/getbasicsearch_by_address_api.js index e2536d88..3de4d83d 100644 --- a/pages/api/endpoint/getbasicsearch_by_address_api.js +++ b/pages/api/endpoint/getbasicsearch_by_address_api.js @@ -298,6 +298,18 @@ export default async function ApiProxy(req, res) { "NavigationProperty": "pinswg_PlanningObligationAppealS106Ids", "value": "Planning Obligation Appeal - S106", }, + { + "LogicalCollectionName": "pinswg_sipses", + "LogicalName": "pinswg_sips", + "PrimaryIdAttribute": "pinswg_sipscase", + "UrlName": "sips", + "MetadataId": "8d31911b-b8ea-ef11-ab08-00224800be9c", + "appealTypeID": "846040002", + "tmpNav": "pinswg_sipsid", + "NavigationProperty": "pinswg_SIPSids", + "value": "SIPs", + }, + { "LogicalCollectionName": "pinswg_rows", "LogicalName": "pinswg_row", @@ -345,7 +357,8 @@ export default async function ApiProxy(req, res) { item.LogicalCollectionName == "pinswg_electricityacts" || item.LogicalCollectionName == "pinswg_transportandworkacts" || - item.LogicalCollectionName == "pinswg_dnses" + item.LogicalCollectionName == "pinswg_dnses" || + item.LogicalCollectionName == "pinswg_sipses" ? "pinswg_addressline1" : "pinswg_siteaddressline1") + ", '" + @@ -363,7 +376,8 @@ export default async function ApiProxy(req, res) { "pinswg_transportandworkacts" || item.LogicalCollectionName == "pinswg_electricityacts" || - item.LogicalCollectionName == "pinswg_dnses" + item.LogicalCollectionName == "pinswg_dnses" || + item.LogicalCollectionName == "pinswg_sipses" ? "pinswg_addresstown" : "pinswg_siteaddresstown") + ", '" + @@ -383,7 +397,8 @@ export default async function ApiProxy(req, res) { "pinswg_transportandworkacts" || item.LogicalCollectionName == "pinswg_electricityacts" || - item.LogicalCollectionName == "pinswg_dnses" + item.LogicalCollectionName == "pinswg_dnses" || + item.LogicalCollectionName == "pinswg_sipses" ? "pinswg_addresscounty" : item.LogicalCollectionName == "pinswg_rows" ? "pinswg_sitecounty" @@ -459,6 +474,7 @@ export default async function ApiProxy(req, res) { ? "pinswg_addresstown,pinswg_addressline1,pinswg_addresscounty,pinswg_addressline2,pinswg_addresspostcode" : item.LogicalCollectionName == "pinswg_electricityacts" || item.LogicalCollectionName == "pinswg_dnses" || + item.LogicalCollectionName == "pinswg_sipses" || item.LogicalCollectionName == "pinswg_transportandworkacts" ? "pinswg_addresstown,pinswg_addressline1,pinswg_addresscounty,pinswg_addressline2,pinswg_postcode" @@ -468,13 +484,14 @@ export default async function ApiProxy(req, res) { "," + (item.LogicalCollectionName == "pinswg_dnses" || item.LogicalCollectionName == "pinswg_transportandworkacts" - ? "pinswg_dateofdecision" + ? "pinswg_dateofdecision," : item.LogicalCollectionName == "pinswg_nonvalidations" - ? "pinswg_decisionissueddate" + ? "pinswg_decisionissueddate," : item.LogicalCollectionName == "pinswg_electricityacts" - ? "pinswg_datedecision" - : "pinswg_casedecisiondate") + - "," + + ? "pinswg_datedecision," + : item.LogicalCollectionName == "pinswg_sipses" + ? "" + : "pinswg_casedecisiondate,") + (item.LogicalCollectionName == "pinswg_planningappeals78s" ? "pinswg_dicision" : item.LogicalCollectionName == @@ -484,12 +501,14 @@ export default async function ApiProxy(req, res) { ? "pinswg_decisionissued" : "pinswg_decision") + "," + - (item.LogicalCollectionName == "pinswg_nonvalidations" + (item.LogicalCollectionName == "pinswg_nonvalidations" || + item.LogicalCollectionName == "pinswg_sipses" ? "" : "pinswg_dateeventrequested,") + - "statuscode,_" + - item.NavigationProperty.toLowerCase() + - "_value" + + "statuscode" + + (item.LogicalCollectionName == "pinswg_sipses" + ? "" + : ",_" + item.NavigationProperty.toLowerCase() + "_value") + (item.LogicalCollectionName == "pinswg_planningappeals78s" ? ",_pinswg_localplanningauthority_value" : "") + @@ -519,19 +538,23 @@ export default async function ApiProxy(req, res) { item.LogicalCollectionName == "pinswg_maintenanceoflands217s" || item.LogicalCollectionName == "pinswg_enforcementlistedbuildingconservationaps" || - item.LogicalCollectionName == "pinswg_dnses" + item.LogicalCollectionName == "pinswg_dnses" || + item.LogicalCollectionName == "pinswg_sipses" ? ",_pinswg_associatedlpa_value" - : ""); + : "") + + (item.LogicalCollectionName == "pinswg_sipses" + ? ",_pinswg_sipscase_value" + : ",_" + item.PrimaryIdAttribute + "s_value"); - console.log( - "\n==========================================\n", - "basic search: " + queryUrl, - "\n\n", - item.LogicalCollectionName, - "\n\n", - WEBAPI_URL + queryUrl + hashAPIPath(queryUrl), - "\n==========================================\n" - ); + // console.log( + // "\n==========================================\n", + // "basic search: " + queryUrl, + // "\n\n", + // item.LogicalCollectionName, + // "\n\n", + // WEBAPI_URL + queryUrl + hashAPIPath(queryUrl), + // "\n==========================================\n" + // ); const resultObj = axios .get( @@ -544,9 +567,11 @@ export default async function ApiProxy(req, res) { "pinswg_appealType": item.value, "incidentid": key[ - "_" + - item.NavigationProperty.toLowerCase() + - "_value" + item.value == "SIPs" + ? "_pinswg_sipscase_value" + : "_" + + item.NavigationProperty.toLowerCase() + + "_value" ], }); }); @@ -567,6 +592,7 @@ export default async function ApiProxy(req, res) { const getIncidentResultsObj = await Promise.all( searchResultsObj.map(async (key) => { + console.log(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,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=incidentid eq " + key.incidentid + @@ -582,6 +608,11 @@ export default async function ApiProxy(req, res) { .then(({ data }) => { return data.value[0]; }); + + console.log( + "pinswg_publishtoweb: " + incidentObj.pinswg_publishtoweb, + "ticketnumber: " + incidentObj.ticketnumber + ); Object.assign(key, { "pinswg_publishtoweb": incidentObj.pinswg_publishtoweb, "ticketnumber": incidentObj.ticketnumber, From 202e1efd51833f2a1660c288ab464f975daf0f39 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Tue, 18 Feb 2025 14:18:40 +0000 Subject: [PATCH 4/8] 13929 Update advanced search --- .../api/endpoint/getbasicsearchdetails_api.js | 27 ++++++++++--------- .../getbasicsearchdetailspaged_api.js | 14 +++++++--- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/pages/api/endpoint/getbasicsearchdetails_api.js b/pages/api/endpoint/getbasicsearchdetails_api.js index 2a7c524f..fac42e63 100644 --- a/pages/api/endpoint/getbasicsearchdetails_api.js +++ b/pages/api/endpoint/getbasicsearchdetails_api.js @@ -58,8 +58,10 @@ export default async function ApiProxy(req, res) { var queryUrl = appealTypeName + "?$filter=_" + - primaryIdAttribute + - "s_value eq " + + (primaryIdAttribute == "pinswg_sipscase" + ? "pinswg_sipscase_value" + : primaryIdAttribute + "s_value ") + + " eq " + incidentID + "&$count=true"; //" and statuscode eq 1&$count=true"; @@ -68,17 +70,18 @@ export default async function ApiProxy(req, res) { queryUrl + getSelectQuery(appealTypeName) + ",_" + - primaryIdAttribute + - "s_value"; + (primaryIdAttribute == "pinswg_sipscase" + ? "pinswg_sipscase_value" + : primaryIdAttribute + "s_value"); - console.log( - "\n==========================================\n", - "\nSearch Details query ", - "\nAppealType: " + appealTypeName, - "\nIncident ID: " + incidentID, - "\n\nQuery url: " + queryUrl, - "\n==========================================\n" - ); + // console.log( + // "\n==========================================\n", + // "\nSearch Details query ", + // "\nAppealType: " + appealTypeName, + // "\nIncident ID: " + incidentID, + // "\n\nQuery url: " + queryUrl, + // "\n==========================================\n" + // ); return axios .get( diff --git a/pages/api/endpoint/getbasicsearchdetailspaged_api.js b/pages/api/endpoint/getbasicsearchdetailspaged_api.js index 544d42fb..2929a751 100644 --- a/pages/api/endpoint/getbasicsearchdetailspaged_api.js +++ b/pages/api/endpoint/getbasicsearchdetailspaged_api.js @@ -62,13 +62,21 @@ export default async function ApiProxy(req, res) { var queryUrl = appealTypeName + "?$filter=_" + - primaryIdAttribute + - "s_value eq " + + (primaryIdAttribute == "pinswg_sipscase" + ? "pinswg_sipscase_value" + : primaryIdAttribute + "s_value ") + + " eq " + incidentID + "&$count=true"; //" and statuscode eq 1&$count=true"; - queryUrl = queryUrl + getSelectQuery(appealTypeName); + queryUrl = + queryUrl + + getSelectQuery(appealTypeName) + + ",_" + + (primaryIdAttribute == "pinswg_sipscase" + ? "pinswg_sipscase_value" + : primaryIdAttribute + "s_value"); //console.log("query: ", queryUrl, "<<< Date: Tue, 18 Feb 2025 14:20:27 +0000 Subject: [PATCH 5/8] 13924 13925 13923 update collections for sips --- data/collections.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/data/collections.json b/data/collections.json index 3240e7c1..ae718a72 100644 --- a/data/collections.json +++ b/data/collections.json @@ -370,6 +370,16 @@ "appealTypeID": "846040012", "NavigationProperty": "pinswg_ElectricityActIds", "value": "Electricity Act" + }, + { + "LogicalCollectionName": "pinswg_sipses", + "LogicalName": "pinswg_sips", + "PrimaryIdAttribute": "pinswg_sipscase", + "UrlName": "sips", + "MetadataId": "8d31911b-b8ea-ef11-ab08-00224800be9c", + "appealTypeID": "846040002", + "NavigationProperty": "pinswg_SIPSIds", + "value": "SIPs" } ] } \ No newline at end of file From 7fad19452b69c2bda4bf331753af9f40ef4cd516 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Tue, 18 Feb 2025 14:21:20 +0000 Subject: [PATCH 6/8] 13927 sips summary page --- components/case/summary.js | 47 +- .../case/summaryTypes/pinswg_sipscase.js | 888 ++++++++++++++++++ 2 files changed, 930 insertions(+), 5 deletions(-) create mode 100644 components/case/summaryTypes/pinswg_sipscase.js diff --git a/components/case/summary.js b/components/case/summary.js index 44f0201e..11d7f136 100644 --- a/components/case/summary.js +++ b/components/case/summary.js @@ -37,6 +37,7 @@ import Pinswg_commonlandid from "./summaryTypes/pinswg_commonlandid"; import Pinswg_communityinfrastructurelevyid from "./summaryTypes/pinswg_communityinfrastructurelevyid"; import Pinswg_compulsorypurchaseordersid from "./summaryTypes/pinswg_compulsorypurchaseordersid"; import Pinswg_dnsid from "./summaryTypes/pinswg_dnsid"; +import Pinswg_sipscase from "./summaryTypes/pinswg_sipscase"; import Pinswg_electricityactid from "./summaryTypes/pinswg_electricityactid"; import Pinswg_enforcementlistedbuildingconseid from "./summaryTypes/pinswg_enforcementlistedbuildingconseid"; import Pinswg_enforcementnoticeappeals174id from "./summaryTypes/pinswg_enforcementnoticeappeals174id"; @@ -316,51 +317,75 @@ const CaseSummary = (props) => { ) ? detailsObj.pinswg_siteaddressline1 : ""} + {_.has(detailsObj, "pinswg_addressline1") + ? detailsObj.pinswg_addressline1 + : ""} {_.has( detailsObj, "pinswg_siteaddressline1" ) && detailsObj.pinswg_siteaddressline1 != null &&
} + {_.has(detailsObj, "pinswg_addressline1") && + detailsObj.pinswg_addressline1 != + null &&
} {_.has( detailsObj, "pinswg_siteaddressline2" ) ? detailsObj.pinswg_siteaddressline2 : ""} - {_.has( - detailsObj, - "pinswg_siteaddressline2" - ) && - detailsObj.pinswg_siteaddressline2 != + {_.has(detailsObj, "pinswg_addressline2") + ? detailsObj.pinswg_addressline2 + : ""} + {_.has(detailsObj, "pinswg_addressline2") && + detailsObj.pinswg_addressline2 != null &&
} {_.has(detailsObj, "pinswg_siteaddresstown") ? detailsObj.pinswg_siteaddresstown : ""} + {_.has(detailsObj, "pinswg_addresstown") + ? detailsObj.pinswg_addresstown + : ""} {_.has( detailsObj, "pinswg_siteaddresstown" ) && detailsObj.pinswg_siteaddresstown != null &&
} + {_.has(detailsObj, "pinswg_addresstown") && + detailsObj.pinswg_addresstown != + null &&
} {_.has( detailsObj, "pinswg_siteaddresscounty" ) ? detailsObj.pinswg_siteaddresscounty : ""} + {_.has(detailsObj, "pinswg_addresscounty") + ? detailsObj.pinswg_addresscounty + : ""} {_.has( detailsObj, "pinswg_siteaddresscounty" ) && detailsObj.pinswg_siteaddresscounty != null &&
} + {_.has( + detailsObj, + "pinswg_addresscounty" + ) && + detailsObj.pinswg_addresscounty != + null &&
} {_.has( detailsObj, "pinswg_siteaddresspostcode" ) ? detailsObj.pinswg_siteaddresspostcode : ""} + {_.has(detailsObj, "pinswg_postcode") + ? detailsObj.pinswg_postcode + : ""}
{casesObj.description != null && ( @@ -877,6 +902,18 @@ const CaseSummary = (props) => { /> ); break; + case "pinswg_sipscase": + return ( + + ); + break; case "pinswg_electricityactid": return ( { + let { t } = useTranslation(); + const { casesObj, detailsObj, formatDates, linkedCasesList, showMap } = + props; + + const router = useRouter(); + const { locale } = router; + let point = {}; + let siteCoords = {}; + let center = {}; + + point = new OSPoint( + detailsObj.pinswg_anticipatedgridreferencenorthingtext, + detailsObj.pinswg_anticipatedgridreferenceeastingtext + ); + siteCoords = point.toOSGB36(); + //console.log(siteCoords); + center = { + id: "", + lat: isNaN(parseFloat(siteCoords.latitude)) + ? 52.412272 + : parseFloat(siteCoords.latitude), + lng: isNaN(parseFloat(siteCoords.longitude)) + ? -3.437989 + : parseFloat(siteCoords.longitude), + }; + + const zoom = isNaN(parseFloat(siteCoords.latitude)) ? 7 : 12; + + return ( + <> + {detailsObj.pinswg_projectdescription != null ? ( +
+
+
+

+ {t("case:summary-project-details-label")} +

+

+ {detailsObj.pinswg_projectdescription != null + ? detailsObj.pinswg_projectdescription.indexOf( + ";" + ) < 0 + ? detailsObj.pinswg_projectdescription + : router.locale == "cy" + ? detailsObj.pinswg_projectdescription.split( + ";" + )[1] + : detailsObj.pinswg_projectdescription.split( + ";" + )[0] + : ""} +

+ + {/*

+ {detailsObj.pinswg_projectlocation != null + ? detailsObj.pinswg_projectlocation.indexOf( + ";" + ) < 0 + ? detailsObj.pinswg_projectlocation + : router.locale == "cy" + ? detailsObj.pinswg_projectlocation.split( + ";" + )[1] + : detailsObj.pinswg_projectlocation.split( + ";" + )[0] + : ""} +

*/} +
+ {showMap == "true" && ( +
+
+ + {/* */} +
+
+ )} +
+
+ ) : ( + "" + )} + +
+
+
+
+
+

+ {t("case:summary-case-details-label")} +

+ +
+
+
+ {t("case:summary-case-type-label")} +
+
+ {router.locale == "cy" + ? jsonpath( + '$..[?(@.value=="' + + casesObj[ + "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" + ] + + '")].value_cy', + transLookup + ) + : casesObj[ + "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" + ] || + t( + "case:summary-no-date-entered-label" + )} +
+
+ + {detailsObj.pinswg_webaddress != null && ( +
+
+ {t( + "case:summary-case-website-label" + )} +
+
+ {router.locale == "cy" + ? jsonpath( + '$..[?(@.value=="' + + detailsObj.pinswg_webaddress + + '")].value_cy', + transLookup + ) + : ( + + { + detailsObj.pinswg_webaddress + } + + ) || + t( + "case:summary-no-date-entered-label" + )} +
+
+ )} +
+
+ {t("case:summary-lpa-label")} +
+
+ {router.locale == "cy" + ? jsonpath( + '$..[?(@.value=="' + + casesObj[ + "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" + ] + + '")].value_cy', + transLookup + ) + : casesObj[ + "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" + ] || ""} +
+
+
+
+ {t("case:summary-procedure-label")} +
+
+ {router.locale == "cy" + ? jsonpath( + '$..[?(@.value=="' + + detailsObj[ + "pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue" + ] + + '")].value_cy', + transLookup + ) + : detailsObj[ + "pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue" + ] || + t( + "case:summary-to-be-confirmed-label" + )} +
+
+ {/*
+
+ {t("case:summary-status-label")} +
+
+ {router.locale == "cy" + ? jsonpath( + + '$..[?(@.value=="' + + casesObj[ + "statuscode@OData.Community.Display.V1.FormattedValue" + ] + + '")].value_cy',transLookup + ) + : casesObj[ + "statuscode@OData.Community.Display.V1.FormattedValue" + ] || + t( + "case:summary-to-be-confirmed-label" + )} +
+
*/} + {/*
+
+ {t( + "case:summary-case-officer-label" + )} +
+
+ + {_.has(casesObj, "_ownerid_value") + ? casesObj[ + "_ownerid_value@OData.Community.Display.V1.FormattedValue" + ] + : ""} +
+
*/} +
+
+ {t( + "case:summary-type-of-event-label" + )} +
+
+ {router.locale == "cy" + ? jsonpath( + '$..[?(@.value=="' + + detailsObj[ + "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" + ] + + '")].value_cy', + transLookup + ) + : detailsObj[ + "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" + ] || ""} +
+
+
+
+ {t( + "case:summary-start-event-date-label" + )} +
+
+ {_.has( + detailsObj, + "pinswg_startdateofevent" + ) + ? !_.isEmpty( + detailsObj.pinswg_startdateofevent + ) + ? formatDates( + detailsObj.pinswg_startdateofevent + ) + : t( + "case:summary-no-information-to-date-label" + ) + : t( + "case:summary-no-information-to-date-label" + )} +
+
+
+
+ {t("case:summary-event-date-label")} +
+
+ {_.has( + detailsObj, + "pinswg_dateeventrequested" + ) + ? !_.isEmpty( + detailsObj.pinswg_dateeventrequested + ) + ? formatDates( + detailsObj.pinswg_dateeventrequested + ) + : t( + "case:summary-to-be-confirmed-label" + ) + : t( + "case:summary-to-be-confirmed-label" + )} +
+
+
+
+ {t("case:summary-decision-label")} +
+
+ {router.locale == "cy" + ? jsonpath( + '$..[?(@.value=="' + + detailsObj[ + "pinswg_decision@OData.Community.Display.V1.FormattedValue" + ] + + '")].value_cy', + transLookup + ) + : detailsObj[ + "pinswg_decision@OData.Community.Display.V1.FormattedValue" + ] || + t( + "case:summary-no-information-to-date-label" + )} + +
+ {/* + + {casesObj.caseDetails + .outcome_document || ""} + + */} +
+
+
+
+ {t( + "case:summary-decision-date-label" + )} +
+
+ {_.has( + detailsObj, + "pinswg_dateofdecision" + ) + ? !_.isEmpty( + detailsObj.pinswg_dateofdecision + ) + ? formatDates( + detailsObj.pinswg_dateofdecision + ) + : t( + "case:summary-no-information-to-date-label" + ) + : t( + "case:summary-no-information-to-date-label" + )} +
+
+ {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + )} +
+
+ )} + {casesObj.numberofchildincidents > 0 ? ( +
+
+ {t( + "case:summary-linked-cases-label" + )} +
+
+ {linkedCasesList( + props.currentView + .linkedCaseReferences + )} +
+
+ ) : ( + "" + )} + {/*
+
+ {t( + "case:summary-case-recommendation-label" + )} +
+
+ {router.locale == "cy" + ? jsonpath( + '$..[?(@.value=="' + + detailsObj.pinswg_recommendation + + '")].value_cy', + transLookup, + + ) + : detailsObj.pinswg_recommendation} +
+
*/} +
+
+
+
+
+
+
+

+ {t("case:summary-dates-label")} +

+
+ {/*
+
+ {t( + "case:summary-valid-notice-of-intention-to-submit-an-application" + )} +
{" "} +
+ {_.has( + detailsObj, + "pinswg_validnoticeofintentiontosubmitanapplicati" + ) + ? !_.isEmpty( + detailsObj.pinswg_validnoticeofintentiontosubmitanapplicati + ) + ? formatDates( + detailsObj.pinswg_validnoticeofintentiontosubmitanapplicati + ) + : t( + "case:summary-awaiting-information-label" + ) + : t( + "case:summary-awaiting-information-label" + )} +
+
*/} +
+
+ {t( + "case:summary-written-acceptance-of-notice" + )} +
+
+ {_.has( + detailsObj, + "pinswg_writtenacceptanceofnotification" + ) + ? !_.isEmpty( + detailsObj.pinswg_writtenacceptanceofnotification + ) + ? formatDates( + detailsObj.pinswg_writtenacceptanceofnotification + ) + : t( + "case:summary-awaiting-information-label" + ) + : t( + "case:summary-awaiting-information-label" + )} +
+
+
+
+ {t( + "case:summary-deadline-for-submission-of-application" + )} +
+
+ {_.has( + detailsObj, + "pinswg_deadlineforsubmissionofapplication" + ) + ? !_.isEmpty( + detailsObj.pinswg_deadlineforsubmissionofapplication + ) + ? formatDates( + detailsObj.pinswg_deadlineforsubmissionofapplication + ) + : t( + "case:summary-awaiting-information-label" + ) + : t( + "case:summary-awaiting-information-label" + )} +
+
+
+
+ {t( + "case:summary-date-of-submission-of-application" + )} +
+
+ {_.has( + detailsObj, + "pinswg_dateofsubmissionofapplication" + ) + ? !_.isEmpty( + detailsObj.pinswg_dateofsubmissionofapplication + ) + ? formatDates( + detailsObj.pinswg_dateofsubmissionofapplication + ) + : t( + "case:summary-awaiting-information-label" + ) + : t( + "case:summary-awaiting-information-label" + )} +
+
+ {_.has( + detailsObj, + "pinswg_applicationacceptedasvalid" + ) && + !_.isEmpty( + detailsObj.pinswg_applicationrejectedasinvalid + ) && ( +
+
+ {t( + "case:summary-application-accepted-as-valid" + )} +
+
+ {!_.isEmpty( + detailsObj.pinswg_applicationacceptedasvalid + ) + ? formatDates( + detailsObj.pinswg_applicationacceptedasvalid + ) + : t( + "case:summary-awaiting-information-label" + )} +
+
+ )} + {_.has( + detailsObj, + "pinswg_applicationrejectedasinvalid" + ) && + !_.isEmpty( + detailsObj.pinswg_applicationrejectedasinvalid + ) && ( +
+
+ {t( + "case:summary-application-rejected-as-invalid" + )} +
+
+ {!_.isEmpty( + detailsObj.pinswg_applicationrejectedasinvalid + ) + ? formatDates( + detailsObj.pinswg_applicationrejectedasinvalid + ) + : t( + "case:summary-awaiting-information-label" + )} +
+
+ )} +
+
+ {t( + "case:summary-end-of-representation-period" + )} +
+
+ {_.has( + detailsObj, + "pinswg_endofrepresentationperiod" + ) + ? !_.isEmpty( + detailsObj.pinswg_endofrepresentationperiod + ) + ? formatDates( + detailsObj.pinswg_endofrepresentationperiod + ) + : t( + "case:summary-awaiting-information-label" + ) + : t( + "case:summary-awaiting-information-label" + )} +
+
+ + {_.has( + detailsObj, + "pinswg_dateofrequesttovarytheapplication" + ) && + !_.isEmpty( + detailsObj.pinswg_dateofrequesttovarytheapplication + ) && ( +
+
+ {t( + "case:summary-date-of-request-to-vary" + )} +
+
+ {!_.isEmpty( + detailsObj.pinswg_dateofrequesttovarytheapplication + ) + ? formatDates( + detailsObj.pinswg_dateofrequesttovarytheapplication + ) + : t( + "case:summary-awaiting-information-label" + )} +
+
+ )} + + {_.has( + detailsObj, + "pinswg_confirmrequesttovaryapplication" + ) && + !_.isEmpty( + detailsObj.pinswg_confirmrequesttovaryapplication + ) && + (_.has( + detailsObj, + "pinswg_rejectrequesttovaryapplication" + ) && + _.isEmpty( + detailsObj.pinswg_rejectrequesttovaryapplication + ) ? ( +
+
+ {t( + "case:summary-confirm-request-to-vary-application" + )} +
+
+ {!_.isEmpty( + detailsObj.pinswg_confirmrequesttovaryapplication + ) + ? formatDates( + detailsObj.pinswg_confirmrequesttovaryapplication + ) + : t( + "case:summary-awaiting-information-label" + )} +
+
+ ) : ( + "" + ))} + {_.has( + detailsObj, + "pinswg_rejectrequesttovaryapplication" + ) && + !_.isEmpty( + detailsObj.pinswg_rejectrequesttovaryapplication + ) && + (_.has( + detailsObj, + "pinswg_confirmrequesttovaryapplication" + ) && + _.isEmpty( + detailsObj.pinswg_confirmrequesttovaryapplication + ) ? ( +
+
+ {t( + "case:summary-reject-request-to-vary-application" + )} +
+
+ {!_.isEmpty( + detailsObj.pinswg_rejectrequesttovaryapplication + ) + ? formatDates( + detailsObj.pinswg_rejectrequesttovaryapplication + ) + : t( + "case:summary-awaiting-information-label" + )} +
+
+ ) : ( + "" + ))} + {_.has( + detailsObj, + "pinswg_suspensionstartdates" + ) && + !_.isEmpty( + detailsObj.pinswg_suspensionstartdates + ) && ( +
+
+ {t( + "case:summary-suspension-start-dates" + )} +
+
+ {!_.isEmpty( + detailsObj.pinswg_suspensionstartdates + ) + ? formatDates( + detailsObj.pinswg_suspensionstartdates + ) + : t( + "case:summary-awaiting-information-label" + )} +
+
+ )} + +
+
+ {t( + "case:summary-suspension-end-dates" + )} +
+
+ {_.has( + detailsObj, + "pinswg_suspensionenddates" + ) + ? !_.isEmpty( + detailsObj.pinswg_suspensionenddates + ) + ? formatDates( + detailsObj.pinswg_suspensionenddates + ) + : t( + "case:summary-awaiting-information-label" + ) + : t( + "case:summary-awaiting-information-label" + )} +
+
+
+
+ {t("case:summary-report-due-by")} +
+
+ {_.has( + detailsObj, + "pinswg_reportdueby" + ) + ? !_.isEmpty( + detailsObj.pinswg_reportdueby + ) + ? formatDates( + detailsObj.pinswg_reportdueby + ) + : t( + "case:summary-awaiting-information-label" + ) + : t( + "case:summary-awaiting-information-label" + )} +
+
+ {/*
+
+ {t("case:summary-suspension-dates")} +
+
+ {_.has( + detailsObj, + "pinswg_suspensiondates" + ) + ? !_.isEmpty( + detailsObj.pinswg_suspensiondates + ) + ? formatDates( + detailsObj.pinswg_suspensiondates + ) + : t( + "case:summary-no-date-entered-label" + ) + : t( + "case:summary-no-date-entered-label" + )} +
+
*/} +
+
+ {t( + "case:summary-inspector-report-submission-to-welsh-government" + )} +
+
+ {_.has( + detailsObj, + "pinswg_inspectorreportsubmittedtowelshgovernment" + ) + ? !_.isEmpty( + detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment + ) + ? formatDates( + detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment + ) + : t( + "case:summary-awaiting-information-label" + ) + : t( + "case:summary-awaiting-information-label" + )} +
+
+ {_.has( + detailsObj, + "pinswg_withdrawndate" + ) && + !_.isEmpty( + detailsObj.pinswg_withdrawndate + ) && ( +
+
+ {t( + "case:summary-withdrawn-date" + )} +
+
+ {!_.isEmpty( + detailsObj.pinswg_withdrawndate + ) + ? formatDates( + detailsObj.pinswg_withdrawndate + ) + : t( + "case:summary-awaiting-information-label" + )} +
+
+ )} +
+
+
+
+
+
+ + ); +}; + +export default Pinswg_sipscase; From dec96c0546e468ce65d9c83ffb760f9086c618a2 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Tue, 18 Feb 2025 14:25:13 +0000 Subject: [PATCH 7/8] 13933 ui for infrasturcure card --- locales/cy/home.json | 4 ++-- locales/en/home.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/locales/cy/home.json b/locales/cy/home.json index 9b31e35a..34f96e01 100644 --- a/locales/cy/home.json +++ b/locales/cy/home.json @@ -38,8 +38,8 @@ "inspectorate-card-visit-label": "Ymweld â'r Arolygiaeth Gynllunio", "inspectorate-card-visit-link": "Hafan", "inspectorate-card-alt-text": "Yr Arolygiaeth Gynllunio", - "dns-card-title": "Gweld yr holl Ddatblygiadau o Arwyddocâd Cenedlaethol", - "dns-card-paragraph": "Mae Datblygiad o Arwyddocâd Cenedlaethol yn fath o gais cynllunio ar gyfer prosiect seilwaith mawr sydd o bwysigrwydd cenedlaethol.", + "dns-card-title": "Gweld yr holl Brosiectau Seilwaith", + "dns-card-paragraph": "Gellir dosbarthu prosiectau o bwysigrwydd cenedlaethol fel Datblygiad o Arwyddocâd Cenedlaethol neu dan ddeddfwriaeth newydd, Prosiect Seilwaith Arwyddocaol.", "dns-card-button": "Gweld pob cais", "logging-in-heading": "Rydym yn dilysu eich cyfrif. Arhoswch a pheidiwch ag adnewyddu'r dudalen", "logging-in-paragraph": "Arhoswch os gwelwch yn dda...", diff --git a/locales/en/home.json b/locales/en/home.json index 9f83d698..7b163326 100644 --- a/locales/en/home.json +++ b/locales/en/home.json @@ -38,7 +38,7 @@ "inspectorate-card-visit-label": "Visit the Planning Inspectorate", "inspectorate-card-visit-link": "Home", "inspectorate-card-alt-text": "The Planning Inspectorate", - "dns-card-title": "View all Developments of National Significance ", + "dns-card-title": "View all Infrastructure Projects", "dns-card-paragraph": "A Development of National Significance is a type of planning application for a large infrastructure project of national importance.", "dns-card-button": "View all applications", "logging-in-heading": "We are authenticating your account please wait and don't refresh", From b699f1d3591a2930ce7d8395c2ccfb7a42fffa49 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Tue, 18 Feb 2025 14:25:39 +0000 Subject: [PATCH 8/8] 13933 --- locales/en/home.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/en/home.json b/locales/en/home.json index 7b163326..2310c144 100644 --- a/locales/en/home.json +++ b/locales/en/home.json @@ -39,7 +39,7 @@ "inspectorate-card-visit-link": "Home", "inspectorate-card-alt-text": "The Planning Inspectorate", "dns-card-title": "View all Infrastructure Projects", - "dns-card-paragraph": "A Development of National Significance is a type of planning application for a large infrastructure project of national importance.", + "dns-card-paragraph": "Projects of national importance can be classed as a Development of National Significance or under new legislation, a Significant Infrastructure Project.", "dns-card-button": "View all applications", "logging-in-heading": "We are authenticating your account please wait and don't refresh", "logging-in-paragraph": "Please wait...",