update jsonpath for csp fix

This commit is contained in:
2025-04-15 12:59:27 +01:00
parent 1caab59c05
commit 05f791e6a8
57 changed files with 1585 additions and 1041 deletions
+33 -20
View File
@@ -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;
};
@@ -237,12 +242,14 @@ const SearchResults = (props) => {
</div>
) : (
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] || {};
return (
@@ -430,14 +437,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"
@@ -451,14 +460,16 @@ const SearchResults = (props) => {
:
</span>
{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"}
@@ -472,14 +483,16 @@ const SearchResults = (props) => {
</span>
{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"}