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"}
|
||||
|
||||
@@ -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"
|
||||
@@ -239,13 +241,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"
|
||||
@@ -342,13 +346,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"
|
||||
|
||||
@@ -168,10 +168,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;
|
||||
};
|
||||
@@ -293,12 +297,14 @@ const DNSSearchResults = (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 (
|
||||
@@ -452,14 +458,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"
|
||||
@@ -474,14 +482,16 @@ const DNSSearchResults = (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"}
|
||||
|
||||
@@ -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"}
|
||||
|
||||
Reference in New Issue
Block a user