update jsonpath for csp fix
This commit is contained in:
@@ -63,11 +63,19 @@ let BuildCheckRow = (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;
|
||||
};
|
||||
@@ -93,12 +101,14 @@ let BuildCheckRow = (props) => {
|
||||
var rows = xpath.select("//label/@description", doc);
|
||||
var fieldtype = xpath.select("//@classid", doc);
|
||||
var datafieldname = xpath.select("//@datafieldname", doc);
|
||||
const isRequiredField = jsonpath(
|
||||
"$..value[?(@.LogicalName=='" +
|
||||
const isRequiredField = jsonpath({
|
||||
path:
|
||||
"$..value[?(@.LogicalName=='" +
|
||||
datafieldname[0].value +
|
||||
"')]",
|
||||
mandatoryFieldsData
|
||||
);
|
||||
json: mandatoryFieldsData,
|
||||
sandbox: {},
|
||||
});
|
||||
|
||||
var documentTypeCode = xpath.select(
|
||||
"//@ishareDocumentCode",
|
||||
|
||||
Reference in New Issue
Block a user