uodated queries to sort deep recursion
This commit is contained in:
@@ -134,7 +134,7 @@ const CaseSummary = (props) => {
|
||||
const isWatchedCase = (whichIncident) => {
|
||||
let isWatched = jsonpath({
|
||||
path:
|
||||
"$..value[?(@._pinswg_watchedcase_value=='" +
|
||||
"$..value[?(@ && @._pinswg_watchedcase_value=='" +
|
||||
whichIncident +
|
||||
"')]",
|
||||
json: watchedCases,
|
||||
@@ -176,30 +176,30 @@ const CaseSummary = (props) => {
|
||||
|
||||
currentType == "searchResultsObj"
|
||||
? (casesObj = jsonpath({
|
||||
path: '$..[?(@.title=="' + caseReference + '")]',
|
||||
path: '$..[?(@ && @.title=="' + caseReference + '")]',
|
||||
json: searchResultsObj,
|
||||
eval: true,
|
||||
}))
|
||||
: currentType == "watchedCases"
|
||||
? (casesObj = jsonpath({
|
||||
path: '$..[?(@.pinswg_title=="' + caseReference + '")]',
|
||||
path: '$..[?(@ && @.pinswg_title=="' + caseReference + '")]',
|
||||
json: setCaseQueryObj,
|
||||
eval: true,
|
||||
}))
|
||||
: currentType == "myCases"
|
||||
? (casesObj = jsonpath({
|
||||
path: '$..[?(@.pinswg_title=="' + caseReference + '")]',
|
||||
path: '$..[?(@ && @.pinswg_title=="' + caseReference + '")]',
|
||||
json: setCaseQueryObj,
|
||||
eval: true,
|
||||
}))
|
||||
: currentType == "directResultsObj"
|
||||
? (casesObj = jsonpath({
|
||||
path: '$..[?(@.ticketnumber=="' + caseReference + '")]',
|
||||
path: '$..[?(@ && @.ticketnumber=="' + caseReference + '")]',
|
||||
json: setCaseQueryObj,
|
||||
eval: true,
|
||||
}))
|
||||
: (casesObj = jsonpath({
|
||||
path: '$..[?(@.reference=="' + caseReference + '")]',
|
||||
path: '$..[?(@ && @.reference=="' + caseReference + '")]',
|
||||
json: setCaseQueryObj,
|
||||
eval: true,
|
||||
}));
|
||||
@@ -210,14 +210,14 @@ const CaseSummary = (props) => {
|
||||
|
||||
currentType == "searchResultsObj"
|
||||
? (detailsObj = jsonpath({
|
||||
path: '$..[?(@.pinswg_name=="' + caseReference + '")]',
|
||||
path: '$..[?(@ && @.pinswg_name=="' + caseReference + '")]',
|
||||
json: searchDetailsObj,
|
||||
eval: true,
|
||||
}))
|
||||
: currentType == "directResultsObj"
|
||||
? (detailsObj = setCaseDetailsObj[0].value[0])
|
||||
: (detailsObj = jsonpath({
|
||||
path: '$..[?(@.pinswg_name=="' + caseReference + '")]',
|
||||
path: '$..[?(@ && @.pinswg_name=="' + caseReference + '")]',
|
||||
jsopn: setCaseDetailsObj,
|
||||
eval: true,
|
||||
}));
|
||||
@@ -399,7 +399,7 @@ const CaseSummary = (props) => {
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_casestage@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
|
||||
Reference in New Issue
Block a user