Merge branch 'Development' into SIPS-Development
This commit is contained in:
@@ -146,13 +146,15 @@ let AdvancedSearch = (props) => {
|
||||
{/* {optionsObj[key].name} */}
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
optionsObj[key]
|
||||
.name +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: optionsObj[key].name ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
@@ -249,13 +251,15 @@ let AdvancedSearch = (props) => {
|
||||
)
|
||||
? ""
|
||||
: router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
optionsObj[key]
|
||||
.value +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: optionsObj[key].value ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
|
||||
@@ -202,15 +202,17 @@ const AwaitingSubmissionFromBlob = (props) => {
|
||||
<div className="cardModuleReference">
|
||||
<b>{t("myportal:appeal-type-label")}:</b>{" "}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
getFormCollectionByID(
|
||||
showTopThreeArr[key]
|
||||
.pinswg_appealcasetype
|
||||
).value +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: getFormCollectionByID(
|
||||
showTopThreeArr[key]
|
||||
.pinswg_appealcasetype
|
||||
@@ -293,14 +295,16 @@ const AwaitingSubmissionFromBlob = (props) => {
|
||||
:
|
||||
</b>
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
showTopThreeArr[key][
|
||||
"pinswg_lpaname"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: showTopThreeArr[key][
|
||||
"pinswg_lpaname"
|
||||
] || ""}
|
||||
|
||||
@@ -326,14 +326,16 @@ const TopThree = (props) => {
|
||||
<div className="cardModuleReference">
|
||||
<b>{t("myportal:appeal-type-label")}:</b>{" "}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
showTopThreeArr[key][
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: showTopThreeArr[key][
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""}
|
||||
@@ -396,14 +398,16 @@ const TopThree = (props) => {
|
||||
<div className="cardModuleReference">
|
||||
<b>{router.locale == "cy" ? "ACLl" : "LPA"}:</b>
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
showTopThreeArr[key][
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: showTopThreeArr[key][
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""}
|
||||
|
||||
@@ -269,42 +269,50 @@ const TopThree = (props) => {
|
||||
{" "}
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
showTopThreeArr[key].representationType +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: showTopThreeArr[key].representationType || ""}
|
||||
</div>
|
||||
<div className="cardModuleReference">
|
||||
<b>{t("myportal:capacity")}:</b>
|
||||
{" "}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
showTopThreeArr[key]
|
||||
.representationCapacity +
|
||||
'" ||@.value_cy=="' +
|
||||
showTopThreeArr[key]
|
||||
.representationCapacity +
|
||||
'" )].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: jsonpath(
|
||||
'$..[?(@.value_cy=="' +
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: jsonpath({
|
||||
path:
|
||||
'$..[?(@.value_cy=="' +
|
||||
showTopThreeArr[key]
|
||||
.representationCapacity +
|
||||
'")].value',
|
||||
transLookup
|
||||
).length > 0
|
||||
? jsonpath(
|
||||
'$..[?(@.value_cy=="' +
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
}).length > 0
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value_cy=="' +
|
||||
showTopThreeArr[key]
|
||||
.representationCapacity +
|
||||
'")].value',
|
||||
transLookup
|
||||
)
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: showTopThreeArr[key].representationCapacity}
|
||||
</div>
|
||||
<div className="cardModuleReference">
|
||||
@@ -317,14 +325,16 @@ const TopThree = (props) => {
|
||||
{" "}
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
showTopThreeArr[key][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: showTopThreeArr[key][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""}
|
||||
|
||||
@@ -112,8 +112,9 @@ const ViewAllResults = (props) => {
|
||||
let resultsRowArr = [];
|
||||
const buildResultsRowArr = () => {
|
||||
resultsArr.map((item, key) => {
|
||||
let detailsObj = jsonpath(
|
||||
"$" +
|
||||
let detailsObj = jsonpath({
|
||||
path:
|
||||
"$" +
|
||||
(currentView.viewKey == "myRepresentations"
|
||||
? ""
|
||||
: "..value") +
|
||||
@@ -126,8 +127,9 @@ const ViewAllResults = (props) => {
|
||||
? item.pinswg_name
|
||||
: item.pinswg_title) +
|
||||
'")]',
|
||||
searchDetailsObj
|
||||
);
|
||||
json: searchDetailsObj,
|
||||
sandbox: {},
|
||||
});
|
||||
detailsObj = detailsObj[0];
|
||||
|
||||
//console.log(searchDetailsObj[key]);
|
||||
@@ -476,26 +478,30 @@ const ViewAllResults = (props) => {
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
_.has(resultsArr[key], "pinswg_lpaname")
|
||||
? router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
resultsArr[key].pinswg_lpaname +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: resultsArr[key].pinswg_lpaname || "N/A"
|
||||
: ""}
|
||||
{_.has(resultsArr[key], [
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
|
||||
])
|
||||
? router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
resultsArr[key][
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: resultsArr[key][
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"
|
||||
@@ -504,14 +510,16 @@ const ViewAllResults = (props) => {
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue",
|
||||
])
|
||||
? router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
searchDetailsObj[key].value[0][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValuee"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: currentView.viewKey == "myRepresentations"
|
||||
? searchDetailsObj[key].value
|
||||
: searchDetailsObj[key].value[0][
|
||||
@@ -522,14 +530,16 @@ const ViewAllResults = (props) => {
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue",
|
||||
])
|
||||
? router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
resultsArr[key][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValuee"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: resultsArr[key][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
@@ -538,14 +548,16 @@ const ViewAllResults = (props) => {
|
||||
: "N/A")
|
||||
: currentView.viewKey == "myRepresentations" &&
|
||||
router.locale == "cy" &&
|
||||
jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
searchDetailsObj[key][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)}
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
@@ -554,26 +566,30 @@ const ViewAllResults = (props) => {
|
||||
|
||||
{currentView.viewKey == "awaitingSubmissionDetails"
|
||||
? router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
getFormCollectionByID(
|
||||
item.pinswg_appealcasetype
|
||||
).value +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: getFormCollectionByID(
|
||||
item.pinswg_appealcasetype
|
||||
).value || "N/A"
|
||||
: router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
@@ -583,14 +599,16 @@ const ViewAllResults = (props) => {
|
||||
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
(router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
getFormCollectionByID(
|
||||
searchDetailsObj[key].appealType
|
||||
).value +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)[0]
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})[0]
|
||||
: getFormCollectionByID(
|
||||
searchDetailsObj[key].appealType
|
||||
).value)}
|
||||
@@ -609,21 +627,25 @@ const ViewAllResults = (props) => {
|
||||
|
||||
{currentView.viewKey == "awaitingSubmissionDetails"
|
||||
? router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.statuscode=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.statuscode=="' +
|
||||
item.statuscode +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: jsonpath(
|
||||
'$..[?(@.statuscode=="' +
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: jsonpath({
|
||||
path:
|
||||
'$..[?(@.statuscode=="' +
|
||||
item.statuscode +
|
||||
'")].value',
|
||||
transLookup
|
||||
) || "N/A"
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
}) || "N/A"
|
||||
: currentView.viewKey == "myRepresentations"
|
||||
? repRaisedDate(item.repfile_name) // ? router.locale == "cy"
|
||||
: // ? jsonpath(
|
||||
: // ? jsonpath({path:
|
||||
//
|
||||
// '$..[?(@.value=="' +
|
||||
// searchDetailsObj[key].value[0][
|
||||
@@ -635,7 +657,7 @@ const ViewAllResults = (props) => {
|
||||
// "statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
// ] || "N/A"
|
||||
// : router.locale == "cy"
|
||||
// ? jsonpath(
|
||||
// ? jsonpath({path:
|
||||
//
|
||||
// '$..[?(@.value=="' +
|
||||
// item[
|
||||
@@ -645,14 +667,16 @@ const ViewAllResults = (props) => {
|
||||
// )
|
||||
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
json: transLookup,
|
||||
sandbox: {},
|
||||
})
|
||||
: item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"}
|
||||
|
||||
Reference in New Issue
Block a user