update jsonpath library

This commit is contained in:
2024-02-08 14:28:40 +00:00
parent f034f4be3d
commit 2af463fbe9
67 changed files with 961 additions and 966 deletions
+5 -5
View File
@@ -2,7 +2,7 @@ import Link from "next/link";
import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation";
import xpath from "xpath";
import jsonpath from "jsonpath";
import { JSONPath as jsonpath } from "jsonpath-plus";
import { useSelector, shallowEqual, connect } from "react-redux";
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
import {
@@ -145,7 +145,7 @@ export const AppealRow_pdf = (props) => {
const FieldsTranslations = (label) => {
const { appealtypes } = router.query;
let formObj = jsonpath.query(fieldLookup, "$['" + appealtypes + "']");
let formObj = jsonpath("$['" + appealtypes + "']", fieldLookup);
let labelTrans = label;
return labelTrans;
@@ -371,11 +371,11 @@ export const AppealRow_pdf = (props) => {
);
break;
case "{16D63FD6-119B-4353-BDCA-18358721C3FE}":
const blobList = jsonpath.query(
props.filesList,
const blobList = jsonpath(
"$..[?(@.documentType=='" +
documentTypeCode[0].value +
"')]"
"')]",
props.filesList
);
return (
<View
@@ -15,7 +15,7 @@ import useTranslation from "next-translate/useTranslation";
import transLookupCY from "../../locales/cy/myrepresentations.json";
import transLookupEN from "../../locales/en/myrepresentations.json";
import jsonpath from "jsonpath";
import { JSONPath as jsonpath } from "jsonpath-plus";
const getTrans = (locale, key) => {
let jsonQuery = `$.${key}`;