From 87f0dcd8110cb8945570ae3fe194f31551a69758 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Tue, 15 Apr 2025 17:25:14 +0100 Subject: [PATCH 1/7] changes sandbox: {} to eval: true, caused errors in evaluated queries --- components/case/documents.js | 8 +++---- components/case/representation/index.js | 16 ++++++------- .../representation/representationDetails.js | 2 +- .../case/representation/representationLPA.js | 4 ++-- .../representationLPADetails.js | 2 +- ...resentationLPAQuestionnaire_enforcement.js | 4 ++-- .../representationLPAQuestionnaire_s78.js | 4 ++-- components/case/representationList.js | 2 +- components/case/summary.js | 18 +++++++------- .../case/summaryTypes/pinswg_advertsid.js | 14 +++++------ .../case/summaryTypes/pinswg_callinss77id.js | 12 +++++----- .../case/summaryTypes/pinswg_commonlandid.js | 16 ++++++------- .../pinswg_communityinfrastructurelevyid.js | 12 +++++----- .../pinswg_compulsorypurchaseordersid.js | 14 +++++------ components/case/summaryTypes/pinswg_dnsid.js | 12 +++++----- .../summaryTypes/pinswg_electricityactid.js | 16 ++++++------- ...pinswg_enforcementlistedbuildingconseid.js | 12 +++++----- .../pinswg_enforcementnoticeappeals174id.js | 12 +++++----- .../pinswg_environmentalpermittingid.js | 16 ++++++------- .../pinswg_harbourrevisionorderid.js | 14 +++++------ ...pinswg_hedgeshedgerowstreepreservatioid.js | 18 +++++++------- .../pinswg_householderappealhasid.js | 10 ++++---- ...pinswg_lawfuldevelopmentcertificatappid.js | 12 +++++----- components/case/summaryTypes/pinswg_ldpid.js | 12 +++++----- ...pinswg_listedbuildingandconservationrid.js | 12 +++++----- .../pinswg_maintenanceoflands217id.js | 12 +++++----- .../pinswg_miscellaneouscasewordid.js | 16 ++++++------- .../summaryTypes/pinswg_nonvalidationid.js | 10 ++++---- .../pinswg_planningappeals78id.js | 12 +++++----- .../pinswg_planningconditionss73s79id.js | 12 +++++----- .../pinswg_planningobligationappeals106id.js | 12 +++++----- components/case/summaryTypes/pinswg_rowid.js | 18 +++++++------- .../pinswg_transportandworkactid.js | 6 ++--- .../case/summaryTypes/pinswg_wayleaveid.js | 16 ++++++------- components/elements/index.js | 10 ++++---- components/myportal.js | 2 +- components/myportal/advancedsearch.js | 4 ++-- .../myportal/awaitingsubmissionfromblob.js | 4 ++-- components/myportal/topthree.js | 4 ++-- components/myportal/topthree_reps.js | 10 ++++---- components/myportal/viewall.js | 24 +++++++++---------- components/newappeal/buildcheckrow.js | 6 ++--- components/newappeal/buildchecksection.js | 4 ++-- components/newappeal/createCase.js | 4 ++-- components/pdftemplates/appealRow_pdf.js | 2 +- components/search/addresssearchresults.js | 12 +++++----- components/search/advancedsearch.js | 6 ++--- components/search/dnssearchresults.js | 8 +++---- components/search/searchresults.js | 10 ++++---- components/utils/index.js | 16 ++++++------- .../getbasicsearch_by_address_api copy.js | 2 +- .../endpoint/getbasicsearch_by_address_api.js | 2 +- pages/api/endpoint/getmylpacases_api.js | 2 +- pages/myportal/[appealtypes].js | 2 +- pages/newappeal/[appealtypes].js | 2 +- 55 files changed, 262 insertions(+), 262 deletions(-) diff --git a/components/case/documents.js b/components/case/documents.js index 41b94b9a..daeb274d 100644 --- a/components/case/documents.js +++ b/components/case/documents.js @@ -160,7 +160,7 @@ const DocumentDetails = (props) => { ? jsonpath({ path: '$..[?(@.value=="All")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : "All"} @@ -179,7 +179,7 @@ const DocumentDetails = (props) => { item.pinswg_isharedocumentlocationsLabel + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : item.pinswg_isharedocumentlocationsLabel || t( @@ -735,7 +735,7 @@ const DocumentDetails = (props) => { incidentid + "')]", json: item, - sandbox: {}, + eval: true, }); detailsObj = item; return ( @@ -830,7 +830,7 @@ const DocumentDetails = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue" diff --git a/components/case/representation/index.js b/components/case/representation/index.js index ce849cbe..64b4c03a 100644 --- a/components/case/representation/index.js +++ b/components/case/representation/index.js @@ -212,18 +212,18 @@ let MakeRepresentation = (props) => { ? (casesObj = jsonpath({ path: '$..[?(@.title=="' + caseReference + '")]', json: setCaseQueryObj, - sandbox: {}, + eval: true, })) : currentType == "watchedCases" ? (casesObj = jsonpath({ path: '$..[?(@.ticketnumber=="' + caseReference + '")]', json: watchedCases, - sandbox: {}, + eval: true, })) : (casesObj = jsonpath({ path: '$..[?(@.reference=="' + caseReference + '")]', json: setCaseQueryObj, - sandbox: {}, + eval: true, })); casesObj = Object.assign({}, ...casesObj); @@ -271,7 +271,7 @@ let MakeRepresentation = (props) => { currentView.caseReference.currentReference + '")]', json: setCaseResultsObj, - sandbox: {}, + eval: true, }); resultsObj = resultsObj[0]; @@ -282,7 +282,7 @@ let MakeRepresentation = (props) => { path: '$..[?(@.repfile_name =="' + router.query.created + '")]', json: setCaseDetailsObj, - sandbox: {}, + eval: true, }) : jsonpath({ path: @@ -290,7 +290,7 @@ let MakeRepresentation = (props) => { currentView.caseReference.currentReference + '")]', json: setCaseDetailsObj, - sandbox: {}, + eval: true, }) : jsonpath({ path: @@ -298,7 +298,7 @@ let MakeRepresentation = (props) => { currentView.caseReference.currentReference + '")]', json: setCaseDetailsObj, - sandbox: {}, + eval: true, }); detailsObj = detailsObj[0]; @@ -945,7 +945,7 @@ let MakeRepresentation = (props) => { detailsObj = jsonpath({ path: '$..[?(@.pinswg_name=="' + caseReference + '")]', json: setCaseDetailsObj, - sandbox: {}, + eval: true, }); detailsObj = detailsObj[0]; diff --git a/components/case/representation/representationDetails.js b/components/case/representation/representationDetails.js index 8b32d7a3..afd6e0e3 100644 --- a/components/case/representation/representationDetails.js +++ b/components/case/representation/representationDetails.js @@ -31,7 +31,7 @@ const RepDetails = (props) => { detailsObj = jsonpath({ path: '$..[?(@.pinswg_name=="' + caseReference + '")]', json: setCaseDetailsObj, - sandbox: {}, + eval: true, }); detailsObj = detailsObj[0]; diff --git a/components/case/representation/representationLPA.js b/components/case/representation/representationLPA.js index d2950f83..f782526b 100644 --- a/components/case/representation/representationLPA.js +++ b/components/case/representation/representationLPA.js @@ -182,7 +182,7 @@ let RepLPA = (props) => { currentView.caseReference.currentReference + '")]', json: setCaseDetailsObj, - sandbox: {}, + eval: true, }); let setCaseResultssObj = router.query.hasOwnProperty("state") @@ -201,7 +201,7 @@ let RepLPA = (props) => { currentView.caseReference.currentReference + '")]', json: setCaseResultssObj, - sandbox: {}, + eval: true, }); resultsObj = resultsObj[0]; diff --git a/components/case/representation/representationLPADetails.js b/components/case/representation/representationLPADetails.js index b9433e0b..8ef1b362 100644 --- a/components/case/representation/representationLPADetails.js +++ b/components/case/representation/representationLPADetails.js @@ -23,7 +23,7 @@ const RepLPADetails = (props) => { detailsObj = jsonpath({ path: '$..[?(@.pinswg_name=="' + caseReference + '")]', json: setCaseDetailsObj, - sandbox: {}, + eval: true, }); detailsObj = detailsObj[0]; diff --git a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js index ef433f52..6230d22f 100644 --- a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js +++ b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js @@ -64,7 +64,7 @@ let Enforcement_Questionnaire = (props) => { currentView.caseReference.currentReference + '")]', json: setCaseDetailsObj, - sandbox: {}, + eval: true, }); let setCaseResultssObj = router.query.hasOwnProperty("state") @@ -87,7 +87,7 @@ let Enforcement_Questionnaire = (props) => { currentView.caseReference.currentReference + '")]', json: setCaseResultssObj, - sandbox: {}, + eval: true, }); resultsObj = resultsObj[0]; diff --git a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js index 20b6cc6a..6b6d2a29 100644 --- a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js +++ b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js @@ -66,7 +66,7 @@ let S78_Questionnaire = (props) => { currentView.caseReference.currentReference + '")]', json: setCaseResultssObj, - sandbox: {}, + eval: true, }); let setCaseResultssObj = router.query.hasOwnProperty("state") @@ -95,7 +95,7 @@ let S78_Questionnaire = (props) => { currentView.caseReference.currentReference + '")]', json: setCaseResultssObj, - sandbox: {}, + eval: true, }); resultsObj = resultsObj[0]; diff --git a/components/case/representationList.js b/components/case/representationList.js index 7c24ae12..bd95c1c9 100644 --- a/components/case/representationList.js +++ b/components/case/representationList.js @@ -63,7 +63,7 @@ const RepresentationList = (props) => { incidentid + "')]", json: item, - sandbox: {}, + eval: true, }); detailsObj = item; diff --git a/components/case/summary.js b/components/case/summary.js index ddedc878..34c466cc 100644 --- a/components/case/summary.js +++ b/components/case/summary.js @@ -138,7 +138,7 @@ const CaseSummary = (props) => { whichIncident + "')]", json: watchedCases, - sandbox: {}, + eval: true, }); return isWatched; @@ -178,30 +178,30 @@ const CaseSummary = (props) => { ? (casesObj = jsonpath({ path: '$..[?(@.title=="' + caseReference + '")]', json: searchResultsObj, - sandbox: {}, + eval: true, })) : currentType == "watchedCases" ? (casesObj = jsonpath({ path: '$..[?(@.pinswg_title=="' + caseReference + '")]', json: setCaseQueryObj, - sandbox: {}, + eval: true, })) : currentType == "myCases" ? (casesObj = jsonpath({ path: '$..[?(@.pinswg_title=="' + caseReference + '")]', json: setCaseQueryObj, - sandbox: {}, + eval: true, })) : currentType == "directResultsObj" ? (casesObj = jsonpath({ path: '$..[?(@.ticketnumber=="' + caseReference + '")]', json: setCaseQueryObj, - sandbox: {}, + eval: true, })) : (casesObj = jsonpath({ path: '$..[?(@.reference=="' + caseReference + '")]', json: setCaseQueryObj, - sandbox: {}, + eval: true, })); casesObj = Object.assign({}, ...casesObj); @@ -212,14 +212,14 @@ const CaseSummary = (props) => { ? (detailsObj = jsonpath({ path: '$..[?(@.pinswg_name=="' + caseReference + '")]', json: searchDetailsObj, - sandbox: {}, + eval: true, })) : currentType == "directResultsObj" ? (detailsObj = setCaseDetailsObj[0].value[0]) : (detailsObj = jsonpath({ path: '$..[?(@.pinswg_name=="' + caseReference + '")]', jsopn: setCaseDetailsObj, - sandbox: {}, + eval: true, })); detailsObj = typeof detailsObj == "object" ? detailsObj : detailsObj[0]; @@ -405,7 +405,7 @@ const CaseSummary = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_casestage@OData.Community.Display.V1.FormattedValue" diff --git a/components/case/summaryTypes/pinswg_advertsid.js b/components/case/summaryTypes/pinswg_advertsid.js index b6208e39..63906eb2 100644 --- a/components/case/summaryTypes/pinswg_advertsid.js +++ b/components/case/summaryTypes/pinswg_advertsid.js @@ -35,7 +35,7 @@ const Pinswg_advertsid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -60,7 +60,7 @@ const Pinswg_advertsid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_speacialistcaseprocess@OData.Community.Display.V1.FormattedValue" @@ -82,7 +82,7 @@ const Pinswg_advertsid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -118,7 +118,7 @@ const Pinswg_advertsid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -139,7 +139,7 @@ const Pinswg_advertsid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -160,7 +160,7 @@ const Pinswg_advertsid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -185,7 +185,7 @@ const Pinswg_advertsid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" diff --git a/components/case/summaryTypes/pinswg_callinss77id.js b/components/case/summaryTypes/pinswg_callinss77id.js index f56d2685..d7129125 100644 --- a/components/case/summaryTypes/pinswg_callinss77id.js +++ b/components/case/summaryTypes/pinswg_callinss77id.js @@ -35,7 +35,7 @@ const Pinswg_callinss77id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -59,7 +59,7 @@ const Pinswg_callinss77id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -95,7 +95,7 @@ const Pinswg_callinss77id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -116,7 +116,7 @@ const Pinswg_callinss77id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -137,7 +137,7 @@ const Pinswg_callinss77id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -161,7 +161,7 @@ const Pinswg_callinss77id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" diff --git a/components/case/summaryTypes/pinswg_commonlandid.js b/components/case/summaryTypes/pinswg_commonlandid.js index 0f9a093b..107099fc 100644 --- a/components/case/summaryTypes/pinswg_commonlandid.js +++ b/components/case/summaryTypes/pinswg_commonlandid.js @@ -35,7 +35,7 @@ const Pinswg_commonlandid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -59,7 +59,7 @@ const Pinswg_commonlandid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -95,7 +95,7 @@ const Pinswg_commonlandid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -116,7 +116,7 @@ const Pinswg_commonlandid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -137,7 +137,7 @@ const Pinswg_commonlandid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -161,7 +161,7 @@ const Pinswg_commonlandid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" @@ -235,7 +235,7 @@ const Pinswg_commonlandid = (props) => { detailsObj.pinswg_relevantauthorityname + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : jsonpath({ path: @@ -243,7 +243,7 @@ const Pinswg_commonlandid = (props) => { detailsObj.pinswg_relevantauthorityname + '")].value', json: transLookup, - sandbox: {}, + eval: true, }) || t( "case:summary-no-date-entered-label" diff --git a/components/case/summaryTypes/pinswg_communityinfrastructurelevyid.js b/components/case/summaryTypes/pinswg_communityinfrastructurelevyid.js index 724cfe8b..9c2f7a3b 100644 --- a/components/case/summaryTypes/pinswg_communityinfrastructurelevyid.js +++ b/components/case/summaryTypes/pinswg_communityinfrastructurelevyid.js @@ -35,7 +35,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -59,7 +59,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -95,7 +95,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -116,7 +116,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -137,7 +137,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -161,7 +161,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" diff --git a/components/case/summaryTypes/pinswg_compulsorypurchaseordersid.js b/components/case/summaryTypes/pinswg_compulsorypurchaseordersid.js index 409b26d7..06a339eb 100644 --- a/components/case/summaryTypes/pinswg_compulsorypurchaseordersid.js +++ b/components/case/summaryTypes/pinswg_compulsorypurchaseordersid.js @@ -35,7 +35,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -75,7 +75,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -96,7 +96,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -117,7 +117,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -141,7 +141,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" @@ -215,7 +215,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => { detailsObj.pinswg_relevantauthorityname + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : jsonpath({ path: @@ -223,7 +223,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => { detailsObj.pinswg_relevantauthorityname + '")].value', json: transLookup, - sandbox: {}, + eval: true, }) || t( "case:summary-no-date-entered-label" diff --git a/components/case/summaryTypes/pinswg_dnsid.js b/components/case/summaryTypes/pinswg_dnsid.js index 5a624b8f..d2a8a95d 100644 --- a/components/case/summaryTypes/pinswg_dnsid.js +++ b/components/case/summaryTypes/pinswg_dnsid.js @@ -131,7 +131,7 @@ const Pinswg_dnsid = (props) => { '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -157,7 +157,7 @@ const Pinswg_dnsid = (props) => { detailsObj.pinswg_webaddress + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : ( { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -218,7 +218,7 @@ const Pinswg_dnsid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue" @@ -281,7 +281,7 @@ const Pinswg_dnsid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -350,7 +350,7 @@ const Pinswg_dnsid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" diff --git a/components/case/summaryTypes/pinswg_electricityactid.js b/components/case/summaryTypes/pinswg_electricityactid.js index 35b51298..4dbabebb 100644 --- a/components/case/summaryTypes/pinswg_electricityactid.js +++ b/components/case/summaryTypes/pinswg_electricityactid.js @@ -73,7 +73,7 @@ const Pinswg_electricityactid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -97,7 +97,7 @@ const Pinswg_electricityactid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -135,7 +135,7 @@ const Pinswg_electricityactid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -158,7 +158,7 @@ const Pinswg_electricityactid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -179,7 +179,7 @@ const Pinswg_electricityactid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -203,7 +203,7 @@ const Pinswg_electricityactid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" @@ -277,7 +277,7 @@ const Pinswg_electricityactid = (props) => { detailsObj.pinswg_recommendation + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj.pinswg_recommendation || t( @@ -300,7 +300,7 @@ const Pinswg_electricityactid = (props) => { detailsObj.pinswg_webaddress + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj.pinswg_webaddress || t( diff --git a/components/case/summaryTypes/pinswg_enforcementlistedbuildingconseid.js b/components/case/summaryTypes/pinswg_enforcementlistedbuildingconseid.js index 00fb137d..6b2672da 100644 --- a/components/case/summaryTypes/pinswg_enforcementlistedbuildingconseid.js +++ b/components/case/summaryTypes/pinswg_enforcementlistedbuildingconseid.js @@ -35,7 +35,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -59,7 +59,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -95,7 +95,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -116,7 +116,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -137,7 +137,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -161,7 +161,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" diff --git a/components/case/summaryTypes/pinswg_enforcementnoticeappeals174id.js b/components/case/summaryTypes/pinswg_enforcementnoticeappeals174id.js index 5c6f393e..61581c73 100644 --- a/components/case/summaryTypes/pinswg_enforcementnoticeappeals174id.js +++ b/components/case/summaryTypes/pinswg_enforcementnoticeappeals174id.js @@ -35,7 +35,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -59,7 +59,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -95,7 +95,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -116,7 +116,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -137,7 +137,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -161,7 +161,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" diff --git a/components/case/summaryTypes/pinswg_environmentalpermittingid.js b/components/case/summaryTypes/pinswg_environmentalpermittingid.js index e9e76b0b..96dd2472 100644 --- a/components/case/summaryTypes/pinswg_environmentalpermittingid.js +++ b/components/case/summaryTypes/pinswg_environmentalpermittingid.js @@ -35,7 +35,7 @@ const Pinswg_environmentalpermittingid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -59,7 +59,7 @@ const Pinswg_environmentalpermittingid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -95,7 +95,7 @@ const Pinswg_environmentalpermittingid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -116,7 +116,7 @@ const Pinswg_environmentalpermittingid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -137,7 +137,7 @@ const Pinswg_environmentalpermittingid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -161,7 +161,7 @@ const Pinswg_environmentalpermittingid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" @@ -235,7 +235,7 @@ const Pinswg_environmentalpermittingid = (props) => { detailsObj.pinswg_relevantauthorityname + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : jsonpath({ path: @@ -243,7 +243,7 @@ const Pinswg_environmentalpermittingid = (props) => { detailsObj.pinswg_relevantauthorityname + '")].value', json: transLookup, - sandbox: {}, + eval: true, }) || t( "case:summary-no-date-entered-label" diff --git a/components/case/summaryTypes/pinswg_harbourrevisionorderid.js b/components/case/summaryTypes/pinswg_harbourrevisionorderid.js index 980373f5..d286782b 100644 --- a/components/case/summaryTypes/pinswg_harbourrevisionorderid.js +++ b/components/case/summaryTypes/pinswg_harbourrevisionorderid.js @@ -73,7 +73,7 @@ const Pinswg_harbourrevisionorderid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -97,7 +97,7 @@ const Pinswg_harbourrevisionorderid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -135,7 +135,7 @@ const Pinswg_harbourrevisionorderid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -156,7 +156,7 @@ const Pinswg_harbourrevisionorderid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -180,7 +180,7 @@ const Pinswg_harbourrevisionorderid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" @@ -254,7 +254,7 @@ const Pinswg_harbourrevisionorderid = (props) => { detailsObj.pinswg_recommendation + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj.pinswg_recommendation || t( @@ -277,7 +277,7 @@ const Pinswg_harbourrevisionorderid = (props) => { detailsObj.pinswg_webaddress + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj.pinswg_webaddress || t( diff --git a/components/case/summaryTypes/pinswg_hedgeshedgerowstreepreservatioid.js b/components/case/summaryTypes/pinswg_hedgeshedgerowstreepreservatioid.js index d3ed5d7f..48f35bf9 100644 --- a/components/case/summaryTypes/pinswg_hedgeshedgerowstreepreservatioid.js +++ b/components/case/summaryTypes/pinswg_hedgeshedgerowstreepreservatioid.js @@ -35,7 +35,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -60,7 +60,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue" @@ -82,7 +82,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -118,7 +118,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -139,7 +139,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -160,7 +160,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -184,7 +184,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" @@ -258,7 +258,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { detailsObj.pinswg_relevantauthorityname + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : jsonpath({ path: @@ -266,7 +266,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { detailsObj.pinswg_relevantauthorityname + '")].value', json: transLookup, - sandbox: {}, + eval: true, }) || t( "case:summary-no-date-entered-label" diff --git a/components/case/summaryTypes/pinswg_householderappealhasid.js b/components/case/summaryTypes/pinswg_householderappealhasid.js index 98d8f8fe..e94f86db 100644 --- a/components/case/summaryTypes/pinswg_householderappealhasid.js +++ b/components/case/summaryTypes/pinswg_householderappealhasid.js @@ -35,7 +35,7 @@ const Pinswg_householderappealhasid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -59,7 +59,7 @@ const Pinswg_householderappealhasid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -95,7 +95,7 @@ const Pinswg_householderappealhasid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -116,7 +116,7 @@ const Pinswg_householderappealhasid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -140,7 +140,7 @@ const Pinswg_householderappealhasid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" diff --git a/components/case/summaryTypes/pinswg_lawfuldevelopmentcertificatappid.js b/components/case/summaryTypes/pinswg_lawfuldevelopmentcertificatappid.js index 54c02828..0ab88510 100644 --- a/components/case/summaryTypes/pinswg_lawfuldevelopmentcertificatappid.js +++ b/components/case/summaryTypes/pinswg_lawfuldevelopmentcertificatappid.js @@ -35,7 +35,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -59,7 +59,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -95,7 +95,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -116,7 +116,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -137,7 +137,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -161,7 +161,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" diff --git a/components/case/summaryTypes/pinswg_ldpid.js b/components/case/summaryTypes/pinswg_ldpid.js index b04d8699..693466ee 100644 --- a/components/case/summaryTypes/pinswg_ldpid.js +++ b/components/case/summaryTypes/pinswg_ldpid.js @@ -35,7 +35,7 @@ const Pinswg_ldpid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -59,7 +59,7 @@ const Pinswg_ldpid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -95,7 +95,7 @@ const Pinswg_ldpid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -116,7 +116,7 @@ const Pinswg_ldpid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -137,7 +137,7 @@ const Pinswg_ldpid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -161,7 +161,7 @@ const Pinswg_ldpid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" diff --git a/components/case/summaryTypes/pinswg_listedbuildingandconservationrid.js b/components/case/summaryTypes/pinswg_listedbuildingandconservationrid.js index e66f06bb..f111dc26 100644 --- a/components/case/summaryTypes/pinswg_listedbuildingandconservationrid.js +++ b/components/case/summaryTypes/pinswg_listedbuildingandconservationrid.js @@ -35,7 +35,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -59,7 +59,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -95,7 +95,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -116,7 +116,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -137,7 +137,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -161,7 +161,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" diff --git a/components/case/summaryTypes/pinswg_maintenanceoflands217id.js b/components/case/summaryTypes/pinswg_maintenanceoflands217id.js index 97a2dd62..3ed23e25 100644 --- a/components/case/summaryTypes/pinswg_maintenanceoflands217id.js +++ b/components/case/summaryTypes/pinswg_maintenanceoflands217id.js @@ -35,7 +35,7 @@ const Pinswg_maintenanceoflands217id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -59,7 +59,7 @@ const Pinswg_maintenanceoflands217id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -95,7 +95,7 @@ const Pinswg_maintenanceoflands217id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -116,7 +116,7 @@ const Pinswg_maintenanceoflands217id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -137,7 +137,7 @@ const Pinswg_maintenanceoflands217id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -161,7 +161,7 @@ const Pinswg_maintenanceoflands217id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" diff --git a/components/case/summaryTypes/pinswg_miscellaneouscasewordid.js b/components/case/summaryTypes/pinswg_miscellaneouscasewordid.js index 793aa1cf..b79d3303 100644 --- a/components/case/summaryTypes/pinswg_miscellaneouscasewordid.js +++ b/components/case/summaryTypes/pinswg_miscellaneouscasewordid.js @@ -35,7 +35,7 @@ const Pinswg_miscellaneouscasewordid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -59,7 +59,7 @@ const Pinswg_miscellaneouscasewordid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -95,7 +95,7 @@ const Pinswg_miscellaneouscasewordid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -116,7 +116,7 @@ const Pinswg_miscellaneouscasewordid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -137,7 +137,7 @@ const Pinswg_miscellaneouscasewordid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -161,7 +161,7 @@ const Pinswg_miscellaneouscasewordid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" @@ -235,7 +235,7 @@ const Pinswg_miscellaneouscasewordid = (props) => { detailsObj.pinswg_relevantauthorityname + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : jsonpath({ path: @@ -243,7 +243,7 @@ const Pinswg_miscellaneouscasewordid = (props) => { detailsObj.pinswg_relevantauthorityname + '")].value', json: transLookup, - sandbox: {}, + eval: true, }) || t( "case:summary-no-date-entered-label" diff --git a/components/case/summaryTypes/pinswg_nonvalidationid.js b/components/case/summaryTypes/pinswg_nonvalidationid.js index 33bd1483..3d078776 100644 --- a/components/case/summaryTypes/pinswg_nonvalidationid.js +++ b/components/case/summaryTypes/pinswg_nonvalidationid.js @@ -35,7 +35,7 @@ const Pinswg_nonvalidationid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -59,7 +59,7 @@ const Pinswg_nonvalidationid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -94,7 +94,7 @@ const Pinswg_nonvalidationid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -115,7 +115,7 @@ const Pinswg_nonvalidationid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -139,7 +139,7 @@ const Pinswg_nonvalidationid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decisionissued@OData.Community.Display.V1.FormattedValue" diff --git a/components/case/summaryTypes/pinswg_planningappeals78id.js b/components/case/summaryTypes/pinswg_planningappeals78id.js index 9a60cc48..b70340f7 100644 --- a/components/case/summaryTypes/pinswg_planningappeals78id.js +++ b/components/case/summaryTypes/pinswg_planningappeals78id.js @@ -35,7 +35,7 @@ const Pinswg_planningappeals78id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -59,7 +59,7 @@ const Pinswg_planningappeals78id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -95,7 +95,7 @@ const Pinswg_planningappeals78id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -116,7 +116,7 @@ const Pinswg_planningappeals78id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -140,7 +140,7 @@ const Pinswg_planningappeals78id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -164,7 +164,7 @@ const Pinswg_planningappeals78id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_dicision@OData.Community.Display.V1.FormattedValue" diff --git a/components/case/summaryTypes/pinswg_planningconditionss73s79id.js b/components/case/summaryTypes/pinswg_planningconditionss73s79id.js index a89cf9ab..b34be7cd 100644 --- a/components/case/summaryTypes/pinswg_planningconditionss73s79id.js +++ b/components/case/summaryTypes/pinswg_planningconditionss73s79id.js @@ -35,7 +35,7 @@ const Pinswg_planningconditionss73s79id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -59,7 +59,7 @@ const Pinswg_planningconditionss73s79id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -95,7 +95,7 @@ const Pinswg_planningconditionss73s79id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -116,7 +116,7 @@ const Pinswg_planningconditionss73s79id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -137,7 +137,7 @@ const Pinswg_planningconditionss73s79id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -161,7 +161,7 @@ const Pinswg_planningconditionss73s79id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" diff --git a/components/case/summaryTypes/pinswg_planningobligationappeals106id.js b/components/case/summaryTypes/pinswg_planningobligationappeals106id.js index 1b124841..389a719b 100644 --- a/components/case/summaryTypes/pinswg_planningobligationappeals106id.js +++ b/components/case/summaryTypes/pinswg_planningobligationappeals106id.js @@ -35,7 +35,7 @@ const Pinswg_planningobligationappeals106id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -59,7 +59,7 @@ const Pinswg_planningobligationappeals106id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -95,7 +95,7 @@ const Pinswg_planningobligationappeals106id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -116,7 +116,7 @@ const Pinswg_planningobligationappeals106id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -137,7 +137,7 @@ const Pinswg_planningobligationappeals106id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -161,7 +161,7 @@ const Pinswg_planningobligationappeals106id = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" diff --git a/components/case/summaryTypes/pinswg_rowid.js b/components/case/summaryTypes/pinswg_rowid.js index 3c78b453..d47b0e3d 100644 --- a/components/case/summaryTypes/pinswg_rowid.js +++ b/components/case/summaryTypes/pinswg_rowid.js @@ -35,7 +35,7 @@ const Pinswg_rowid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -60,7 +60,7 @@ const Pinswg_rowid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue" @@ -82,7 +82,7 @@ const Pinswg_rowid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -118,7 +118,7 @@ const Pinswg_rowid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -139,7 +139,7 @@ const Pinswg_rowid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -160,7 +160,7 @@ const Pinswg_rowid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -184,7 +184,7 @@ const Pinswg_rowid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" @@ -258,7 +258,7 @@ const Pinswg_rowid = (props) => { detailsObj.pinswg_relevantauthorityname + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : jsonpath({ path: @@ -266,7 +266,7 @@ const Pinswg_rowid = (props) => { detailsObj.pinswg_relevantauthorityname + '")].value', json: transLookup, - sandbox: {}, + eval: true, }) || t( "case:summary-no-date-entered-label" diff --git a/components/case/summaryTypes/pinswg_transportandworkactid.js b/components/case/summaryTypes/pinswg_transportandworkactid.js index 5ca48c8a..fb4091f6 100644 --- a/components/case/summaryTypes/pinswg_transportandworkactid.js +++ b/components/case/summaryTypes/pinswg_transportandworkactid.js @@ -73,7 +73,7 @@ const Pinswg_transportandworkactid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -98,7 +98,7 @@ const Pinswg_transportandworkactid = (props) => { detailsObj.pinswg_recommendation + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj.pinswg_recommendation || t( @@ -121,7 +121,7 @@ const Pinswg_transportandworkactid = (props) => { detailsObj.pinswg_webaddress + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj.pinswg_webaddress || t( diff --git a/components/case/summaryTypes/pinswg_wayleaveid.js b/components/case/summaryTypes/pinswg_wayleaveid.js index bc3eb60e..61e4f1f3 100644 --- a/components/case/summaryTypes/pinswg_wayleaveid.js +++ b/components/case/summaryTypes/pinswg_wayleaveid.js @@ -35,7 +35,7 @@ const Pinswg_wayleaveid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -59,7 +59,7 @@ const Pinswg_wayleaveid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -95,7 +95,7 @@ const Pinswg_wayleaveid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" @@ -116,7 +116,7 @@ const Pinswg_wayleaveid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" @@ -137,7 +137,7 @@ const Pinswg_wayleaveid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" @@ -161,7 +161,7 @@ const Pinswg_wayleaveid = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" @@ -235,7 +235,7 @@ const Pinswg_wayleaveid = (props) => { detailsObj.pinswg_relevantauthorityname + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : jsonpath({ path: @@ -243,7 +243,7 @@ const Pinswg_wayleaveid = (props) => { detailsObj.pinswg_relevantauthorityname + '")].value', json: transLookup, - sandbox: {}, + eval: true, }) || t( "case:summary-no-date-entered-label" diff --git a/components/elements/index.js b/components/elements/index.js index 5f3b594b..4f1007cb 100644 --- a/components/elements/index.js +++ b/components/elements/index.js @@ -1342,7 +1342,7 @@ const RenderPickList = ({ var dropdownObj = jsonpath({ path: "$..value[?(@.LogicalName=='" + datafieldname + "')]..Options", json: picklistData, - sandbox: {}, + eval: true, }); dropdownObj = dropdownObj[0]; @@ -1720,7 +1720,7 @@ export const FieldsTranslations = (label) => { let formObj = jsonpath({ path: "$['" + appealtypes + "']", json: fieldLookup, - sandbox: {}, + eval: true, }); let labelTrans = @@ -1728,7 +1728,7 @@ export const FieldsTranslations = (label) => { ? jsonpath({ path: '$..[?(@.value=="' + label + '")].value_cy', json: formObj, - sandbox: {}, + eval: true, })[0] : label; @@ -1747,7 +1747,7 @@ const PickListTranslations = (optionValue) => { ? jsonpath({ path: '$..[?(@.value=="' + optionValue + '")].value_cy', json: pickListLookup, - sandbox: {}, + eval: true, }) : optionValue; //console.log(optionTrans, optionValue); @@ -1947,7 +1947,7 @@ const RenderFileUpload = (field) => { const blobList = jsonpath({ path: "$..[?(@.documentType=='" + field.documentTypeCode + "')]", json: filelistObj, - sandbox: {}, + eval: true, }); //const blobList = filelistObj; diff --git a/components/myportal.js b/components/myportal.js index 9162deb8..1387da38 100644 --- a/components/myportal.js +++ b/components/myportal.js @@ -114,7 +114,7 @@ const MyPortal = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : props.accountDetails.accountDetails[ "pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue" diff --git a/components/myportal/advancedsearch.js b/components/myportal/advancedsearch.js index 58b95e7e..c699b893 100644 --- a/components/myportal/advancedsearch.js +++ b/components/myportal/advancedsearch.js @@ -153,7 +153,7 @@ let AdvancedSearch = (props) => { .name + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : optionsObj[key].name || t( @@ -258,7 +258,7 @@ let AdvancedSearch = (props) => { .value + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : optionsObj[key].value || t( diff --git a/components/myportal/awaitingsubmissionfromblob.js b/components/myportal/awaitingsubmissionfromblob.js index bca702d2..b327f855 100644 --- a/components/myportal/awaitingsubmissionfromblob.js +++ b/components/myportal/awaitingsubmissionfromblob.js @@ -211,7 +211,7 @@ const AwaitingSubmissionFromBlob = (props) => { ).value + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : getFormCollectionByID( showTopThreeArr[key] @@ -303,7 +303,7 @@ const AwaitingSubmissionFromBlob = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : showTopThreeArr[key][ "pinswg_lpaname" diff --git a/components/myportal/topthree.js b/components/myportal/topthree.js index 640e9c96..c039c483 100644 --- a/components/myportal/topthree.js +++ b/components/myportal/topthree.js @@ -334,7 +334,7 @@ const TopThree = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : showTopThreeArr[key][ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -406,7 +406,7 @@ const TopThree = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : showTopThreeArr[key][ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" diff --git a/components/myportal/topthree_reps.js b/components/myportal/topthree_reps.js index c60f87a1..ed48e185 100644 --- a/components/myportal/topthree_reps.js +++ b/components/myportal/topthree_reps.js @@ -275,7 +275,7 @@ const TopThree = (props) => { showTopThreeArr[key].representationType + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : showTopThreeArr[key].representationType || ""} @@ -293,7 +293,7 @@ const TopThree = (props) => { .representationCapacity + '" )].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : jsonpath({ path: @@ -302,7 +302,7 @@ const TopThree = (props) => { .representationCapacity + '")].value', json: transLookup, - sandbox: {}, + eval: true, }).length > 0 ? jsonpath({ path: @@ -311,7 +311,7 @@ const TopThree = (props) => { .representationCapacity + '")].value', json: transLookup, - sandbox: {}, + eval: true, }) : showTopThreeArr[key].representationCapacity} @@ -333,7 +333,7 @@ const TopThree = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : showTopThreeArr[key][ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue" diff --git a/components/myportal/viewall.js b/components/myportal/viewall.js index 2cb23571..e1536b58 100644 --- a/components/myportal/viewall.js +++ b/components/myportal/viewall.js @@ -128,7 +128,7 @@ const ViewAllResults = (props) => { : item.pinswg_title) + '")]', json: searchDetailsObj, - sandbox: {}, + eval: true, }); detailsObj = detailsObj[0]; @@ -484,7 +484,7 @@ const ViewAllResults = (props) => { resultsArr[key].pinswg_lpaname + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : resultsArr[key].pinswg_lpaname || "N/A" : ""} @@ -500,7 +500,7 @@ const ViewAllResults = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : resultsArr[key][ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -518,7 +518,7 @@ const ViewAllResults = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : currentView.viewKey == "myRepresentations" ? searchDetailsObj[key].value @@ -538,7 +538,7 @@ const ViewAllResults = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : resultsArr[key][ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue" @@ -556,7 +556,7 @@ const ViewAllResults = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, })}
@@ -574,7 +574,7 @@ const ViewAllResults = (props) => { ).value + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : getFormCollectionByID( item.pinswg_appealcasetype @@ -588,7 +588,7 @@ const ViewAllResults = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : item[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -607,7 +607,7 @@ const ViewAllResults = (props) => { ).value + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, })[0] : getFormCollectionByID( searchDetailsObj[key].appealType @@ -633,7 +633,7 @@ const ViewAllResults = (props) => { item.statuscode + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : jsonpath({ path: @@ -641,7 +641,7 @@ const ViewAllResults = (props) => { item.statuscode + '")].value', json: transLookup, - sandbox: {}, + eval: true, }) || "N/A" : currentView.viewKey == "myRepresentations" ? repRaisedDate(item.repfile_name) // ? router.locale == "cy" @@ -675,7 +675,7 @@ const ViewAllResults = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : item[ "statuscode@OData.Community.Display.V1.FormattedValue" diff --git a/components/newappeal/buildcheckrow.js b/components/newappeal/buildcheckrow.js index 374080bc..514dab18 100644 --- a/components/newappeal/buildcheckrow.js +++ b/components/newappeal/buildcheckrow.js @@ -66,7 +66,7 @@ let BuildCheckRow = (props) => { let formObj = jsonpath({ path: "$['" + appealtypes + "']", json: fieldLookup, - sandbox: {}, + eval: true, }); let labelTrans = @@ -74,7 +74,7 @@ let BuildCheckRow = (props) => { ? jsonpath({ path: '$..[?(@.value=="' + label + '")].value_cy', json: formObj, - sandbox: {}, + eval: true, }) : label; return labelTrans; @@ -107,7 +107,7 @@ let BuildCheckRow = (props) => { datafieldname[0].value + "')]", json: mandatoryFieldsData, - sandbox: {}, + eval: true, }); var documentTypeCode = xpath.select( diff --git a/components/newappeal/buildchecksection.js b/components/newappeal/buildchecksection.js index 519f5c1e..40a24ee2 100644 --- a/components/newappeal/buildchecksection.js +++ b/components/newappeal/buildchecksection.js @@ -130,7 +130,7 @@ let BuildCheckSection = (props) => { let formObj = jsonpath({ path: "$['" + appealtypes + "']", json: fieldLookup, - sandbox: {}, + eval: true, }); let labelTrans = @@ -138,7 +138,7 @@ let BuildCheckSection = (props) => { ? jsonpath({ path: '$..[?(@.value=="' + label + '")].value_cy', json: formObj, - sandbox: {}, + eval: true, }) : label; return labelTrans; diff --git a/components/newappeal/createCase.js b/components/newappeal/createCase.js index da9b9aee..73d9d36c 100644 --- a/components/newappeal/createCase.js +++ b/components/newappeal/createCase.js @@ -71,7 +71,7 @@ const RenderLPAList = ({ optionsObj[key].name + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : optionsObj[key].name} @@ -155,7 +155,7 @@ const RenderAppealTypeList = ({ optionsObj[key].value + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : optionsObj[key].value} diff --git a/components/pdftemplates/appealRow_pdf.js b/components/pdftemplates/appealRow_pdf.js index efb4e758..e1f73319 100644 --- a/components/pdftemplates/appealRow_pdf.js +++ b/components/pdftemplates/appealRow_pdf.js @@ -151,7 +151,7 @@ export const AppealRow_pdf = (props) => { let formObj = jsonpath({ path: "$['" + appealtypes + "']", json: fieldLookup, - sandbox: {}, + eval: true, }); let labelTrans = label; diff --git a/components/search/addresssearchresults.js b/components/search/addresssearchresults.js index 30918cba..c1f28c16 100644 --- a/components/search/addresssearchresults.js +++ b/components/search/addresssearchresults.js @@ -101,7 +101,7 @@ const SearchResults = (props) => { whichIncident + "')]", json: watchedCases, - sandbox: {}, + eval: true, }); return isWatched; @@ -252,7 +252,7 @@ const SearchResults = (props) => { '")]', json: searchDetailsObj, - sandbox: {}, + eval: true, }); detailsObj = detailsObj[0]; return ( @@ -468,7 +468,7 @@ const SearchResults = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : item[ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue" @@ -486,7 +486,7 @@ const SearchResults = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : item[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -509,7 +509,7 @@ const SearchResults = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : item["pinswg_appealType"] || "N/A"} @@ -531,7 +531,7 @@ const SearchResults = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : item[ "statuscode@OData.Community.Display.V1.FormattedValue" diff --git a/components/search/advancedsearch.js b/components/search/advancedsearch.js index 3381984d..13237263 100644 --- a/components/search/advancedsearch.js +++ b/components/search/advancedsearch.js @@ -133,7 +133,7 @@ const RenderCaseStatusList = ({ .statuscode + '")].value_cy', json: optionsObj, - sandbox: {}, + eval: true, }) : optionsObj[key].value || t( @@ -248,7 +248,7 @@ let AdvancedSearch = (props) => { .name + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : optionsObj[key].name || t( @@ -353,7 +353,7 @@ let AdvancedSearch = (props) => { .value + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : optionsObj[key].value || t( diff --git a/components/search/dnssearchresults.js b/components/search/dnssearchresults.js index 7feaedc2..135910ab 100644 --- a/components/search/dnssearchresults.js +++ b/components/search/dnssearchresults.js @@ -174,7 +174,7 @@ const DNSSearchResults = (props) => { whichIncident + "')]", json: watchedCases, - sandbox: {}, + eval: true, }); return isWatched; @@ -303,7 +303,7 @@ const DNSSearchResults = (props) => { item.title + '")]', json: searchDetailsObj, - sandbox: {}, + eval: true, }); detailsObj = detailsObj[0]; @@ -466,7 +466,7 @@ const DNSSearchResults = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : detailsObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -490,7 +490,7 @@ const DNSSearchResults = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : item[ "statuscode@OData.Community.Display.V1.FormattedValue" diff --git a/components/search/searchresults.js b/components/search/searchresults.js index 0909da30..ccef381b 100644 --- a/components/search/searchresults.js +++ b/components/search/searchresults.js @@ -108,7 +108,7 @@ const SearchResults = (props) => { "')]", json: watchedCases, - sandbox: {}, + eval: true, }); return isWatched; @@ -248,7 +248,7 @@ const SearchResults = (props) => { item.title + '")]', json: searchDetailsObj, - sandbox: {}, + eval: true, }); detailsObj = detailsObj[0] || {}; @@ -445,7 +445,7 @@ const SearchResults = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : item[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" @@ -468,7 +468,7 @@ const SearchResults = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : item[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" @@ -491,7 +491,7 @@ const SearchResults = (props) => { ] + '")].value_cy', json: transLookup, - sandbox: {}, + eval: true, }) : item[ "statuscode@OData.Community.Display.V1.FormattedValue" diff --git a/components/utils/index.js b/components/utils/index.js index fb846316..a8423d1e 100644 --- a/components/utils/index.js +++ b/components/utils/index.js @@ -20,7 +20,7 @@ export const getFormCollection = (formtype) => { const collectionName = jsonpath({ path: "$..[?(@.LogicalName=='" + formtype + "')]", json: data, - sandbox: {}, + eval: true, }); return collectionName[0]; }; @@ -29,7 +29,7 @@ export const getFormCollectionByID = (appealTypeID) => { const collectionName = jsonpath({ path: "$..[?(@.appealTypeID =='" + appealTypeID + "')]", json: data, - sandbox: {}, + eval: true, }); return collectionName[0]; }; @@ -38,7 +38,7 @@ export const getFormIDByLogicalName = (appealTypeLogicalName) => { const collectionName = jsonpath({ path: "$..[?(@.LogicalName =='" + appealTypeLogicalName + "')]", json: data, - sandbox: {}, + eval: true, }); return collectionName[0]; }; @@ -47,7 +47,7 @@ export const getPickListLabel = (data, picklistType, picklistID) => { const pickListData = jsonpath({ path: "$..[?(@.LogicalName=='" + picklistType + "')]", json: data, - sandbox: {}, + eval: true, }); const pickListLabel = jsonpath({ @@ -57,7 +57,7 @@ export const getPickListLabel = (data, picklistType, picklistID) => { "')].Label.LocalizedLabels..Label", json: pickListData, - sandbox: {}, + eval: true, }); return pickListLabel[0]; }; @@ -66,7 +66,7 @@ export const getRadioLabel = (data, radiotListName, radioListID) => { const radioListData = jsonpath({ path: "$..[?(@.LogicalName=='" + radiotListName + "')]", json: data, - sandbox: {}, + eval: true, }); const pickListLabel = jsonpath({ @@ -76,7 +76,7 @@ export const getRadioLabel = (data, radiotListName, radioListID) => { "')].Label.LocalizedLabels..Label", json: radioListData, - sandbox: {}, + eval: true, }); return pickListLabel[0]; }; @@ -340,7 +340,7 @@ export const getProgressObj = ( datafieldname[0].value + "')]", json: mandatoryFieldsData, - sandbox: {}, + eval: true, }); if (datafieldname[0].value.includes("pinswg_fileUpload")) { diff --git a/pages/api/endpoint/getbasicsearch_by_address_api copy.js b/pages/api/endpoint/getbasicsearch_by_address_api copy.js index 2fdbab26..dfcd2bab 100644 --- a/pages/api/endpoint/getbasicsearch_by_address_api copy.js +++ b/pages/api/endpoint/getbasicsearch_by_address_api copy.js @@ -472,7 +472,7 @@ export default async function ApiProxy(req, res) { searchResultsObj = jsonpath({ path: "$..[?(@ && @.pinswg_name)]", json: searchResultsObj, - sandbox: {}, + eval: true, }); const getIncidentResultsObj = await Promise.all( diff --git a/pages/api/endpoint/getbasicsearch_by_address_api.js b/pages/api/endpoint/getbasicsearch_by_address_api.js index 6489114f..1a20ed52 100644 --- a/pages/api/endpoint/getbasicsearch_by_address_api.js +++ b/pages/api/endpoint/getbasicsearch_by_address_api.js @@ -564,7 +564,7 @@ export default async function ApiProxy(req, res) { searchResultsObj = jsonpath({ path: "$..[?(@ && @.pinswg_name)]", json: searchResultsObj, - sandbox: {}, + eval: true, }); searchResultsObj = searchResultsObj.filter((arr) => arr.incidentid != null); diff --git a/pages/api/endpoint/getmylpacases_api.js b/pages/api/endpoint/getmylpacases_api.js index 92be0ce1..7967ef2f 100644 --- a/pages/api/endpoint/getmylpacases_api.js +++ b/pages/api/endpoint/getmylpacases_api.js @@ -51,7 +51,7 @@ export default async function ApiProxy(req, res) { const lpaGUID = jsonpath({ path: '$..[?(@.name=="' + lpaid + '")]', json: lpaList, - sandbox: {}, + eval: true, }); //console.log( diff --git a/pages/myportal/[appealtypes].js b/pages/myportal/[appealtypes].js index 74d6d1ee..0a705538 100644 --- a/pages/myportal/[appealtypes].js +++ b/pages/myportal/[appealtypes].js @@ -79,7 +79,7 @@ let Home = (props) => { let selectedObj = jsonpath({ path: "$..[?(@.attributevalue=='" + router.query.apt + "')]", json: optionsStr, - sandbox: {}, + eval: true, }); //let optionsTitleObj = []; diff --git a/pages/newappeal/[appealtypes].js b/pages/newappeal/[appealtypes].js index e4be195a..a9ebe6ea 100644 --- a/pages/newappeal/[appealtypes].js +++ b/pages/newappeal/[appealtypes].js @@ -71,7 +71,7 @@ let Home = (props) => { let selectedObj = jsonpath({ path: "$..[?(@.attributevalue=='" + router.query.apt + "')]", json: optionsStr, - sandbox: {}, + eval: true, }); //let optionsTitleObj = []; From d882e65071b4e87ac9332f96b12bed46ef41d7d9 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Wed, 16 Apr 2025 08:44:45 +0100 Subject: [PATCH 2/7] uodated queries to sort deep recursion --- components/case/documents.js | 14 +++++----- components/case/representation/index.js | 18 ++++++------ .../representation/representationDetails.js | 2 +- .../case/representation/representationLPA.js | 4 +-- .../representationLPADetails.js | 2 +- ...resentationLPAQuestionnaire_enforcement.js | 4 +-- .../representationLPAQuestionnaire_s78.js | 4 +-- components/case/representationList.js | 4 +-- components/case/summary.js | 18 ++++++------ .../case/summaryTypes/pinswg_advertsid.js | 14 +++++----- .../case/summaryTypes/pinswg_callinss77id.js | 12 ++++---- .../case/summaryTypes/pinswg_commonlandid.js | 16 +++++------ .../pinswg_communityinfrastructurelevyid.js | 12 ++++---- .../pinswg_compulsorypurchaseordersid.js | 14 +++++----- components/case/summaryTypes/pinswg_dnsid.js | 16 +++++------ .../summaryTypes/pinswg_electricityactid.js | 16 +++++------ ...pinswg_enforcementlistedbuildingconseid.js | 12 ++++---- .../pinswg_enforcementnoticeappeals174id.js | 12 ++++---- .../pinswg_environmentalpermittingid.js | 16 +++++------ .../pinswg_harbourrevisionorderid.js | 14 +++++----- ...pinswg_hedgeshedgerowstreepreservatioid.js | 18 ++++++------ .../pinswg_householderappealhasid.js | 10 +++---- ...pinswg_lawfuldevelopmentcertificatappid.js | 12 ++++---- components/case/summaryTypes/pinswg_ldpid.js | 12 ++++---- ...pinswg_listedbuildingandconservationrid.js | 12 ++++---- .../pinswg_maintenanceoflands217id.js | 12 ++++---- .../pinswg_miscellaneouscasewordid.js | 16 +++++------ .../summaryTypes/pinswg_nonvalidationid.js | 10 +++---- .../pinswg_planningappeals78id.js | 12 ++++---- .../pinswg_planningconditionss73s79id.js | 12 ++++---- .../pinswg_planningobligationappeals106id.js | 12 ++++---- components/case/summaryTypes/pinswg_rowid.js | 18 ++++++------ .../pinswg_transportandworkactid.js | 6 ++-- .../case/summaryTypes/pinswg_wayleaveid.js | 16 +++++------ components/elements/index.js | 9 +++--- components/myportal.js | 2 +- components/myportal/advancedsearch.js | 4 +-- .../myportal/awaitingsubmissionfromblob.js | 4 +-- components/myportal/topthree.js | 4 +-- components/myportal/topthree_reps.js | 10 +++---- components/myportal/viewall.js | 28 +++++++++---------- components/newappeal/buildcheckrow.js | 4 +-- components/newappeal/buildchecksection.js | 2 +- components/newappeal/buildrow.js | 2 +- components/newappeal/createCase.js | 4 +-- components/pdftemplates/appealRow_pdf.js | 2 +- components/search/addresssearchresults.js | 12 ++++---- components/search/advancedsearch.js | 6 ++-- components/search/dnssearchresults.js | 8 +++--- components/search/searchresults.js | 10 +++---- components/utils/index.js | 16 +++++------ pages/api/endpoint/getmylpacases_api.js | 4 +-- pages/myportal/[appealtypes].js | 2 +- pages/newappeal/[appealtypes].js | 2 +- 54 files changed, 270 insertions(+), 267 deletions(-) diff --git a/components/case/documents.js b/components/case/documents.js index daeb274d..e288f843 100644 --- a/components/case/documents.js +++ b/components/case/documents.js @@ -158,7 +158,7 @@ const DocumentDetails = (props) => {
{router.locale == "cy" ? jsonpath({path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj.pinswg_recommendation + '")].value_cy', transLookup, diff --git a/components/case/summaryTypes/pinswg_electricityactid.js b/components/case/summaryTypes/pinswg_electricityactid.js index 4dbabebb..b54fa13a 100644 --- a/components/case/summaryTypes/pinswg_electricityactid.js +++ b/components/case/summaryTypes/pinswg_electricityactid.js @@ -67,7 +67,7 @@ const Pinswg_electricityactid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -91,7 +91,7 @@ const Pinswg_electricityactid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -129,7 +129,7 @@ const Pinswg_electricityactid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -152,7 +152,7 @@ const Pinswg_electricityactid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + @@ -173,7 +173,7 @@ const Pinswg_electricityactid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -197,7 +197,7 @@ const Pinswg_electricityactid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + @@ -273,7 +273,7 @@ const Pinswg_electricityactid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj.pinswg_recommendation + '")].value_cy', json: transLookup, @@ -296,7 +296,7 @@ const Pinswg_electricityactid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj.pinswg_webaddress + '")].value_cy', json: transLookup, diff --git a/components/case/summaryTypes/pinswg_enforcementlistedbuildingconseid.js b/components/case/summaryTypes/pinswg_enforcementlistedbuildingconseid.js index 6b2672da..6f83fab1 100644 --- a/components/case/summaryTypes/pinswg_enforcementlistedbuildingconseid.js +++ b/components/case/summaryTypes/pinswg_enforcementlistedbuildingconseid.js @@ -29,7 +29,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -53,7 +53,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -89,7 +89,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -110,7 +110,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + @@ -131,7 +131,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -155,7 +155,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/case/summaryTypes/pinswg_enforcementnoticeappeals174id.js b/components/case/summaryTypes/pinswg_enforcementnoticeappeals174id.js index 61581c73..6c62ace5 100644 --- a/components/case/summaryTypes/pinswg_enforcementnoticeappeals174id.js +++ b/components/case/summaryTypes/pinswg_enforcementnoticeappeals174id.js @@ -29,7 +29,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -53,7 +53,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -89,7 +89,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -110,7 +110,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + @@ -131,7 +131,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -155,7 +155,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/case/summaryTypes/pinswg_environmentalpermittingid.js b/components/case/summaryTypes/pinswg_environmentalpermittingid.js index 96dd2472..807a633f 100644 --- a/components/case/summaryTypes/pinswg_environmentalpermittingid.js +++ b/components/case/summaryTypes/pinswg_environmentalpermittingid.js @@ -29,7 +29,7 @@ const Pinswg_environmentalpermittingid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -53,7 +53,7 @@ const Pinswg_environmentalpermittingid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -89,7 +89,7 @@ const Pinswg_environmentalpermittingid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -110,7 +110,7 @@ const Pinswg_environmentalpermittingid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + @@ -131,7 +131,7 @@ const Pinswg_environmentalpermittingid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -155,7 +155,7 @@ const Pinswg_environmentalpermittingid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + @@ -231,7 +231,7 @@ const Pinswg_environmentalpermittingid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.pinswg_lpa=="' + + '$..[?(@ && @.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value_cy', json: transLookup, @@ -239,7 +239,7 @@ const Pinswg_environmentalpermittingid = (props) => { }) : jsonpath({ path: - '$..[?(@.pinswg_lpa=="' + + '$..[?(@ && @.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value', json: transLookup, diff --git a/components/case/summaryTypes/pinswg_harbourrevisionorderid.js b/components/case/summaryTypes/pinswg_harbourrevisionorderid.js index d286782b..5368e19d 100644 --- a/components/case/summaryTypes/pinswg_harbourrevisionorderid.js +++ b/components/case/summaryTypes/pinswg_harbourrevisionorderid.js @@ -67,7 +67,7 @@ const Pinswg_harbourrevisionorderid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -91,7 +91,7 @@ const Pinswg_harbourrevisionorderid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -129,7 +129,7 @@ const Pinswg_harbourrevisionorderid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -150,7 +150,7 @@ const Pinswg_harbourrevisionorderid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -174,7 +174,7 @@ const Pinswg_harbourrevisionorderid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + @@ -250,7 +250,7 @@ const Pinswg_harbourrevisionorderid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj.pinswg_recommendation + '")].value_cy', json: transLookup, @@ -273,7 +273,7 @@ const Pinswg_harbourrevisionorderid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj.pinswg_webaddress + '")].value_cy', json: transLookup, diff --git a/components/case/summaryTypes/pinswg_hedgeshedgerowstreepreservatioid.js b/components/case/summaryTypes/pinswg_hedgeshedgerowstreepreservatioid.js index 48f35bf9..873bcf3e 100644 --- a/components/case/summaryTypes/pinswg_hedgeshedgerowstreepreservatioid.js +++ b/components/case/summaryTypes/pinswg_hedgeshedgerowstreepreservatioid.js @@ -29,7 +29,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -54,7 +54,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue" ] + @@ -76,7 +76,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -112,7 +112,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -133,7 +133,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + @@ -154,7 +154,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -178,7 +178,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + @@ -254,7 +254,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.pinswg_lpa=="' + + '$..[?(@ && @.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value_cy', json: transLookup, @@ -262,7 +262,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { }) : jsonpath({ path: - '$..[?(@.pinswg_lpa=="' + + '$..[?(@ && @.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value', json: transLookup, diff --git a/components/case/summaryTypes/pinswg_householderappealhasid.js b/components/case/summaryTypes/pinswg_householderappealhasid.js index e94f86db..87a29165 100644 --- a/components/case/summaryTypes/pinswg_householderappealhasid.js +++ b/components/case/summaryTypes/pinswg_householderappealhasid.js @@ -29,7 +29,7 @@ const Pinswg_householderappealhasid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -53,7 +53,7 @@ const Pinswg_householderappealhasid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -89,7 +89,7 @@ const Pinswg_householderappealhasid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -110,7 +110,7 @@ const Pinswg_householderappealhasid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -134,7 +134,7 @@ const Pinswg_householderappealhasid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/case/summaryTypes/pinswg_lawfuldevelopmentcertificatappid.js b/components/case/summaryTypes/pinswg_lawfuldevelopmentcertificatappid.js index 0ab88510..6574243c 100644 --- a/components/case/summaryTypes/pinswg_lawfuldevelopmentcertificatappid.js +++ b/components/case/summaryTypes/pinswg_lawfuldevelopmentcertificatappid.js @@ -29,7 +29,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -53,7 +53,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -89,7 +89,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -110,7 +110,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + @@ -131,7 +131,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -155,7 +155,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/case/summaryTypes/pinswg_ldpid.js b/components/case/summaryTypes/pinswg_ldpid.js index 693466ee..11c0210d 100644 --- a/components/case/summaryTypes/pinswg_ldpid.js +++ b/components/case/summaryTypes/pinswg_ldpid.js @@ -29,7 +29,7 @@ const Pinswg_ldpid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -53,7 +53,7 @@ const Pinswg_ldpid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -89,7 +89,7 @@ const Pinswg_ldpid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -110,7 +110,7 @@ const Pinswg_ldpid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + @@ -131,7 +131,7 @@ const Pinswg_ldpid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -155,7 +155,7 @@ const Pinswg_ldpid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/case/summaryTypes/pinswg_listedbuildingandconservationrid.js b/components/case/summaryTypes/pinswg_listedbuildingandconservationrid.js index f111dc26..a79642bd 100644 --- a/components/case/summaryTypes/pinswg_listedbuildingandconservationrid.js +++ b/components/case/summaryTypes/pinswg_listedbuildingandconservationrid.js @@ -29,7 +29,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -53,7 +53,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -89,7 +89,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -110,7 +110,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + @@ -131,7 +131,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -155,7 +155,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/case/summaryTypes/pinswg_maintenanceoflands217id.js b/components/case/summaryTypes/pinswg_maintenanceoflands217id.js index 3ed23e25..770cdc16 100644 --- a/components/case/summaryTypes/pinswg_maintenanceoflands217id.js +++ b/components/case/summaryTypes/pinswg_maintenanceoflands217id.js @@ -29,7 +29,7 @@ const Pinswg_maintenanceoflands217id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -53,7 +53,7 @@ const Pinswg_maintenanceoflands217id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -89,7 +89,7 @@ const Pinswg_maintenanceoflands217id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -110,7 +110,7 @@ const Pinswg_maintenanceoflands217id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + @@ -131,7 +131,7 @@ const Pinswg_maintenanceoflands217id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -155,7 +155,7 @@ const Pinswg_maintenanceoflands217id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/case/summaryTypes/pinswg_miscellaneouscasewordid.js b/components/case/summaryTypes/pinswg_miscellaneouscasewordid.js index b79d3303..0212cbcc 100644 --- a/components/case/summaryTypes/pinswg_miscellaneouscasewordid.js +++ b/components/case/summaryTypes/pinswg_miscellaneouscasewordid.js @@ -29,7 +29,7 @@ const Pinswg_miscellaneouscasewordid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -53,7 +53,7 @@ const Pinswg_miscellaneouscasewordid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -89,7 +89,7 @@ const Pinswg_miscellaneouscasewordid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -110,7 +110,7 @@ const Pinswg_miscellaneouscasewordid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + @@ -131,7 +131,7 @@ const Pinswg_miscellaneouscasewordid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -155,7 +155,7 @@ const Pinswg_miscellaneouscasewordid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + @@ -231,7 +231,7 @@ const Pinswg_miscellaneouscasewordid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.pinswg_lpa=="' + + '$..[?(@ && @.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value_cy', json: transLookup, @@ -239,7 +239,7 @@ const Pinswg_miscellaneouscasewordid = (props) => { }) : jsonpath({ path: - '$..[?(@.pinswg_lpa=="' + + '$..[?(@ && @.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value', json: transLookup, diff --git a/components/case/summaryTypes/pinswg_nonvalidationid.js b/components/case/summaryTypes/pinswg_nonvalidationid.js index 3d078776..2e0e62b0 100644 --- a/components/case/summaryTypes/pinswg_nonvalidationid.js +++ b/components/case/summaryTypes/pinswg_nonvalidationid.js @@ -29,7 +29,7 @@ const Pinswg_nonvalidationid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -53,7 +53,7 @@ const Pinswg_nonvalidationid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -88,7 +88,7 @@ const Pinswg_nonvalidationid = (props) => {
{router.locale == "cy" ? jsonpath({path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -109,7 +109,7 @@ const Pinswg_nonvalidationid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -133,7 +133,7 @@ const Pinswg_nonvalidationid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_decisionissued@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/case/summaryTypes/pinswg_planningappeals78id.js b/components/case/summaryTypes/pinswg_planningappeals78id.js index b70340f7..37666618 100644 --- a/components/case/summaryTypes/pinswg_planningappeals78id.js +++ b/components/case/summaryTypes/pinswg_planningappeals78id.js @@ -29,7 +29,7 @@ const Pinswg_planningappeals78id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -53,7 +53,7 @@ const Pinswg_planningappeals78id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -89,7 +89,7 @@ const Pinswg_planningappeals78id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -110,7 +110,7 @@ const Pinswg_planningappeals78id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + @@ -134,7 +134,7 @@ const Pinswg_planningappeals78id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -158,7 +158,7 @@ const Pinswg_planningappeals78id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_dicision@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/case/summaryTypes/pinswg_planningconditionss73s79id.js b/components/case/summaryTypes/pinswg_planningconditionss73s79id.js index b34be7cd..8cc278b9 100644 --- a/components/case/summaryTypes/pinswg_planningconditionss73s79id.js +++ b/components/case/summaryTypes/pinswg_planningconditionss73s79id.js @@ -29,7 +29,7 @@ const Pinswg_planningconditionss73s79id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -53,7 +53,7 @@ const Pinswg_planningconditionss73s79id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -89,7 +89,7 @@ const Pinswg_planningconditionss73s79id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -110,7 +110,7 @@ const Pinswg_planningconditionss73s79id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + @@ -131,7 +131,7 @@ const Pinswg_planningconditionss73s79id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -155,7 +155,7 @@ const Pinswg_planningconditionss73s79id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/case/summaryTypes/pinswg_planningobligationappeals106id.js b/components/case/summaryTypes/pinswg_planningobligationappeals106id.js index 389a719b..113ea09f 100644 --- a/components/case/summaryTypes/pinswg_planningobligationappeals106id.js +++ b/components/case/summaryTypes/pinswg_planningobligationappeals106id.js @@ -29,7 +29,7 @@ const Pinswg_planningobligationappeals106id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -53,7 +53,7 @@ const Pinswg_planningobligationappeals106id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -89,7 +89,7 @@ const Pinswg_planningobligationappeals106id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -110,7 +110,7 @@ const Pinswg_planningobligationappeals106id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + @@ -131,7 +131,7 @@ const Pinswg_planningobligationappeals106id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -155,7 +155,7 @@ const Pinswg_planningobligationappeals106id = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/case/summaryTypes/pinswg_rowid.js b/components/case/summaryTypes/pinswg_rowid.js index d47b0e3d..e26b34d1 100644 --- a/components/case/summaryTypes/pinswg_rowid.js +++ b/components/case/summaryTypes/pinswg_rowid.js @@ -29,7 +29,7 @@ const Pinswg_rowid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -54,7 +54,7 @@ const Pinswg_rowid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue" ] + @@ -76,7 +76,7 @@ const Pinswg_rowid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -112,7 +112,7 @@ const Pinswg_rowid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -133,7 +133,7 @@ const Pinswg_rowid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + @@ -154,7 +154,7 @@ const Pinswg_rowid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -178,7 +178,7 @@ const Pinswg_rowid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + @@ -254,7 +254,7 @@ const Pinswg_rowid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.pinswg_lpa=="' + + '$..[?(@ && @.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value_cy', json: transLookup, @@ -262,7 +262,7 @@ const Pinswg_rowid = (props) => { }) : jsonpath({ path: - '$..[?(@.pinswg_lpa=="' + + '$..[?(@ && @.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value', json: transLookup, diff --git a/components/case/summaryTypes/pinswg_transportandworkactid.js b/components/case/summaryTypes/pinswg_transportandworkactid.js index fb4091f6..161eac01 100644 --- a/components/case/summaryTypes/pinswg_transportandworkactid.js +++ b/components/case/summaryTypes/pinswg_transportandworkactid.js @@ -67,7 +67,7 @@ const Pinswg_transportandworkactid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -94,7 +94,7 @@ const Pinswg_transportandworkactid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj.pinswg_recommendation + '")].value_cy', json: transLookup, @@ -117,7 +117,7 @@ const Pinswg_transportandworkactid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj.pinswg_webaddress + '")].value_cy', json: transLookup, diff --git a/components/case/summaryTypes/pinswg_wayleaveid.js b/components/case/summaryTypes/pinswg_wayleaveid.js index 61e4f1f3..c75e9dac 100644 --- a/components/case/summaryTypes/pinswg_wayleaveid.js +++ b/components/case/summaryTypes/pinswg_wayleaveid.js @@ -29,7 +29,7 @@ const Pinswg_wayleaveid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -53,7 +53,7 @@ const Pinswg_wayleaveid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -89,7 +89,7 @@ const Pinswg_wayleaveid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + @@ -110,7 +110,7 @@ const Pinswg_wayleaveid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + @@ -131,7 +131,7 @@ const Pinswg_wayleaveid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + @@ -155,7 +155,7 @@ const Pinswg_wayleaveid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + @@ -231,7 +231,7 @@ const Pinswg_wayleaveid = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.pinswg_lpa=="' + + '$..[?(@ && @.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value_cy', json: transLookup, @@ -239,7 +239,7 @@ const Pinswg_wayleaveid = (props) => { }) : jsonpath({ path: - '$..[?(@.pinswg_lpa=="' + + '$..[?(@ && @.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value', json: transLookup, diff --git a/components/elements/index.js b/components/elements/index.js index 4f1007cb..8a4d84bf 100644 --- a/components/elements/index.js +++ b/components/elements/index.js @@ -1340,7 +1340,8 @@ const RenderPickList = ({ let { t } = useTranslation(); var dropdownObj = jsonpath({ - path: "$..value[?(@.LogicalName=='" + datafieldname + "')]..Options", + path: + "$..value[?(@ && @.LogicalName=='" + datafieldname + "')]..Options", json: picklistData, eval: true, }); @@ -1726,7 +1727,7 @@ export const FieldsTranslations = (label) => { let labelTrans = router.locale == "cy" ? jsonpath({ - path: '$..[?(@.value=="' + label + '")].value_cy', + path: '$..[?(@ && @.value=="' + label + '")].value_cy', json: formObj, eval: true, })[0] @@ -1745,7 +1746,7 @@ const PickListTranslations = (optionValue) => { let optionTrans = router.locale == "cy" ? jsonpath({ - path: '$..[?(@.value=="' + optionValue + '")].value_cy', + path: '$..[?(@ && @.value=="' + optionValue + '")].value_cy', json: pickListLookup, eval: true, }) @@ -1945,7 +1946,7 @@ const RenderFileUpload = (field) => { const filelistObj = field.fileList || {}; const blobList = jsonpath({ - path: "$..[?(@.documentType=='" + field.documentTypeCode + "')]", + path: "$..[?(@ && @.documentType=='" + field.documentTypeCode + "')]", json: filelistObj, eval: true, }); diff --git a/components/myportal.js b/components/myportal.js index 1387da38..495bb19d 100644 --- a/components/myportal.js +++ b/components/myportal.js @@ -108,7 +108,7 @@ const MyPortal = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + props.accountDetails.accountDetails[ "pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/myportal/advancedsearch.js b/components/myportal/advancedsearch.js index c699b893..87d56566 100644 --- a/components/myportal/advancedsearch.js +++ b/components/myportal/advancedsearch.js @@ -148,7 +148,7 @@ let AdvancedSearch = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + optionsObj[key] .name + '")].value_cy', @@ -253,7 +253,7 @@ let AdvancedSearch = (props) => { : router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + optionsObj[key] .value + '")].value_cy', diff --git a/components/myportal/awaitingsubmissionfromblob.js b/components/myportal/awaitingsubmissionfromblob.js index b327f855..26baf861 100644 --- a/components/myportal/awaitingsubmissionfromblob.js +++ b/components/myportal/awaitingsubmissionfromblob.js @@ -204,7 +204,7 @@ const AwaitingSubmissionFromBlob = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + getFormCollectionByID( showTopThreeArr[key] .pinswg_appealcasetype @@ -297,7 +297,7 @@ const AwaitingSubmissionFromBlob = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + showTopThreeArr[key][ "pinswg_lpaname" ] + diff --git a/components/myportal/topthree.js b/components/myportal/topthree.js index c039c483..9d61d7fc 100644 --- a/components/myportal/topthree.js +++ b/components/myportal/topthree.js @@ -328,7 +328,7 @@ const TopThree = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + showTopThreeArr[key][ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -400,7 +400,7 @@ const TopThree = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + showTopThreeArr[key][ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/myportal/topthree_reps.js b/components/myportal/topthree_reps.js index ed48e185..1b9ab569 100644 --- a/components/myportal/topthree_reps.js +++ b/components/myportal/topthree_reps.js @@ -271,7 +271,7 @@ const TopThree = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + showTopThreeArr[key].representationType + '")].value_cy', json: transLookup, @@ -285,7 +285,7 @@ const TopThree = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + showTopThreeArr[key] .representationCapacity + '" ||@.value_cy=="' + @@ -297,7 +297,7 @@ const TopThree = (props) => { }) : jsonpath({ path: - '$..[?(@.value_cy=="' + + '$..[?(@ && @.value_cy=="' + showTopThreeArr[key] .representationCapacity + '")].value', @@ -306,7 +306,7 @@ const TopThree = (props) => { }).length > 0 ? jsonpath({ path: - '$..[?(@.value_cy=="' + + '$..[?(@ && @.value_cy=="' + showTopThreeArr[key] .representationCapacity + '")].value', @@ -327,7 +327,7 @@ const TopThree = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + showTopThreeArr[key][ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/myportal/viewall.js b/components/myportal/viewall.js index e1536b58..249992fb 100644 --- a/components/myportal/viewall.js +++ b/components/myportal/viewall.js @@ -118,7 +118,7 @@ const ViewAllResults = (props) => { (currentView.viewKey == "myRepresentations" ? "" : "..value") + - '[?(@.pinswg_name=="' + + '[?(@ && @.pinswg_name=="' + (currentView.viewKey == "awaitingSubmissionDetails" ? item.title : currentView.viewKey == "watchedCases" @@ -480,7 +480,7 @@ const ViewAllResults = (props) => { ? router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + resultsArr[key].pinswg_lpaname + '")].value_cy', json: transLookup, @@ -494,7 +494,7 @@ const ViewAllResults = (props) => { ? router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + resultsArr[key][ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -512,7 +512,7 @@ const ViewAllResults = (props) => { ? router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + searchDetailsObj[key].value[0][ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValuee" ] + @@ -532,7 +532,7 @@ const ViewAllResults = (props) => { ? router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + resultsArr[key][ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValuee" ] + @@ -550,7 +550,7 @@ const ViewAllResults = (props) => { router.locale == "cy" && jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + searchDetailsObj[key][ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue" ] + @@ -568,7 +568,7 @@ const ViewAllResults = (props) => { ? router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + getFormCollectionByID( item.pinswg_appealcasetype ).value + @@ -582,7 +582,7 @@ const ViewAllResults = (props) => { : router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + item[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -601,7 +601,7 @@ const ViewAllResults = (props) => { (router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + getFormCollectionByID( searchDetailsObj[key].appealType ).value + @@ -629,7 +629,7 @@ const ViewAllResults = (props) => { ? router.locale == "cy" ? jsonpath({ path: - '$..[?(@.statuscode=="' + + '$..[?(@ && @.statuscode=="' + item.statuscode + '")].value_cy', json: transLookup, @@ -637,7 +637,7 @@ const ViewAllResults = (props) => { }) : jsonpath({ path: - '$..[?(@.statuscode=="' + + '$..[?(@ && @.statuscode=="' + item.statuscode + '")].value', json: transLookup, @@ -647,7 +647,7 @@ const ViewAllResults = (props) => { ? repRaisedDate(item.repfile_name) // ? router.locale == "cy" : // ? jsonpath({path: // - // '$..[?(@.value=="' + + // '$..[?(@ && @.value=="' + // searchDetailsObj[key].value[0][ // "statuscode@OData.Community.Display.V1.FormattedValue" // ] + @@ -659,7 +659,7 @@ const ViewAllResults = (props) => { // : router.locale == "cy" // ? jsonpath({path: // - // '$..[?(@.value=="' + + // '$..[?(@ && @.value=="' + // item[ // "statuscode@OData.Community.Display.V1.FormattedValue" // ] + @@ -669,7 +669,7 @@ const ViewAllResults = (props) => { router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + item[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/newappeal/buildcheckrow.js b/components/newappeal/buildcheckrow.js index 514dab18..3934ed05 100644 --- a/components/newappeal/buildcheckrow.js +++ b/components/newappeal/buildcheckrow.js @@ -72,7 +72,7 @@ let BuildCheckRow = (props) => { let labelTrans = router.locale == "cy" ? jsonpath({ - path: '$..[?(@.value=="' + label + '")].value_cy', + path: '$..[?(@ && @.value=="' + label + '")].value_cy', json: formObj, eval: true, }) @@ -103,7 +103,7 @@ let BuildCheckRow = (props) => { var datafieldname = xpath.select("//@datafieldname", doc); const isRequiredField = jsonpath({ path: - "$..value[?(@.LogicalName=='" + + "$..value[?(@ && @.LogicalName=='" + datafieldname[0].value + "')]", json: mandatoryFieldsData, diff --git a/components/newappeal/buildchecksection.js b/components/newappeal/buildchecksection.js index 40a24ee2..58030988 100644 --- a/components/newappeal/buildchecksection.js +++ b/components/newappeal/buildchecksection.js @@ -136,7 +136,7 @@ let BuildCheckSection = (props) => { let labelTrans = router.locale == "cy" ? jsonpath({ - path: '$..[?(@.value=="' + label + '")].value_cy', + path: '$..[?(@ && @.value=="' + label + '")].value_cy', json: formObj, eval: true, }) diff --git a/components/newappeal/buildrow.js b/components/newappeal/buildrow.js index 8150df40..bb48a1d5 100644 --- a/components/newappeal/buildrow.js +++ b/components/newappeal/buildrow.js @@ -111,7 +111,7 @@ export default function BuildRow(props) { dateEnd = !_.isEmpty(dateEnd) && dateEnd[0].value; //const isRequiredField = jsonpath({path: - // "$..value[?(@.LogicalName=='" + + // "$..value[?(@ && @.LogicalName=='" + // datafieldname[0].value + // "')]", // mandatoryFieldsData diff --git a/components/newappeal/createCase.js b/components/newappeal/createCase.js index 73d9d36c..b7b29e07 100644 --- a/components/newappeal/createCase.js +++ b/components/newappeal/createCase.js @@ -67,7 +67,7 @@ const RenderLPAList = ({ {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + optionsObj[key].name + '")].value_cy', json: transLookup, @@ -151,7 +151,7 @@ const RenderAppealTypeList = ({ : router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + optionsObj[key].value + '")].value_cy', json: transLookup, diff --git a/components/pdftemplates/appealRow_pdf.js b/components/pdftemplates/appealRow_pdf.js index e1f73319..06609d61 100644 --- a/components/pdftemplates/appealRow_pdf.js +++ b/components/pdftemplates/appealRow_pdf.js @@ -395,7 +395,7 @@ export const AppealRow_pdf = (props) => { break; case "{16D63FD6-119B-4353-BDCA-18358721C3FE}": // const blobList = jsonpath({path: - // "$..[?(@.documentType=='" + + // "$..[?(@ && @.documentType=='" + // documentTypeCode[0].value + // "')]", // props.filesList diff --git a/components/search/addresssearchresults.js b/components/search/addresssearchresults.js index c1f28c16..51fb4479 100644 --- a/components/search/addresssearchresults.js +++ b/components/search/addresssearchresults.js @@ -97,7 +97,7 @@ const SearchResults = (props) => { const isWatchedCase = (whichIncident) => { let isWatched = jsonpath({ path: - "$..value[?(@._pinswg_watchedcase_value=='" + + "$..value[?(@ && @._pinswg_watchedcase_value=='" + whichIncident + "')]", json: watchedCases, @@ -247,7 +247,7 @@ const SearchResults = (props) => { resultsArrPaged.map((item, key) => { let detailsObj = jsonpath({ path: - '$..value[?(@.pinswg_name=="' + + '$..value[?(@ && @.pinswg_name=="' + item.pinswg_name + '")]', @@ -462,7 +462,7 @@ const SearchResults = (props) => { ? router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + item[ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue" ] + @@ -480,7 +480,7 @@ const SearchResults = (props) => { ? router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + item[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -503,7 +503,7 @@ const SearchResults = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + item[ "pinswg_appealType" ] + @@ -525,7 +525,7 @@ const SearchResults = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + item[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/search/advancedsearch.js b/components/search/advancedsearch.js index 13237263..d5bf3cc4 100644 --- a/components/search/advancedsearch.js +++ b/components/search/advancedsearch.js @@ -128,7 +128,7 @@ const RenderCaseStatusList = ({ : router.locale == "cy" ? jsonpath({ path: - '$..[?(@.statuscode=="' + + '$..[?(@ && @.statuscode=="' + optionsObj[key] .statuscode + '")].value_cy', @@ -243,7 +243,7 @@ let AdvancedSearch = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + optionsObj[key] .name + '")].value_cy', @@ -348,7 +348,7 @@ let AdvancedSearch = (props) => { : router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + optionsObj[key] .value + '")].value_cy', diff --git a/components/search/dnssearchresults.js b/components/search/dnssearchresults.js index 135910ab..787f5c91 100644 --- a/components/search/dnssearchresults.js +++ b/components/search/dnssearchresults.js @@ -170,7 +170,7 @@ const DNSSearchResults = (props) => { const isWatchedCase = (whichIncident) => { let isWatched = jsonpath({ path: - "$..value[?(@._pinswg_watchedcase_value=='" + + "$..value[?(@ && @._pinswg_watchedcase_value=='" + whichIncident + "')]", json: watchedCases, @@ -299,7 +299,7 @@ const DNSSearchResults = (props) => { resultsArr.map((item, key) => { let detailsObj = jsonpath({ path: - '$..value[?(@.pinswg_name=="' + + '$..value[?(@ && @.pinswg_name=="' + item.title + '")]', json: searchDetailsObj, @@ -460,7 +460,7 @@ const DNSSearchResults = (props) => { ? router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + detailsObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -484,7 +484,7 @@ const DNSSearchResults = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + item[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/search/searchresults.js b/components/search/searchresults.js index ccef381b..51a0d645 100644 --- a/components/search/searchresults.js +++ b/components/search/searchresults.js @@ -103,7 +103,7 @@ const SearchResults = (props) => { const isWatchedCase = (whichIncident) => { let isWatched = jsonpath({ path: - "$..value[?(@._pinswg_watchedcase_value=='" + + "$..value[?(@ && @._pinswg_watchedcase_value=='" + whichIncident + "')]", @@ -244,7 +244,7 @@ const SearchResults = (props) => { resultsArr.map((item, key) => { let detailsObj = jsonpath({ path: - '$..value[?(@.pinswg_name=="' + + '$..value[?(@ && @.pinswg_name=="' + item.title + '")]', json: searchDetailsObj, @@ -439,7 +439,7 @@ const SearchResults = (props) => { ? router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + item[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + @@ -462,7 +462,7 @@ const SearchResults = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + item[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + @@ -485,7 +485,7 @@ const SearchResults = (props) => { {router.locale == "cy" ? jsonpath({ path: - '$..[?(@.value=="' + + '$..[?(@ && @.value=="' + item[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + diff --git a/components/utils/index.js b/components/utils/index.js index a8423d1e..041b12c4 100644 --- a/components/utils/index.js +++ b/components/utils/index.js @@ -18,7 +18,7 @@ import xpath from "xpath"; */ export const getFormCollection = (formtype) => { const collectionName = jsonpath({ - path: "$..[?(@.LogicalName=='" + formtype + "')]", + path: "$..[?(@ && @.LogicalName=='" + formtype + "')]", json: data, eval: true, }); @@ -27,7 +27,7 @@ export const getFormCollection = (formtype) => { export const getFormCollectionByID = (appealTypeID) => { const collectionName = jsonpath({ - path: "$..[?(@.appealTypeID =='" + appealTypeID + "')]", + path: "$..[?(@ && @.appealTypeID =='" + appealTypeID + "')]", json: data, eval: true, }); @@ -36,7 +36,7 @@ export const getFormCollectionByID = (appealTypeID) => { export const getFormIDByLogicalName = (appealTypeLogicalName) => { const collectionName = jsonpath({ - path: "$..[?(@.LogicalName =='" + appealTypeLogicalName + "')]", + path: "$..[?(@ && @.LogicalName =='" + appealTypeLogicalName + "')]", json: data, eval: true, }); @@ -45,14 +45,14 @@ export const getFormIDByLogicalName = (appealTypeLogicalName) => { export const getPickListLabel = (data, picklistType, picklistID) => { const pickListData = jsonpath({ - path: "$..[?(@.LogicalName=='" + picklistType + "')]", + path: "$..[?(@ && @.LogicalName=='" + picklistType + "')]", json: data, eval: true, }); const pickListLabel = jsonpath({ path: - "$..[?(@.Value=='" + + "$..[?(@ && @.Value=='" + picklistID + "')].Label.LocalizedLabels..Label", @@ -64,14 +64,14 @@ export const getPickListLabel = (data, picklistType, picklistID) => { export const getRadioLabel = (data, radiotListName, radioListID) => { const radioListData = jsonpath({ - path: "$..[?(@.LogicalName=='" + radiotListName + "')]", + path: "$..[?(@ && @.LogicalName=='" + radiotListName + "')]", json: data, eval: true, }); const pickListLabel = jsonpath({ path: - "$..[?(@.Value=='" + + "$..[?(@ && @.Value=='" + radioListID + "')].Label.LocalizedLabels..Label", @@ -336,7 +336,7 @@ export const getProgressObj = ( const isRequiredField = jsonpath({ path: - "$..value[?(@.LogicalName=='" + + "$..value[?(@ && @.LogicalName=='" + datafieldname[0].value + "')]", json: mandatoryFieldsData, diff --git a/pages/api/endpoint/getmylpacases_api.js b/pages/api/endpoint/getmylpacases_api.js index 7967ef2f..f1bb809c 100644 --- a/pages/api/endpoint/getmylpacases_api.js +++ b/pages/api/endpoint/getmylpacases_api.js @@ -49,13 +49,13 @@ export default async function ApiProxy(req, res) { const lpaList = await getLPA(); const lpaGUID = jsonpath({ - path: '$..[?(@.name=="' + lpaid + '")]', + path: '$..[?(@ && @.name=="' + lpaid + '")]', json: lpaList, eval: true, }); //console.log( - // '$..[?(@.name="' + lpaid + '")]', + // '$..[?(@ && @.name="' + lpaid + '")]', // lpaList, // lpaid, // "LPAGUID=", diff --git a/pages/myportal/[appealtypes].js b/pages/myportal/[appealtypes].js index 0a705538..950c7e41 100644 --- a/pages/myportal/[appealtypes].js +++ b/pages/myportal/[appealtypes].js @@ -77,7 +77,7 @@ let Home = (props) => { let optionsStr = props.appealType.appealTypeOptions.value || {}; let selectedObj = jsonpath({ - path: "$..[?(@.attributevalue=='" + router.query.apt + "')]", + path: "$..[?(@ && @.attributevalue=='" + router.query.apt + "')]", json: optionsStr, eval: true, }); diff --git a/pages/newappeal/[appealtypes].js b/pages/newappeal/[appealtypes].js index a9ebe6ea..0878d677 100644 --- a/pages/newappeal/[appealtypes].js +++ b/pages/newappeal/[appealtypes].js @@ -69,7 +69,7 @@ let Home = (props) => { let optionsStr = props.appealType.appealTypeOptions.value; let selectedObj = jsonpath({ - path: "$..[?(@.attributevalue=='" + router.query.apt + "')]", + path: "$..[?(@ && @.attributevalue=='" + router.query.apt + "')]", json: optionsStr, eval: true, }); From 75467ca55a01cc9214cecff3fef0b636d20a04e9 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Wed, 16 Apr 2025 14:44:04 +0100 Subject: [PATCH 3/7] remove eval funciton in form for CSP fix --- components/elements/index.js | 144 ++++++++++++++++++++++--- components/elements/validationUtils.js | 71 ++++++++++++ 2 files changed, 201 insertions(+), 14 deletions(-) create mode 100644 components/elements/validationUtils.js diff --git a/components/elements/index.js b/components/elements/index.js index 8a4d84bf..a11ea73b 100644 --- a/components/elements/index.js +++ b/components/elements/index.js @@ -37,6 +37,7 @@ const ReactQuill = dynamic(() => import("react-quill-new"), { ssr: false }); import { useStore as store, useSelector } from "react-redux"; import { useDispatch } from "react-redux"; +import { validateField } from "./validationUtils"; // Import the validation function const RenderTextfield = ({ id, @@ -223,7 +224,9 @@ export function Textfield(props) { // console.log(parentField, formProps, form); //console.log("validation props:", validation); - + const requiredMessage = t("account:is-required-label"); + const emojiNotAllowedMessage = t("newappeal:emojis-not-allowed-label"); + const invalidPostcodeMessage = t("newappeal:invalid-postcode-label"); return (
{parentField != false ? ( @@ -234,7 +237,15 @@ export function Textfield(props) { component={RenderTextfield} type="text" className="govuk-input govuk-input--width-20" - validate={eval(validation)} + validate={(value) => + validateField( + value, + validation, + requiredMessage, + emojiNotAllowedMessage, + invalidPostcodeMessage + ) + } // Use the external validate function label={props.label} maxFieldLength={props.maxFieldLength} /> @@ -246,7 +257,15 @@ export function Textfield(props) { component={RenderTextfield} type="text" className="govuk-input govuk-input--width-20" - validate={eval(validation)} + validate={(value) => + validateField( + value, + validation, + requiredMessage, + emojiNotAllowedMessage, + invalidPostcodeMessage + ) + } // Use the external validate function label={props.label} errorMsg={t("newappeal:is-required-label")} maxFieldLength={props.maxFieldLength} @@ -356,6 +375,9 @@ export function MultiLinefield(props) { //console.log(showIfHasParentShowValue, formProps[form].values[parentField]); let { t } = useTranslation(); + const requiredMessage = t("newappeal:is-required-label"); + const emojiNotAllowedMessage = t("newappeal:emojis-not-allowed-label"); + const invalidPostcodeMessage = t("newappeal:invalid-postcode-label"); return ( <> {parentField != false ? ( @@ -383,7 +405,15 @@ export function MultiLinefield(props) { rows="5" className="govuk-textarea govuk-input--width-30" aria-describedby={props.name + "-hint"} - validate={eval(validation)} + validate={(value) => + validateField( + value, + validation, + requiredMessage, + emojiNotAllowedMessage, + invalidPostcodeMessage + ) + } // Use the external validate function maxFieldLength={props.maxFieldLength} />
@@ -412,7 +442,15 @@ export function MultiLinefield(props) { rows="5" className="govuk-textarea govuk-input--width-30" aria-describedby={props.name + "-hint"} - validate={eval(validation)} + validate={(value) => + validateField( + value, + validation, + requiredMessage, + emojiNotAllowedMessage, + invalidPostcodeMessage + ) + } // Use the external validate function maxFieldLength={props.maxFieldLength} /> @@ -517,6 +555,9 @@ export function RichMultiLinefield(props) { //console.log(showIfHasParentShowValue, formProps[form].values[parentField]); let { t } = useTranslation(); + const requiredMessage = t("newappeal:is-required-label"); + const emojiNotAllowedMessage = t("newappeal:emojis-not-allowed-label"); + const invalidPostcodeMessage = t("newappeal:invalid-postcode-label"); return ( <> {parentField != false ? ( @@ -543,7 +584,15 @@ export function RichMultiLinefield(props) { rows="5" className="govuk-textarea govuk-input--width-30" aria-describedby={props.name + "-hint"} - validate={eval(validation)} + validate={(value) => + validateField( + value, + validation, + requiredMessage, + emojiNotAllowedMessage, + invalidPostcodeMessage + ) + } // Use the external validate function maxFieldLength={props.maxFieldLength} /> @@ -572,7 +621,15 @@ export function RichMultiLinefield(props) { rows="5" className="govuk-textarea govuk-input--width-30" aria-describedby={props.name + "-hint"} - validate={eval(validation)} + validate={(value) => + validateField( + value, + validation, + requiredMessage, + emojiNotAllowedMessage, + invalidPostcodeMessage + ) + } // Use the external validate function maxFieldLength={props.maxFieldLength} /> @@ -738,6 +795,9 @@ export function DateFieldPicker(props) { _.has(formProps[form].values, parentField) && formProps[form].values[parentField]) == parentFieldShowOnValue; + const requiredMessage = t("newappeal:is-required-label"); + const emojiNotAllowedMessage = t("newappeal:emojis-not-allowed-label"); + const invalidPostcodeMessage = t("newappeal:invalid-postcode-label"); return (
{parentField != false ? ( @@ -747,7 +807,15 @@ export function DateFieldPicker(props) { id={name} label={label} component={RenderDatePicker} - validate={eval(validation)} + validate={(value) => + validateField( + value, + validation, + requiredMessage, + emojiNotAllowedMessage, + invalidPostcodeMessage + ) + } // Use the external validate function errorMsg={t("newappeal:select-a-date-label")} dateStart={dateStart} dateEnd={dateEnd} @@ -760,7 +828,15 @@ export function DateFieldPicker(props) { id={name} label={label} component={RenderDatePicker} - validate={eval(validation)} + validate={(value) => + validateField( + value, + validation, + requiredMessage, + emojiNotAllowedMessage, + invalidPostcodeMessage + ) + } // Use the external validate function errorMsg={t("newappeal:select-a-date-label")} dateStart={dateStart} dateEnd={dateEnd} @@ -1187,6 +1263,9 @@ export function Radiofield(props) { (showIfHasParentShowValue == parentField) != false && showIfHasParentShowValue; + const requiredMessage = t("newappeal:is-required-label"); + const emojiNotAllowedMessage = t("newappeal:emojis-not-allowed-label"); + const invalidPostcodeMessage = t("newappeal:invalid-postcode-label"); return ( <> {parentField != false ? ( @@ -1202,7 +1281,15 @@ export function Radiofield(props) { component={RenderRadio} inline={props.inline} hint={props.hint} - validate={eval(validation)} + validate={(value) => + validateField( + value, + validation, + requiredMessage, + emojiNotAllowedMessage, + invalidPostcodeMessage + ) + } // Use the external validate function requiredDocumentLabel={props.requiredDocumentLabel} requiredDocumentValue={props.requiredDocumentValue} setDocumentsList={props.setDocumentsList} @@ -1221,7 +1308,15 @@ export function Radiofield(props) { component={RenderRadio} inline={props.inline} hint={props.hint} - validate={eval(validation)} + validate={(value) => + validateField( + value, + validation, + requiredMessage, + emojiNotAllowedMessage, + invalidPostcodeMessage + ) + } // Use the external validate function requiredDocumentLabel={props.requiredDocumentLabel} requiredDocumentValue={props.requiredDocumentValue} setDocumentsList={props.setDocumentsList} @@ -1458,7 +1553,9 @@ export function NumericField(props) { showIfHasParentShowValue; //console.log("parentField:", parentField, showIfHasParentShowValue); - + const requiredMessage = t("newappeal:is-required-label"); + const emojiNotAllowedMessage = t("newappeal:emojis-not-allowed-label"); + const invalidPostcodeMessage = t("newappeal:invalid-postcode-label"); return ( <> {parentField != false ? ( @@ -1474,7 +1571,15 @@ export function NumericField(props) { pattern="[0-9]*" inputMode="numeric" parse={Number} - validate={eval(validation)} + validate={(value) => + validateField( + value, + validation, + requiredMessage, + emojiNotAllowedMessage, + invalidPostcodeMessage + ) + } // Use the external validate function component={RenderTextfield} label={label} maxFieldLength={props.maxFieldLength} @@ -1586,6 +1691,9 @@ export function DecimalField(props) { return undefined; }; + const requiredMessage = t("newappeal:is-required-label"); + const emojiNotAllowedMessage = t("newappeal:emojis-not-allowed-label"); + const invalidPostcodeMessage = t("newappeal:invalid-postcode-label"); return ( <> {parentField != false ? ( @@ -1602,7 +1710,15 @@ export function DecimalField(props) { pattern="[0-9]*" inputMode="numeric" parse={Number} - validate={eval(validation)} + validate={(value) => + validateField( + value, + validation, + requiredMessage, + emojiNotAllowedMessage, + invalidPostcodeMessage + ) + } // Use the external validate function component={RenderTextfield} label={props.label} maxFieldLength={props.maxFieldLength} diff --git a/components/elements/validationUtils.js b/components/elements/validationUtils.js new file mode 100644 index 00000000..ea0d60b9 --- /dev/null +++ b/components/elements/validationUtils.js @@ -0,0 +1,71 @@ +// validationUtils.js + +// Validation functions +const required = (value, requiredMessage, emojiNotAllowedMessage) => { + let errors; + if (!value) { + errors = requiredMessage; + } else { + const emojiRegex = + /[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F700}-\u{1F77F}\u{1F780}-\u{1F7FF}\u{1F800}-\u{1F8FF}\u{1F900}-\u{1F9FF}\u{1FA00}-\u{1FA6F}\u{1FA70}-\u{1FAFF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{2300}-\u{23FF}\u{2B50}\u{1F004}-\u{1F0CF}\u{1F0A0}-\u{1F0A5}\u{1F170}-\u{1F251}]/gu; + + if (emojiRegex.test(value)) { + errors = emojiNotAllowedMessage; + } + } + return errors; +}; + +const postcode = (value, invalidPostcodeMessage) => + value && + !/^([A-Z][A-HJ-Y]?[0-9][A-Z0-9]? ?[0-9][A-Z]{2}|GIR ?0A{2})$/i.test(value) + ? "Invalid postcode" + : undefined; + +// Function to parse the validation string +export const parseValidationString = (validationString) => { + if (typeof validationString !== "string") { + return []; // Return an empty array if it's not a string + } + + // Remove square brackets and split by commas + return validationString + .replace(/[\[\]']+/g, "") // Remove square brackets + .split(",") // Split by commas + .map((rule) => rule.trim()); // Trim each validation rule +}; + +// Function to handle multiple validation rules +export const validateField = ( + value, + validationString, + requiredMessage, + emojiNotAllowedMessage, + invalidPostcodeMessage +) => { + const validations = parseValidationString(validationString); // Parse the validation string + let errors; + + console.log(typeof validations, validations); + for (let validationRule of validations) { + const validationFunc = validationFunctions[validationRule]; + if (validationFunc) { + errors = validationFunc( + value, + requiredMessage, + emojiNotAllowedMessage, + invalidPostcodeMessage + ); + } + if (errors) break; // Exit if any validation fails + } + + return errors; +}; + +// Map validation strings to actual validation functions +export const validationFunctions = { + required, + postcode, + // Add other validation functions as needed +}; From 35f19bd975efc0d2a40e12c6904fac1e0878c88b Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Wed, 16 Apr 2025 14:48:15 +0100 Subject: [PATCH 4/7] removed comments --- components/elements/validationUtils.js | 2 -- components/myportal/uploadFile.js | 2 +- components/newappeal/buildsection.js | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/components/elements/validationUtils.js b/components/elements/validationUtils.js index ea0d60b9..43f9dbef 100644 --- a/components/elements/validationUtils.js +++ b/components/elements/validationUtils.js @@ -45,8 +45,6 @@ export const validateField = ( ) => { const validations = parseValidationString(validationString); // Parse the validation string let errors; - - console.log(typeof validations, validations); for (let validationRule of validations) { const validationFunc = validationFunctions[validationRule]; if (validationFunc) { diff --git a/components/myportal/uploadFile.js b/components/myportal/uploadFile.js index 015a303d..492c8b84 100644 --- a/components/myportal/uploadFile.js +++ b/components/myportal/uploadFile.js @@ -290,7 +290,7 @@ let UploadFile = (props) => { const uploadAction = await uploadFiles(dataObj, fileObj).then( (data) => { - console.log("hello", data); + console.log("$1", data); } ); // router.push({ diff --git a/components/newappeal/buildsection.js b/components/newappeal/buildsection.js index 2cf10ef7..7d57af76 100644 --- a/components/newappeal/buildsection.js +++ b/components/newappeal/buildsection.js @@ -125,7 +125,7 @@ let BuildSection = (props) => { props.props.accountDetails.containerID, props.props.appealType.caseReference.ticketnumber ).then((data) => { - console.log("hello", data); + console.log("$1", data); setCompletedUploadFiles(true); return data; }); From cf0c05ff6ac414faaf363874858c468a02cb15bc Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Wed, 16 Apr 2025 14:55:06 +0100 Subject: [PATCH 5/7] removed comments --- .../representation/representationAgent.js | 4 ++-- .../representation/representationAppellant.js | 4 ++-- .../representationInterestedPartyPerson.js | 4 ++-- .../case/representation/representationLPA.js | 24 +++++++++---------- components/elements/index.js | 2 +- components/newappeal/buildsection.js | 10 ++++---- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/components/case/representation/representationAgent.js b/components/case/representation/representationAgent.js index c5c39db2..6e13b87e 100644 --- a/components/case/representation/representationAgent.js +++ b/components/case/representation/representationAgent.js @@ -287,13 +287,13 @@ const RepAgent = (props) => { props.props.props.form[props.form] .values || {}; - console.log("valuesobj:", valuesObj); + //console.log("valuesobj:", valuesObj); delete valuesObj[ "_pinswg_appellant_value" ]; - console.log("on save:", valuesObj); + //console.log("on save:", valuesObj); updateRepresentation( valuesObj, false, diff --git a/components/case/representation/representationAppellant.js b/components/case/representation/representationAppellant.js index 64ccd627..5dc66794 100644 --- a/components/case/representation/representationAppellant.js +++ b/components/case/representation/representationAppellant.js @@ -275,13 +275,13 @@ const RepAppellant = (props) => { props.props.props.form[props.form] .values || {}; - console.log("valuesobj:", valuesObj); + //console.log("valuesobj:", valuesObj); delete valuesObj[ "_pinswg_appellant_value" ]; - console.log("on save:", valuesObj); + //console.log("on save:", valuesObj); updateRepresentation( valuesObj, false, diff --git a/components/case/representation/representationInterestedPartyPerson.js b/components/case/representation/representationInterestedPartyPerson.js index 6967c61d..11c3cca6 100644 --- a/components/case/representation/representationInterestedPartyPerson.js +++ b/components/case/representation/representationInterestedPartyPerson.js @@ -283,13 +283,13 @@ const RepInterestedPartyPerson = (props) => { props.props.props.form[props.form] .values || {}; - console.log("valuesobj:", valuesObj); + //console.log("valuesobj:", valuesObj); delete valuesObj[ "_pinswg_appellant_value" ]; - console.log("on save:", valuesObj); + //console.log("on save:", valuesObj); updateRepresentation( valuesObj, false, diff --git a/components/case/representation/representationLPA.js b/components/case/representation/representationLPA.js index 19eb3b5b..9818fe09 100644 --- a/components/case/representation/representationLPA.js +++ b/components/case/representation/representationLPA.js @@ -480,16 +480,16 @@ let RepLPA = (props) => { props.form ].values || {}; - console.log( - "valuesobj:", - valuesObj - ); + // console.log( + // "valuesobj:", + // valuesObj + // ); delete valuesObj[ "_pinswg_appellant_value" ]; - console.log("on save:", valuesObj); + //console.log("on save:", valuesObj); updateRepresentation( valuesObj, false, @@ -515,13 +515,13 @@ let RepLPA = (props) => { props.props.props.form[props.form] .values || {}; - console.log("valuesobj:", valuesObj); + //console.log("valuesobj:", valuesObj); delete valuesObj[ "_pinswg_appellant_value" ]; - console.log("on save:", valuesObj); + //console.log("on save:", valuesObj); updateRepresentation( valuesObj, false, @@ -571,16 +571,16 @@ let RepLPA = (props) => { props.form ].values || {}; - console.log( - "valuesobj:", - valuesObj - ); + // console.log( + // "valuesobj:", + // valuesObj + // ); delete valuesObj[ "_pinswg_appellant_value" ]; - console.log("on save:", valuesObj); + //console.log("on save:", valuesObj); updateRepresentation( valuesObj, false, diff --git a/components/elements/index.js b/components/elements/index.js index a11ea73b..931edf43 100644 --- a/components/elements/index.js +++ b/components/elements/index.js @@ -224,7 +224,7 @@ export function Textfield(props) { // console.log(parentField, formProps, form); //console.log("validation props:", validation); - const requiredMessage = t("account:is-required-label"); + const requiredMessage = t("newappeal:is-required-label"); const emojiNotAllowedMessage = t("newappeal:emojis-not-allowed-label"); const invalidPostcodeMessage = t("newappeal:invalid-postcode-label"); return ( diff --git a/components/newappeal/buildsection.js b/components/newappeal/buildsection.js index 7d57af76..712bff39 100644 --- a/components/newappeal/buildsection.js +++ b/components/newappeal/buildsection.js @@ -488,7 +488,7 @@ let BuildSection = (props) => { "_pinswg_appellant_value" ]; - console.log("on save:", valuesObj); + //console.log("on save:", valuesObj); updateCaseProgress( valuesObj, false, @@ -593,10 +593,10 @@ let BuildSection = (props) => { props.props.form[props.form] .values || {}; - console.log( - "valuesobj:", - valuesObj - ); + // console.log( + // "valuesobj:", + // valuesObj + // ); delete valuesObj[ "_pinswg_appellant_value" From f586842b3970e2e19be5e01fe816aa6d84b8062c Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Wed, 16 Apr 2025 15:47:05 +0100 Subject: [PATCH 6/7] key in notice banner --- components/case/caseNoticeBanner.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/case/caseNoticeBanner.js b/components/case/caseNoticeBanner.js index 23d63cd2..b510801b 100644 --- a/components/case/caseNoticeBanner.js +++ b/components/case/caseNoticeBanner.js @@ -20,7 +20,7 @@ export default function CaseNoticeBanner(props) { return ( <> {messagesObjArr.map((message, index) => ( - <> +
{todaysDate.toISOString() >= message.scheduledstart && todaysDate.toISOString() <= message.scheduledend && (
)} - +
))} ); From 0d91e75811be27b9dd3a246942d3988a0e3e8c40 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Wed, 16 Apr 2025 15:47:20 +0100 Subject: [PATCH 7/7] csp frame src set for map wales --- middleware.js | 1 + 1 file changed, 1 insertion(+) diff --git a/middleware.js b/middleware.js index afd4fc0b..d8a952ed 100644 --- a/middleware.js +++ b/middleware.js @@ -14,6 +14,7 @@ export function middleware(request) { font-src 'self' https://pro.fontawesome.com/ https://fonts.gstatic.com/ ; object-src 'none'; base-uri 'self'; + frame-src https://datamap.gov.wales/; form-action 'self' ` + process.env.NEXTAUTH_URL + `;