diff --git a/components/case/documents.js b/components/case/documents.js index d4bfcf6f..bc401367 100644 --- a/components/case/documents.js +++ b/components/case/documents.js @@ -157,10 +157,11 @@ const DocumentDetails = (props) => { > {documentTypes.map((item, key) => { @@ -172,12 +173,14 @@ const DocumentDetails = (props) => { } > {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + item.pinswg_isharedocumentlocationsLabel + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : item.pinswg_isharedocumentlocationsLabel || t( "case:summary-no-date-entered-label" @@ -320,12 +323,14 @@ const DocumentDetails = (props) => { ) : ( documentDetailsArr.map((item, key) => { - let detailsObj = jsonpath( - "$..[?(@._pinswg_documentids_value=='" + + let detailsObj = jsonpath({ + path: + "$..[?(@._pinswg_documentids_value=='" + incidentid + "')]", - item - ); + json: item, + sanbox: {}, + }); detailsObj = item; return (
{ {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sanbox: {}, + }) : detailsObj[ "pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue" ] || @@ -572,12 +579,14 @@ const DocumentDetails = (props) => { } > {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + item.pinswg_isharedocumentlocationsLabel + '")].value_cy', - transLookup - ) + jsonL: transLookup, + sanbox: {}, + }) : item.pinswg_isharedocumentlocationsLabel || t( "case:summary-no-date-entered-label" @@ -731,12 +740,14 @@ const DocumentDetails = (props) => {
) : ( documentDetailsArr.map((item, key) => { - let detailsObj = jsonpath( - "$..[?(@._pinswg_documentids_value=='" + + let detailsObj = jsonpath({ + path: + "$..[?(@._pinswg_documentids_value=='" + incidentid + "')]", - item - ); + json: item, + sandbox: {}, + }); detailsObj = item; return (
{ {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue" ] || diff --git a/components/case/representation/index.js b/components/case/representation/index.js index 41fdbb0e..ce849cbe 100644 --- a/components/case/representation/index.js +++ b/components/case/representation/index.js @@ -209,19 +209,22 @@ let MakeRepresentation = (props) => { isLPA && setRepresentationCapacity("LPA"); currentType == "searchResultsObj" - ? (casesObj = jsonpath( - '$..[?(@.title=="' + caseReference + '")]', - setCaseQueryObj - )) + ? (casesObj = jsonpath({ + path: '$..[?(@.title=="' + caseReference + '")]', + json: setCaseQueryObj, + sandbox: {}, + })) : currentType == "watchedCases" - ? (casesObj = jsonpath( - '$..[?(@.ticketnumber=="' + caseReference + '")]', - watchedCases - )) - : (casesObj = jsonpath( - '$..[?(@.reference=="' + caseReference + '")]', - setCaseQueryObj - )); + ? (casesObj = jsonpath({ + path: '$..[?(@.ticketnumber=="' + caseReference + '")]', + json: watchedCases, + sandbox: {}, + })) + : (casesObj = jsonpath({ + path: '$..[?(@.reference=="' + caseReference + '")]', + json: setCaseQueryObj, + sandbox: {}, + })); casesObj = Object.assign({}, ...casesObj); @@ -262,33 +265,41 @@ let MakeRepresentation = (props) => { var resultsObj = {}; - resultsObj = jsonpath( - '$..[?(@.ticketnumber=="' + + resultsObj = jsonpath({ + path: + '$..[?(@.ticketnumber=="' + currentView.caseReference.currentReference + '")]', - setCaseResultsObj - ); + json: setCaseResultsObj, + sandbox: {}, + }); resultsObj = resultsObj[0]; detailsObj = router.query.hasOwnProperty("state") ? router.query.state == "edit" - ? jsonpath( - '$..[?(@.repfile_name =="' + router.query.created + '")]', - setCaseDetailsObj - ) - : jsonpath( - '$..[?(@.pinswg_name =="' + + ? jsonpath({ + path: + '$..[?(@.repfile_name =="' + router.query.created + '")]', + json: setCaseDetailsObj, + sandbox: {}, + }) + : jsonpath({ + path: + '$..[?(@.pinswg_name =="' + currentView.caseReference.currentReference + '")]', - setCaseDetailsObj - ) - : jsonpath( - '$..[?(@.pinswg_name =="' + + json: setCaseDetailsObj, + sandbox: {}, + }) + : jsonpath({ + path: + '$..[?(@.pinswg_name =="' + currentView.caseReference.currentReference + '")]', - setCaseDetailsObj - ); + json: setCaseDetailsObj, + sandbox: {}, + }); detailsObj = detailsObj[0]; @@ -931,10 +942,11 @@ let MakeRepresentation = (props) => { var detailsObj = {}; - detailsObj = jsonpath( - '$..[?(@.pinswg_name=="' + caseReference + '")]', - setCaseDetailsObj - ); + detailsObj = jsonpath({ + path: '$..[?(@.pinswg_name=="' + caseReference + '")]', + json: setCaseDetailsObj, + sandbox: {}, + }); detailsObj = detailsObj[0]; diff --git a/components/case/representation/representationDetails.js b/components/case/representation/representationDetails.js index efe5380c..8b32d7a3 100644 --- a/components/case/representation/representationDetails.js +++ b/components/case/representation/representationDetails.js @@ -28,10 +28,11 @@ const RepDetails = (props) => { : caseReference : caseReference; - detailsObj = jsonpath( - '$..[?(@.pinswg_name=="' + caseReference + '")]', - setCaseDetailsObj - ); + detailsObj = jsonpath({ + path: '$..[?(@.pinswg_name=="' + caseReference + '")]', + json: setCaseDetailsObj, + sandbox: {}, + }); detailsObj = detailsObj[0]; diff --git a/components/case/representation/representationLPA.js b/components/case/representation/representationLPA.js index 477d5c9d..d2950f83 100644 --- a/components/case/representation/representationLPA.js +++ b/components/case/representation/representationLPA.js @@ -176,12 +176,14 @@ let RepLPA = (props) => { var detailsObj = {}; - detailsObj = jsonpath( - '$..[?(@.pinswg_name=="' + + detailsObj = jsonpath({ + path: + '$..[?(@.pinswg_name=="' + currentView.caseReference.currentReference + '")]', - setCaseDetailsObj - ); + json: setCaseDetailsObj, + sandbox: {}, + }); let setCaseResultssObj = router.query.hasOwnProperty("state") ? router.query.state == "edit" @@ -193,12 +195,14 @@ let RepLPA = (props) => { var resultsObj = {}; - resultsObj = jsonpath( - '$..[?(@.pinswg_name=="' + + resultsObj = jsonpath({ + path: + '$..[?(@.pinswg_name=="' + currentView.caseReference.currentReference + '")]', - setCaseResultssObj - ); + json: setCaseResultssObj, + sandbox: {}, + }); resultsObj = resultsObj[0]; props.formObj.hasOwnProperty("representationForm") && diff --git a/components/case/representation/representationLPADetails.js b/components/case/representation/representationLPADetails.js index f38e40f2..b9433e0b 100644 --- a/components/case/representation/representationLPADetails.js +++ b/components/case/representation/representationLPADetails.js @@ -20,10 +20,11 @@ const RepLPADetails = (props) => { var detailsObj = {}; - detailsObj = jsonpath( - '$..[?(@.pinswg_name=="' + caseReference + '")]', - setCaseDetailsObj - ); + detailsObj = jsonpath({ + path: '$..[?(@.pinswg_name=="' + caseReference + '")]', + json: setCaseDetailsObj, + sandbox: {}, + }); detailsObj = detailsObj[0]; diff --git a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js index e33bd895..ef433f52 100644 --- a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js +++ b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js @@ -58,12 +58,14 @@ let Enforcement_Questionnaire = (props) => { var detailsObj = {}; - detailsObj = jsonpath( - '$..[?(@.pinswg_name=="' + + detailsObj = jsonpath({ + path: + '$..[?(@.pinswg_name=="' + currentView.caseReference.currentReference + '")]', - setCaseDetailsObj - ); + json: setCaseDetailsObj, + sandbox: {}, + }); let setCaseResultssObj = router.query.hasOwnProperty("state") ? router.query.state == "edit" @@ -79,12 +81,14 @@ let Enforcement_Questionnaire = (props) => { var resultsObj = {}; - resultsObj = jsonpath( - '$..[?(@.ticketnumber=="' + + resultsObj = jsonpath({ + path: + '$..[?(@.ticketnumber=="' + currentView.caseReference.currentReference + '")]', - setCaseResultssObj - ); + json: setCaseResultssObj, + sandbox: {}, + }); resultsObj = resultsObj[0]; return ( diff --git a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js index 3eaf275d..20b6cc6a 100644 --- a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js +++ b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js @@ -60,12 +60,14 @@ let S78_Questionnaire = (props) => { var detailsObj = {}; - detailsObj = jsonpath( - '$..[?(@.pinswg_name=="' + + detailsObj = jsonpath({ + path: + '$..[?(@.pinswg_name=="' + currentView.caseReference.currentReference + '")]', - setCaseDetailsObj - ); + json: setCaseResultssObj, + sandbox: {}, + }); let setCaseResultssObj = router.query.hasOwnProperty("state") ? router.query.state == "edit" @@ -81,8 +83,9 @@ let S78_Questionnaire = (props) => { var resultsObj = {}; - resultsObj = jsonpath( - "$..[?(@." + + resultsObj = jsonpath({ + path: + "$..[?(@." + (router.query.hasOwnProperty("state") ? router.query.state == "edit" ? "caseRef" @@ -91,8 +94,9 @@ let S78_Questionnaire = (props) => { '=="' + currentView.caseReference.currentReference + '")]', - setCaseResultssObj - ); + json: setCaseResultssObj, + sandbox: {}, + }); resultsObj = resultsObj[0]; //console.log(resultsObj); diff --git a/components/case/representationList.js b/components/case/representationList.js index 0a5db79f..7c24ae12 100644 --- a/components/case/representationList.js +++ b/components/case/representationList.js @@ -57,12 +57,14 @@ const RepresentationList = (props) => {
{representationsArr.map((item, key) => { - let detailsObj = jsonpath( - "$..[?(@.pinswg_representationsid=='" + + let detailsObj = jsonpath({ + path: + "$..[?(@.pinswg_representationsid=='" + incidentid + "')]", - item - ); + json: item, + sandbox: {}, + }); detailsObj = item; console.log(detailsObj); @@ -87,14 +89,16 @@ const RepresentationList = (props) => { {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sanbox: {}, + }) : detailsObj[ "pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue" ] || diff --git a/components/case/summary.js b/components/case/summary.js index 80002673..58afabab 100644 --- a/components/case/summary.js +++ b/components/case/summary.js @@ -139,10 +139,14 @@ const CaseSummary = (props) => { }; const isWatchedCase = (whichIncident) => { - let isWatched = jsonpath( - "$..value[?(@._pinswg_watchedcase_value=='" + whichIncident + "')]", - watchedCases - ); + let isWatched = jsonpath({ + path: + "$..value[?(@._pinswg_watchedcase_value=='" + + whichIncident + + "')]", + json: watchedCases, + sandbox: {}, + }); return isWatched; }; @@ -178,45 +182,52 @@ const CaseSummary = (props) => { var casesObj = {}; currentType == "searchResultsObj" - ? (casesObj = jsonpath( - '$..[?(@.title=="' + caseReference + '")]', - searchResultsObj - )) + ? (casesObj = jsonpath({ + path: '$..[?(@.title=="' + caseReference + '")]', + json: searchResultsObj, + sandbox: {}, + })) : currentType == "watchedCases" - ? (casesObj = jsonpath( - '$..[?(@.pinswg_title=="' + caseReference + '")]', - setCaseQueryObj - )) + ? (casesObj = jsonpath({ + path: '$..[?(@.pinswg_title=="' + caseReference + '")]', + json: setCaseQueryObj, + sandbox: {}, + })) : currentType == "myCases" - ? (casesObj = jsonpath( - '$..[?(@.pinswg_title=="' + caseReference + '")]', - setCaseQueryObj - )) + ? (casesObj = jsonpath({ + path: '$..[?(@.pinswg_title=="' + caseReference + '")]', + json: setCaseQueryObj, + sandbox: {}, + })) : currentType == "directResultsObj" - ? (casesObj = jsonpath( - '$..[?(@.ticketnumber=="' + caseReference + '")]', - setCaseQueryObj - )) - : (casesObj = jsonpath( - '$..[?(@.reference=="' + caseReference + '")]', - setCaseQueryObj - )); + ? (casesObj = jsonpath({ + path: '$..[?(@.ticketnumber=="' + caseReference + '")]', + json: setCaseQueryObj, + sandbox: {}, + })) + : (casesObj = jsonpath({ + path: '$..[?(@.reference=="' + caseReference + '")]', + json: setCaseQueryObj, + sandbox: {}, + })); casesObj = Object.assign({}, ...casesObj); var detailsObj = {}; currentType == "searchResultsObj" - ? (detailsObj = jsonpath( - '$..[?(@.pinswg_name=="' + caseReference + '")]', - searchDetailsObj - )) + ? (detailsObj = jsonpath({ + path: '$..[?(@.pinswg_name=="' + caseReference + '")]', + json: searchDetailsObj, + sandbox: {}, + })) : currentType == "directResultsObj" ? (detailsObj = setCaseDetailsObj[0].value[0]) - : (detailsObj = jsonpath( - '$..[?(@.pinswg_name=="' + caseReference + '")]', - setCaseDetailsObj - )); + : (detailsObj = jsonpath({ + path: '$..[?(@.pinswg_name=="' + caseReference + '")]', + jsopn: setCaseDetailsObj, + sandbox: {}, + })); detailsObj = typeof detailsObj == "object" ? detailsObj : detailsObj[0]; diff --git a/components/case/summaryTypes/pinswg_advertsid.js b/components/case/summaryTypes/pinswg_advertsid.js index e3ed163d..bb6c293c 100644 --- a/components/case/summaryTypes/pinswg_advertsid.js +++ b/components/case/summaryTypes/pinswg_advertsid.js @@ -27,14 +27,16 @@ const Pinswg_advertsid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -50,14 +52,16 @@ const Pinswg_advertsid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_speacialistcaseprocess@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_speacialistcaseprocess@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -70,14 +74,16 @@ const Pinswg_advertsid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -111,14 +117,16 @@ const Pinswg_advertsid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -130,14 +138,16 @@ const Pinswg_advertsid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -149,14 +159,16 @@ const Pinswg_advertsid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -172,14 +184,16 @@ const Pinswg_advertsid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : 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 198b7a80..fd9ea020 100644 --- a/components/case/summaryTypes/pinswg_callinss77id.js +++ b/components/case/summaryTypes/pinswg_callinss77id.js @@ -27,14 +27,16 @@ const Pinswg_callinss77id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -49,14 +51,16 @@ const Pinswg_callinss77id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -90,14 +94,16 @@ const Pinswg_callinss77id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -109,14 +115,16 @@ const Pinswg_callinss77id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -128,14 +136,16 @@ const Pinswg_callinss77id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -150,14 +160,16 @@ const Pinswg_callinss77id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : 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 40c48a60..94a67779 100644 --- a/components/case/summaryTypes/pinswg_commonlandid.js +++ b/components/case/summaryTypes/pinswg_commonlandid.js @@ -27,14 +27,16 @@ const Pinswg_commonlandid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -49,14 +51,16 @@ const Pinswg_commonlandid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -90,14 +94,16 @@ const Pinswg_commonlandid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -109,14 +115,16 @@ const Pinswg_commonlandid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -128,14 +136,16 @@ const Pinswg_commonlandid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -150,14 +160,16 @@ const Pinswg_commonlandid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] || @@ -224,18 +236,22 @@ const Pinswg_commonlandid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.pinswg_lpa=="' + + ? jsonpath({ + path: + '$..[?(@.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value_cy', - transLookup - ) - : jsonpath( - '$..[?(@.pinswg_lpa=="' + + json: transLookup, + sandbox: {}, + }) + : jsonpath({ + path: + '$..[?(@.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value', - transLookup - ) || + json: transLookup, + sandbox: {}, + }) || t( "case:summary-no-date-entered-label" )} diff --git a/components/case/summaryTypes/pinswg_communityinfrastructurelevyid.js b/components/case/summaryTypes/pinswg_communityinfrastructurelevyid.js index 25a5ef8e..461bd49b 100644 --- a/components/case/summaryTypes/pinswg_communityinfrastructurelevyid.js +++ b/components/case/summaryTypes/pinswg_communityinfrastructurelevyid.js @@ -27,14 +27,16 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -49,14 +51,16 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -90,14 +94,16 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -109,14 +115,16 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -128,14 +136,16 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -150,14 +160,16 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : 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 2079e38a..a6bbcfac 100644 --- a/components/case/summaryTypes/pinswg_compulsorypurchaseordersid.js +++ b/components/case/summaryTypes/pinswg_compulsorypurchaseordersid.js @@ -27,14 +27,16 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -72,14 +74,16 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -91,14 +95,16 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -110,14 +116,16 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -132,14 +140,16 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] || @@ -206,18 +216,22 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.pinswg_lpa=="' + + ? jsonpath({ + path: + '$..[?(@.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value_cy', - transLookup - ) - : jsonpath( - '$..[?(@.pinswg_lpa=="' + + json: transLookup, + sandbox: {}, + }) + : jsonpath({ + path: + '$..[?(@.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value', - transLookup - ) || + json: transLookup, + sandbox: {}, + }) || t( "case:summary-no-date-entered-label" )} diff --git a/components/case/summaryTypes/pinswg_dnsid.js b/components/case/summaryTypes/pinswg_dnsid.js index 76383b34..8d88cf5d 100644 --- a/components/case/summaryTypes/pinswg_dnsid.js +++ b/components/case/summaryTypes/pinswg_dnsid.js @@ -122,14 +122,17 @@ const Pinswg_dnsid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -148,12 +151,14 @@ const Pinswg_dnsid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj.pinswg_webaddress + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : ( {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -227,14 +234,16 @@ const Pinswg_dnsid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue" ] || @@ -249,7 +258,7 @@ const Pinswg_dnsid = (props) => {
{router.locale == "cy" - ? jsonpath( + ? jsonpath({path: '$..[?(@.value=="' + casesObj[ @@ -288,14 +297,16 @@ const Pinswg_dnsid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -355,14 +366,16 @@ const Pinswg_dnsid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] || @@ -454,7 +467,7 @@ const Pinswg_dnsid = (props) => {
{router.locale == "cy" - ? jsonpath( + ? jsonpath({path: '$..[?(@.value=="' + detailsObj.pinswg_recommendation + '")].value_cy', diff --git a/components/case/summaryTypes/pinswg_electricityactid.js b/components/case/summaryTypes/pinswg_electricityactid.js index 38b7d951..91a6b106 100644 --- a/components/case/summaryTypes/pinswg_electricityactid.js +++ b/components/case/summaryTypes/pinswg_electricityactid.js @@ -65,14 +65,16 @@ const Pinswg_electricityactid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -87,14 +89,16 @@ const Pinswg_electricityactid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -147,14 +151,16 @@ const Pinswg_electricityactid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -168,14 +174,16 @@ const Pinswg_electricityactid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -187,14 +195,16 @@ const Pinswg_electricityactid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -209,14 +219,16 @@ const Pinswg_electricityactid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] || @@ -283,12 +295,14 @@ const Pinswg_electricityactid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj.pinswg_recommendation + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj.pinswg_recommendation || t( "case:summary-no-date-entered-label" @@ -304,12 +318,14 @@ const Pinswg_electricityactid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj.pinswg_webaddress + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj.pinswg_webaddress || t( "case:summary-no-date-entered-label" diff --git a/components/case/summaryTypes/pinswg_enforcementlistedbuildingconseid.js b/components/case/summaryTypes/pinswg_enforcementlistedbuildingconseid.js index fd5d6206..142d968b 100644 --- a/components/case/summaryTypes/pinswg_enforcementlistedbuildingconseid.js +++ b/components/case/summaryTypes/pinswg_enforcementlistedbuildingconseid.js @@ -27,14 +27,16 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -49,14 +51,16 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -90,14 +94,16 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -109,14 +115,16 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -128,14 +136,16 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -150,14 +160,16 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : 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 edf10280..fc6db4ad 100644 --- a/components/case/summaryTypes/pinswg_enforcementnoticeappeals174id.js +++ b/components/case/summaryTypes/pinswg_enforcementnoticeappeals174id.js @@ -27,14 +27,16 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -49,14 +51,16 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -90,14 +94,16 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -109,14 +115,16 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -128,14 +136,16 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -150,14 +160,16 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : 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 6c2c8b44..78301cad 100644 --- a/components/case/summaryTypes/pinswg_environmentalpermittingid.js +++ b/components/case/summaryTypes/pinswg_environmentalpermittingid.js @@ -27,14 +27,16 @@ const Pinswg_environmentalpermittingid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -49,14 +51,16 @@ const Pinswg_environmentalpermittingid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -90,14 +94,16 @@ const Pinswg_environmentalpermittingid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -109,14 +115,16 @@ const Pinswg_environmentalpermittingid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -128,14 +136,16 @@ const Pinswg_environmentalpermittingid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -150,14 +160,16 @@ const Pinswg_environmentalpermittingid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] || @@ -224,18 +236,22 @@ const Pinswg_environmentalpermittingid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.pinswg_lpa=="' + + ? jsonpath({ + path: + '$..[?(@.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value_cy', - transLookup - ) - : jsonpath( - '$..[?(@.pinswg_lpa=="' + + json: transLookup, + sandbox: {}, + }) + : jsonpath({ + path: + '$..[?(@.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value', - transLookup - ) || + json: transLookup, + sandbox: {}, + }) || t( "case:summary-no-date-entered-label" )} diff --git a/components/case/summaryTypes/pinswg_harbourrevisionorderid.js b/components/case/summaryTypes/pinswg_harbourrevisionorderid.js index 448ca2bd..16afe185 100644 --- a/components/case/summaryTypes/pinswg_harbourrevisionorderid.js +++ b/components/case/summaryTypes/pinswg_harbourrevisionorderid.js @@ -65,14 +65,16 @@ const Pinswg_harbourrevisionorderid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -87,14 +89,16 @@ const Pinswg_harbourrevisionorderid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -147,14 +151,16 @@ const Pinswg_harbourrevisionorderid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -166,14 +172,16 @@ const Pinswg_harbourrevisionorderid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -188,14 +196,16 @@ const Pinswg_harbourrevisionorderid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] || @@ -262,12 +272,14 @@ const Pinswg_harbourrevisionorderid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj.pinswg_recommendation + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj.pinswg_recommendation || t( "case:summary-no-date-entered-label" @@ -283,12 +295,14 @@ const Pinswg_harbourrevisionorderid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj.pinswg_webaddress + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj.pinswg_webaddress || t( "case:summary-no-date-entered-label" diff --git a/components/case/summaryTypes/pinswg_hedgeshedgerowstreepreservatioid.js b/components/case/summaryTypes/pinswg_hedgeshedgerowstreepreservatioid.js index 614d8c7f..b9fdd905 100644 --- a/components/case/summaryTypes/pinswg_hedgeshedgerowstreepreservatioid.js +++ b/components/case/summaryTypes/pinswg_hedgeshedgerowstreepreservatioid.js @@ -27,14 +27,16 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -50,14 +52,16 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -70,14 +74,16 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -111,14 +117,16 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -130,14 +138,16 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -149,14 +159,16 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -171,14 +183,16 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] || @@ -245,18 +259,22 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.pinswg_lpa=="' + + ? jsonpath({ + path: + '$..[?(@.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value_cy', - transLookup - ) - : jsonpath( - '$..[?(@.pinswg_lpa=="' + + json: transLookup, + sandbox: {}, + }) + : jsonpath({ + path: + '$..[?(@.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value', - transLookup - ) || + json: transLookup, + sandbox: {}, + }) || t( "case:summary-no-date-entered-label" )} diff --git a/components/case/summaryTypes/pinswg_householderappealhasid.js b/components/case/summaryTypes/pinswg_householderappealhasid.js index 19197573..26a4d08b 100644 --- a/components/case/summaryTypes/pinswg_householderappealhasid.js +++ b/components/case/summaryTypes/pinswg_householderappealhasid.js @@ -27,14 +27,16 @@ const Pinswg_householderappealhasid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -49,14 +51,16 @@ const Pinswg_householderappealhasid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -90,14 +94,16 @@ const Pinswg_householderappealhasid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -109,14 +115,16 @@ const Pinswg_householderappealhasid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -131,14 +139,16 @@ const Pinswg_householderappealhasid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : 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 368e7bf3..2d067aa4 100644 --- a/components/case/summaryTypes/pinswg_lawfuldevelopmentcertificatappid.js +++ b/components/case/summaryTypes/pinswg_lawfuldevelopmentcertificatappid.js @@ -27,14 +27,16 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -49,14 +51,16 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -90,14 +94,16 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -109,14 +115,16 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -128,14 +136,16 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -150,14 +160,16 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : 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 21a6e721..0b162e76 100644 --- a/components/case/summaryTypes/pinswg_ldpid.js +++ b/components/case/summaryTypes/pinswg_ldpid.js @@ -27,14 +27,16 @@ const Pinswg_ldpid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -49,14 +51,16 @@ const Pinswg_ldpid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -69,14 +73,16 @@ const Pinswg_ldpid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -88,14 +94,16 @@ const Pinswg_ldpid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -107,14 +115,16 @@ const Pinswg_ldpid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -129,14 +139,16 @@ const Pinswg_ldpid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : 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 e6740a8a..a7f1cc5a 100644 --- a/components/case/summaryTypes/pinswg_listedbuildingandconservationrid.js +++ b/components/case/summaryTypes/pinswg_listedbuildingandconservationrid.js @@ -27,14 +27,16 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -49,14 +51,16 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -90,14 +94,16 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -109,14 +115,16 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -128,14 +136,16 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -150,14 +160,16 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : 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 355937ae..c359db9a 100644 --- a/components/case/summaryTypes/pinswg_maintenanceoflands217id.js +++ b/components/case/summaryTypes/pinswg_maintenanceoflands217id.js @@ -27,14 +27,16 @@ const Pinswg_maintenanceoflands217id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -49,14 +51,16 @@ const Pinswg_maintenanceoflands217id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -90,14 +94,16 @@ const Pinswg_maintenanceoflands217id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -109,14 +115,16 @@ const Pinswg_maintenanceoflands217id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -128,14 +136,16 @@ const Pinswg_maintenanceoflands217id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -150,14 +160,16 @@ const Pinswg_maintenanceoflands217id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : 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 18deac18..9c7f875b 100644 --- a/components/case/summaryTypes/pinswg_miscellaneouscasewordid.js +++ b/components/case/summaryTypes/pinswg_miscellaneouscasewordid.js @@ -27,14 +27,16 @@ const Pinswg_miscellaneouscasewordid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -49,14 +51,16 @@ const Pinswg_miscellaneouscasewordid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -90,14 +94,16 @@ const Pinswg_miscellaneouscasewordid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -109,14 +115,16 @@ const Pinswg_miscellaneouscasewordid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -128,14 +136,16 @@ const Pinswg_miscellaneouscasewordid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -150,14 +160,16 @@ const Pinswg_miscellaneouscasewordid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] || @@ -224,18 +236,22 @@ const Pinswg_miscellaneouscasewordid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.pinswg_lpa=="' + + ? jsonpath({ + path: + '$..[?(@.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value_cy', - transLookup - ) - : jsonpath( - '$..[?(@.pinswg_lpa=="' + + json: transLookup, + sandbox: {}, + }) + : jsonpath({ + path: + '$..[?(@.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value', - transLookup - ) || + json: transLookup, + sandbox: {}, + }) || t( "case:summary-no-date-entered-label" )} diff --git a/components/case/summaryTypes/pinswg_nonvalidationid.js b/components/case/summaryTypes/pinswg_nonvalidationid.js index 819878d7..b768263f 100644 --- a/components/case/summaryTypes/pinswg_nonvalidationid.js +++ b/components/case/summaryTypes/pinswg_nonvalidationid.js @@ -27,14 +27,16 @@ const Pinswg_nonvalidationid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -49,14 +51,16 @@ const Pinswg_nonvalidationid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -69,14 +73,15 @@ const Pinswg_nonvalidationid = (props) => {
{router.locale == "cy" - ? jsonpath( + ? jsonpath({path: '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -88,14 +93,16 @@ const Pinswg_nonvalidationid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -110,14 +117,16 @@ const Pinswg_nonvalidationid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decisionissued@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : 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 f947de03..91e5fb8e 100644 --- a/components/case/summaryTypes/pinswg_planningappeals78id.js +++ b/components/case/summaryTypes/pinswg_planningappeals78id.js @@ -27,14 +27,16 @@ const Pinswg_planningappeals78id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -49,14 +51,16 @@ const Pinswg_planningappeals78id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -90,14 +94,16 @@ const Pinswg_planningappeals78id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -109,14 +115,16 @@ const Pinswg_planningappeals78id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || @@ -131,14 +139,16 @@ const Pinswg_planningappeals78id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -153,14 +163,16 @@ const Pinswg_planningappeals78id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_dicision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : 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 ccbe8f89..a735f2c6 100644 --- a/components/case/summaryTypes/pinswg_planningconditionss73s79id.js +++ b/components/case/summaryTypes/pinswg_planningconditionss73s79id.js @@ -27,14 +27,16 @@ const Pinswg_planningconditionss73s79id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -49,14 +51,16 @@ const Pinswg_planningconditionss73s79id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -90,14 +94,16 @@ const Pinswg_planningconditionss73s79id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -109,14 +115,16 @@ const Pinswg_planningconditionss73s79id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -128,14 +136,16 @@ const Pinswg_planningconditionss73s79id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -150,14 +160,16 @@ const Pinswg_planningconditionss73s79id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : 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 ceb7f376..8da3edaf 100644 --- a/components/case/summaryTypes/pinswg_planningobligationappeals106id.js +++ b/components/case/summaryTypes/pinswg_planningobligationappeals106id.js @@ -27,14 +27,16 @@ const Pinswg_planningobligationappeals106id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -49,14 +51,16 @@ const Pinswg_planningobligationappeals106id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -90,14 +94,16 @@ const Pinswg_planningobligationappeals106id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -109,14 +115,16 @@ const Pinswg_planningobligationappeals106id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -128,14 +136,16 @@ const Pinswg_planningobligationappeals106id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -150,14 +160,16 @@ const Pinswg_planningobligationappeals106id = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : 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 0b6d68fa..84f94424 100644 --- a/components/case/summaryTypes/pinswg_rowid.js +++ b/components/case/summaryTypes/pinswg_rowid.js @@ -27,14 +27,16 @@ const Pinswg_rowid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -50,14 +52,16 @@ const Pinswg_rowid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -70,14 +74,16 @@ const Pinswg_rowid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -111,14 +117,16 @@ const Pinswg_rowid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -130,14 +138,16 @@ const Pinswg_rowid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -149,14 +159,16 @@ const Pinswg_rowid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -171,14 +183,16 @@ const Pinswg_rowid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] || @@ -245,18 +259,22 @@ const Pinswg_rowid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.pinswg_lpa=="' + + ? jsonpath({ + path: + '$..[?(@.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value_cy', - transLookup - ) - : jsonpath( - '$..[?(@.pinswg_lpa=="' + + json: transLookup, + sandbox: {}, + }) + : jsonpath({ + path: + '$..[?(@.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value', - transLookup - ) || + json: transLookup, + sandbox: {}, + }) || t( "case:summary-no-date-entered-label" )} diff --git a/components/case/summaryTypes/pinswg_transportandworkactid.js b/components/case/summaryTypes/pinswg_transportandworkactid.js index 32a99e27..d0e478e2 100644 --- a/components/case/summaryTypes/pinswg_transportandworkactid.js +++ b/components/case/summaryTypes/pinswg_transportandworkactid.js @@ -65,14 +65,16 @@ const Pinswg_transportandworkactid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -114,12 +116,14 @@ const Pinswg_transportandworkactid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj.pinswg_recommendation + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj.pinswg_recommendation || t( "case:summary-no-date-entered-label" @@ -135,12 +139,14 @@ const Pinswg_transportandworkactid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj.pinswg_webaddress + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj.pinswg_webaddress || t( "case:summary-no-date-entered-label" diff --git a/components/case/summaryTypes/pinswg_wayleaveid.js b/components/case/summaryTypes/pinswg_wayleaveid.js index aa537a8d..db885366 100644 --- a/components/case/summaryTypes/pinswg_wayleaveid.js +++ b/components/case/summaryTypes/pinswg_wayleaveid.js @@ -27,14 +27,16 @@ const Pinswg_wayleaveid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -49,14 +51,16 @@ const Pinswg_wayleaveid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -90,14 +94,16 @@ const Pinswg_wayleaveid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_procedure@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -109,14 +115,16 @@ const Pinswg_wayleaveid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_typeofevent@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -128,14 +136,16 @@ const Pinswg_wayleaveid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : casesObj[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || @@ -150,14 +160,16 @@ const Pinswg_wayleaveid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "pinswg_decision@OData.Community.Display.V1.FormattedValue" ] || @@ -224,18 +236,22 @@ const Pinswg_wayleaveid = (props) => {
{router.locale == "cy" - ? jsonpath( - '$..[?(@.pinswg_lpa=="' + + ? jsonpath({ + path: + '$..[?(@.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value_cy', - transLookup - ) - : jsonpath( - '$..[?(@.pinswg_lpa=="' + + json: transLookup, + sandbox: {}, + }) + : jsonpath({ + path: + '$..[?(@.pinswg_lpa=="' + detailsObj.pinswg_relevantauthorityname + '")].value', - transLookup - ) || + json: transLookup, + sandbox: {}, + }) || t( "case:summary-no-date-entered-label" )} diff --git a/components/elements/index.js b/components/elements/index.js index f676b273..5f3b594b 100644 --- a/components/elements/index.js +++ b/components/elements/index.js @@ -1339,10 +1339,11 @@ const RenderPickList = ({ }) => { let { t } = useTranslation(); - var dropdownObj = jsonpath( - "$..value[?(@.LogicalName=='" + datafieldname + "')]..Options", - picklistData - ); + var dropdownObj = jsonpath({ + path: "$..value[?(@.LogicalName=='" + datafieldname + "')]..Options", + json: picklistData, + sandbox: {}, + }); dropdownObj = dropdownObj[0]; const required = (value) => { @@ -1716,11 +1717,19 @@ export const FieldsTranslations = (label) => { const { locale } = router; const { appealtypes } = router.query; - let formObj = jsonpath("$['" + appealtypes + "']", fieldLookup); + let formObj = jsonpath({ + path: "$['" + appealtypes + "']", + json: fieldLookup, + sandbox: {}, + }); let labelTrans = router.locale == "cy" - ? jsonpath('$..[?(@.value=="' + label + '")].value_cy', formObj)[0] + ? jsonpath({ + path: '$..[?(@.value=="' + label + '")].value_cy', + json: formObj, + sandbox: {}, + })[0] : label; //labelTrans = labelTrans.length > 1 ? labelTrans[0] : labelTrans; @@ -1735,10 +1744,11 @@ const PickListTranslations = (optionValue) => { //console.log(optionValue); let optionTrans = router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + optionValue + '")].value_cy', - pickListLookup - ) + ? jsonpath({ + path: '$..[?(@.value=="' + optionValue + '")].value_cy', + json: pickListLookup, + sandbox: {}, + }) : optionValue; //console.log(optionTrans, optionValue); return optionTrans; @@ -1934,10 +1944,11 @@ const RenderFileUpload = (field) => { const filelistObj = field.fileList || {}; - const blobList = jsonpath( - "$..[?(@.documentType=='" + field.documentTypeCode + "')]", - filelistObj - ); + const blobList = jsonpath({ + path: "$..[?(@.documentType=='" + field.documentTypeCode + "')]", + json: filelistObj, + sandbox: {}, + }); //const blobList = filelistObj; const deleteThisBlob = async ( diff --git a/components/myportal.js b/components/myportal.js index 5ea4a188..9162deb8 100644 --- a/components/myportal.js +++ b/components/myportal.js @@ -106,14 +106,16 @@ const MyPortal = (props) => {

{router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + props.accountDetails.accountDetails[ "pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : props.accountDetails.accountDetails[ "pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue" ]}{" "} diff --git a/components/myportal/advancedsearch.js b/components/myportal/advancedsearch.js index a446ca75..58b95e7e 100644 --- a/components/myportal/advancedsearch.js +++ b/components/myportal/advancedsearch.js @@ -146,13 +146,15 @@ let AdvancedSearch = (props) => { {/* {optionsObj[key].name} */} {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + optionsObj[key] .name + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : optionsObj[key].name || t( "case:summary-no-date-entered-label" @@ -249,13 +251,15 @@ let AdvancedSearch = (props) => { ) ? "" : router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + optionsObj[key] .value + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : optionsObj[key].value || t( "case:summary-no-date-entered-label" diff --git a/components/myportal/awaitingsubmissionfromblob.js b/components/myportal/awaitingsubmissionfromblob.js index be32e0eb..bca702d2 100644 --- a/components/myportal/awaitingsubmissionfromblob.js +++ b/components/myportal/awaitingsubmissionfromblob.js @@ -202,15 +202,17 @@ const AwaitingSubmissionFromBlob = (props) => {
{t("myportal:appeal-type-label")}:{" "} {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + getFormCollectionByID( showTopThreeArr[key] .pinswg_appealcasetype ).value + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : getFormCollectionByID( showTopThreeArr[key] .pinswg_appealcasetype @@ -293,14 +295,16 @@ const AwaitingSubmissionFromBlob = (props) => { : {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + showTopThreeArr[key][ "pinswg_lpaname" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : showTopThreeArr[key][ "pinswg_lpaname" ] || ""} diff --git a/components/myportal/topthree.js b/components/myportal/topthree.js index 9c33cdbb..640e9c96 100644 --- a/components/myportal/topthree.js +++ b/components/myportal/topthree.js @@ -326,14 +326,16 @@ const TopThree = (props) => {
{t("myportal:appeal-type-label")}:{" "} {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + showTopThreeArr[key][ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : showTopThreeArr[key][ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || ""} @@ -396,14 +398,16 @@ const TopThree = (props) => {
{router.locale == "cy" ? "ACLl" : "LPA"}: {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + showTopThreeArr[key][ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : 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 8ebbbaff..c60f87a1 100644 --- a/components/myportal/topthree_reps.js +++ b/components/myportal/topthree_reps.js @@ -269,42 +269,50 @@ const TopThree = (props) => { {" "} {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + showTopThreeArr[key].representationType + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : showTopThreeArr[key].representationType || ""}
{t("myportal:capacity")}: {" "} {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + showTopThreeArr[key] .representationCapacity + '" ||@.value_cy=="' + showTopThreeArr[key] .representationCapacity + '" )].value_cy', - transLookup - ) - : jsonpath( - '$..[?(@.value_cy=="' + + json: transLookup, + sandbox: {}, + }) + : jsonpath({ + path: + '$..[?(@.value_cy=="' + showTopThreeArr[key] .representationCapacity + '")].value', - transLookup - ).length > 0 - ? jsonpath( - '$..[?(@.value_cy=="' + + json: transLookup, + sandbox: {}, + }).length > 0 + ? jsonpath({ + path: + '$..[?(@.value_cy=="' + showTopThreeArr[key] .representationCapacity + '")].value', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : showTopThreeArr[key].representationCapacity}
@@ -317,14 +325,16 @@ const TopThree = (props) => { {" "} {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + showTopThreeArr[key][ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : showTopThreeArr[key][ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue" ] || ""} diff --git a/components/myportal/viewall.js b/components/myportal/viewall.js index 8e353e9e..2cb23571 100644 --- a/components/myportal/viewall.js +++ b/components/myportal/viewall.js @@ -112,8 +112,9 @@ const ViewAllResults = (props) => { let resultsRowArr = []; const buildResultsRowArr = () => { resultsArr.map((item, key) => { - let detailsObj = jsonpath( - "$" + + let detailsObj = jsonpath({ + path: + "$" + (currentView.viewKey == "myRepresentations" ? "" : "..value") + @@ -126,8 +127,9 @@ const ViewAllResults = (props) => { ? item.pinswg_name : item.pinswg_title) + '")]', - searchDetailsObj - ); + json: searchDetailsObj, + sandbox: {}, + }); detailsObj = detailsObj[0]; //console.log(searchDetailsObj[key]); @@ -476,26 +478,30 @@ const ViewAllResults = (props) => { {currentView.viewKey == "awaitingSubmissionDetails" && _.has(resultsArr[key], "pinswg_lpaname") ? router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + resultsArr[key].pinswg_lpaname + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : resultsArr[key].pinswg_lpaname || "N/A" : ""} {_.has(resultsArr[key], [ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue", ]) ? router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + resultsArr[key][ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : resultsArr[key][ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || "N/A" @@ -504,14 +510,16 @@ const ViewAllResults = (props) => { "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue", ]) ? router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + searchDetailsObj[key].value[0][ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValuee" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : currentView.viewKey == "myRepresentations" ? searchDetailsObj[key].value : searchDetailsObj[key].value[0][ @@ -522,14 +530,16 @@ const ViewAllResults = (props) => { "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue", ]) ? router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + resultsArr[key][ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValuee" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : resultsArr[key][ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue" ] || @@ -538,14 +548,16 @@ const ViewAllResults = (props) => { : "N/A") : currentView.viewKey == "myRepresentations" && router.locale == "cy" && - jsonpath( - '$..[?(@.value=="' + + jsonpath({ + path: + '$..[?(@.value=="' + searchDetailsObj[key][ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - )} + json: transLookup, + sandbox: {}, + })}

@@ -554,26 +566,30 @@ const ViewAllResults = (props) => { {currentView.viewKey == "awaitingSubmissionDetails" ? router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + getFormCollectionByID( item.pinswg_appealcasetype ).value + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : getFormCollectionByID( item.pinswg_appealcasetype ).value || "N/A" : router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + item[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : item[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || @@ -583,14 +599,16 @@ const ViewAllResults = (props) => { {currentView.viewKey == "myRepresentations" && (router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + getFormCollectionByID( searchDetailsObj[key].appealType ).value + '")].value_cy', - transLookup - )[0] + json: transLookup, + sandbox: {}, + })[0] : getFormCollectionByID( searchDetailsObj[key].appealType ).value)} @@ -609,21 +627,25 @@ const ViewAllResults = (props) => { {currentView.viewKey == "awaitingSubmissionDetails" ? router.locale == "cy" - ? jsonpath( - '$..[?(@.statuscode=="' + + ? jsonpath({ + path: + '$..[?(@.statuscode=="' + item.statuscode + '")].value_cy', - transLookup - ) - : jsonpath( - '$..[?(@.statuscode=="' + + json: transLookup, + sandbox: {}, + }) + : jsonpath({ + path: + '$..[?(@.statuscode=="' + item.statuscode + '")].value', - transLookup - ) || "N/A" + json: transLookup, + sandbox: {}, + }) || "N/A" : currentView.viewKey == "myRepresentations" ? repRaisedDate(item.repfile_name) // ? router.locale == "cy" - : // ? jsonpath( + : // ? jsonpath({path: // // '$..[?(@.value=="' + // searchDetailsObj[key].value[0][ @@ -635,7 +657,7 @@ const ViewAllResults = (props) => { // "statuscode@OData.Community.Display.V1.FormattedValue" // ] || "N/A" // : router.locale == "cy" - // ? jsonpath( + // ? jsonpath({path: // // '$..[?(@.value=="' + // item[ @@ -645,14 +667,16 @@ const ViewAllResults = (props) => { // ) router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + item[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : item[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || "N/A"} diff --git a/components/newappeal/buildcheckrow.js b/components/newappeal/buildcheckrow.js index 339da986..374080bc 100644 --- a/components/newappeal/buildcheckrow.js +++ b/components/newappeal/buildcheckrow.js @@ -63,11 +63,19 @@ let BuildCheckRow = (props) => { const { locale } = router; const { appealtypes } = router.query; - let formObj = jsonpath("$['" + appealtypes + "']", fieldLookup); + let formObj = jsonpath({ + path: "$['" + appealtypes + "']", + json: fieldLookup, + sandbox: {}, + }); let labelTrans = router.locale == "cy" - ? jsonpath('$..[?(@.value=="' + label + '")].value_cy', formObj) + ? jsonpath({ + path: '$..[?(@.value=="' + label + '")].value_cy', + json: formObj, + sandbox: {}, + }) : label; return labelTrans; }; @@ -93,12 +101,14 @@ let BuildCheckRow = (props) => { var rows = xpath.select("//label/@description", doc); var fieldtype = xpath.select("//@classid", doc); var datafieldname = xpath.select("//@datafieldname", doc); - const isRequiredField = jsonpath( - "$..value[?(@.LogicalName=='" + + const isRequiredField = jsonpath({ + path: + "$..value[?(@.LogicalName=='" + datafieldname[0].value + "')]", - mandatoryFieldsData - ); + json: mandatoryFieldsData, + sandbox: {}, + }); var documentTypeCode = xpath.select( "//@ishareDocumentCode", diff --git a/components/newappeal/buildchecksection.js b/components/newappeal/buildchecksection.js index ea5d2c9c..519f5c1e 100644 --- a/components/newappeal/buildchecksection.js +++ b/components/newappeal/buildchecksection.js @@ -127,11 +127,19 @@ let BuildCheckSection = (props) => { const { locale } = router; const { appealtypes } = router.query; - let formObj = jsonpath("$['" + appealtypes + "']", fieldLookup); + let formObj = jsonpath({ + path: "$['" + appealtypes + "']", + json: fieldLookup, + sandbox: {}, + }); let labelTrans = router.locale == "cy" - ? jsonpath('$..[?(@.value=="' + label + '")].value_cy', formObj) + ? jsonpath({ + path: '$..[?(@.value=="' + label + '")].value_cy', + json: formObj, + sandbox: {}, + }) : label; return labelTrans; }; diff --git a/components/newappeal/buildrow.js b/components/newappeal/buildrow.js index 1919a103..8150df40 100644 --- a/components/newappeal/buildrow.js +++ b/components/newappeal/buildrow.js @@ -110,7 +110,7 @@ export default function BuildRow(props) { dateEnd = !_.isEmpty(dateEnd) && dateEnd[0].value; - //const isRequiredField = jsonpath( + //const isRequiredField = jsonpath({path: // "$..value[?(@.LogicalName=='" + // datafieldname[0].value + // "')]", diff --git a/components/newappeal/createCase.js b/components/newappeal/createCase.js index 93d6be68..da9b9aee 100644 --- a/components/newappeal/createCase.js +++ b/components/newappeal/createCase.js @@ -65,12 +65,14 @@ const RenderLPAList = ({ value={optionsObj[key].accountid} > {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + optionsObj[key].name + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : optionsObj[key].name} ); @@ -147,12 +149,14 @@ const RenderAppealTypeList = ({ : _.isEmpty(optionsObj[key].value) ? "" : router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + optionsObj[key].value + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : optionsObj[key].value} ); diff --git a/components/pdftemplates/appealRow_pdf.js b/components/pdftemplates/appealRow_pdf.js index a4671f82..efb4e758 100644 --- a/components/pdftemplates/appealRow_pdf.js +++ b/components/pdftemplates/appealRow_pdf.js @@ -148,7 +148,11 @@ export const AppealRow_pdf = (props) => { const FieldsTranslations = (label) => { const { appealtypes } = router.query; - let formObj = jsonpath("$['" + appealtypes + "']", fieldLookup); + let formObj = jsonpath({ + path: "$['" + appealtypes + "']", + json: fieldLookup, + sandbox: {}, + }); let labelTrans = label; return labelTrans; @@ -390,7 +394,7 @@ export const AppealRow_pdf = (props) => { ); break; case "{16D63FD6-119B-4353-BDCA-18358721C3FE}": - // const blobList = jsonpath( + // const blobList = jsonpath({path: // "$..[?(@.documentType=='" + // documentTypeCode[0].value + // "')]", diff --git a/components/search/addresssearchresults.js b/components/search/addresssearchresults.js index ae86a26f..30918cba 100644 --- a/components/search/addresssearchresults.js +++ b/components/search/addresssearchresults.js @@ -95,10 +95,14 @@ const SearchResults = (props) => { }; const isWatchedCase = (whichIncident) => { - let isWatched = jsonpath( - "$..value[?(@._pinswg_watchedcase_value=='" + whichIncident + "')]", - watchedCases - ); + let isWatched = jsonpath({ + path: + "$..value[?(@._pinswg_watchedcase_value=='" + + whichIncident + + "')]", + json: watchedCases, + sandbox: {}, + }); return isWatched; }; @@ -241,12 +245,15 @@ const SearchResults = (props) => { ) : ( resultsArrPaged.map((item, key) => { - let detailsObj = jsonpath( - '$..value[?(@.pinswg_name=="' + + let detailsObj = jsonpath({ + path: + '$..value[?(@.pinswg_name=="' + item.pinswg_name + '")]', - searchDetailsObj - ); + + json: searchDetailsObj, + sandbox: {}, + }); detailsObj = detailsObj[0]; return (
{ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue", ]) ? router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + item[ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : item[ "_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue" ] || "N/A" @@ -469,14 +478,16 @@ const SearchResults = (props) => { "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue", ]) ? router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + item[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : item[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || "N/A" @@ -490,14 +501,16 @@ const SearchResults = (props) => { : {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + item[ "pinswg_appealType" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : item["pinswg_appealType"] || "N/A"}
@@ -510,14 +523,16 @@ const SearchResults = (props) => { {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + item[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : item[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || "N/A"} diff --git a/components/search/advancedsearch.js b/components/search/advancedsearch.js index 1c23b9a1..8a863dbc 100644 --- a/components/search/advancedsearch.js +++ b/components/search/advancedsearch.js @@ -126,13 +126,15 @@ const RenderCaseStatusList = ({ : _.isEmpty(optionsObj[key].value) ? "" : router.locale == "cy" - ? jsonpath( - '$..[?(@.statuscode=="' + + ? jsonpath({ + path: + '$..[?(@.statuscode=="' + optionsObj[key] .statuscode + '")].value_cy', - optionsObj - ) + json: optionsObj, + sandbox: {}, + }) : optionsObj[key].value || t( "case:summary-no-date-entered-label" @@ -249,13 +251,15 @@ let AdvancedSearch = (props) => { {/* {optionsObj[key].name} */} {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + optionsObj[key] .name + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : optionsObj[key].name || t( "case:summary-no-date-entered-label" @@ -352,13 +356,15 @@ let AdvancedSearch = (props) => { ) ? "" : router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + optionsObj[key] .value + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : optionsObj[key].value || t( "case:summary-no-date-entered-label" diff --git a/components/search/dnssearchresults.js b/components/search/dnssearchresults.js index 29694ff9..c8e6965c 100644 --- a/components/search/dnssearchresults.js +++ b/components/search/dnssearchresults.js @@ -172,10 +172,14 @@ const DNSSearchResults = (props) => { }; const isWatchedCase = (whichIncident) => { - let isWatched = jsonpath( - "$..value[?(@._pinswg_watchedcase_value=='" + whichIncident + "')]", - watchedCases - ); + let isWatched = jsonpath({ + path: + "$..value[?(@._pinswg_watchedcase_value=='" + + whichIncident + + "')]", + json: watchedCases, + sandbox: {}, + }); return isWatched; }; @@ -308,12 +312,14 @@ const DNSSearchResults = (props) => { ) : ( resultsArr.map((item, key) => { - let detailsObj = jsonpath( - '$..value[?(@.pinswg_name=="' + + let detailsObj = jsonpath({ + path: + '$..value[?(@.pinswg_name=="' + item.title + '")]', - searchDetailsObj - ); + json: searchDetailsObj, + sandbox: {}, + }); detailsObj = detailsObj[0]; var appType = @@ -509,14 +515,16 @@ const DNSSearchResults = (props) => { "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue", ]) ? router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + detailsObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : detailsObj[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || "N/A" @@ -530,14 +538,16 @@ const DNSSearchResults = (props) => { : {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + item[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : item[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || "N/A"} diff --git a/components/search/searchresults.js b/components/search/searchresults.js index 71442be0..52c76863 100644 --- a/components/search/searchresults.js +++ b/components/search/searchresults.js @@ -101,10 +101,15 @@ const SearchResults = (props) => { }; const isWatchedCase = (whichIncident) => { - let isWatched = jsonpath( - "$..value[?(@._pinswg_watchedcase_value=='" + whichIncident + "')]", - watchedCases - ); + let isWatched = jsonpath({ + path: + "$..value[?(@._pinswg_watchedcase_value=='" + + whichIncident + + "')]", + + json: watchedCases, + sandbox: {}, + }); return isWatched; }; @@ -246,12 +251,14 @@ const SearchResults = (props) => { ) : ( resultsArr.map((item, key) => { - let detailsObj = jsonpath( - '$..value[?(@.pinswg_name=="' + + let detailsObj = jsonpath({ + path: + '$..value[?(@.pinswg_name=="' + item.title + '")]', - searchDetailsObj - ); + json: searchDetailsObj, + sandbox: {}, + }); Object.assign(item, item.pinswg_sipscase); @@ -473,14 +480,16 @@ const SearchResults = (props) => { "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue", ]) ? router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + item[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : item[ "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue" ] || "N/A" @@ -494,14 +503,16 @@ const SearchResults = (props) => { : {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + item[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : item[ "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue" ] || "N/A"} @@ -515,14 +526,16 @@ const SearchResults = (props) => { {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + + ? jsonpath({ + path: + '$..[?(@.value=="' + item[ "statuscode@OData.Community.Display.V1.FormattedValue" ] + '")].value_cy', - transLookup - ) + json: transLookup, + sandbox: {}, + }) : item[ "statuscode@OData.Community.Display.V1.FormattedValue" ] || "N/A"} diff --git a/components/utils/index.js b/components/utils/index.js index f3d07bde..fb846316 100644 --- a/components/utils/index.js +++ b/components/utils/index.js @@ -17,52 +17,67 @@ import xpath from "xpath"; * @param String formtype - string from appeal entity name */ export const getFormCollection = (formtype) => { - const collectionName = jsonpath( - "$..[?(@.LogicalName=='" + formtype + "')]", - data - ); + const collectionName = jsonpath({ + path: "$..[?(@.LogicalName=='" + formtype + "')]", + json: data, + sandbox: {}, + }); return collectionName[0]; }; export const getFormCollectionByID = (appealTypeID) => { - const collectionName = jsonpath( - "$..[?(@.appealTypeID =='" + appealTypeID + "')]", - data - ); + const collectionName = jsonpath({ + path: "$..[?(@.appealTypeID =='" + appealTypeID + "')]", + json: data, + sandbox: {}, + }); return collectionName[0]; }; export const getFormIDByLogicalName = (appealTypeLogicalName) => { - const collectionName = jsonpath( - "$..[?(@.LogicalName =='" + appealTypeLogicalName + "')]", - data - ); + const collectionName = jsonpath({ + path: "$..[?(@.LogicalName =='" + appealTypeLogicalName + "')]", + json: data, + sandbox: {}, + }); return collectionName[0]; }; export const getPickListLabel = (data, picklistType, picklistID) => { - const pickListData = jsonpath( - "$..[?(@.LogicalName=='" + picklistType + "')]", - data - ); + const pickListData = jsonpath({ + path: "$..[?(@.LogicalName=='" + picklistType + "')]", + json: data, + sandbox: {}, + }); - const pickListLabel = jsonpath( - "$..[?(@.Value=='" + picklistID + "')].Label.LocalizedLabels..Label", - pickListData - ); + const pickListLabel = jsonpath({ + path: + "$..[?(@.Value=='" + + picklistID + + "')].Label.LocalizedLabels..Label", + + json: pickListData, + sandbox: {}, + }); return pickListLabel[0]; }; export const getRadioLabel = (data, radiotListName, radioListID) => { - const radioListData = jsonpath( - "$..[?(@.LogicalName=='" + radiotListName + "')]", - data - ); + const radioListData = jsonpath({ + path: "$..[?(@.LogicalName=='" + radiotListName + "')]", + json: data, + sandbox: {}, + }); - const pickListLabel = jsonpath( - "$..[?(@.Value=='" + radioListID + "')].Label.LocalizedLabels..Label", - radioListData - ); + const pickListLabel = jsonpath({ + path: + "$..[?(@.Value=='" + + radioListID + + "')].Label.LocalizedLabels..Label", + + json: radioListData, + sandbox: {}, + }); return pickListLabel[0]; }; @@ -319,12 +334,14 @@ export const getProgressObj = ( dateEnd = !_.isEmpty(dateEnd) && dateEnd[0].value; - const isRequiredField = jsonpath( - "$..value[?(@.LogicalName=='" + + const isRequiredField = jsonpath({ + path: + "$..value[?(@.LogicalName=='" + datafieldname[0].value + "')]", - mandatoryFieldsData - ); + json: mandatoryFieldsData, + sandbox: {}, + }); if (datafieldname[0].value.includes("pinswg_fileUpload")) { if (typeof isRequiredField[0] != "undefined") { diff --git a/middleware.js b/middleware.js index a07e56ce..afd4fc0b 100644 --- a/middleware.js +++ b/middleware.js @@ -40,7 +40,10 @@ export function middleware(request) { .trim(); const requestHeaders = new Headers(request.headers); + // Unique trusted nonce requestHeaders.set("x-nonce", nonce); + + // CSP policy requestHeaders.set( "Content-Security-Policy", contentSecurityPolicyHeaderValue @@ -56,24 +59,29 @@ export function middleware(request) { contentSecurityPolicyHeaderValue ); + // XSS protection (legacy) + response.headers.set("X-XSS-Protection", "1; mode=block"); + + // Prevent MIME type sniffing + response.headers.set("X-Content-Type-Options", "nosniff"); + + // Prevent iframe embedding + response.headers.set("X-Frame-Options", "DENY"); + + // Referrer policy + response.headers.set("Referrer-Policy", "strict-origin-when-cross-origin"); + + // Permissions lockdown + response.headers.set( + "Permissions-Policy", + "geolocation=(), camera=(), microphone=(), fullscreen=(self)" + ); + + // Enforce HTTPS via HSTS + response.headers.set( + "Strict-Transport-Security", + "max-age=63072000; includeSubDomains; preload" + ); + return response; } - -// export const config = { -// matcher: [ -// /* -// * Match all request paths except for the ones starting with: -// * - api (API routes) -// * - _next/static (static files) -// * - _next/image (image optimization files) -// * - favicon.ico (favicon file) -// */ -// { -// source: "/((?!api|_next/static|_next/image|favicon.ico).*)", -// missing: [ -// { type: "header", key: "next-router-prefetch" }, -// { type: "header", key: "purpose", value: "prefetch" }, -// ], -// }, -// ], -// }; diff --git a/package.json b/package.json index 25e7f5bd..42fe9764 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "govuk-frontend": "^5.0.0", "history": "^5.3.0", "jsonpath": "^1.1.1", - "jsonpath-plus": "^4.0.0", + "jsonpath-plus": "^10.3.0", "leaflet": "^1.9.4", "leaflet-defaulticon-compatibility": "^0.1.2", "lodash": "^4.17.21", @@ -104,4 +104,4 @@ "eslint-plugin-jsdoc": "^48.2.3", "prisma": "^5.0.0" } -} \ No newline at end of file +} diff --git a/pages/api/endpoint/getbasicsearch_by_address_api.js b/pages/api/endpoint/getbasicsearch_by_address_api.js index 72101e2f..683121e6 100644 --- a/pages/api/endpoint/getbasicsearch_by_address_api.js +++ b/pages/api/endpoint/getbasicsearch_by_address_api.js @@ -627,7 +627,11 @@ export default async function ApiProxy(req, res) { }) ); - searchResultsObj = jsonpath("$..[?(@ && @.pinswg_name)]", searchResultsObj); + searchResultsObj = jsonpath({ + path: "$..[?(@ && @.pinswg_name)]", + json: searchResultsObj, + sandbox: {}, + }); searchResultsObj = searchResultsObj.filter((arr) => arr.incidentid != null); diff --git a/pages/api/endpoint/getmylpacases_api.js b/pages/api/endpoint/getmylpacases_api.js index 5652e639..25db7730 100644 --- a/pages/api/endpoint/getmylpacases_api.js +++ b/pages/api/endpoint/getmylpacases_api.js @@ -48,7 +48,11 @@ export default async function ApiProxy(req, res) { const lpaList = await getLPA(); - const lpaGUID = jsonpath('$..[?(@.name=="' + lpaid + '")]', lpaList); + const lpaGUID = jsonpath({ + path: '$..[?(@.name=="' + lpaid + '")]', + json: lpaList, + sandbox: {}, + }); //console.log( // '$..[?(@.name="' + lpaid + '")]', diff --git a/pages/myportal/[appealtypes].js b/pages/myportal/[appealtypes].js index c4975bb5..74d6d1ee 100644 --- a/pages/myportal/[appealtypes].js +++ b/pages/myportal/[appealtypes].js @@ -76,10 +76,11 @@ let Home = (props) => { let optionsStr = props.appealType.appealTypeOptions.value || {}; - let selectedObj = jsonpath( - "$..[?(@.attributevalue=='" + router.query.apt + "')]", - optionsStr - ); + let selectedObj = jsonpath({ + path: "$..[?(@.attributevalue=='" + router.query.apt + "')]", + json: optionsStr, + sandbox: {}, + }); //let optionsTitleObj = []; diff --git a/pages/newappeal/[appealtypes].js b/pages/newappeal/[appealtypes].js index 4c5945b0..e4be195a 100644 --- a/pages/newappeal/[appealtypes].js +++ b/pages/newappeal/[appealtypes].js @@ -68,10 +68,11 @@ let Home = (props) => { let optionsStr = props.appealType.appealTypeOptions.value; - let selectedObj = jsonpath( - "$..[?(@.attributevalue=='" + router.query.apt + "')]", - optionsStr - ); + let selectedObj = jsonpath({ + path: "$..[?(@.attributevalue=='" + router.query.apt + "')]", + json: optionsStr, + sandbox: {}, + }); //let optionsTitleObj = [];