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
+10 -2
View File
@@ -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;
};