update jsonpath library
This commit is contained in:
@@ -21,7 +21,7 @@ import {
|
||||
} from "../../../store/currentView/action";
|
||||
import { useDropzone } from "react-dropzone";
|
||||
import { select } from "xpath";
|
||||
import jsonpath from "jsonpath";
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import { useState } from "react";
|
||||
import Enforcement_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_enforcement";
|
||||
import S78_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_s78";
|
||||
@@ -199,11 +199,11 @@ let RepLPA = (props) => {
|
||||
|
||||
var detailsObj = {};
|
||||
|
||||
detailsObj = jsonpath.query(
|
||||
setCaseDetailsObj,
|
||||
detailsObj = jsonpath(
|
||||
'$..[?(@.pinswg_name=="' +
|
||||
currentView.caseReference.currentReference +
|
||||
'")]'
|
||||
'")]',
|
||||
setCaseDetailsObj
|
||||
);
|
||||
|
||||
let setCaseResultssObj = router.query.hasOwnProperty("state")
|
||||
@@ -216,11 +216,11 @@ let RepLPA = (props) => {
|
||||
|
||||
var resultsObj = {};
|
||||
|
||||
resultsObj = jsonpath.query(
|
||||
setCaseResultssObj,
|
||||
resultsObj = jsonpath(
|
||||
'$..[?(@.pinswg_name=="' +
|
||||
currentView.caseReference.currentReference +
|
||||
'")]'
|
||||
'")]',
|
||||
setCaseResultssObj
|
||||
);
|
||||
resultsObj = resultsObj[0];
|
||||
|
||||
@@ -239,11 +239,11 @@ let RepLPA = (props) => {
|
||||
: "Representation"}{" "}
|
||||
{locale == "cy" ? "o ACLI am a" : "from an LPA for a"}{" "}
|
||||
{locale == "cy"
|
||||
? jsonpath.query(
|
||||
transLookup,
|
||||
? jsonpath(
|
||||
'$..[?(@.attributevalue=="' +
|
||||
currentView.caseReference.appealType +
|
||||
'")].value_cy'
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: getFormCollectionByID(
|
||||
currentView.caseReference.appealType
|
||||
|
||||
Reference in New Issue
Block a user