uodated queries to sort deep recursion

This commit is contained in:
2025-04-16 08:44:45 +01:00
parent 420501dbf1
commit d882e65071
54 changed files with 270 additions and 267 deletions
+6 -6
View File
@@ -97,7 +97,7 @@ const SearchResults = (props) => {
const isWatchedCase = (whichIncident) => {
let isWatched = jsonpath({
path:
"$..value[?(@._pinswg_watchedcase_value=='" +
"$..value[?(@ && @._pinswg_watchedcase_value=='" +
whichIncident +
"')]",
json: watchedCases,
@@ -247,7 +247,7 @@ const SearchResults = (props) => {
resultsArrPaged.map((item, key) => {
let detailsObj = jsonpath({
path:
'$..value[?(@.pinswg_name=="' +
'$..value[?(@ && @.pinswg_name=="' +
item.pinswg_name +
'")]',
@@ -462,7 +462,7 @@ const SearchResults = (props) => {
? router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -480,7 +480,7 @@ const SearchResults = (props) => {
? router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -503,7 +503,7 @@ const SearchResults = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"pinswg_appealType"
] +
@@ -525,7 +525,7 @@ const SearchResults = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
+3 -3
View File
@@ -128,7 +128,7 @@ const RenderCaseStatusList = ({
: router.locale == "cy"
? jsonpath({
path:
'$..[?(@.statuscode=="' +
'$..[?(@ && @.statuscode=="' +
optionsObj[key]
.statuscode +
'")].value_cy',
@@ -243,7 +243,7 @@ let AdvancedSearch = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
optionsObj[key]
.name +
'")].value_cy',
@@ -348,7 +348,7 @@ let AdvancedSearch = (props) => {
: router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
optionsObj[key]
.value +
'")].value_cy',
+4 -4
View File
@@ -170,7 +170,7 @@ const DNSSearchResults = (props) => {
const isWatchedCase = (whichIncident) => {
let isWatched = jsonpath({
path:
"$..value[?(@._pinswg_watchedcase_value=='" +
"$..value[?(@ && @._pinswg_watchedcase_value=='" +
whichIncident +
"')]",
json: watchedCases,
@@ -299,7 +299,7 @@ const DNSSearchResults = (props) => {
resultsArr.map((item, key) => {
let detailsObj = jsonpath({
path:
'$..value[?(@.pinswg_name=="' +
'$..value[?(@ && @.pinswg_name=="' +
item.title +
'")]',
json: searchDetailsObj,
@@ -460,7 +460,7 @@ const DNSSearchResults = (props) => {
? router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -484,7 +484,7 @@ const DNSSearchResults = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
+5 -5
View File
@@ -103,7 +103,7 @@ const SearchResults = (props) => {
const isWatchedCase = (whichIncident) => {
let isWatched = jsonpath({
path:
"$..value[?(@._pinswg_watchedcase_value=='" +
"$..value[?(@ && @._pinswg_watchedcase_value=='" +
whichIncident +
"')]",
@@ -244,7 +244,7 @@ const SearchResults = (props) => {
resultsArr.map((item, key) => {
let detailsObj = jsonpath({
path:
'$..value[?(@.pinswg_name=="' +
'$..value[?(@ && @.pinswg_name=="' +
item.title +
'")]',
json: searchDetailsObj,
@@ -439,7 +439,7 @@ const SearchResults = (props) => {
? router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -462,7 +462,7 @@ const SearchResults = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -485,7 +485,7 @@ const SearchResults = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +