update jsonpath library
This commit is contained in:
@@ -4,7 +4,7 @@ import React, { useEffect, useState } from "react";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import {
|
import {
|
||||||
Field,
|
Field,
|
||||||
reduxForm,
|
reduxForm,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
@@ -20,9 +20,9 @@ const Breadcrumbs = (props) => {
|
|||||||
if (_.isEmpty(courseContent)) {
|
if (_.isEmpty(courseContent)) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
var sectionObj = jsonpath.query(
|
var sectionObj = jsonpath(
|
||||||
courseContent,
|
'$..sections[?(@.path=="/' + coursePageURL + '")]',
|
||||||
'$..sections[?(@.path=="/' + coursePageURL + '")]'
|
courseContent
|
||||||
);
|
);
|
||||||
var breadcrumb = sectionObj[0].chapter.title; //sectionObj[0].chapter
|
var breadcrumb = sectionObj[0].chapter.title; //sectionObj[0].chapter
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
@@ -73,9 +73,9 @@ const DocumentDetails = (props) => {
|
|||||||
>
|
>
|
||||||
<option value="all">
|
<option value="all">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
'$..[?(@.value=="All")].value_cy',
|
||||||
'$..[?(@.value=="All")].value_cy'
|
transLookup
|
||||||
)
|
)
|
||||||
: "All"}
|
: "All"}
|
||||||
</option>
|
</option>
|
||||||
@@ -88,11 +88,11 @@ const DocumentDetails = (props) => {
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
item.pinswg_isharedocumentlocationsLabel +
|
item.pinswg_isharedocumentlocationsLabel +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: item.pinswg_isharedocumentlocationsLabel ||
|
: item.pinswg_isharedocumentlocationsLabel ||
|
||||||
t(
|
t(
|
||||||
@@ -216,11 +216,11 @@ const DocumentDetails = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
documentDetailsArr.map((item, key) => {
|
documentDetailsArr.map((item, key) => {
|
||||||
let detailsObj = jsonpath.query(
|
let detailsObj = jsonpath(
|
||||||
item,
|
|
||||||
"$..[?(@._pinswg_documentids_value=='" +
|
"$..[?(@._pinswg_documentids_value=='" +
|
||||||
incidentid +
|
incidentid +
|
||||||
"')]"
|
"')]",
|
||||||
|
item
|
||||||
);
|
);
|
||||||
detailsObj = item;
|
detailsObj = item;
|
||||||
return (
|
return (
|
||||||
@@ -268,13 +268,13 @@ const DocumentDetails = (props) => {
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import Link from "next/link";
|
|||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath, { value } from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _, { property } from "lodash";
|
import _, { property } from "lodash";
|
||||||
import {
|
import {
|
||||||
Field,
|
Field,
|
||||||
@@ -85,13 +85,13 @@ let MakeRepresentation = (props) => {
|
|||||||
: false;
|
: false;
|
||||||
|
|
||||||
currentType == "searchResultsObj"
|
currentType == "searchResultsObj"
|
||||||
? (casesObj = jsonpath.query(
|
? (casesObj = jsonpath(
|
||||||
setCaseQueryObj,
|
'$..[?(@.title=="' + caseReference + '")]',
|
||||||
'$..[?(@.title=="' + caseReference + '")]'
|
setCaseQueryObj
|
||||||
))
|
))
|
||||||
: (casesObj = jsonpath.query(
|
: (casesObj = jsonpath(
|
||||||
setCaseQueryObj,
|
'$..[?(@.reference=="' + caseReference + '")]',
|
||||||
'$..[?(@.reference=="' + caseReference + '")]'
|
setCaseQueryObj
|
||||||
));
|
));
|
||||||
|
|
||||||
casesObj = Object.assign({}, ...casesObj);
|
casesObj = Object.assign({}, ...casesObj);
|
||||||
@@ -114,7 +114,7 @@ let MakeRepresentation = (props) => {
|
|||||||
|
|
||||||
var detailsObj = {};
|
var detailsObj = {};
|
||||||
|
|
||||||
detailsObj = jsonpath.query(
|
detailsObj = jsonpath(
|
||||||
setCaseDetailsObj,
|
setCaseDetailsObj,
|
||||||
'$..[?(@.pinswg_name=="' +
|
'$..[?(@.pinswg_name=="' +
|
||||||
currentView.caseReference.currentReference +
|
currentView.caseReference.currentReference +
|
||||||
@@ -497,9 +497,9 @@ let MakeRepresentation = (props) => {
|
|||||||
|
|
||||||
var detailsObj = {};
|
var detailsObj = {};
|
||||||
|
|
||||||
detailsObj = jsonpath.query(
|
detailsObj = jsonpath(
|
||||||
setCaseDetailsObj,
|
'$..[?(@.pinswg_name=="' + caseReference + '")]',
|
||||||
'$..[?(@.pinswg_name=="' + caseReference + '")]'
|
setCaseDetailsObj
|
||||||
);
|
);
|
||||||
|
|
||||||
detailsObj = detailsObj[0];
|
detailsObj = detailsObj[0];
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { useRouter } from "next/router";
|
|||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { Field, reduxForm } from "redux-form";
|
import { Field, reduxForm } from "redux-form";
|
||||||
import { RenderPickList, RenderTextfield } from "./representationElements";
|
import { RenderPickList, RenderTextfield } from "./representationElements";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
|
|
||||||
const RepDetails = (props) => {
|
const RepDetails = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -31,9 +31,9 @@ const RepDetails = (props) => {
|
|||||||
: caseReference
|
: caseReference
|
||||||
: caseReference;
|
: caseReference;
|
||||||
|
|
||||||
detailsObj = jsonpath.query(
|
detailsObj = jsonpath(
|
||||||
setCaseDetailsObj,
|
'$..[?(@.pinswg_name=="' + caseReference + '")]',
|
||||||
'$..[?(@.pinswg_name=="' + caseReference + '")]'
|
setCaseDetailsObj
|
||||||
);
|
);
|
||||||
|
|
||||||
detailsObj = detailsObj[0];
|
detailsObj = detailsObj[0];
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Field, Fields, reduxForm } from "redux-form";
|
|||||||
import router from "next/router";
|
import router from "next/router";
|
||||||
import React, { useState, useMemo } from "react";
|
import React, { useState, useMemo } from "react";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import Dropzone, { useDropzone } from "react-dropzone";
|
import Dropzone, { useDropzone } from "react-dropzone";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import dynamic from "next/dynamic";
|
import dynamic from "next/dynamic";
|
||||||
@@ -963,9 +963,9 @@ export const RenderFileUpload = (field) => {
|
|||||||
|
|
||||||
const filelistObj = field.fileList || {};
|
const filelistObj = field.fileList || {};
|
||||||
|
|
||||||
const blobList = jsonpath.query(
|
const blobList = jsonpath(
|
||||||
filelistObj,
|
"$..[?(@.documentType=='" + field.documentTypeCode + "')]",
|
||||||
"$..[?(@.documentType=='" + field.documentTypeCode + "')]"
|
filelistObj
|
||||||
);
|
);
|
||||||
|
|
||||||
const deleteThisBlob = async (
|
const deleteThisBlob = async (
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import {
|
|||||||
} from "../../../store/currentView/action";
|
} from "../../../store/currentView/action";
|
||||||
import { useDropzone } from "react-dropzone";
|
import { useDropzone } from "react-dropzone";
|
||||||
import { select } from "xpath";
|
import { select } from "xpath";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import Enforcement_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_enforcement";
|
import Enforcement_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_enforcement";
|
||||||
import S78_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_s78";
|
import S78_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_s78";
|
||||||
@@ -199,11 +199,11 @@ let RepLPA = (props) => {
|
|||||||
|
|
||||||
var detailsObj = {};
|
var detailsObj = {};
|
||||||
|
|
||||||
detailsObj = jsonpath.query(
|
detailsObj = jsonpath(
|
||||||
setCaseDetailsObj,
|
|
||||||
'$..[?(@.pinswg_name=="' +
|
'$..[?(@.pinswg_name=="' +
|
||||||
currentView.caseReference.currentReference +
|
currentView.caseReference.currentReference +
|
||||||
'")]'
|
'")]',
|
||||||
|
setCaseDetailsObj
|
||||||
);
|
);
|
||||||
|
|
||||||
let setCaseResultssObj = router.query.hasOwnProperty("state")
|
let setCaseResultssObj = router.query.hasOwnProperty("state")
|
||||||
@@ -216,11 +216,11 @@ let RepLPA = (props) => {
|
|||||||
|
|
||||||
var resultsObj = {};
|
var resultsObj = {};
|
||||||
|
|
||||||
resultsObj = jsonpath.query(
|
resultsObj = jsonpath(
|
||||||
setCaseResultssObj,
|
|
||||||
'$..[?(@.pinswg_name=="' +
|
'$..[?(@.pinswg_name=="' +
|
||||||
currentView.caseReference.currentReference +
|
currentView.caseReference.currentReference +
|
||||||
'")]'
|
'")]',
|
||||||
|
setCaseResultssObj
|
||||||
);
|
);
|
||||||
resultsObj = resultsObj[0];
|
resultsObj = resultsObj[0];
|
||||||
|
|
||||||
@@ -239,11 +239,11 @@ let RepLPA = (props) => {
|
|||||||
: "Representation"}{" "}
|
: "Representation"}{" "}
|
||||||
{locale == "cy" ? "o ACLI am a" : "from an LPA for a"}{" "}
|
{locale == "cy" ? "o ACLI am a" : "from an LPA for a"}{" "}
|
||||||
{locale == "cy"
|
{locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.attributevalue=="' +
|
'$..[?(@.attributevalue=="' +
|
||||||
currentView.caseReference.appealType +
|
currentView.caseReference.appealType +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: getFormCollectionByID(
|
: getFormCollectionByID(
|
||||||
currentView.caseReference.appealType
|
currentView.caseReference.appealType
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { useRouter } from "next/router";
|
|||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { Field, reduxForm } from "redux-form";
|
import { Field, reduxForm } from "redux-form";
|
||||||
import { RenderPickList, RenderTextfield } from "./representationElements";
|
import { RenderPickList, RenderTextfield } from "./representationElements";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
|
|
||||||
const RepLPADetails = (props) => {
|
const RepLPADetails = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -23,9 +23,9 @@ const RepLPADetails = (props) => {
|
|||||||
|
|
||||||
var detailsObj = {};
|
var detailsObj = {};
|
||||||
|
|
||||||
detailsObj = jsonpath.query(
|
detailsObj = jsonpath(
|
||||||
setCaseDetailsObj,
|
'$..[?(@.pinswg_name=="' + caseReference + '")]',
|
||||||
'$..[?(@.pinswg_name=="' + caseReference + '")]'
|
setCaseDetailsObj
|
||||||
);
|
);
|
||||||
|
|
||||||
detailsObj = detailsObj[0];
|
detailsObj = detailsObj[0];
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ import {
|
|||||||
} from "../../../../store/currentView/action";
|
} from "../../../../store/currentView/action";
|
||||||
import { useDropzone } from "react-dropzone";
|
import { useDropzone } from "react-dropzone";
|
||||||
import { select } from "xpath";
|
import { select } from "xpath";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
|
|
||||||
const RepresentationProgress_enforcement = (props) => {
|
const RepresentationProgress_enforcement = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import {
|
|||||||
} from "../../../../store/currentView/action";
|
} from "../../../../store/currentView/action";
|
||||||
import { useDropzone } from "react-dropzone";
|
import { useDropzone } from "react-dropzone";
|
||||||
import { select } from "xpath";
|
import { select } from "xpath";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
|
|
||||||
const RepresentationProgress_s78 = (props) => {
|
const RepresentationProgress_s78 = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|||||||
+7
-7
@@ -20,7 +20,7 @@ import {
|
|||||||
} from "../../../../store/currentView/action";
|
} from "../../../../store/currentView/action";
|
||||||
import { useDropzone } from "react-dropzone";
|
import { useDropzone } from "react-dropzone";
|
||||||
import { select } from "xpath";
|
import { select } from "xpath";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
|
|
||||||
let Enforcement_Questionnaire = (props) => {
|
let Enforcement_Questionnaire = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -53,11 +53,11 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
|
|
||||||
var detailsObj = {};
|
var detailsObj = {};
|
||||||
|
|
||||||
detailsObj = jsonpath.query(
|
detailsObj = jsonpath(
|
||||||
setCaseDetailsObj,
|
|
||||||
'$..[?(@.pinswg_name=="' +
|
'$..[?(@.pinswg_name=="' +
|
||||||
currentView.caseReference.currentReference +
|
currentView.caseReference.currentReference +
|
||||||
'")]'
|
'")]',
|
||||||
|
setCaseDetailsObj
|
||||||
);
|
);
|
||||||
|
|
||||||
let setCaseResultssObj = router.query.hasOwnProperty("state")
|
let setCaseResultssObj = router.query.hasOwnProperty("state")
|
||||||
@@ -70,11 +70,11 @@ let Enforcement_Questionnaire = (props) => {
|
|||||||
|
|
||||||
var resultsObj = {};
|
var resultsObj = {};
|
||||||
|
|
||||||
resultsObj = jsonpath.query(
|
resultsObj = jsonpath(
|
||||||
setCaseResultssObj,
|
|
||||||
'$..[?(@.ticketnumber=="' +
|
'$..[?(@.ticketnumber=="' +
|
||||||
currentView.caseReference.currentReference +
|
currentView.caseReference.currentReference +
|
||||||
'")]'
|
'")]',
|
||||||
|
setCaseResultssObj
|
||||||
);
|
);
|
||||||
resultsObj = resultsObj[0];
|
resultsObj = resultsObj[0];
|
||||||
|
|
||||||
|
|||||||
+7
-7
@@ -20,7 +20,7 @@ import {
|
|||||||
} from "../../../../store/currentView/action";
|
} from "../../../../store/currentView/action";
|
||||||
import { useDropzone } from "react-dropzone";
|
import { useDropzone } from "react-dropzone";
|
||||||
import { select } from "xpath";
|
import { select } from "xpath";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import { getFormCollectionByID } from "../../../../components/utils";
|
import { getFormCollectionByID } from "../../../../components/utils";
|
||||||
|
|
||||||
let S78_Questionnaire = (props) => {
|
let S78_Questionnaire = (props) => {
|
||||||
@@ -56,11 +56,11 @@ let S78_Questionnaire = (props) => {
|
|||||||
|
|
||||||
var detailsObj = {};
|
var detailsObj = {};
|
||||||
|
|
||||||
detailsObj = jsonpath.query(
|
detailsObj = jsonpath(
|
||||||
setCaseDetailsObj,
|
|
||||||
'$..[?(@.pinswg_name=="' +
|
'$..[?(@.pinswg_name=="' +
|
||||||
currentView.caseReference.currentReference +
|
currentView.caseReference.currentReference +
|
||||||
'")]'
|
'")]',
|
||||||
|
setCaseDetailsObj
|
||||||
);
|
);
|
||||||
|
|
||||||
let setCaseResultssObj = router.query.hasOwnProperty("state")
|
let setCaseResultssObj = router.query.hasOwnProperty("state")
|
||||||
@@ -73,8 +73,7 @@ let S78_Questionnaire = (props) => {
|
|||||||
|
|
||||||
var resultsObj = {};
|
var resultsObj = {};
|
||||||
|
|
||||||
resultsObj = jsonpath.query(
|
resultsObj = jsonpath(
|
||||||
setCaseResultssObj,
|
|
||||||
"$..[?(@." +
|
"$..[?(@." +
|
||||||
(router.query.hasOwnProperty("state")
|
(router.query.hasOwnProperty("state")
|
||||||
? router.query.state == "edit"
|
? router.query.state == "edit"
|
||||||
@@ -83,7 +82,8 @@ let S78_Questionnaire = (props) => {
|
|||||||
: "ticketnumber") +
|
: "ticketnumber") +
|
||||||
'=="' +
|
'=="' +
|
||||||
currentView.caseReference.currentReference +
|
currentView.caseReference.currentReference +
|
||||||
'")]'
|
'")]',
|
||||||
|
setCaseResultssObj
|
||||||
);
|
);
|
||||||
resultsObj = resultsObj[0];
|
resultsObj = resultsObj[0];
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { useRouter } from "next/router";
|
|||||||
import { useState, useEffect, useRef } from "react";
|
import { useState, useEffect, useRef } from "react";
|
||||||
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -61,11 +61,11 @@ const RepresentationList = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{representationsArr.map((item, key) => {
|
{representationsArr.map((item, key) => {
|
||||||
let detailsObj = jsonpath.query(
|
let detailsObj = jsonpath(
|
||||||
item,
|
|
||||||
"$..[?(@.pinswg_representationsid=='" +
|
"$..[?(@.pinswg_representationsid=='" +
|
||||||
incidentid +
|
incidentid +
|
||||||
"')]"
|
"')]",
|
||||||
|
item
|
||||||
);
|
);
|
||||||
detailsObj = item;
|
detailsObj = item;
|
||||||
|
|
||||||
@@ -91,13 +91,13 @@ const RepresentationList = (props) => {
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
+23
-23
@@ -3,7 +3,7 @@ import { useRouter } from "next/router";
|
|||||||
import { useState, useEffect, useRef } from "react";
|
import { useState, useEffect, useRef } from "react";
|
||||||
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -137,9 +137,9 @@ const CaseSummary = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const isWatchedCase = (whichIncident) => {
|
const isWatchedCase = (whichIncident) => {
|
||||||
let isWatched = jsonpath.query(
|
let isWatched = jsonpath(
|
||||||
watchedCases,
|
"$..value[?(@._pinswg_watchedcase_value=='" + whichIncident + "')]",
|
||||||
"$..value[?(@._pinswg_watchedcase_value=='" + whichIncident + "')]"
|
watchedCases
|
||||||
);
|
);
|
||||||
|
|
||||||
return isWatched;
|
return isWatched;
|
||||||
@@ -168,23 +168,23 @@ const CaseSummary = (props) => {
|
|||||||
var casesObj = {};
|
var casesObj = {};
|
||||||
|
|
||||||
currentType == "searchResultsObj"
|
currentType == "searchResultsObj"
|
||||||
? (casesObj = jsonpath.query(
|
? (casesObj = jsonpath(
|
||||||
searchResultsObj,
|
'$..[?(@.title=="' + caseReference + '")]',
|
||||||
'$..[?(@.title=="' + caseReference + '")]'
|
searchResultsObj
|
||||||
))
|
))
|
||||||
: currentType == "watchedCases"
|
: currentType == "watchedCases"
|
||||||
? (casesObj = jsonpath.query(
|
? (casesObj = jsonpath(
|
||||||
setCaseQueryObj,
|
'$..[?(@.pinswg_title=="' + caseReference + '")]',
|
||||||
'$..[?(@.pinswg_title=="' + caseReference + '")]'
|
setCaseQueryObj
|
||||||
))
|
))
|
||||||
: currentType == "myCases"
|
: currentType == "myCases"
|
||||||
? (casesObj = jsonpath.query(
|
? (casesObj = jsonpath(
|
||||||
setCaseQueryObj,
|
'$..[?(@.pinswg_title=="' + caseReference + '")]',
|
||||||
'$..[?(@.pinswg_title=="' + caseReference + '")]'
|
setCaseQueryObj
|
||||||
))
|
))
|
||||||
: (casesObj = jsonpath.query(
|
: (casesObj = jsonpath(
|
||||||
setCaseQueryObj,
|
'$..[?(@.reference=="' + caseReference + '")]',
|
||||||
'$..[?(@.reference=="' + caseReference + '")]'
|
setCaseQueryObj
|
||||||
));
|
));
|
||||||
|
|
||||||
casesObj = Object.assign({}, ...casesObj);
|
casesObj = Object.assign({}, ...casesObj);
|
||||||
@@ -192,13 +192,13 @@ const CaseSummary = (props) => {
|
|||||||
var detailsObj = {};
|
var detailsObj = {};
|
||||||
|
|
||||||
currentType == "searchResultsObj"
|
currentType == "searchResultsObj"
|
||||||
? (detailsObj = jsonpath.query(
|
? (detailsObj = jsonpath(
|
||||||
searchDetailsObj,
|
'$..[?(@.pinswg_name=="' + caseReference + '")]',
|
||||||
'$..[?(@.pinswg_name=="' + caseReference + '")]'
|
searchDetailsObj
|
||||||
))
|
))
|
||||||
: (detailsObj = jsonpath.query(
|
: (detailsObj = jsonpath(
|
||||||
setCaseDetailsObj,
|
'$..[?(@.pinswg_name=="' + caseReference + '")]',
|
||||||
'$..[?(@.pinswg_name=="' + caseReference + '")]'
|
setCaseDetailsObj
|
||||||
));
|
));
|
||||||
|
|
||||||
detailsObj = detailsObj[0];
|
detailsObj = detailsObj[0];
|
||||||
@@ -366,7 +366,7 @@ const CaseSummary = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
transLookup,
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_advertsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_advertsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_advertsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_advertsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_advertsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_advertsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -217,17 +217,17 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: jsonpath.query(
|
: jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value'
|
'")].value',
|
||||||
|
transLookup
|
||||||
) ||
|
) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -65,13 +65,13 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -84,13 +84,13 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -103,13 +103,13 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -125,13 +125,13 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -199,17 +199,17 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: jsonpath.query(
|
: jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value'
|
'")].value',
|
||||||
|
transLookup
|
||||||
) ||
|
) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Head from "next/head";
|
|||||||
import { useEffect, useRef, ReactElement } from "react";
|
import { useEffect, useRef, ReactElement } from "react";
|
||||||
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _, { round } from "lodash";
|
import _, { round } from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -125,13 +125,13 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -151,11 +151,11 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: (
|
: (
|
||||||
<a
|
<a
|
||||||
@@ -187,13 +187,13 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -206,13 +206,13 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -228,13 +228,13 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -267,13 +267,13 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -334,13 +334,13 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -433,11 +433,12 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj.pinswg_recommendation +
|
detailsObj.pinswg_recommendation +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup,
|
||||||
|
|
||||||
)
|
)
|
||||||
: detailsObj.pinswg_recommendation}
|
: detailsObj.pinswg_recommendation}
|
||||||
</dd>
|
</dd>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -65,13 +65,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -87,13 +87,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -123,13 +123,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -144,13 +144,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -163,13 +163,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -185,13 +185,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -259,11 +259,11 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj.pinswg_recommendation +
|
detailsObj.pinswg_recommendation +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj.pinswg_recommendation ||
|
: detailsObj.pinswg_recommendation ||
|
||||||
t(
|
t(
|
||||||
@@ -280,11 +280,11 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj.pinswg_webaddress ||
|
: detailsObj.pinswg_webaddress ||
|
||||||
t(
|
t(
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -217,17 +217,17 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: jsonpath.query(
|
: jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value'
|
'")].value',
|
||||||
|
transLookup
|
||||||
) ||
|
) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -65,13 +65,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -87,13 +87,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -123,13 +123,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -142,13 +142,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -164,13 +164,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -238,11 +238,11 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj.pinswg_recommendation +
|
detailsObj.pinswg_recommendation +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj.pinswg_recommendation ||
|
: detailsObj.pinswg_recommendation ||
|
||||||
t(
|
t(
|
||||||
@@ -259,11 +259,11 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj.pinswg_webaddress ||
|
: detailsObj.pinswg_webaddress ||
|
||||||
t(
|
t(
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -217,17 +217,17 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: jsonpath.query(
|
: jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value'
|
'")].value',
|
||||||
|
transLookup
|
||||||
) ||
|
) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -124,13 +124,13 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_ldpid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_ldpid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_ldpid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_ldpid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_ldpid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_ldpid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -217,17 +217,17 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: jsonpath.query(
|
: jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value'
|
'")].value',
|
||||||
|
transLookup
|
||||||
) ||
|
) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -124,13 +124,13 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_rowid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_rowid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_rowid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_rowid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_rowid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_rowid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -217,17 +217,17 @@ const Pinswg_rowid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: jsonpath.query(
|
: jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value'
|
'")].value',
|
||||||
|
transLookup
|
||||||
) ||
|
) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -65,13 +65,13 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -90,11 +90,11 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj.pinswg_recommendation +
|
detailsObj.pinswg_recommendation +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj.pinswg_recommendation ||
|
: detailsObj.pinswg_recommendation ||
|
||||||
t(
|
t(
|
||||||
@@ -111,11 +111,11 @@ const Pinswg_transportandworkactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj.pinswg_webaddress ||
|
: detailsObj.pinswg_webaddress ||
|
||||||
t(
|
t(
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
|
|
||||||
@@ -27,13 +27,13 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -49,13 +49,13 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -83,13 +83,13 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -102,13 +102,13 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -121,13 +121,13 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
casesObj[
|
casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -143,13 +143,13 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -217,17 +217,17 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: jsonpath.query(
|
: jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.pinswg_lpa=="' +
|
'$..[?(@.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value'
|
'")].value',
|
||||||
|
transLookup
|
||||||
) ||
|
) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import DatePicker, { registerLocale, setDefaultLocale } from "react-datepicker";
|
|||||||
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
||||||
import "react-datepicker/dist/react-datepicker.css";
|
import "react-datepicker/dist/react-datepicker.css";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
||||||
import pickListLookup from "../../data/picklistLookups.json";
|
import pickListLookup from "../../data/picklistLookups.json";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
@@ -1157,9 +1157,9 @@ const RenderPickList = ({
|
|||||||
}) => {
|
}) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
var dropdownObj = jsonpath.query(
|
var dropdownObj = jsonpath(
|
||||||
picklistData,
|
"$..value[?(@.LogicalName=='" + datafieldname + "')]..Options",
|
||||||
"$..value[?(@.LogicalName=='" + datafieldname + "')]..Options"
|
picklistData
|
||||||
);
|
);
|
||||||
dropdownObj = dropdownObj[0];
|
dropdownObj = dropdownObj[0];
|
||||||
return (
|
return (
|
||||||
@@ -1379,14 +1379,11 @@ export const FieldsTranslations = (label) => {
|
|||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
const { appealtypes } = router.query;
|
const { appealtypes } = router.query;
|
||||||
|
|
||||||
let formObj = jsonpath.query(fieldLookup, "$['" + appealtypes + "']");
|
let formObj = jsonpath("$['" + appealtypes + "']", fieldLookup);
|
||||||
|
|
||||||
let labelTrans =
|
let labelTrans =
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath("$..[?(@.value=='" + label + "')].value_cy", formObj)
|
||||||
formObj,
|
|
||||||
"$..[?(@.value=='" + label + "')].value_cy"
|
|
||||||
)
|
|
||||||
: label;
|
: label;
|
||||||
return labelTrans;
|
return labelTrans;
|
||||||
};
|
};
|
||||||
@@ -1398,9 +1395,9 @@ const PickListTranslations = (optionValue) => {
|
|||||||
//console.log(optionValue);
|
//console.log(optionValue);
|
||||||
let optionTrans =
|
let optionTrans =
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
pickListLookup,
|
'$..[?(@.value=="' + optionValue + '")].value_cy',
|
||||||
'$..[?(@.value=="' + optionValue + '")].value_cy'
|
pickListLookup
|
||||||
)
|
)
|
||||||
: optionValue;
|
: optionValue;
|
||||||
//console.log(optionTrans, optionValue);
|
//console.log(optionTrans, optionValue);
|
||||||
@@ -1573,9 +1570,9 @@ const RenderFileUpload = (field) => {
|
|||||||
|
|
||||||
const filelistObj = field.fileList || {};
|
const filelistObj = field.fileList || {};
|
||||||
|
|
||||||
const blobList = jsonpath.query(
|
const blobList = jsonpath(
|
||||||
filelistObj,
|
"$..[?(@.documentType=='" + field.documentTypeCode + "')]",
|
||||||
"$..[?(@.documentType=='" + field.documentTypeCode + "')]"
|
filelistObj
|
||||||
);
|
);
|
||||||
|
|
||||||
const deleteThisBlob = async (
|
const deleteThisBlob = async (
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { useRouter } from "next/router";
|
|||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { reduxForm, formValueSelector, Field } from "redux-form";
|
import { reduxForm, formValueSelector, Field } from "redux-form";
|
||||||
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import data from "../../data/collections.json";
|
import data from "../../data/collections.json";
|
||||||
|
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
@@ -149,12 +149,12 @@ let AdvancedSearch = (props) => {
|
|||||||
{/* {optionsObj[key].name} */}
|
{/* {optionsObj[key].name} */}
|
||||||
|
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
optionsObj[key]
|
optionsObj[key]
|
||||||
.name +
|
.name +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: optionsObj[key].name ||
|
: optionsObj[key].name ||
|
||||||
t(
|
t(
|
||||||
@@ -179,96 +179,98 @@ let AdvancedSearch = (props) => {
|
|||||||
label,
|
label,
|
||||||
errormsg,
|
errormsg,
|
||||||
}) => {
|
}) => {
|
||||||
return <>
|
return (
|
||||||
<div
|
<>
|
||||||
className={
|
<div
|
||||||
touched && error
|
className={
|
||||||
? "govuk-form-group govuk-form-group--error"
|
touched && error
|
||||||
: "govuk-form-group "
|
? "govuk-form-group govuk-form-group--error"
|
||||||
}
|
: "govuk-form-group "
|
||||||
>
|
}
|
||||||
<label className="govuk-label" htmlFor={id}>
|
>
|
||||||
{label}
|
<label className="govuk-label" htmlFor={id}>
|
||||||
{name}
|
{label}
|
||||||
</label>
|
{name}
|
||||||
{touched && error && (
|
</label>
|
||||||
<span
|
{touched && error && (
|
||||||
id="passport-issued-error"
|
<span
|
||||||
className="govuk-error-message"
|
id="passport-issued-error"
|
||||||
>
|
className="govuk-error-message"
|
||||||
<span className="govuk-visually-hidden">
|
>
|
||||||
Error:
|
<span className="govuk-visually-hidden">
|
||||||
</span>{" "}
|
Error:
|
||||||
{errormsg}
|
</span>{" "}
|
||||||
</span>
|
{errormsg}
|
||||||
)}
|
</span>
|
||||||
<div>
|
)}
|
||||||
<select
|
<div>
|
||||||
{...input}
|
<select
|
||||||
className="govuk-select"
|
{...input}
|
||||||
id={id}
|
className="govuk-select"
|
||||||
name={name}
|
id={id}
|
||||||
//onChange={(e) => props.onChangeSelectAppealType(e)}
|
name={name}
|
||||||
>
|
//onChange={(e) => props.onChangeSelectAppealType(e)}
|
||||||
<option value="" disabled defaultValue>
|
>
|
||||||
{t("common:drop-down-select")}
|
<option value="" disabled defaultValue>
|
||||||
</option>
|
{t("common:drop-down-select")}
|
||||||
{_.isEmpty(optionsObj)
|
</option>
|
||||||
? ""
|
{_.isEmpty(optionsObj)
|
||||||
: Object.keys(optionsObj).map((key, index) => {
|
? ""
|
||||||
return (
|
: Object.keys(optionsObj).map((key, index) => {
|
||||||
<option
|
return (
|
||||||
key={key}
|
<option
|
||||||
value={
|
key={key}
|
||||||
_.isEmpty(optionsObj[key])
|
value={
|
||||||
? ""
|
_.isEmpty(optionsObj[key])
|
||||||
: _.isEmpty(
|
? ""
|
||||||
optionsObj[key]
|
: _.isEmpty(
|
||||||
)
|
optionsObj[key]
|
||||||
? ""
|
|
||||||
: _.isEmpty(
|
|
||||||
optionsObj[key]
|
|
||||||
.value
|
|
||||||
)
|
|
||||||
? ""
|
|
||||||
: optionsObj[key]
|
|
||||||
.attributevalue +
|
|
||||||
"," +
|
|
||||||
optionsObj[key].value
|
|
||||||
.replace(
|
|
||||||
/(\band|[\s\-\+\(\)\,\&])/g,
|
|
||||||
""
|
|
||||||
)
|
)
|
||||||
.toLowerCase()
|
? ""
|
||||||
}
|
: _.isEmpty(
|
||||||
>
|
optionsObj[key]
|
||||||
{_.isEmpty(optionsObj[key])
|
.value
|
||||||
? ""
|
)
|
||||||
: _.isEmpty(optionsObj[key])
|
? ""
|
||||||
? ""
|
: optionsObj[key]
|
||||||
: _.isEmpty(
|
.attributevalue +
|
||||||
optionsObj[key].value
|
"," +
|
||||||
)
|
optionsObj[key].value
|
||||||
? ""
|
.replace(
|
||||||
: router.locale == "cy"
|
/(\band|[\s\-\+\(\)\,\&])/g,
|
||||||
? jsonpath.query(
|
""
|
||||||
transLookup,
|
)
|
||||||
'$..[?(@.value=="' +
|
.toLowerCase()
|
||||||
optionsObj[key]
|
}
|
||||||
.value +
|
>
|
||||||
'")].value_cy'
|
{_.isEmpty(optionsObj[key])
|
||||||
)
|
? ""
|
||||||
: optionsObj[key].value ||
|
: _.isEmpty(optionsObj[key])
|
||||||
t(
|
? ""
|
||||||
"case:summary-no-date-entered-label"
|
: _.isEmpty(
|
||||||
)}
|
optionsObj[key].value
|
||||||
</option>
|
)
|
||||||
);
|
? ""
|
||||||
})}
|
: router.locale == "cy"
|
||||||
</select>
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
optionsObj[key]
|
||||||
|
.value +
|
||||||
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
|
)
|
||||||
|
: optionsObj[key].value ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
</option>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</>
|
||||||
</>;
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// const [showSpinnerState, setShowSpinnerState] = useState(false);
|
// const [showSpinnerState, setShowSpinnerState] = useState(false);
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
setCurrentView,
|
setCurrentView,
|
||||||
setCurrentReference,
|
setCurrentReference,
|
||||||
} from "../../store/currentView/action";
|
} from "../../store/currentView/action";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
import {
|
import {
|
||||||
deleteAwaitingSubmissionsFromBlob,
|
deleteAwaitingSubmissionsFromBlob,
|
||||||
@@ -168,11 +168,11 @@ const AwaitingSubmissionFromBlob = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
showTopThreeArrDets[key]["pinswg_lpaname"] +
|
showTopThreeArrDets[key]["pinswg_lpaname"] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: showTopThreeArrDets[key]["pinswg_lpaname"] || ""}
|
: showTopThreeArrDets[key]["pinswg_lpaname"] || ""}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
deleteAwaitingSubmissions,
|
deleteAwaitingSubmissions,
|
||||||
getAwaitingSubmissionProxy,
|
getAwaitingSubmissionProxy,
|
||||||
} from "../../actions";
|
} from "../../actions";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
import {
|
import {
|
||||||
setWatchedCases,
|
setWatchedCases,
|
||||||
@@ -283,13 +283,13 @@ const TopThree = (props) => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
showTopThreeArr[key][
|
showTopThreeArr[key][
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: showTopThreeArr[key][
|
: showTopThreeArr[key][
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import {
|
|||||||
setWatchedCasesDetails,
|
setWatchedCasesDetails,
|
||||||
} from "../../store/watchedCases/action";
|
} from "../../store/watchedCases/action";
|
||||||
import { getFormCollectionByID } from "../utils";
|
import { getFormCollectionByID } from "../utils";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const TopThree = (props) => {
|
const TopThree = (props) => {
|
||||||
@@ -204,13 +204,13 @@ const TopThree = (props) => {
|
|||||||
{" "}
|
{" "}
|
||||||
|
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
showTopThreeArr[key][
|
showTopThreeArr[key][
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: showTopThreeArr[key][
|
: showTopThreeArr[key][
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { useRouter } from "next/router";
|
|||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { setCurrentReference } from "../../store/currentView/action";
|
import { setCurrentReference } from "../../store/currentView/action";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
import { getFormCollectionByID } from "../../components/utils";
|
import { getFormCollectionByID } from "../../components/utils";
|
||||||
|
|
||||||
@@ -47,9 +47,9 @@ const ViewAllResults = (props) => {
|
|||||||
|
|
||||||
let resultsRowArr = [];
|
let resultsRowArr = [];
|
||||||
resultsArr.map((item, key) => {
|
resultsArr.map((item, key) => {
|
||||||
let detailsObj = jsonpath.query(
|
let detailsObj = jsonpath(
|
||||||
searchDetailsObj,
|
'$..value[?(@.pinswg_name=="' + item.pinswg_title + '")]',
|
||||||
'$..value[?(@.pinswg_name=="' + item.pinswg_title + '")]'
|
searchDetailsObj
|
||||||
);
|
);
|
||||||
detailsObj = detailsObj[0];
|
detailsObj = detailsObj[0];
|
||||||
|
|
||||||
@@ -297,11 +297,11 @@ const ViewAllResults = (props) => {
|
|||||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||||
_.has(resultsArr[key], "pinswg_lpaname")
|
_.has(resultsArr[key], "pinswg_lpaname")
|
||||||
? router.locale == "cy"
|
? router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
resultsArr[key].pinswg_lpaname +
|
resultsArr[key].pinswg_lpaname +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: resultsArr[key].pinswg_lpaname || "N/A"
|
: resultsArr[key].pinswg_lpaname || "N/A"
|
||||||
: ""}
|
: ""}
|
||||||
@@ -309,13 +309,13 @@ const ViewAllResults = (props) => {
|
|||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
|
||||||
])
|
])
|
||||||
? router.locale == "cy"
|
? router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
resultsArr[key][
|
resultsArr[key][
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: resultsArr[key][
|
: resultsArr[key][
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -325,13 +325,13 @@ const ViewAllResults = (props) => {
|
|||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue",
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue",
|
||||||
])
|
])
|
||||||
? router.locale == "cy"
|
? router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
searchDetailsObj[key].value[0][
|
searchDetailsObj[key].value[0][
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValuee"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValuee"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: currentView.viewKey == "myRepresentations"
|
: currentView.viewKey == "myRepresentations"
|
||||||
? searchDetailsObj[key].value
|
? searchDetailsObj[key].value
|
||||||
@@ -343,13 +343,13 @@ const ViewAllResults = (props) => {
|
|||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue",
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue",
|
||||||
])
|
])
|
||||||
? router.locale == "cy"
|
? router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
resultsArr[key][
|
resultsArr[key][
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValuee"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValuee"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: resultsArr[key][
|
: resultsArr[key][
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -359,13 +359,13 @@ const ViewAllResults = (props) => {
|
|||||||
: "N/A")
|
: "N/A")
|
||||||
: currentView.viewKey == "myRepresentations" &&
|
: currentView.viewKey == "myRepresentations" &&
|
||||||
router.locale == "cy" &&
|
router.locale == "cy" &&
|
||||||
jsonpath.query(
|
jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
searchDetailsObj[key][
|
searchDetailsObj[key][
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
@@ -375,24 +375,24 @@ const ViewAllResults = (props) => {
|
|||||||
|
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails"
|
{currentView.viewKey == "awaitingSubmissionDetails"
|
||||||
? router.locale == "cy"
|
? router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
getFormCollectionByID(
|
getFormCollectionByID(
|
||||||
item.pinswg_appealcasetype
|
item.pinswg_appealcasetype
|
||||||
).value +
|
).value +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: getFormCollectionByID(item.pinswg_appealcasetype)
|
: getFormCollectionByID(item.pinswg_appealcasetype)
|
||||||
.value || "N/A"
|
.value || "N/A"
|
||||||
: router.locale == "cy"
|
: router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
item[
|
item[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: item[
|
: item[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -403,13 +403,13 @@ const ViewAllResults = (props) => {
|
|||||||
|
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{currentView.viewKey == "myRepresentations" &&
|
||||||
(router.locale == "cy"
|
(router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
getFormCollectionByID(
|
getFormCollectionByID(
|
||||||
searchDetailsObj[key].appealType
|
searchDetailsObj[key].appealType
|
||||||
).value +
|
).value +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)[0]
|
)[0]
|
||||||
: getFormCollectionByID(
|
: getFormCollectionByID(
|
||||||
searchDetailsObj[key].appealType
|
searchDetailsObj[key].appealType
|
||||||
@@ -429,39 +429,39 @@ const ViewAllResults = (props) => {
|
|||||||
|
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails"
|
{currentView.viewKey == "awaitingSubmissionDetails"
|
||||||
? router.locale == "cy"
|
? router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.statuscode=="' +
|
'$..[?(@.statuscode=="' +
|
||||||
item.statuscode +
|
item.statuscode +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: jsonpath.query(
|
: jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.statuscode=="' +
|
'$..[?(@.statuscode=="' +
|
||||||
item.statuscode +
|
item.statuscode +
|
||||||
'")].value'
|
'")].value',
|
||||||
|
transLookup
|
||||||
) || "N/A"
|
) || "N/A"
|
||||||
: currentView.viewKey == "myRepresentations"
|
: currentView.viewKey == "myRepresentations"
|
||||||
? repRaisedDate(item.createdDate) // ? router.locale == "cy"
|
? repRaisedDate(item.createdDate) // ? router.locale == "cy"
|
||||||
: // ? jsonpath.query(
|
: // ? jsonpath(
|
||||||
// transLookup,
|
//
|
||||||
// '$..[?(@.value=="' +
|
// '$..[?(@.value=="' +
|
||||||
// searchDetailsObj[key].value[0][
|
// searchDetailsObj[key].value[0][
|
||||||
// "statuscode@OData.Community.Display.V1.FormattedValue"
|
// "statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
// ] +
|
// ] +
|
||||||
// '")].value_cy'
|
// '")].value_cy',transLookup,
|
||||||
// )
|
// )
|
||||||
// : searchDetailsObj[key].value[0][
|
// : searchDetailsObj[key].value[0][
|
||||||
// "statuscode@OData.Community.Display.V1.FormattedValue"
|
// "statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
// ] || "N/A"
|
// ] || "N/A"
|
||||||
// : router.locale == "cy"
|
// : router.locale == "cy"
|
||||||
// ? jsonpath.query(
|
// ? jsonpath(
|
||||||
// transLookup,
|
//
|
||||||
// '$..[?(@.value=="' +
|
// '$..[?(@.value=="' +
|
||||||
// item[
|
// item[
|
||||||
// "statuscode@OData.Community.Display.V1.FormattedValue"
|
// "statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
// ] +
|
// ] +
|
||||||
// '")].value_cy'
|
// '")].value_cy',transLookup,
|
||||||
// )
|
// )
|
||||||
item[
|
item[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import Link from "next/link";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import xpath from "xpath";
|
import xpath from "xpath";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import BuildCheckField from "./buildCheckfield";
|
import BuildCheckField from "./buildCheckfield";
|
||||||
import { useSelector, shallowEqual, connect } from "react-redux";
|
import { useSelector, shallowEqual, connect } from "react-redux";
|
||||||
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
||||||
@@ -63,14 +63,11 @@ let BuildCheckRow = (props) => {
|
|||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
const { appealtypes } = router.query;
|
const { appealtypes } = router.query;
|
||||||
|
|
||||||
let formObj = jsonpath.query(fieldLookup, "$['" + appealtypes + "']");
|
let formObj = jsonpath(fieldLookup, "$['" + appealtypes + "']");
|
||||||
|
|
||||||
let labelTrans =
|
let labelTrans =
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath("$..[?(@.value=='" + label + "')].value_cy", formObj)
|
||||||
formObj,
|
|
||||||
"$..[?(@.value=='" + label + "')].value_cy"
|
|
||||||
)
|
|
||||||
: label;
|
: label;
|
||||||
return labelTrans;
|
return labelTrans;
|
||||||
};
|
};
|
||||||
@@ -88,11 +85,11 @@ let BuildCheckRow = (props) => {
|
|||||||
var rows = xpath.select("//label/@description", doc);
|
var rows = xpath.select("//label/@description", doc);
|
||||||
var fieldtype = xpath.select("//@classid", doc);
|
var fieldtype = xpath.select("//@classid", doc);
|
||||||
var datafieldname = xpath.select("//@datafieldname", doc);
|
var datafieldname = xpath.select("//@datafieldname", doc);
|
||||||
const isRequiredField = jsonpath.query(
|
const isRequiredField = jsonpath(
|
||||||
mandatoryFieldsData,
|
|
||||||
"$..value[?(@.LogicalName=='" +
|
"$..value[?(@.LogicalName=='" +
|
||||||
datafieldname[0].value +
|
datafieldname[0].value +
|
||||||
"')]"
|
"')]",
|
||||||
|
mandatoryFieldsData
|
||||||
);
|
);
|
||||||
|
|
||||||
// if (datafieldname[0].value.indexOf("fileUpload") > 0) {
|
// if (datafieldname[0].value.indexOf("fileUpload") > 0) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { useRouter } from "next/router";
|
|||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import xpath from "xpath";
|
import xpath from "xpath";
|
||||||
import BuildField from "./buildfield";
|
import BuildField from "./buildfield";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import FileUpload from "./fileupload";
|
import FileUpload from "./fileupload";
|
||||||
|
|
||||||
export default function BuildRow(props) {
|
export default function BuildRow(props) {
|
||||||
@@ -104,11 +104,11 @@ export default function BuildRow(props) {
|
|||||||
|
|
||||||
dateEnd = !_.isEmpty(dateEnd) && dateEnd[0].value;
|
dateEnd = !_.isEmpty(dateEnd) && dateEnd[0].value;
|
||||||
|
|
||||||
const isRequiredField = jsonpath.query(
|
const isRequiredField = jsonpath(
|
||||||
mandatoryFieldsData,
|
|
||||||
"$..value[?(@.LogicalName=='" +
|
"$..value[?(@.LogicalName=='" +
|
||||||
datafieldname[0].value +
|
datafieldname[0].value +
|
||||||
"')]"
|
"')]",
|
||||||
|
mandatoryFieldsData
|
||||||
);
|
);
|
||||||
|
|
||||||
if (datafieldname[0].value == "pinswg_fileUpload") {
|
if (datafieldname[0].value == "pinswg_fileUpload") {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import {
|
|||||||
} from "../../actions";
|
} from "../../actions";
|
||||||
|
|
||||||
import { FieldsTranslations } from "../elements";
|
import { FieldsTranslations } from "../elements";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import BuildProgress from "./buildprogress";
|
import BuildProgress from "./buildprogress";
|
||||||
|
|
||||||
let BuildSection = (props) => {
|
let BuildSection = (props) => {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -101,12 +101,12 @@ let CreateCase = (props) => {
|
|||||||
value={optionsObj[key].accountid}
|
value={optionsObj[key].accountid}
|
||||||
>
|
>
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
optionsObj[key]
|
optionsObj[key]
|
||||||
.name +
|
.name +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: optionsObj[key].name}
|
: optionsObj[key].name}
|
||||||
</option>
|
</option>
|
||||||
@@ -192,12 +192,12 @@ let CreateCase = (props) => {
|
|||||||
)
|
)
|
||||||
? ""
|
? ""
|
||||||
: router.locale == "cy"
|
: router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
optionsObj[key]
|
optionsObj[key]
|
||||||
.value +
|
.value +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: optionsObj[key].value}
|
: optionsObj[key].value}
|
||||||
</option>
|
</option>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// import { useState, useEffect } from "react";
|
// import { useState, useEffect } from "react";
|
||||||
// import { useRouter } from "next/router";
|
// import { useRouter } from "next/router";
|
||||||
// import useTranslation from "next-translate/useTranslation";
|
// import useTranslation from "next-translate/useTranslation";
|
||||||
// import jsonpath from "jsonpath";
|
// import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
// import _ from "lodash";
|
// import _ from "lodash";
|
||||||
|
|
||||||
// const FileUpload = () => {
|
// const FileUpload = () => {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import Link from "next/link";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import xpath from "xpath";
|
import xpath from "xpath";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import { useSelector, shallowEqual, connect } from "react-redux";
|
import { useSelector, shallowEqual, connect } from "react-redux";
|
||||||
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
||||||
import {
|
import {
|
||||||
@@ -145,7 +145,7 @@ export const AppealRow_pdf = (props) => {
|
|||||||
const FieldsTranslations = (label) => {
|
const FieldsTranslations = (label) => {
|
||||||
const { appealtypes } = router.query;
|
const { appealtypes } = router.query;
|
||||||
|
|
||||||
let formObj = jsonpath.query(fieldLookup, "$['" + appealtypes + "']");
|
let formObj = jsonpath("$['" + appealtypes + "']", fieldLookup);
|
||||||
|
|
||||||
let labelTrans = label;
|
let labelTrans = label;
|
||||||
return labelTrans;
|
return labelTrans;
|
||||||
@@ -371,11 +371,11 @@ export const AppealRow_pdf = (props) => {
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case "{16D63FD6-119B-4353-BDCA-18358721C3FE}":
|
case "{16D63FD6-119B-4353-BDCA-18358721C3FE}":
|
||||||
const blobList = jsonpath.query(
|
const blobList = jsonpath(
|
||||||
props.filesList,
|
|
||||||
"$..[?(@.documentType=='" +
|
"$..[?(@.documentType=='" +
|
||||||
documentTypeCode[0].value +
|
documentTypeCode[0].value +
|
||||||
"')]"
|
"')]",
|
||||||
|
props.filesList
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
|
|
||||||
import transLookupCY from "../../locales/cy/myrepresentations.json";
|
import transLookupCY from "../../locales/cy/myrepresentations.json";
|
||||||
import transLookupEN from "../../locales/en/myrepresentations.json";
|
import transLookupEN from "../../locales/en/myrepresentations.json";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
|
|
||||||
const getTrans = (locale, key) => {
|
const getTrans = (locale, key) => {
|
||||||
let jsonQuery = `$.${key}`;
|
let jsonQuery = `$.${key}`;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { useRouter } from "next/router";
|
|||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { reduxForm, formValueSelector, Field } from "redux-form";
|
import { reduxForm, formValueSelector, Field } from "redux-form";
|
||||||
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import data from "../../data/collections.json";
|
import data from "../../data/collections.json";
|
||||||
|
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
@@ -132,12 +132,12 @@ const RenderCaseStatusList = ({
|
|||||||
: _.isEmpty(optionsObj[key].value)
|
: _.isEmpty(optionsObj[key].value)
|
||||||
? ""
|
? ""
|
||||||
: router.locale == "cy"
|
: router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
optionsObj,
|
|
||||||
'$..[?(@.statuscode=="' +
|
'$..[?(@.statuscode=="' +
|
||||||
optionsObj[key]
|
optionsObj[key]
|
||||||
.statuscode +
|
.statuscode +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
optionsObj
|
||||||
)
|
)
|
||||||
: optionsObj[key].value ||
|
: optionsObj[key].value ||
|
||||||
t(
|
t(
|
||||||
@@ -245,12 +245,12 @@ let AdvancedSearch = (props) => {
|
|||||||
{/* {optionsObj[key].name} */}
|
{/* {optionsObj[key].name} */}
|
||||||
|
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
optionsObj[key]
|
optionsObj[key]
|
||||||
.name +
|
.name +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: optionsObj[key].name ||
|
: optionsObj[key].name ||
|
||||||
t(
|
t(
|
||||||
@@ -275,96 +275,98 @@ let AdvancedSearch = (props) => {
|
|||||||
label,
|
label,
|
||||||
errormsg,
|
errormsg,
|
||||||
}) => {
|
}) => {
|
||||||
return <>
|
return (
|
||||||
<div
|
<>
|
||||||
className={
|
<div
|
||||||
touched && error
|
className={
|
||||||
? "govuk-form-group govuk-form-group--error"
|
touched && error
|
||||||
: "govuk-form-group "
|
? "govuk-form-group govuk-form-group--error"
|
||||||
}
|
: "govuk-form-group "
|
||||||
>
|
}
|
||||||
<label className="govuk-label" htmlFor={id}>
|
>
|
||||||
{label}
|
<label className="govuk-label" htmlFor={id}>
|
||||||
{name}
|
{label}
|
||||||
</label>
|
{name}
|
||||||
{touched && error && (
|
</label>
|
||||||
<span
|
{touched && error && (
|
||||||
id="passport-issued-error"
|
<span
|
||||||
className="govuk-error-message"
|
id="passport-issued-error"
|
||||||
>
|
className="govuk-error-message"
|
||||||
<span className="govuk-visually-hidden">
|
>
|
||||||
Error:
|
<span className="govuk-visually-hidden">
|
||||||
</span>{" "}
|
Error:
|
||||||
{errormsg}
|
</span>{" "}
|
||||||
</span>
|
{errormsg}
|
||||||
)}
|
</span>
|
||||||
<div>
|
)}
|
||||||
<select
|
<div>
|
||||||
{...input}
|
<select
|
||||||
className="govuk-select"
|
{...input}
|
||||||
id={id}
|
className="govuk-select"
|
||||||
name={name}
|
id={id}
|
||||||
//onChange={(e) => props.onChangeSelectAppealType(e)}
|
name={name}
|
||||||
>
|
//onChange={(e) => props.onChangeSelectAppealType(e)}
|
||||||
<option value="" disabled defaultValue>
|
>
|
||||||
{t("common:drop-down-select")}
|
<option value="" disabled defaultValue>
|
||||||
</option>
|
{t("common:drop-down-select")}
|
||||||
{_.isEmpty(optionsObj)
|
</option>
|
||||||
? ""
|
{_.isEmpty(optionsObj)
|
||||||
: Object.keys(optionsObj).map((key, index) => {
|
? ""
|
||||||
return (
|
: Object.keys(optionsObj).map((key, index) => {
|
||||||
<option
|
return (
|
||||||
key={key}
|
<option
|
||||||
value={
|
key={key}
|
||||||
_.isEmpty(optionsObj[key])
|
value={
|
||||||
? ""
|
_.isEmpty(optionsObj[key])
|
||||||
: _.isEmpty(
|
? ""
|
||||||
optionsObj[key]
|
: _.isEmpty(
|
||||||
)
|
optionsObj[key]
|
||||||
? ""
|
|
||||||
: _.isEmpty(
|
|
||||||
optionsObj[key]
|
|
||||||
.value
|
|
||||||
)
|
|
||||||
? ""
|
|
||||||
: optionsObj[key]
|
|
||||||
.attributevalue +
|
|
||||||
"," +
|
|
||||||
optionsObj[key].value
|
|
||||||
.replace(
|
|
||||||
/(\band|[\s\-\+\(\)\,\&])/g,
|
|
||||||
""
|
|
||||||
)
|
)
|
||||||
.toLowerCase()
|
? ""
|
||||||
}
|
: _.isEmpty(
|
||||||
>
|
optionsObj[key]
|
||||||
{_.isEmpty(optionsObj[key])
|
.value
|
||||||
? ""
|
)
|
||||||
: _.isEmpty(optionsObj[key])
|
? ""
|
||||||
? ""
|
: optionsObj[key]
|
||||||
: _.isEmpty(
|
.attributevalue +
|
||||||
optionsObj[key].value
|
"," +
|
||||||
)
|
optionsObj[key].value
|
||||||
? ""
|
.replace(
|
||||||
: router.locale == "cy"
|
/(\band|[\s\-\+\(\)\,\&])/g,
|
||||||
? jsonpath.query(
|
""
|
||||||
transLookup,
|
)
|
||||||
'$..[?(@.value=="' +
|
.toLowerCase()
|
||||||
optionsObj[key]
|
}
|
||||||
.value +
|
>
|
||||||
'")].value_cy'
|
{_.isEmpty(optionsObj[key])
|
||||||
)
|
? ""
|
||||||
: optionsObj[key].value ||
|
: _.isEmpty(optionsObj[key])
|
||||||
t(
|
? ""
|
||||||
"case:summary-no-date-entered-label"
|
: _.isEmpty(
|
||||||
)}
|
optionsObj[key].value
|
||||||
</option>
|
)
|
||||||
);
|
? ""
|
||||||
})}
|
: router.locale == "cy"
|
||||||
</select>
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
optionsObj[key]
|
||||||
|
.value +
|
||||||
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
|
)
|
||||||
|
: optionsObj[key].value ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
</option>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</>
|
||||||
</>;
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// const [showSpinnerState, setShowSpinnerState] = useState(false);
|
// const [showSpinnerState, setShowSpinnerState] = useState(false);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import Link from "next/link";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
import PaginationControl from "./pagination";
|
import PaginationControl from "./pagination";
|
||||||
@@ -174,9 +174,9 @@ const DNSSearchResults = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const isWatchedCase = (whichIncident) => {
|
const isWatchedCase = (whichIncident) => {
|
||||||
let isWatched = jsonpath.query(
|
let isWatched = jsonpath(
|
||||||
watchedCases,
|
"$..value[?(@._pinswg_watchedcase_value=='" + whichIncident + "')]",
|
||||||
"$..value[?(@._pinswg_watchedcase_value=='" + whichIncident + "')]"
|
watchedCases
|
||||||
);
|
);
|
||||||
|
|
||||||
return isWatched;
|
return isWatched;
|
||||||
@@ -330,11 +330,11 @@ const DNSSearchResults = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
resultsArr.map((item, key) => {
|
resultsArr.map((item, key) => {
|
||||||
let detailsObj = jsonpath.query(
|
let detailsObj = jsonpath(
|
||||||
searchDetailsObj,
|
|
||||||
'$..value[?(@.pinswg_name=="' +
|
'$..value[?(@.pinswg_name=="' +
|
||||||
item.title +
|
item.title +
|
||||||
'")]'
|
'")]',
|
||||||
|
searchDetailsObj
|
||||||
);
|
);
|
||||||
detailsObj = detailsObj[0];
|
detailsObj = detailsObj[0];
|
||||||
|
|
||||||
@@ -487,13 +487,13 @@ const DNSSearchResults = (props) => {
|
|||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
|
||||||
])
|
])
|
||||||
? router.locale == "cy"
|
? router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -509,13 +509,13 @@ const DNSSearchResults = (props) => {
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
item[
|
item[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: item[
|
: item[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
setCurrentPage,
|
setCurrentPage,
|
||||||
} from "../../store/currentView/action";
|
} from "../../store/currentView/action";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
import {
|
import {
|
||||||
@@ -108,9 +108,9 @@ const SearchResults = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const isWatchedCase = (whichIncident) => {
|
const isWatchedCase = (whichIncident) => {
|
||||||
let isWatched = jsonpath.query(
|
let isWatched = jsonpath(
|
||||||
watchedCases,
|
"$..value[?(@._pinswg_watchedcase_value=='" + whichIncident + "')]",
|
||||||
"$..value[?(@._pinswg_watchedcase_value=='" + whichIncident + "')]"
|
watchedCases
|
||||||
);
|
);
|
||||||
|
|
||||||
return isWatched;
|
return isWatched;
|
||||||
@@ -275,11 +275,11 @@ const SearchResults = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
resultsArr.map((item, key) => {
|
resultsArr.map((item, key) => {
|
||||||
let detailsObj = jsonpath.query(
|
let detailsObj = jsonpath(
|
||||||
searchDetailsObj,
|
|
||||||
'$..value[?(@.pinswg_name=="' +
|
'$..value[?(@.pinswg_name=="' +
|
||||||
item.title +
|
item.title +
|
||||||
'")]'
|
'")]',
|
||||||
|
searchDetailsObj
|
||||||
);
|
);
|
||||||
detailsObj = detailsObj[0];
|
detailsObj = detailsObj[0];
|
||||||
return (
|
return (
|
||||||
@@ -437,13 +437,13 @@ const SearchResults = (props) => {
|
|||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
|
||||||
])
|
])
|
||||||
? router.locale == "cy"
|
? router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
item[
|
item[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: item[
|
: item[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -458,13 +458,13 @@ const SearchResults = (props) => {
|
|||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
item[
|
item[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: item[
|
: item[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -479,13 +479,13 @@ const SearchResults = (props) => {
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
{router.locale == "cy"
|
{router.locale == "cy"
|
||||||
? jsonpath.query(
|
? jsonpath(
|
||||||
transLookup,
|
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
item[
|
item[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy'
|
'")].value_cy',
|
||||||
|
transLookup
|
||||||
)
|
)
|
||||||
: item[
|
: item[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
|||||||
+22
-22
@@ -1,4 +1,4 @@
|
|||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import { v4 as uuidv4 } from "uuid";
|
import { v4 as uuidv4 } from "uuid";
|
||||||
import data from "../../data/collections.json";
|
import data from "../../data/collections.json";
|
||||||
import {
|
import {
|
||||||
@@ -14,43 +14,43 @@ import xpath from "xpath";
|
|||||||
* @param String formtype - string from appeal entity name
|
* @param String formtype - string from appeal entity name
|
||||||
*/
|
*/
|
||||||
export const getFormCollection = (formtype) => {
|
export const getFormCollection = (formtype) => {
|
||||||
const collectionName = jsonpath.query(
|
const collectionName = jsonpath(
|
||||||
data,
|
"$..[?(@.LogicalName=='" + formtype + "')]",
|
||||||
"$..[?(@.LogicalName=='" + formtype + "')]"
|
data
|
||||||
);
|
);
|
||||||
return collectionName[0];
|
return collectionName[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getFormCollectionByID = (appealTypeID) => {
|
export const getFormCollectionByID = (appealTypeID) => {
|
||||||
const collectionName = jsonpath.query(
|
const collectionName = jsonpath(
|
||||||
data,
|
"$..[?(@.appealTypeID =='" + appealTypeID + "')]",
|
||||||
"$..[?(@.appealTypeID =='" + appealTypeID + "')]"
|
data
|
||||||
);
|
);
|
||||||
return collectionName[0];
|
return collectionName[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getPickListLabel = (data, picklistType, picklistID) => {
|
export const getPickListLabel = (data, picklistType, picklistID) => {
|
||||||
const pickListData = jsonpath.query(
|
const pickListData = jsonpath(
|
||||||
data,
|
"$..[?(@.LogicalName=='" + picklistType + "')]",
|
||||||
"$..[?(@.LogicalName=='" + picklistType + "')]"
|
data
|
||||||
);
|
);
|
||||||
|
|
||||||
const pickListLabel = jsonpath.query(
|
const pickListLabel = jsonpath(
|
||||||
pickListData,
|
"$..[?(@.Value=='" + picklistID + "')].Label.LocalizedLabels..Label",
|
||||||
"$..[?(@.Value=='" + picklistID + "')].Label.LocalizedLabels..Label"
|
pickListData
|
||||||
);
|
);
|
||||||
return pickListLabel[0];
|
return pickListLabel[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getRadioLabel = (data, radiotListName, radioListID) => {
|
export const getRadioLabel = (data, radiotListName, radioListID) => {
|
||||||
const radioListData = jsonpath.query(
|
const radioListData = jsonpath(
|
||||||
data,
|
"$..[?(@.LogicalName=='" + radiotListName + "')]",
|
||||||
"$..[?(@.LogicalName=='" + radiotListName + "')]"
|
data
|
||||||
);
|
);
|
||||||
|
|
||||||
const pickListLabel = jsonpath.query(
|
const pickListLabel = jsonpath(
|
||||||
radioListData,
|
"$..[?(@.Value=='" + radioListID + "')].Label.LocalizedLabels..Label",
|
||||||
"$..[?(@.Value=='" + radioListID + "')].Label.LocalizedLabels..Label"
|
radioListData
|
||||||
);
|
);
|
||||||
return pickListLabel[0];
|
return pickListLabel[0];
|
||||||
};
|
};
|
||||||
@@ -294,11 +294,11 @@ export const getProgressObj = (
|
|||||||
|
|
||||||
dateEnd = !_.isEmpty(dateEnd) && dateEnd[0].value;
|
dateEnd = !_.isEmpty(dateEnd) && dateEnd[0].value;
|
||||||
|
|
||||||
const isRequiredField = jsonpath.query(
|
const isRequiredField = jsonpath(
|
||||||
mandatoryFieldsData,
|
|
||||||
"$..value[?(@.LogicalName=='" +
|
"$..value[?(@.LogicalName=='" +
|
||||||
datafieldname[0].value +
|
datafieldname[0].value +
|
||||||
"')]"
|
"')]",
|
||||||
|
mandatoryFieldsData
|
||||||
);
|
);
|
||||||
|
|
||||||
if (datafieldname[0].value == "pinswg_fileUpload") {
|
if (datafieldname[0].value == "pinswg_fileUpload") {
|
||||||
|
|||||||
Vendored
-1
@@ -1,6 +1,5 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
/// <reference types="next/navigation-types/compat/navigation" />
|
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||||
|
|||||||
+2
-1
@@ -35,6 +35,7 @@
|
|||||||
"google-map-react": "^2.2.1",
|
"google-map-react": "^2.2.1",
|
||||||
"govuk-frontend": "^5.0.0",
|
"govuk-frontend": "^5.0.0",
|
||||||
"jsonpath": "^1.1.1",
|
"jsonpath": "^1.1.1",
|
||||||
|
"jsonpath-plus": "^8.0.0",
|
||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
"leaflet-defaulticon-compatibility": "^0.1.2",
|
"leaflet-defaulticon-compatibility": "^0.1.2",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
@@ -89,4 +90,4 @@
|
|||||||
"next-translate-plugin": "^2.6.2",
|
"next-translate-plugin": "^2.6.2",
|
||||||
"prisma": "^5.0.0"
|
"prisma": "^5.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { wrapper } from "../../store/store";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import { reduxForm, formValueSelector } from "redux-form";
|
import { reduxForm, formValueSelector } from "redux-form";
|
||||||
|
|
||||||
import ChangePassword from "../../components/account/changepassword";
|
import ChangePassword from "../../components/account/changepassword";
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { wrapper } from "../../store/store";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import { reduxForm, formValueSelector } from "redux-form";
|
import { reduxForm, formValueSelector } from "redux-form";
|
||||||
|
|
||||||
import RegisterForm from "../../components/account/registerform";
|
import RegisterForm from "../../components/account/registerform";
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { wrapper } from "../../store/store";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import { reduxForm, formValueSelector } from "redux-form";
|
import { reduxForm, formValueSelector } from "redux-form";
|
||||||
import { getSession, useSession } from "next-auth/react";
|
import { getSession, useSession } from "next-auth/react";
|
||||||
import NoSessionWarning from "../../components/nosession";
|
import NoSessionWarning from "../../components/nosession";
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { wrapper } from "../../store/store";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import { reduxForm, formValueSelector } from "redux-form";
|
import { reduxForm, formValueSelector } from "redux-form";
|
||||||
|
|
||||||
import PersonalDetails from "../../components/account/personaldetails";
|
import PersonalDetails from "../../components/account/personaldetails";
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { wrapper } from "../../store/store";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import { reduxForm, formValueSelector } from "redux-form";
|
import { reduxForm, formValueSelector } from "redux-form";
|
||||||
|
|
||||||
import RegisterForm from "../../components/account/registerform";
|
import RegisterForm from "../../components/account/registerform";
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import {
|
|||||||
consoleLogger,
|
consoleLogger,
|
||||||
getLPA,
|
getLPA,
|
||||||
} from "../../../actions";
|
} from "../../../actions";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
|
|
||||||
const WORDKEY = process.env.HASHKEY;
|
const WORDKEY = process.env.HASHKEY;
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
|
|
||||||
const lpaList = await getLPA();
|
const lpaList = await getLPA();
|
||||||
|
|
||||||
const lpaGUID = jsonpath.query(lpaList, '$..[?(@.name=="' + lpaid + '")]');
|
const lpaGUID = jsonpath('$..[?(@.name=="' + lpaid + '")]', lpaList);
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
'$..[?(@.name="' + lpaid + '")]',
|
'$..[?(@.name="' + lpaid + '")]',
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
@@ -69,11 +69,9 @@ let Home = (props) => {
|
|||||||
|
|
||||||
let optionsStr = props.appealType.appealTypeOptions.value || {};
|
let optionsStr = props.appealType.appealTypeOptions.value || {};
|
||||||
|
|
||||||
// let selectedObj = jsonpath.query(optionsStr, "$..value");
|
let selectedObj = jsonpath(
|
||||||
|
"$..[?(@.attributevalue=='" + router.query.apt + "')]",
|
||||||
let selectedObj = jsonpath.query(
|
optionsStr
|
||||||
optionsStr,
|
|
||||||
"$..[?(@.attributevalue=='" + router.query.apt + "')]"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//let optionsTitleObj = [];
|
//let optionsTitleObj = [];
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import jsonpath from "jsonpath";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
@@ -69,11 +69,9 @@ let Home = (props) => {
|
|||||||
|
|
||||||
let optionsStr = props.appealType.appealTypeOptions.value;
|
let optionsStr = props.appealType.appealTypeOptions.value;
|
||||||
|
|
||||||
// let selectedObj = jsonpath.query(optionsStr, "$..value");
|
let selectedObj = jsonpath(
|
||||||
|
"$..[?(@.attributevalue=='" + router.query.apt + "')]",
|
||||||
let selectedObj = jsonpath.query(
|
optionsStr
|
||||||
optionsStr,
|
|
||||||
"$..[?(@.attributevalue=='" + router.query.apt + "')]"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//let optionsTitleObj = [];
|
//let optionsTitleObj = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user