Merge branch 'Development' into SIPS-Sprint-5-dev-merge-csp

This commit is contained in:
2025-04-16 15:46:10 +01:00
60 changed files with 493 additions and 305 deletions
+7 -7
View File
@@ -158,7 +158,7 @@ const DocumentDetails = (props) => {
<option value="all" key="00">
{router.locale == "cy"
? jsonpath({
path: '$..[?(@.value=="All")].value_cy',
path: '$..[?(@ && @.value=="All")].value_cy',
json: transLookup,
eval: true,
})
@@ -175,7 +175,7 @@ const DocumentDetails = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item.pinswg_isharedocumentlocationsLabel +
'")].value_cy',
json: transLookup,
@@ -325,7 +325,7 @@ const DocumentDetails = (props) => {
documentDetailsArr.map((item, key) => {
let detailsObj = jsonpath({
path:
"$..[?(@._pinswg_documentids_value=='" +
"$..[?(@ && @._pinswg_documentids_value=='" +
incidentid +
"')]",
json: item,
@@ -413,7 +413,7 @@ const DocumentDetails = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
] +
@@ -581,7 +581,7 @@ const DocumentDetails = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item.pinswg_isharedocumentlocationsLabel +
'")].value_cy',
jsonL: transLookup,
@@ -742,7 +742,7 @@ const DocumentDetails = (props) => {
documentDetailsArr.map((item, key) => {
let detailsObj = jsonpath({
path:
"$..[?(@._pinswg_documentids_value=='" +
"$..[?(@ && @._pinswg_documentids_value=='" +
incidentid +
"')]",
json: item,
@@ -835,7 +835,7 @@ const DocumentDetails = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
] +
+10 -8
View File
@@ -210,18 +210,18 @@ let MakeRepresentation = (props) => {
currentType == "searchResultsObj"
? (casesObj = jsonpath({
path: '$..[?(@.title=="' + caseReference + '")]',
path: '$..[?(@ && @.title=="' + caseReference + '")]',
json: setCaseQueryObj,
eval: true,
}))
: currentType == "watchedCases"
? (casesObj = jsonpath({
path: '$..[?(@.ticketnumber=="' + caseReference + '")]',
path: '$..[?(@ && @.ticketnumber=="' + caseReference + '")]',
json: watchedCases,
eval: true,
}))
: (casesObj = jsonpath({
path: '$..[?(@.reference=="' + caseReference + '")]',
path: '$..[?(@ && @.reference=="' + caseReference + '")]',
json: setCaseQueryObj,
eval: true,
}));
@@ -267,7 +267,7 @@ let MakeRepresentation = (props) => {
resultsObj = jsonpath({
path:
'$..[?(@.ticketnumber=="' +
'$..[?(@ && @.ticketnumber=="' +
currentView.caseReference.currentReference +
'")]',
json: setCaseResultsObj,
@@ -280,13 +280,15 @@ let MakeRepresentation = (props) => {
? router.query.state == "edit"
? jsonpath({
path:
'$..[?(@.repfile_name =="' + router.query.created + '")]',
'$..[?(@ && @.repfile_name =="' +
router.query.created +
'")]',
json: setCaseDetailsObj,
eval: true,
})
: jsonpath({
path:
'$..[?(@.pinswg_name =="' +
'$..[?(@ && @.pinswg_name =="' +
currentView.caseReference.currentReference +
'")]',
json: setCaseDetailsObj,
@@ -294,7 +296,7 @@ let MakeRepresentation = (props) => {
})
: jsonpath({
path:
'$..[?(@.pinswg_name =="' +
'$..[?(@ && @.pinswg_name =="' +
currentView.caseReference.currentReference +
'")]',
json: setCaseDetailsObj,
@@ -943,7 +945,7 @@ let MakeRepresentation = (props) => {
var detailsObj = {};
detailsObj = jsonpath({
path: '$..[?(@.pinswg_name=="' + caseReference + '")]',
path: '$..[?(@ && @.pinswg_name=="' + caseReference + '")]',
json: setCaseDetailsObj,
eval: true,
});
@@ -287,13 +287,13 @@ const RepAgent = (props) => {
props.props.props.form[props.form]
.values || {};
console.log("valuesobj:", valuesObj);
//console.log("valuesobj:", valuesObj);
delete valuesObj[
"_pinswg_appellant_value"
];
console.log("on save:", valuesObj);
//console.log("on save:", valuesObj);
updateRepresentation(
valuesObj,
false,
@@ -275,13 +275,13 @@ const RepAppellant = (props) => {
props.props.props.form[props.form]
.values || {};
console.log("valuesobj:", valuesObj);
//console.log("valuesobj:", valuesObj);
delete valuesObj[
"_pinswg_appellant_value"
];
console.log("on save:", valuesObj);
//console.log("on save:", valuesObj);
updateRepresentation(
valuesObj,
false,
@@ -29,7 +29,7 @@ const RepDetails = (props) => {
: caseReference;
detailsObj = jsonpath({
path: '$..[?(@.pinswg_name=="' + caseReference + '")]',
path: '$..[?(@ && @.pinswg_name=="' + caseReference + '")]',
json: setCaseDetailsObj,
eval: true,
});
@@ -283,13 +283,13 @@ const RepInterestedPartyPerson = (props) => {
props.props.props.form[props.form]
.values || {};
console.log("valuesobj:", valuesObj);
//console.log("valuesobj:", valuesObj);
delete valuesObj[
"_pinswg_appellant_value"
];
console.log("on save:", valuesObj);
//console.log("on save:", valuesObj);
updateRepresentation(
valuesObj,
false,
@@ -178,7 +178,7 @@ let RepLPA = (props) => {
detailsObj = jsonpath({
path:
'$..[?(@.pinswg_name=="' +
'$..[?(@ && @.pinswg_name=="' +
currentView.caseReference.currentReference +
'")]',
json: setCaseDetailsObj,
@@ -197,7 +197,7 @@ let RepLPA = (props) => {
resultsObj = jsonpath({
path:
'$..[?(@.pinswg_name=="' +
'$..[?@ && @.pinswg_name=="' +
currentView.caseReference.currentReference +
'")]',
json: setCaseResultssObj,
@@ -480,16 +480,16 @@ let RepLPA = (props) => {
props.form
].values || {};
console.log(
"valuesobj:",
valuesObj
);
// console.log(
// "valuesobj:",
// valuesObj
// );
delete valuesObj[
"_pinswg_appellant_value"
];
console.log("on save:", valuesObj);
//console.log("on save:", valuesObj);
updateRepresentation(
valuesObj,
false,
@@ -515,13 +515,13 @@ let RepLPA = (props) => {
props.props.props.form[props.form]
.values || {};
console.log("valuesobj:", valuesObj);
//console.log("valuesobj:", valuesObj);
delete valuesObj[
"_pinswg_appellant_value"
];
console.log("on save:", valuesObj);
//console.log("on save:", valuesObj);
updateRepresentation(
valuesObj,
false,
@@ -571,16 +571,16 @@ let RepLPA = (props) => {
props.form
].values || {};
console.log(
"valuesobj:",
valuesObj
);
// console.log(
// "valuesobj:",
// valuesObj
// );
delete valuesObj[
"_pinswg_appellant_value"
];
console.log("on save:", valuesObj);
//console.log("on save:", valuesObj);
updateRepresentation(
valuesObj,
false,
@@ -21,7 +21,7 @@ const RepLPADetails = (props) => {
var detailsObj = {};
detailsObj = jsonpath({
path: '$..[?(@.pinswg_name=="' + caseReference + '")]',
path: '$..[?(@ && @.pinswg_name=="' + caseReference + '")]',
json: setCaseDetailsObj,
eval: true,
});
@@ -60,7 +60,7 @@ let Enforcement_Questionnaire = (props) => {
detailsObj = jsonpath({
path:
'$..[?(@.pinswg_name=="' +
'$..[?(@ && @.pinswg_name=="' +
currentView.caseReference.currentReference +
'")]',
json: setCaseDetailsObj,
@@ -83,7 +83,7 @@ let Enforcement_Questionnaire = (props) => {
resultsObj = jsonpath({
path:
'$..[?(@.ticketnumber=="' +
'$..[?(@ && @.ticketnumber=="' +
currentView.caseReference.currentReference +
'")]',
json: setCaseResultssObj,
@@ -62,7 +62,7 @@ let S78_Questionnaire = (props) => {
detailsObj = jsonpath({
path:
'$..[?(@.pinswg_name=="' +
'$..[?(@ && @.pinswg_name=="' +
currentView.caseReference.currentReference +
'")]',
json: setCaseResultssObj,
@@ -85,7 +85,7 @@ let S78_Questionnaire = (props) => {
resultsObj = jsonpath({
path:
"$..[?(@." +
"$..[?(@ && @." +
(router.query.hasOwnProperty("state")
? router.query.state == "edit"
? "caseRef"
+2 -2
View File
@@ -59,7 +59,7 @@ const RepresentationList = (props) => {
{representationsArr.map((item, key) => {
let detailsObj = jsonpath({
path:
"$..[?(@.pinswg_representationsid=='" +
"$..[?(@ && @.pinswg_representationsid=='" +
incidentid +
"')]",
json: item,
@@ -91,7 +91,7 @@ const RepresentationList = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
] +
+8 -8
View File
@@ -141,7 +141,7 @@ const CaseSummary = (props) => {
const isWatchedCase = (whichIncident) => {
let isWatched = jsonpath({
path:
"$..value[?(@._pinswg_watchedcase_value=='" +
"$..value[?(@ && @._pinswg_watchedcase_value=='" +
whichIncident +
"')]",
json: watchedCases,
@@ -183,30 +183,30 @@ const CaseSummary = (props) => {
currentType == "searchResultsObj"
? (casesObj = jsonpath({
path: '$..[?(@.title=="' + caseReference + '")]',
path: '$..[?(@ && @.title=="' + caseReference + '")]',
json: searchResultsObj,
eval: true,
}))
: currentType == "watchedCases"
? (casesObj = jsonpath({
path: '$..[?(@.pinswg_title=="' + caseReference + '")]',
path: '$..[?(@ && @.pinswg_title=="' + caseReference + '")]',
json: setCaseQueryObj,
eval: true,
}))
: currentType == "myCases"
? (casesObj = jsonpath({
path: '$..[?(@.pinswg_title=="' + caseReference + '")]',
path: '$..[?(@ && @.pinswg_title=="' + caseReference + '")]',
json: setCaseQueryObj,
eval: true,
}))
: currentType == "directResultsObj"
? (casesObj = jsonpath({
path: '$..[?(@.ticketnumber=="' + caseReference + '")]',
path: '$..[?(@ && @.ticketnumber=="' + caseReference + '")]',
json: setCaseQueryObj,
eval: true,
}))
: (casesObj = jsonpath({
path: '$..[?(@.reference=="' + caseReference + '")]',
path: '$..[?(@ && @.reference=="' + caseReference + '")]',
json: setCaseQueryObj,
eval: true,
}));
@@ -217,14 +217,14 @@ const CaseSummary = (props) => {
currentType == "searchResultsObj"
? (detailsObj = jsonpath({
path: '$..[?(@.pinswg_name=="' + caseReference + '")]',
path: '$..[?(@ && @.pinswg_name=="' + caseReference + '")]',
json: searchDetailsObj,
eval: true,
}))
: currentType == "directResultsObj"
? (detailsObj = setCaseDetailsObj[0].value[0])
: (detailsObj = jsonpath({
path: '$..[?(@.pinswg_name=="' + caseReference + '")]',
path: '$..[?(@ && @.pinswg_name=="' + caseReference + '")]',
jsopn: setCaseDetailsObj,
eval: true,
}));
@@ -29,7 +29,7 @@ const Pinswg_advertsid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -54,7 +54,7 @@ const Pinswg_advertsid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_speacialistcaseprocess@OData.Community.Display.V1.FormattedValue"
] +
@@ -76,7 +76,7 @@ const Pinswg_advertsid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -119,7 +119,7 @@ const Pinswg_advertsid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -140,7 +140,7 @@ const Pinswg_advertsid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -161,7 +161,7 @@ const Pinswg_advertsid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -186,7 +186,7 @@ const Pinswg_advertsid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -29,7 +29,7 @@ const Pinswg_callinss77id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -53,7 +53,7 @@ const Pinswg_callinss77id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -96,7 +96,7 @@ const Pinswg_callinss77id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -117,7 +117,7 @@ const Pinswg_callinss77id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -138,7 +138,7 @@ const Pinswg_callinss77id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -162,7 +162,7 @@ const Pinswg_callinss77id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -29,7 +29,7 @@ const Pinswg_commonlandid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -53,7 +53,7 @@ const Pinswg_commonlandid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -96,7 +96,7 @@ const Pinswg_commonlandid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -117,7 +117,7 @@ const Pinswg_commonlandid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -138,7 +138,7 @@ const Pinswg_commonlandid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -162,7 +162,7 @@ const Pinswg_commonlandid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -238,7 +238,7 @@ const Pinswg_commonlandid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.pinswg_lpa=="' +
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value_cy',
json: transLookup,
@@ -246,7 +246,7 @@ const Pinswg_commonlandid = (props) => {
})
: jsonpath({
path:
'$..[?(@.pinswg_lpa=="' +
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value',
json: transLookup,
@@ -29,7 +29,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -53,7 +53,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -96,7 +96,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -117,7 +117,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -138,7 +138,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -162,7 +162,7 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -29,7 +29,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -76,7 +76,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -97,7 +97,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -118,7 +118,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -142,7 +142,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -218,7 +218,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.pinswg_lpa=="' +
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value_cy',
json: transLookup,
@@ -226,7 +226,7 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
})
: jsonpath({
path:
'$..[?(@.pinswg_lpa=="' +
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value',
json: transLookup,
+8 -8
View File
@@ -124,7 +124,7 @@ const Pinswg_dnsid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -153,7 +153,7 @@ const Pinswg_dnsid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj.pinswg_webaddress +
'")].value_cy',
json: transLookup,
@@ -191,7 +191,7 @@ const Pinswg_dnsid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -236,7 +236,7 @@ const Pinswg_dnsid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -260,7 +260,7 @@ const Pinswg_dnsid = (props) => {
{router.locale == "cy"
? jsonpath({path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -299,7 +299,7 @@ const Pinswg_dnsid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -368,7 +368,7 @@ const Pinswg_dnsid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -468,7 +468,7 @@ const Pinswg_dnsid = (props) => {
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj.pinswg_recommendation +
'")].value_cy',
transLookup,
@@ -67,7 +67,7 @@ const Pinswg_electricityactid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -91,7 +91,7 @@ const Pinswg_electricityactid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -153,7 +153,7 @@ const Pinswg_electricityactid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -176,7 +176,7 @@ const Pinswg_electricityactid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -197,7 +197,7 @@ const Pinswg_electricityactid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -221,7 +221,7 @@ const Pinswg_electricityactid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -297,7 +297,7 @@ const Pinswg_electricityactid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj.pinswg_recommendation +
'")].value_cy',
json: transLookup,
@@ -320,7 +320,7 @@ const Pinswg_electricityactid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj.pinswg_webaddress +
'")].value_cy',
json: transLookup,
@@ -29,7 +29,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -53,7 +53,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -96,7 +96,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -117,7 +117,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -138,7 +138,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -162,7 +162,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -29,7 +29,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -53,7 +53,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -96,7 +96,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -117,7 +117,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -138,7 +138,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -162,7 +162,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -29,7 +29,7 @@ const Pinswg_environmentalpermittingid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -53,7 +53,7 @@ const Pinswg_environmentalpermittingid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -96,7 +96,7 @@ const Pinswg_environmentalpermittingid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -117,7 +117,7 @@ const Pinswg_environmentalpermittingid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -138,7 +138,7 @@ const Pinswg_environmentalpermittingid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -162,7 +162,7 @@ const Pinswg_environmentalpermittingid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -238,7 +238,7 @@ const Pinswg_environmentalpermittingid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.pinswg_lpa=="' +
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value_cy',
json: transLookup,
@@ -246,7 +246,7 @@ const Pinswg_environmentalpermittingid = (props) => {
})
: jsonpath({
path:
'$..[?(@.pinswg_lpa=="' +
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value',
json: transLookup,
@@ -67,7 +67,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -91,7 +91,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -153,7 +153,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -174,7 +174,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -198,7 +198,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -274,7 +274,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj.pinswg_recommendation +
'")].value_cy',
json: transLookup,
@@ -297,7 +297,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj.pinswg_webaddress +
'")].value_cy',
json: transLookup,
@@ -29,7 +29,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -54,7 +54,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
] +
@@ -76,7 +76,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -119,7 +119,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -140,7 +140,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -161,7 +161,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -185,7 +185,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -261,7 +261,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.pinswg_lpa=="' +
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value_cy',
json: transLookup,
@@ -269,7 +269,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
})
: jsonpath({
path:
'$..[?(@.pinswg_lpa=="' +
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value',
json: transLookup,
@@ -29,7 +29,7 @@ const Pinswg_householderappealhasid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -53,7 +53,7 @@ const Pinswg_householderappealhasid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -96,7 +96,7 @@ const Pinswg_householderappealhasid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -117,7 +117,7 @@ const Pinswg_householderappealhasid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -141,7 +141,7 @@ const Pinswg_householderappealhasid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -29,7 +29,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -53,7 +53,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -96,7 +96,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -117,7 +117,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -138,7 +138,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -162,7 +162,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
+6 -6
View File
@@ -29,7 +29,7 @@ const Pinswg_ldpid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -53,7 +53,7 @@ const Pinswg_ldpid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -75,7 +75,7 @@ const Pinswg_ldpid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -96,7 +96,7 @@ const Pinswg_ldpid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -117,7 +117,7 @@ const Pinswg_ldpid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -141,7 +141,7 @@ const Pinswg_ldpid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -29,7 +29,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -53,7 +53,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -96,7 +96,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -117,7 +117,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -138,7 +138,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -162,7 +162,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -29,7 +29,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -53,7 +53,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -96,7 +96,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -117,7 +117,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -138,7 +138,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -162,7 +162,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -29,7 +29,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -53,7 +53,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -96,7 +96,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -117,7 +117,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -138,7 +138,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -162,7 +162,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -238,7 +238,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.pinswg_lpa=="' +
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value_cy',
json: transLookup,
@@ -246,7 +246,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
})
: jsonpath({
path:
'$..[?(@.pinswg_lpa=="' +
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value',
json: transLookup,
@@ -29,7 +29,7 @@ const Pinswg_nonvalidationid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -53,7 +53,7 @@ const Pinswg_nonvalidationid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -74,7 +74,7 @@ const Pinswg_nonvalidationid = (props) => {
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -95,7 +95,7 @@ const Pinswg_nonvalidationid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -119,7 +119,7 @@ const Pinswg_nonvalidationid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
] +
@@ -29,7 +29,7 @@ const Pinswg_planningappeals78id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -53,7 +53,7 @@ const Pinswg_planningappeals78id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -96,7 +96,7 @@ const Pinswg_planningappeals78id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -117,7 +117,7 @@ const Pinswg_planningappeals78id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -141,7 +141,7 @@ const Pinswg_planningappeals78id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -165,7 +165,7 @@ const Pinswg_planningappeals78id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
] +
@@ -29,7 +29,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -53,7 +53,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -96,7 +96,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -117,7 +117,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -138,7 +138,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -162,7 +162,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -29,7 +29,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -53,7 +53,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -96,7 +96,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -117,7 +117,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -138,7 +138,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -162,7 +162,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
+9 -9
View File
@@ -29,7 +29,7 @@ const Pinswg_rowid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -54,7 +54,7 @@ const Pinswg_rowid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
] +
@@ -76,7 +76,7 @@ const Pinswg_rowid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -119,7 +119,7 @@ const Pinswg_rowid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -140,7 +140,7 @@ const Pinswg_rowid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -161,7 +161,7 @@ const Pinswg_rowid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -185,7 +185,7 @@ const Pinswg_rowid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -261,7 +261,7 @@ const Pinswg_rowid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.pinswg_lpa=="' +
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value_cy',
json: transLookup,
@@ -269,7 +269,7 @@ const Pinswg_rowid = (props) => {
})
: jsonpath({
path:
'$..[?(@.pinswg_lpa=="' +
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value',
json: transLookup,
@@ -67,7 +67,7 @@ const Pinswg_transportandworkactid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -118,7 +118,7 @@ const Pinswg_transportandworkactid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj.pinswg_recommendation +
'")].value_cy',
json: transLookup,
@@ -141,7 +141,7 @@ const Pinswg_transportandworkactid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj.pinswg_webaddress +
'")].value_cy',
json: transLookup,
@@ -29,7 +29,7 @@ const Pinswg_wayleaveid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -53,7 +53,7 @@ const Pinswg_wayleaveid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -96,7 +96,7 @@ const Pinswg_wayleaveid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] +
@@ -117,7 +117,7 @@ const Pinswg_wayleaveid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
@@ -138,7 +138,7 @@ const Pinswg_wayleaveid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
@@ -162,7 +162,7 @@ const Pinswg_wayleaveid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
@@ -238,7 +238,7 @@ const Pinswg_wayleaveid = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.pinswg_lpa=="' +
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value_cy',
json: transLookup,
@@ -246,7 +246,7 @@ const Pinswg_wayleaveid = (props) => {
})
: jsonpath({
path:
'$..[?(@.pinswg_lpa=="' +
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value',
json: transLookup,
+135 -18
View File
@@ -37,6 +37,7 @@ const ReactQuill = dynamic(() => import("react-quill-new"), { ssr: false });
import { useStore as store, useSelector } from "react-redux";
import { useDispatch } from "react-redux";
import { validateField } from "./validationUtils"; // Import the validation function
const RenderTextfield = ({
id,
@@ -223,7 +224,9 @@ export function Textfield(props) {
// console.log(parentField, formProps, form);
//console.log("validation props:", validation);
const requiredMessage = t("newappeal:is-required-label");
const emojiNotAllowedMessage = t("newappeal:emojis-not-allowed-label");
const invalidPostcodeMessage = t("newappeal:invalid-postcode-label");
return (
<div className="govuk-form-group">
{parentField != false ? (
@@ -234,7 +237,15 @@ export function Textfield(props) {
component={RenderTextfield}
type="text"
className="govuk-input govuk-input--width-20"
validate={eval(validation)}
validate={(value) =>
validateField(
value,
validation,
requiredMessage,
emojiNotAllowedMessage,
invalidPostcodeMessage
)
} // Use the external validate function
label={props.label}
maxFieldLength={props.maxFieldLength}
/>
@@ -246,7 +257,15 @@ export function Textfield(props) {
component={RenderTextfield}
type="text"
className="govuk-input govuk-input--width-20"
validate={eval(validation)}
validate={(value) =>
validateField(
value,
validation,
requiredMessage,
emojiNotAllowedMessage,
invalidPostcodeMessage
)
} // Use the external validate function
label={props.label}
errorMsg={t("newappeal:is-required-label")}
maxFieldLength={props.maxFieldLength}
@@ -356,6 +375,9 @@ export function MultiLinefield(props) {
//console.log(showIfHasParentShowValue, formProps[form].values[parentField]);
let { t } = useTranslation();
const requiredMessage = t("newappeal:is-required-label");
const emojiNotAllowedMessage = t("newappeal:emojis-not-allowed-label");
const invalidPostcodeMessage = t("newappeal:invalid-postcode-label");
return (
<>
{parentField != false ? (
@@ -383,7 +405,15 @@ export function MultiLinefield(props) {
rows="5"
className="govuk-textarea govuk-input--width-30"
aria-describedby={props.name + "-hint"}
validate={eval(validation)}
validate={(value) =>
validateField(
value,
validation,
requiredMessage,
emojiNotAllowedMessage,
invalidPostcodeMessage
)
} // Use the external validate function
maxFieldLength={props.maxFieldLength}
/>
</div>
@@ -412,7 +442,15 @@ export function MultiLinefield(props) {
rows="5"
className="govuk-textarea govuk-input--width-30"
aria-describedby={props.name + "-hint"}
validate={eval(validation)}
validate={(value) =>
validateField(
value,
validation,
requiredMessage,
emojiNotAllowedMessage,
invalidPostcodeMessage
)
} // Use the external validate function
maxFieldLength={props.maxFieldLength}
/>
</div>
@@ -517,6 +555,9 @@ export function RichMultiLinefield(props) {
//console.log(showIfHasParentShowValue, formProps[form].values[parentField]);
let { t } = useTranslation();
const requiredMessage = t("newappeal:is-required-label");
const emojiNotAllowedMessage = t("newappeal:emojis-not-allowed-label");
const invalidPostcodeMessage = t("newappeal:invalid-postcode-label");
return (
<>
{parentField != false ? (
@@ -543,7 +584,15 @@ export function RichMultiLinefield(props) {
rows="5"
className="govuk-textarea govuk-input--width-30"
aria-describedby={props.name + "-hint"}
validate={eval(validation)}
validate={(value) =>
validateField(
value,
validation,
requiredMessage,
emojiNotAllowedMessage,
invalidPostcodeMessage
)
} // Use the external validate function
maxFieldLength={props.maxFieldLength}
/>
</div>
@@ -572,7 +621,15 @@ export function RichMultiLinefield(props) {
rows="5"
className="govuk-textarea govuk-input--width-30"
aria-describedby={props.name + "-hint"}
validate={eval(validation)}
validate={(value) =>
validateField(
value,
validation,
requiredMessage,
emojiNotAllowedMessage,
invalidPostcodeMessage
)
} // Use the external validate function
maxFieldLength={props.maxFieldLength}
/>
</div>
@@ -738,6 +795,9 @@ export function DateFieldPicker(props) {
_.has(formProps[form].values, parentField) &&
formProps[form].values[parentField]) == parentFieldShowOnValue;
const requiredMessage = t("newappeal:is-required-label");
const emojiNotAllowedMessage = t("newappeal:emojis-not-allowed-label");
const invalidPostcodeMessage = t("newappeal:invalid-postcode-label");
return (
<div className="govuk-form-group">
{parentField != false ? (
@@ -747,7 +807,15 @@ export function DateFieldPicker(props) {
id={name}
label={label}
component={RenderDatePicker}
validate={eval(validation)}
validate={(value) =>
validateField(
value,
validation,
requiredMessage,
emojiNotAllowedMessage,
invalidPostcodeMessage
)
} // Use the external validate function
errorMsg={t("newappeal:select-a-date-label")}
dateStart={dateStart}
dateEnd={dateEnd}
@@ -760,7 +828,15 @@ export function DateFieldPicker(props) {
id={name}
label={label}
component={RenderDatePicker}
validate={eval(validation)}
validate={(value) =>
validateField(
value,
validation,
requiredMessage,
emojiNotAllowedMessage,
invalidPostcodeMessage
)
} // Use the external validate function
errorMsg={t("newappeal:select-a-date-label")}
dateStart={dateStart}
dateEnd={dateEnd}
@@ -1187,6 +1263,9 @@ export function Radiofield(props) {
(showIfHasParentShowValue == parentField) != false &&
showIfHasParentShowValue;
const requiredMessage = t("newappeal:is-required-label");
const emojiNotAllowedMessage = t("newappeal:emojis-not-allowed-label");
const invalidPostcodeMessage = t("newappeal:invalid-postcode-label");
return (
<>
{parentField != false ? (
@@ -1202,7 +1281,15 @@ export function Radiofield(props) {
component={RenderRadio}
inline={props.inline}
hint={props.hint}
validate={eval(validation)}
validate={(value) =>
validateField(
value,
validation,
requiredMessage,
emojiNotAllowedMessage,
invalidPostcodeMessage
)
} // Use the external validate function
requiredDocumentLabel={props.requiredDocumentLabel}
requiredDocumentValue={props.requiredDocumentValue}
setDocumentsList={props.setDocumentsList}
@@ -1221,7 +1308,15 @@ export function Radiofield(props) {
component={RenderRadio}
inline={props.inline}
hint={props.hint}
validate={eval(validation)}
validate={(value) =>
validateField(
value,
validation,
requiredMessage,
emojiNotAllowedMessage,
invalidPostcodeMessage
)
} // Use the external validate function
requiredDocumentLabel={props.requiredDocumentLabel}
requiredDocumentValue={props.requiredDocumentValue}
setDocumentsList={props.setDocumentsList}
@@ -1340,7 +1435,8 @@ const RenderPickList = ({
let { t } = useTranslation();
var dropdownObj = jsonpath({
path: "$..value[?(@.LogicalName=='" + datafieldname + "')]..Options",
path:
"$..value[?(@ && @.LogicalName=='" + datafieldname + "')]..Options",
json: picklistData,
eval: true,
});
@@ -1457,7 +1553,9 @@ export function NumericField(props) {
showIfHasParentShowValue;
//console.log("parentField:", parentField, showIfHasParentShowValue);
const requiredMessage = t("newappeal:is-required-label");
const emojiNotAllowedMessage = t("newappeal:emojis-not-allowed-label");
const invalidPostcodeMessage = t("newappeal:invalid-postcode-label");
return (
<>
{parentField != false ? (
@@ -1473,7 +1571,15 @@ export function NumericField(props) {
pattern="[0-9]*"
inputMode="numeric"
parse={Number}
validate={eval(validation)}
validate={(value) =>
validateField(
value,
validation,
requiredMessage,
emojiNotAllowedMessage,
invalidPostcodeMessage
)
} // Use the external validate function
component={RenderTextfield}
label={label}
maxFieldLength={props.maxFieldLength}
@@ -1585,6 +1691,9 @@ export function DecimalField(props) {
return undefined;
};
const requiredMessage = t("newappeal:is-required-label");
const emojiNotAllowedMessage = t("newappeal:emojis-not-allowed-label");
const invalidPostcodeMessage = t("newappeal:invalid-postcode-label");
return (
<>
{parentField != false ? (
@@ -1601,7 +1710,15 @@ export function DecimalField(props) {
pattern="[0-9]*"
inputMode="numeric"
parse={Number}
validate={eval(validation)}
validate={(value) =>
validateField(
value,
validation,
requiredMessage,
emojiNotAllowedMessage,
invalidPostcodeMessage
)
} // Use the external validate function
component={RenderTextfield}
label={props.label}
maxFieldLength={props.maxFieldLength}
@@ -1726,7 +1843,7 @@ export const FieldsTranslations = (label) => {
let labelTrans =
router.locale == "cy"
? jsonpath({
path: '$..[?(@.value=="' + label + '")].value_cy',
path: '$..[?(@ && @.value=="' + label + '")].value_cy',
json: formObj,
eval: true,
})[0]
@@ -1745,7 +1862,7 @@ const PickListTranslations = (optionValue) => {
let optionTrans =
router.locale == "cy"
? jsonpath({
path: '$..[?(@.value=="' + optionValue + '")].value_cy',
path: '$..[?(@ && @.value=="' + optionValue + '")].value_cy',
json: pickListLookup,
eval: true,
})
@@ -1945,7 +2062,7 @@ const RenderFileUpload = (field) => {
const filelistObj = field.fileList || {};
const blobList = jsonpath({
path: "$..[?(@.documentType=='" + field.documentTypeCode + "')]",
path: "$..[?(@ && @.documentType=='" + field.documentTypeCode + "')]",
json: filelistObj,
eval: true,
});
+69
View File
@@ -0,0 +1,69 @@
// validationUtils.js
// Validation functions
const required = (value, requiredMessage, emojiNotAllowedMessage) => {
let errors;
if (!value) {
errors = requiredMessage;
} else {
const emojiRegex =
/[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F700}-\u{1F77F}\u{1F780}-\u{1F7FF}\u{1F800}-\u{1F8FF}\u{1F900}-\u{1F9FF}\u{1FA00}-\u{1FA6F}\u{1FA70}-\u{1FAFF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{2300}-\u{23FF}\u{2B50}\u{1F004}-\u{1F0CF}\u{1F0A0}-\u{1F0A5}\u{1F170}-\u{1F251}]/gu;
if (emojiRegex.test(value)) {
errors = emojiNotAllowedMessage;
}
}
return errors;
};
const postcode = (value, invalidPostcodeMessage) =>
value &&
!/^([A-Z][A-HJ-Y]?[0-9][A-Z0-9]? ?[0-9][A-Z]{2}|GIR ?0A{2})$/i.test(value)
? "Invalid postcode"
: undefined;
// Function to parse the validation string
export const parseValidationString = (validationString) => {
if (typeof validationString !== "string") {
return []; // Return an empty array if it's not a string
}
// Remove square brackets and split by commas
return validationString
.replace(/[\[\]']+/g, "") // Remove square brackets
.split(",") // Split by commas
.map((rule) => rule.trim()); // Trim each validation rule
};
// Function to handle multiple validation rules
export const validateField = (
value,
validationString,
requiredMessage,
emojiNotAllowedMessage,
invalidPostcodeMessage
) => {
const validations = parseValidationString(validationString); // Parse the validation string
let errors;
for (let validationRule of validations) {
const validationFunc = validationFunctions[validationRule];
if (validationFunc) {
errors = validationFunc(
value,
requiredMessage,
emojiNotAllowedMessage,
invalidPostcodeMessage
);
}
if (errors) break; // Exit if any validation fails
}
return errors;
};
// Map validation strings to actual validation functions
export const validationFunctions = {
required,
postcode,
// Add other validation functions as needed
};
+1 -1
View File
@@ -108,7 +108,7 @@ const MyPortal = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
props.accountDetails.accountDetails[
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
] +
+2 -2
View File
@@ -148,7 +148,7 @@ let AdvancedSearch = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
optionsObj[key]
.name +
'")].value_cy',
@@ -253,7 +253,7 @@ let AdvancedSearch = (props) => {
: router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
optionsObj[key]
.value +
'")].value_cy',
@@ -204,7 +204,7 @@ const AwaitingSubmissionFromBlob = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
getFormCollectionByID(
showTopThreeArr[key]
.pinswg_appealcasetype
@@ -297,7 +297,7 @@ const AwaitingSubmissionFromBlob = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
showTopThreeArr[key][
"pinswg_lpaname"
] +
+2 -2
View File
@@ -328,7 +328,7 @@ const TopThree = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
showTopThreeArr[key][
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -400,7 +400,7 @@ const TopThree = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
showTopThreeArr[key][
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
+5 -5
View File
@@ -271,7 +271,7 @@ const TopThree = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
showTopThreeArr[key].representationType +
'")].value_cy',
json: transLookup,
@@ -285,7 +285,7 @@ const TopThree = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
showTopThreeArr[key]
.representationCapacity +
'" ||@.value_cy=="' +
@@ -297,7 +297,7 @@ const TopThree = (props) => {
})
: jsonpath({
path:
'$..[?(@.value_cy=="' +
'$..[?(@ && @.value_cy=="' +
showTopThreeArr[key]
.representationCapacity +
'")].value',
@@ -306,7 +306,7 @@ const TopThree = (props) => {
}).length > 0
? jsonpath({
path:
'$..[?(@.value_cy=="' +
'$..[?(@ && @.value_cy=="' +
showTopThreeArr[key]
.representationCapacity +
'")].value',
@@ -327,7 +327,7 @@ const TopThree = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
showTopThreeArr[key][
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
] +
+1 -1
View File
@@ -290,7 +290,7 @@ let UploadFile = (props) => {
const uploadAction = await uploadFiles(dataObj, fileObj).then(
(data) => {
console.log("hello", data);
console.log("$1", data);
}
);
// router.push({
+14 -14
View File
@@ -118,7 +118,7 @@ const ViewAllResults = (props) => {
(currentView.viewKey == "myRepresentations"
? ""
: "..value") +
'[?(@.pinswg_name=="' +
'[?(@ && @.pinswg_name=="' +
(currentView.viewKey == "awaitingSubmissionDetails"
? item.title
: currentView.viewKey == "watchedCases"
@@ -480,7 +480,7 @@ const ViewAllResults = (props) => {
? router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
resultsArr[key].pinswg_lpaname +
'")].value_cy',
json: transLookup,
@@ -494,7 +494,7 @@ const ViewAllResults = (props) => {
? router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
resultsArr[key][
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -512,7 +512,7 @@ const ViewAllResults = (props) => {
? router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
searchDetailsObj[key].value[0][
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValuee"
] +
@@ -532,7 +532,7 @@ const ViewAllResults = (props) => {
? router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
resultsArr[key][
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValuee"
] +
@@ -550,7 +550,7 @@ const ViewAllResults = (props) => {
router.locale == "cy" &&
jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
searchDetailsObj[key][
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -568,7 +568,7 @@ const ViewAllResults = (props) => {
? router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
getFormCollectionByID(
item.pinswg_appealcasetype
).value +
@@ -582,7 +582,7 @@ const ViewAllResults = (props) => {
: router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -601,7 +601,7 @@ const ViewAllResults = (props) => {
(router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
getFormCollectionByID(
searchDetailsObj[key].appealType
).value +
@@ -629,7 +629,7 @@ const ViewAllResults = (props) => {
? router.locale == "cy"
? jsonpath({
path:
'$..[?(@.statuscode=="' +
'$..[?(@ && @.statuscode=="' +
item.statuscode +
'")].value_cy',
json: transLookup,
@@ -637,7 +637,7 @@ const ViewAllResults = (props) => {
})
: jsonpath({
path:
'$..[?(@.statuscode=="' +
'$..[?(@ && @.statuscode=="' +
item.statuscode +
'")].value',
json: transLookup,
@@ -647,7 +647,7 @@ const ViewAllResults = (props) => {
? repRaisedDate(item.repfile_name) // ? router.locale == "cy"
: // ? jsonpath({path:
//
// '$..[?(@.value=="' +
// '$..[?(@ && @.value=="' +
// searchDetailsObj[key].value[0][
// "statuscode@OData.Community.Display.V1.FormattedValue"
// ] +
@@ -659,7 +659,7 @@ const ViewAllResults = (props) => {
// : router.locale == "cy"
// ? jsonpath({path:
//
// '$..[?(@.value=="' +
// '$..[?(@ && @.value=="' +
// item[
// "statuscode@OData.Community.Display.V1.FormattedValue"
// ] +
@@ -669,7 +669,7 @@ const ViewAllResults = (props) => {
router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
+2 -2
View File
@@ -72,7 +72,7 @@ let BuildCheckRow = (props) => {
let labelTrans =
router.locale == "cy"
? jsonpath({
path: '$..[?(@.value=="' + label + '")].value_cy',
path: '$..[?(@ && @.value=="' + label + '")].value_cy',
json: formObj,
eval: true,
})
@@ -103,7 +103,7 @@ let BuildCheckRow = (props) => {
var datafieldname = xpath.select("//@datafieldname", doc);
const isRequiredField = jsonpath({
path:
"$..value[?(@.LogicalName=='" +
"$..value[?(@ && @.LogicalName=='" +
datafieldname[0].value +
"')]",
json: mandatoryFieldsData,
+1 -1
View File
@@ -136,7 +136,7 @@ let BuildCheckSection = (props) => {
let labelTrans =
router.locale == "cy"
? jsonpath({
path: '$..[?(@.value=="' + label + '")].value_cy',
path: '$..[?(@ && @.value=="' + label + '")].value_cy',
json: formObj,
eval: true,
})
+1 -1
View File
@@ -111,7 +111,7 @@ export default function BuildRow(props) {
dateEnd = !_.isEmpty(dateEnd) && dateEnd[0].value;
//const isRequiredField = jsonpath({path:
// "$..value[?(@.LogicalName=='" +
// "$..value[?(@ && @.LogicalName=='" +
// datafieldname[0].value +
// "')]",
// mandatoryFieldsData
+6 -6
View File
@@ -125,7 +125,7 @@ let BuildSection = (props) => {
props.props.accountDetails.containerID,
props.props.appealType.caseReference.ticketnumber
).then((data) => {
console.log("hello", data);
console.log("$1", data);
setCompletedUploadFiles(true);
return data;
});
@@ -488,7 +488,7 @@ let BuildSection = (props) => {
"_pinswg_appellant_value"
];
console.log("on save:", valuesObj);
//console.log("on save:", valuesObj);
updateCaseProgress(
valuesObj,
false,
@@ -593,10 +593,10 @@ let BuildSection = (props) => {
props.props.form[props.form]
.values || {};
console.log(
"valuesobj:",
valuesObj
);
// console.log(
// "valuesobj:",
// valuesObj
// );
delete valuesObj[
"_pinswg_appellant_value"
+2 -2
View File
@@ -67,7 +67,7 @@ const RenderLPAList = ({
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
optionsObj[key].name +
'")].value_cy',
json: transLookup,
@@ -151,7 +151,7 @@ const RenderAppealTypeList = ({
: router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
optionsObj[key].value +
'")].value_cy',
json: transLookup,
+1 -1
View File
@@ -395,7 +395,7 @@ export const AppealRow_pdf = (props) => {
break;
case "{16D63FD6-119B-4353-BDCA-18358721C3FE}":
// const blobList = jsonpath({path:
// "$..[?(@.documentType=='" +
// "$..[?(@ && @.documentType=='" +
// documentTypeCode[0].value +
// "')]",
// props.filesList
+6 -6
View File
@@ -97,7 +97,7 @@ const SearchResults = (props) => {
const isWatchedCase = (whichIncident) => {
let isWatched = jsonpath({
path:
"$..value[?(@._pinswg_watchedcase_value=='" +
"$..value[?(@ && @._pinswg_watchedcase_value=='" +
whichIncident +
"')]",
json: watchedCases,
@@ -247,7 +247,7 @@ const SearchResults = (props) => {
resultsArrPaged.map((item, key) => {
let detailsObj = jsonpath({
path:
'$..value[?(@.pinswg_name=="' +
'$..value[?(@ && @.pinswg_name=="' +
item.pinswg_name +
'")]',
@@ -462,7 +462,7 @@ const SearchResults = (props) => {
? router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -480,7 +480,7 @@ const SearchResults = (props) => {
? router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -503,7 +503,7 @@ const SearchResults = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"pinswg_appealType"
] +
@@ -525,7 +525,7 @@ const SearchResults = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
+3 -3
View File
@@ -128,7 +128,7 @@ const RenderCaseStatusList = ({
: router.locale == "cy"
? jsonpath({
path:
'$..[?(@.statuscode=="' +
'$..[?(@ && @.statuscode=="' +
optionsObj[key]
.statuscode +
'")].value_cy',
@@ -253,7 +253,7 @@ let AdvancedSearch = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
optionsObj[key]
.name +
'")].value_cy',
@@ -358,7 +358,7 @@ let AdvancedSearch = (props) => {
: router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
optionsObj[key]
.value +
'")].value_cy',
+4 -4
View File
@@ -174,7 +174,7 @@ const DNSSearchResults = (props) => {
const isWatchedCase = (whichIncident) => {
let isWatched = jsonpath({
path:
"$..value[?(@._pinswg_watchedcase_value=='" +
"$..value[?(@ && @._pinswg_watchedcase_value=='" +
whichIncident +
"')]",
json: watchedCases,
@@ -314,7 +314,7 @@ const DNSSearchResults = (props) => {
resultsArr.map((item, key) => {
let detailsObj = jsonpath({
path:
'$..value[?(@.pinswg_name=="' +
'$..value[?(@ && @.pinswg_name=="' +
item.title +
'")]',
json: searchDetailsObj,
@@ -517,7 +517,7 @@ const DNSSearchResults = (props) => {
? router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
detailsObj[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -540,7 +540,7 @@ const DNSSearchResults = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
+5 -5
View File
@@ -103,7 +103,7 @@ const SearchResults = (props) => {
const isWatchedCase = (whichIncident) => {
let isWatched = jsonpath({
path:
"$..value[?(@._pinswg_watchedcase_value=='" +
"$..value[?(@ && @._pinswg_watchedcase_value=='" +
whichIncident +
"')]",
@@ -253,7 +253,7 @@ const SearchResults = (props) => {
resultsArr.map((item, key) => {
let detailsObj = jsonpath({
path:
'$..value[?(@.pinswg_name=="' +
'$..value[?(@ && @.pinswg_name=="' +
item.title +
'")]',
json: searchDetailsObj,
@@ -482,7 +482,7 @@ const SearchResults = (props) => {
? router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
] +
@@ -505,7 +505,7 @@ const SearchResults = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
@@ -528,7 +528,7 @@ const SearchResults = (props) => {
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@.value=="' +
'$..[?(@ && @.value=="' +
item[
"statuscode@OData.Community.Display.V1.FormattedValue"
] +
+8 -8
View File
@@ -18,7 +18,7 @@ import xpath from "xpath";
*/
export const getFormCollection = (formtype) => {
const collectionName = jsonpath({
path: "$..[?(@.LogicalName=='" + formtype + "')]",
path: "$..[?(@ && @.LogicalName=='" + formtype + "')]",
json: data,
eval: true,
});
@@ -27,7 +27,7 @@ export const getFormCollection = (formtype) => {
export const getFormCollectionByID = (appealTypeID) => {
const collectionName = jsonpath({
path: "$..[?(@.appealTypeID =='" + appealTypeID + "')]",
path: "$..[?(@ && @.appealTypeID =='" + appealTypeID + "')]",
json: data,
eval: true,
});
@@ -36,7 +36,7 @@ export const getFormCollectionByID = (appealTypeID) => {
export const getFormIDByLogicalName = (appealTypeLogicalName) => {
const collectionName = jsonpath({
path: "$..[?(@.LogicalName =='" + appealTypeLogicalName + "')]",
path: "$..[?(@ && @.LogicalName =='" + appealTypeLogicalName + "')]",
json: data,
eval: true,
});
@@ -45,14 +45,14 @@ export const getFormIDByLogicalName = (appealTypeLogicalName) => {
export const getPickListLabel = (data, picklistType, picklistID) => {
const pickListData = jsonpath({
path: "$..[?(@.LogicalName=='" + picklistType + "')]",
path: "$..[?(@ && @.LogicalName=='" + picklistType + "')]",
json: data,
eval: true,
});
const pickListLabel = jsonpath({
path:
"$..[?(@.Value=='" +
"$..[?(@ && @.Value=='" +
picklistID +
"')].Label.LocalizedLabels..Label",
@@ -64,14 +64,14 @@ export const getPickListLabel = (data, picklistType, picklistID) => {
export const getRadioLabel = (data, radiotListName, radioListID) => {
const radioListData = jsonpath({
path: "$..[?(@.LogicalName=='" + radiotListName + "')]",
path: "$..[?(@ && @.LogicalName=='" + radiotListName + "')]",
json: data,
eval: true,
});
const pickListLabel = jsonpath({
path:
"$..[?(@.Value=='" +
"$..[?(@ && @.Value=='" +
radioListID +
"')].Label.LocalizedLabels..Label",
@@ -336,7 +336,7 @@ export const getProgressObj = (
const isRequiredField = jsonpath({
path:
"$..value[?(@.LogicalName=='" +
"$..value[?(@ && @.LogicalName=='" +
datafieldname[0].value +
"')]",
json: mandatoryFieldsData,
+2 -2
View File
@@ -49,13 +49,13 @@ export default async function ApiProxy(req, res) {
const lpaList = await getLPA();
const lpaGUID = jsonpath({
path: '$..[?(@.name=="' + lpaid + '")]',
path: '$..[?(@ && @.name=="' + lpaid + '")]',
json: lpaList,
eval: true,
});
//console.log(
// '$..[?(@.name="' + lpaid + '")]',
// '$..[?(@ && @.name="' + lpaid + '")]',
// lpaList,
// lpaid,
// "LPAGUID=",
+1 -1
View File
@@ -77,7 +77,7 @@ let Home = (props) => {
let optionsStr = props.appealType.appealTypeOptions.value || {};
let selectedObj = jsonpath({
path: "$..[?(@.attributevalue=='" + router.query.apt + "')]",
path: "$..[?(@ && @.attributevalue=='" + router.query.apt + "')]",
json: optionsStr,
eval: true,
});
+1 -1
View File
@@ -69,7 +69,7 @@ let Home = (props) => {
let optionsStr = props.appealType.appealTypeOptions.value;
let selectedObj = jsonpath({
path: "$..[?(@.attributevalue=='" + router.query.apt + "')]",
path: "$..[?(@ && @.attributevalue=='" + router.query.apt + "')]",
json: optionsStr,
eval: true,
});