update jsonpath for csp fix
This commit is contained in:
@@ -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) => {
|
||||
</div>
|
||||
) : (
|
||||
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 (
|
||||
<div
|
||||
@@ -453,14 +460,16 @@ const SearchResults = (props) => {
|
||||
"_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) => {
|
||||
:
|
||||
</span>
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
item[
|
||||
"pinswg_appealType"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: item["pinswg_appealType"] ||
|
||||
"N/A"}
|
||||
</dd>
|
||||
@@ -510,14 +523,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"}
|
||||
|
||||
Reference in New Issue
Block a user