Merged PR 2262: shows primary lpa and then lists additional lps below on the portal summary tab
shows primary lpa and then lists additional lps below on the portal summary tab Related work items: #22699
This commit is contained in:
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_advertsid = (props) => {
|
const Pinswg_advertsid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -64,20 +65,16 @@ const Pinswg_advertsid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
value={
|
||||||
router.locale == "cy"
|
<>
|
||||||
? jsonpath({
|
{getCaseLpaDisplayLines({
|
||||||
path:
|
casesObj,
|
||||||
'$..[?(@ && @.value=="' +
|
detailsObj,
|
||||||
casesObj[
|
locale: router.locale,
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
transLookup
|
||||||
] +
|
}).map((name) => (
|
||||||
'")].value_cy',
|
<div key={name}>{name}</div>
|
||||||
json: transLookup,
|
))}
|
||||||
eval: true
|
</>
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] || ""
|
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_callinss77id = (props) => {
|
const Pinswg_callinss77id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -43,20 +44,16 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
value={
|
||||||
router.locale == "cy"
|
<>
|
||||||
? jsonpath({
|
{getCaseLpaDisplayLines({
|
||||||
path:
|
casesObj,
|
||||||
'$..[?(@ && @.value=="' +
|
detailsObj,
|
||||||
casesObj[
|
locale: router.locale,
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
transLookup
|
||||||
] +
|
}).map((name) => (
|
||||||
'")].value_cy',
|
<div key={name}>{name}</div>
|
||||||
json: transLookup,
|
))}
|
||||||
eval: true
|
</>
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] || ""
|
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_commonlandid = (props) => {
|
const Pinswg_commonlandid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -43,20 +44,16 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
value={
|
||||||
router.locale == "cy"
|
<>
|
||||||
? jsonpath({
|
{getCaseLpaDisplayLines({
|
||||||
path:
|
casesObj,
|
||||||
'$..[?(@ && @.value=="' +
|
detailsObj,
|
||||||
casesObj[
|
locale: router.locale,
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
transLookup
|
||||||
] +
|
}).map((name) => (
|
||||||
'")].value_cy',
|
<div key={name}>{name}</div>
|
||||||
json: transLookup,
|
))}
|
||||||
eval: true
|
</>
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] || ""
|
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_communityinfrastructurelevyid = (props) => {
|
const Pinswg_communityinfrastructurelevyid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -43,20 +44,16 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
value={
|
||||||
router.locale == "cy"
|
<>
|
||||||
? jsonpath({
|
{getCaseLpaDisplayLines({
|
||||||
path:
|
casesObj,
|
||||||
'$..[?(@ && @.value=="' +
|
detailsObj,
|
||||||
casesObj[
|
locale: router.locale,
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
transLookup
|
||||||
] +
|
}).map((name) => (
|
||||||
'")].value_cy',
|
<div key={name}>{name}</div>
|
||||||
json: transLookup,
|
))}
|
||||||
eval: true
|
</>
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] || ""
|
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
import GoogleMapComponent from "../../mapping/";
|
import GoogleMapComponent from "../../mapping/";
|
||||||
|
|
||||||
@@ -24,7 +25,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
|
|
||||||
point = new OSPoint(
|
point = new OSPoint(
|
||||||
detailsObj.pinswg_anticipatedgridreferencenorthingtext,
|
detailsObj.pinswg_anticipatedgridreferencenorthingtext,
|
||||||
detailsObj.pinswg_anticipatedgridreferenceeastingtext,
|
detailsObj.pinswg_anticipatedgridreferenceeastingtext
|
||||||
);
|
);
|
||||||
siteCoords = point.toOSGB36();
|
siteCoords = point.toOSGB36();
|
||||||
//console.log(siteCoords);
|
//console.log(siteCoords);
|
||||||
@@ -35,7 +36,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
: parseFloat(siteCoords.latitude),
|
: parseFloat(siteCoords.latitude),
|
||||||
lng: isNaN(parseFloat(siteCoords.longitude))
|
lng: isNaN(parseFloat(siteCoords.longitude))
|
||||||
? -3.437989
|
? -3.437989
|
||||||
: parseFloat(siteCoords.longitude),
|
: parseFloat(siteCoords.longitude)
|
||||||
};
|
};
|
||||||
|
|
||||||
const zoom = isNaN(parseFloat(siteCoords.latitude)) ? 7 : 12;
|
const zoom = isNaN(parseFloat(siteCoords.latitude)) ? 7 : 12;
|
||||||
@@ -58,7 +59,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
{getBilingualText(
|
{getBilingualText(
|
||||||
detailsObj.pinswg_projectdescription,
|
detailsObj.pinswg_projectdescription,
|
||||||
router.locale,
|
router.locale
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -67,7 +68,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
height: "40vh",
|
height: "40vh",
|
||||||
width: "100%",
|
width: "100%"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<GoogleMapComponent
|
<GoogleMapComponent
|
||||||
@@ -95,11 +96,10 @@ const Pinswg_dnsid = (props) => {
|
|||||||
|
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
label={t("case:summary-case-type-label")}
|
"case:summary-case-type-label"
|
||||||
|
)}
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -109,28 +109,23 @@ const Pinswg_dnsid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label",
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{detailsObj.pinswg_webaddress != null && (
|
{detailsObj.pinswg_webaddress != null && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-website-label",
|
"case:summary-case-website-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -138,7 +133,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: (
|
: (
|
||||||
<a
|
<a
|
||||||
@@ -146,7 +141,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
href={
|
href={
|
||||||
detailsObj.pinswg_webaddress.indexOf(
|
detailsObj.pinswg_webaddress.indexOf(
|
||||||
"https://",
|
"https://"
|
||||||
)
|
)
|
||||||
? "https://" +
|
? "https://" +
|
||||||
detailsObj.pinswg_webaddress
|
detailsObj.pinswg_webaddress
|
||||||
@@ -159,45 +154,31 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</a>
|
</a>
|
||||||
) ||
|
) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label",
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
<>
|
||||||
router.locale == "cy"
|
{getCaseLpaDisplayLines({
|
||||||
? jsonpath({
|
casesObj,
|
||||||
path:
|
detailsObj,
|
||||||
'$..[?(@ && @.value=="' +
|
locale: router.locale,
|
||||||
casesObj[
|
transLookup
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
}).map((name) => (
|
||||||
] +
|
<div key={name}>{name}</div>
|
||||||
'")].value_cy',
|
))}
|
||||||
json: transLookup,
|
</>
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] || ""
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-eia-required-label",
|
"case:summary-eia-required-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -205,24 +186,21 @@ const Pinswg_dnsid = (props) => {
|
|||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup,
|
transLookup
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-to-be-confirmed-label",
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
label={t("case:summary-procedure-label")}
|
"case:summary-procedure-label"
|
||||||
|
)}
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -232,17 +210,15 @@ const Pinswg_dnsid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-to-be-confirmed-label",
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
@@ -277,13 +253,10 @@ const Pinswg_dnsid = (props) => {
|
|||||||
}
|
}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-type-of-event-label",
|
"case:summary-type-of-event-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -293,68 +266,58 @@ const Pinswg_dnsid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-start-event-date-label",
|
"case:summary-start-event-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_startdateofevent",
|
"pinswg_startdateofevent"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent,
|
detailsObj.pinswg_startdateofevent
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdateofevent,
|
detailsObj.pinswg_startdateofevent
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-information-to-date-label",
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-information-to-date-label",
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
label={t("case:summary-event-date-label")}
|
"case:summary-event-date-label"
|
||||||
|
)}
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateeventrequested",
|
"pinswg_dateeventrequested"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested,
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_dateeventrequested,
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-to-be-confirmed-label",
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-to-be-confirmed-label",
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -370,13 +333,13 @@ const Pinswg_dnsid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-information-to-date-label",
|
"case:summary-no-information-to-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -389,54 +352,49 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-decision-date-label",
|
"case:summary-decision-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofdecision",
|
"pinswg_dateofdecision"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateofdecision,
|
detailsObj.pinswg_dateofdecision
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_dateofdecision,
|
detailsObj.pinswg_dateofdecision
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-information-to-date-label",
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-information-to-date-label",
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
{t(
|
||||||
"case:summary-case-link-status-label",
|
"case:summary-case-link-status-label"
|
||||||
)}
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(casesObj, [
|
{_.has(casesObj, [
|
||||||
"numberofchildincidents",
|
"numberofchildincidents"
|
||||||
])
|
])
|
||||||
? casesObj.numberofchildincidents >
|
? casesObj.numberofchildincidents >
|
||||||
0
|
0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked",
|
"case:summary-case-link-status-linked"
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-case-link-status-not-linked",
|
"case:summary-case-link-status-not-linked"
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-case-link-status-not-linked",
|
"case:summary-case-link-status-not-linked"
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
@@ -445,13 +403,13 @@ const Pinswg_dnsid = (props) => {
|
|||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
{t(
|
||||||
"case:summary-linked-cases-label",
|
"case:summary-linked-cases-label"
|
||||||
)}
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{linkedCasesList(
|
{linkedCasesList(
|
||||||
props.currentView
|
props.currentView
|
||||||
.linkedCaseReferences,
|
.linkedCaseReferences
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
@@ -509,370 +467,305 @@ const Pinswg_dnsid = (props) => {
|
|||||||
}
|
}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-written-acceptance-of-notice",
|
"case:summary-written-acceptance-of-notice"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_writtenacceptanceofnotification",
|
"pinswg_writtenacceptanceofnotification"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_writtenacceptanceofnotification,
|
detailsObj.pinswg_writtenacceptanceofnotification
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_writtenacceptanceofnotification,
|
detailsObj.pinswg_writtenacceptanceofnotification
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-deadline-for-submission-of-application",
|
"case:summary-deadline-for-submission-of-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_deadlineforsubmissionofapplication",
|
"pinswg_deadlineforsubmissionofapplication"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_deadlineforsubmissionofapplication,
|
detailsObj.pinswg_deadlineforsubmissionofapplication
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_deadlineforsubmissionofapplication,
|
detailsObj.pinswg_deadlineforsubmissionofapplication
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-submission-of-application",
|
"case:summary-date-of-submission-of-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofsubmissionofapplication",
|
"pinswg_dateofsubmissionofapplication"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateofsubmissionofapplication,
|
detailsObj.pinswg_dateofsubmissionofapplication
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_dateofsubmissionofapplication,
|
detailsObj.pinswg_dateofsubmissionofapplication
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{_.has(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationacceptedasvalid",
|
"pinswg_applicationacceptedasvalid"
|
||||||
) &&
|
) &&
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_applicationrejectedasinvalid,
|
detailsObj.pinswg_applicationrejectedasinvalid
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-application-accepted-as-valid",
|
"case:summary-application-accepted-as-valid"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_applicationacceptedasvalid,
|
detailsObj.pinswg_applicationacceptedasvalid
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_applicationacceptedasvalid,
|
detailsObj.pinswg_applicationacceptedasvalid
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{_.has(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationrejectedasinvalid",
|
"pinswg_applicationrejectedasinvalid"
|
||||||
) &&
|
) &&
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_applicationrejectedasinvalid,
|
detailsObj.pinswg_applicationrejectedasinvalid
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-application-rejected-as-invalid",
|
"case:summary-application-rejected-as-invalid"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_applicationrejectedasinvalid,
|
detailsObj.pinswg_applicationrejectedasinvalid
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_applicationrejectedasinvalid,
|
detailsObj.pinswg_applicationrejectedasinvalid
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-end-of-representation-period",
|
"case:summary-end-of-representation-period"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_endofrepresentationperiod",
|
"pinswg_endofrepresentationperiod"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_endofrepresentationperiod,
|
detailsObj.pinswg_endofrepresentationperiod
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_endofrepresentationperiod,
|
detailsObj.pinswg_endofrepresentationperiod
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{_.has(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofrequesttovarytheapplication",
|
"pinswg_dateofrequesttovarytheapplication"
|
||||||
) &&
|
) &&
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_dateofrequesttovarytheapplication,
|
detailsObj.pinswg_dateofrequesttovarytheapplication
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-request-to-vary",
|
"case:summary-date-of-request-to-vary"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_dateofrequesttovarytheapplication,
|
detailsObj.pinswg_dateofrequesttovarytheapplication
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_dateofrequesttovarytheapplication,
|
detailsObj.pinswg_dateofrequesttovarytheapplication
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{_.has(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_confirmrequesttovaryapplication",
|
"pinswg_confirmrequesttovaryapplication"
|
||||||
) &&
|
) &&
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_confirmrequesttovaryapplication,
|
detailsObj.pinswg_confirmrequesttovaryapplication
|
||||||
) &&
|
) &&
|
||||||
(_.has(
|
(_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_rejectrequesttovaryapplication",
|
"pinswg_rejectrequesttovaryapplication"
|
||||||
) &&
|
) &&
|
||||||
_.isEmpty(
|
_.isEmpty(
|
||||||
detailsObj.pinswg_rejectrequesttovaryapplication,
|
detailsObj.pinswg_rejectrequesttovaryapplication
|
||||||
) ? (
|
) ? (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-confirm-request-to-vary-application",
|
"case:summary-confirm-request-to-vary-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_confirmrequesttovaryapplication,
|
detailsObj.pinswg_confirmrequesttovaryapplication
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_confirmrequesttovaryapplication,
|
detailsObj.pinswg_confirmrequesttovaryapplication
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
))}
|
))}
|
||||||
{_.has(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_rejectrequesttovaryapplication",
|
"pinswg_rejectrequesttovaryapplication"
|
||||||
) &&
|
) &&
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_rejectrequesttovaryapplication,
|
detailsObj.pinswg_rejectrequesttovaryapplication
|
||||||
) &&
|
) &&
|
||||||
(_.has(
|
(_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_confirmrequesttovaryapplication",
|
"pinswg_confirmrequesttovaryapplication"
|
||||||
) &&
|
) &&
|
||||||
_.isEmpty(
|
_.isEmpty(
|
||||||
detailsObj.pinswg_confirmrequesttovaryapplication,
|
detailsObj.pinswg_confirmrequesttovaryapplication
|
||||||
) ? (
|
) ? (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-reject-request-to-vary-application",
|
"case:summary-reject-request-to-vary-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_rejectrequesttovaryapplication,
|
detailsObj.pinswg_rejectrequesttovaryapplication
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_rejectrequesttovaryapplication,
|
detailsObj.pinswg_rejectrequesttovaryapplication
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
))}
|
))}
|
||||||
{_.has(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionstartdates",
|
"pinswg_suspensionstartdates"
|
||||||
) &&
|
) &&
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_suspensionstartdates,
|
detailsObj.pinswg_suspensionstartdates
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-suspension-start-dates",
|
"case:summary-suspension-start-dates"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_suspensionstartdates,
|
detailsObj.pinswg_suspensionstartdates
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_suspensionstartdates,
|
detailsObj.pinswg_suspensionstartdates
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-suspension-end-dates",
|
"case:summary-suspension-end-dates"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionenddates",
|
"pinswg_suspensionenddates"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_suspensionenddates,
|
detailsObj.pinswg_suspensionenddates
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_suspensionenddates,
|
detailsObj.pinswg_suspensionenddates
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-report-due-by")}
|
label={t("case:summary-report-due-by")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_reportdueby",
|
"pinswg_reportdueby"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_reportdueby,
|
detailsObj.pinswg_reportdueby
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_reportdueby,
|
detailsObj.pinswg_reportdueby
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t("case:summary-suspension-dates")}
|
label={t("case:summary-suspension-dates")}
|
||||||
@@ -896,60 +789,50 @@ const Pinswg_dnsid = (props) => {
|
|||||||
}
|
}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inspector-report-submission-to-welsh-government",
|
"case:summary-inspector-report-submission-to-welsh-government"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_inspectorreportsubmittedtowelshgovernment",
|
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment,
|
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment,
|
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{_.has(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_withdrawndate",
|
"pinswg_withdrawndate"
|
||||||
) &&
|
) &&
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_withdrawndate,
|
detailsObj.pinswg_withdrawndate
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-withdrawn-date",
|
"case:summary-withdrawn-date"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_withdrawndate,
|
detailsObj.pinswg_withdrawndate
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_withdrawndate,
|
detailsObj.pinswg_withdrawndate
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label",
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</dl>
|
</dl>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_electricityactid = (props) => {
|
const Pinswg_electricityactid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -62,11 +63,10 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
|
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
label={t("case:summary-case-type-label")}
|
"case:summary-case-type-label"
|
||||||
|
)}
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -76,7 +76,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -84,42 +84,28 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
<>
|
||||||
router.locale == "cy"
|
{getCaseLpaDisplayLines({
|
||||||
? jsonpath({
|
casesObj,
|
||||||
path:
|
detailsObj,
|
||||||
'$..[?(@ && @.value=="' +
|
locale: router.locale,
|
||||||
casesObj[
|
transLookup
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
}).map((name) => (
|
||||||
] +
|
<div key={name}>{name}</div>
|
||||||
'")].value_cy',
|
))}
|
||||||
json: transLookup,
|
</>
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] || ""
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-eia-required-label"
|
"case:summary-eia-required-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -135,9 +121,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -157,11 +141,10 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
label={t("case:summary-procedure-label")}
|
"case:summary-procedure-label"
|
||||||
|
)}
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -171,23 +154,18 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-type-of-event-label"
|
"case:summary-type-of-event-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -197,21 +175,16 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -221,7 +194,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -229,9 +202,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -247,7 +218,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -274,7 +245,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(casesObj, [
|
{_.has(casesObj, [
|
||||||
"numberofchildincidents",
|
"numberofchildincidents"
|
||||||
])
|
])
|
||||||
? casesObj.numberofchildincidents >
|
? casesObj.numberofchildincidents >
|
||||||
0
|
0
|
||||||
@@ -308,13 +279,10 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-recommendation-label"
|
"case:summary-case-recommendation-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -322,25 +290,20 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
detailsObj.pinswg_recommendation +
|
detailsObj.pinswg_recommendation +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: detailsObj.pinswg_recommendation ||
|
: detailsObj.pinswg_recommendation ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{detailsObj.pinswg_webaddress != null && (
|
{detailsObj.pinswg_webaddress != null && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-website-label"
|
"case:summary-case-website-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -348,15 +311,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: detailsObj.pinswg_webaddress ||
|
: detailsObj.pinswg_webaddress ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</dl>
|
</dl>
|
||||||
@@ -371,11 +332,10 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</h3>
|
</h3>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
label={t("case:summary-event-date-label")}
|
"case:summary-event-date-label"
|
||||||
|
)}
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateeventrequested"
|
"pinswg_dateeventrequested"
|
||||||
@@ -392,18 +352,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-decision-date-label"
|
"case:summary-decision-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_casedecisiondate"
|
"pinswg_casedecisiondate"
|
||||||
@@ -420,22 +375,14 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-application-accepted-as-valid"
|
"case:summary-application-accepted-as-valid"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationacceptedasvalid"
|
"pinswg_applicationacceptedasvalid"
|
||||||
@@ -452,20 +399,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-application-rejected-as-invalid"
|
"case:summary-application-rejected-as-invalid"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationrejectedasinvalid"
|
"pinswg_applicationrejectedasinvalid"
|
||||||
@@ -482,18 +422,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-confirm-request-to-vary-application"
|
"case:summary-confirm-request-to-vary-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_confirmrequesttovaryapplication"
|
"pinswg_confirmrequesttovaryapplication"
|
||||||
@@ -510,18 +445,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-decisions"
|
"case:summary-date-of-decisions"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofdecision"
|
"pinswg_dateofdecision"
|
||||||
@@ -538,18 +468,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-request-to-vary"
|
"case:summary-date-of-request-to-vary"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofrequesttovarytheapplication"
|
"pinswg_dateofrequesttovarytheapplication"
|
||||||
@@ -566,18 +491,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-submission-of-application"
|
"case:summary-date-of-submission-of-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofsubmissionofapplication"
|
"pinswg_dateofsubmissionofapplication"
|
||||||
@@ -594,18 +514,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-project-published-to-website"
|
"case:summary-date-project-published-to-website"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateprojectpublishedonwebsite"
|
"pinswg_dateprojectpublishedonwebsite"
|
||||||
@@ -622,18 +537,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-deadline-for-submission-of-application"
|
"case:summary-deadline-for-submission-of-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_deadlineforsubmissionofapplication"
|
"pinswg_deadlineforsubmissionofapplication"
|
||||||
@@ -650,18 +560,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-end-of-representation-period"
|
"case:summary-end-of-representation-period"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_endofrepresentationperiod"
|
"pinswg_endofrepresentationperiod"
|
||||||
@@ -678,18 +583,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inspector-report-submission-to-welsh-government"
|
"case:summary-inspector-report-submission-to-welsh-government"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
||||||
@@ -706,18 +606,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-procedure-confirmed"
|
"case:summary-procedure-confirmed"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_procedureconfirmed"
|
"pinswg_procedureconfirmed"
|
||||||
@@ -734,18 +629,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-reject-request-to-vary-application"
|
"case:summary-reject-request-to-vary-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_rejectrequesttovaryapplication"
|
"pinswg_rejectrequesttovaryapplication"
|
||||||
@@ -762,16 +652,11 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-report-due-by")}
|
label={t("case:summary-report-due-by")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_reportdueby"
|
"pinswg_reportdueby"
|
||||||
@@ -788,16 +673,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
label={t("case:summary-suspension-dates")}
|
"case:summary-suspension-dates"
|
||||||
|
)}
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensiondates"
|
"pinswg_suspensiondates"
|
||||||
@@ -814,18 +696,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-suspension-end-dates"
|
"case:summary-suspension-end-dates"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionenddates"
|
"pinswg_suspensionenddates"
|
||||||
@@ -842,18 +719,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-suspension-start-dates"
|
"case:summary-suspension-start-dates"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionstartdates"
|
"pinswg_suspensionstartdates"
|
||||||
@@ -870,18 +742,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
||||||
@@ -898,16 +765,11 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-withdrawn-date")}
|
label={t("case:summary-withdrawn-date")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_withdrawndate"
|
"pinswg_withdrawndate"
|
||||||
@@ -924,18 +786,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-written-acceptance-of-notice"
|
"case:summary-written-acceptance-of-notice"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_writtenacceptanceofnotification"
|
"pinswg_writtenacceptanceofnotification"
|
||||||
@@ -952,9 +809,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -43,20 +44,16 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
value={
|
||||||
router.locale == "cy"
|
<>
|
||||||
? jsonpath({
|
{getCaseLpaDisplayLines({
|
||||||
path:
|
casesObj,
|
||||||
'$..[?(@ && @.value=="' +
|
detailsObj,
|
||||||
casesObj[
|
locale: router.locale,
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
transLookup
|
||||||
] +
|
}).map((name) => (
|
||||||
'")].value_cy',
|
<div key={name}>{name}</div>
|
||||||
json: transLookup,
|
))}
|
||||||
eval: true
|
</>
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] || ""
|
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_enforcementnoticeappeals174id = (props) => {
|
const Pinswg_enforcementnoticeappeals174id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -20,208 +21,184 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
title={t("case:summary-case-details-label")}
|
title={t("case:summary-case-details-label")}
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-case-type-label")}
|
||||||
label={t("case:summary-case-type-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath({
|
||||||
? jsonpath({
|
path:
|
||||||
path:
|
'$..[?(@ && @.value=="' +
|
||||||
'$..[?(@ && @.value=="' +
|
casesObj[
|
||||||
casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<SummaryRow
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
label={t("case:summary-lpa-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
value={router.locale == "cy"
|
/>
|
||||||
? jsonpath({
|
<SummaryRow
|
||||||
path:
|
label={t("case:summary-lpa-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
value={
|
||||||
casesObj[
|
<>
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
{getCaseLpaDisplayLines({
|
||||||
] +
|
casesObj,
|
||||||
'")].value_cy',
|
detailsObj,
|
||||||
json: transLookup,
|
locale: router.locale,
|
||||||
eval: true,
|
transLookup
|
||||||
})
|
}).map((name) => (
|
||||||
: casesObj[
|
<div key={name}>{name}</div>
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
))}
|
||||||
] || ""}
|
</>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-eia-required-label")}
|
||||||
label={t("case:summary-eia-required-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath(
|
||||||
? jsonpath(
|
'$..[?(@.value=="' +
|
||||||
'$..[?(@.value=="' +
|
detailsObj[
|
||||||
detailsObj[
|
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
transLookup
|
|
||||||
)
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-to-be-confirmed-label"
|
transLookup
|
||||||
)}
|
)
|
||||||
|
: detailsObj[
|
||||||
/>
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
<SummaryRow
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
label={t("case:summary-procedure-label")}
|
}
|
||||||
|
/>
|
||||||
value={router.locale == "cy"
|
<SummaryRow
|
||||||
? jsonpath({
|
label={t("case:summary-procedure-label")}
|
||||||
path:
|
value={
|
||||||
'$..[?(@ && @.value=="' +
|
router.locale == "cy"
|
||||||
detailsObj[
|
? jsonpath({
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
path:
|
||||||
] +
|
'$..[?(@ && @.value=="' +
|
||||||
'")].value_cy',
|
detailsObj[
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-type-of-event-label")}
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
detailsObj[
|
label={t("case:summary-type-of-event-label")}
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
detailsObj[
|
||||||
: detailsObj[
|
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-status-label")}
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
casesObj[
|
label={t("case:summary-status-label")}
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
casesObj[
|
||||||
: casesObj[
|
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<div className="govuk-summary-list__row">
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
<dt className="govuk-summary-list__key">
|
] ||
|
||||||
{t("case:summary-decision-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
</dt>
|
}
|
||||||
<dd className="govuk-summary-list__value">
|
/>
|
||||||
{router.locale == "cy"
|
<div className="govuk-summary-list__row">
|
||||||
? jsonpath({
|
<dt className="govuk-summary-list__key">
|
||||||
path:
|
{t("case:summary-decision-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
</dt>
|
||||||
detailsObj[
|
<dd className="govuk-summary-list__value">
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
{router.locale == "cy"
|
||||||
] +
|
? jsonpath({
|
||||||
'")].value_cy',
|
path:
|
||||||
json: transLookup,
|
'$..[?(@ && @.value=="' +
|
||||||
eval: true,
|
detailsObj[
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-information-to-date-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-information-to-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
{/* <Link href="/">
|
{/* <Link href="/">
|
||||||
<a>
|
<a>
|
||||||
{casesObj.caseDetails
|
{casesObj.caseDetails
|
||||||
.outcome_document || ""}
|
.outcome_document || ""}
|
||||||
</a>
|
</a>
|
||||||
</Link> */}
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
{t("case:summary-case-link-status-label")}
|
||||||
"case:summary-case-link-status-label"
|
</dt>
|
||||||
)}
|
<dd className="govuk-summary-list__value">
|
||||||
</dt>
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
<dd className="govuk-summary-list__value">
|
? casesObj.numberofchildincidents > 0
|
||||||
{_.has(casesObj, [
|
? t(
|
||||||
"numberofchildincidents",
|
"case:summary-case-link-status-linked"
|
||||||
])
|
)
|
||||||
? casesObj.numberofchildincidents >
|
: t(
|
||||||
0
|
"case:summary-case-link-status-not-linked"
|
||||||
? t(
|
)
|
||||||
"case:summary-case-link-status-linked"
|
: t(
|
||||||
)
|
"case:summary-case-link-status-not-linked"
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
</dd>
|
||||||
)
|
</div>
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
)}
|
<div className="govuk-summary-list__row">
|
||||||
</dd>
|
<dt className="govuk-summary-list__key">
|
||||||
</div>
|
{t("case:summary-linked-cases-label")}
|
||||||
)}
|
</dt>
|
||||||
{casesObj.numberofchildincidents > 0 ? (
|
<dd className="govuk-summary-list__value">
|
||||||
<div className="govuk-summary-list__row">
|
{linkedCasesList(
|
||||||
<dt className="govuk-summary-list__key">
|
props.currentView.linkedCaseReferences
|
||||||
{t(
|
)}
|
||||||
"case:summary-linked-cases-label"
|
</dd>
|
||||||
)}
|
</div>
|
||||||
</dt>
|
) : (
|
||||||
<dd className="govuk-summary-list__value">
|
""
|
||||||
{linkedCasesList(
|
)}
|
||||||
props.currentView
|
</dl>
|
||||||
.linkedCaseReferences
|
|
||||||
)}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)}
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
<SummaryCard
|
<SummaryCard
|
||||||
id="key-dates-card"
|
id="key-dates-card"
|
||||||
@@ -229,164 +206,119 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
headingTag="h3"
|
headingTag="h3"
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-questionnaire-due-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
value={_.has(detailsObj, "pinswg_startdate")
|
<SummaryRow
|
||||||
? !_.isEmpty(
|
label={t("case:summary-statement-due-date-label")}
|
||||||
detailsObj.pinswg_startdate
|
value={
|
||||||
)
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: t(
|
? formatDates(
|
||||||
"case:summary-no-date-entered-label"
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: _.has(
|
: t(
|
||||||
detailsObj,
|
"case:summary-no-date-entered-label"
|
||||||
"pinswg_startdates"
|
)
|
||||||
)
|
: t("case:summary-no-date-entered-label")
|
||||||
? !_.isEmpty(
|
}
|
||||||
detailsObj.pinswg_startdates
|
/>
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdates
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
<SummaryRow
|
"case:summary-interested-party-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
label={t(
|
_.has(
|
||||||
"case:summary-questionnaire-due-date-label"
|
detailsObj,
|
||||||
)}
|
"pinswg_otherpartiesstatement"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
value={_.has(
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_questionnaireduedate"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_questionnaireduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-statement-due-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_statementduedate"
|
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? formatDates(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
)
|
||||||
? formatDates(
|
: t(
|
||||||
detailsObj.pinswg_statementduedate
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t("case:summary-no-date-entered-label")
|
||||||
"case:summary-no-date-entered-label"
|
}
|
||||||
)
|
/>
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
<SummaryRow
|
||||||
/>
|
label={t(
|
||||||
|
"case:summary-applicant-final-comments-date-label"
|
||||||
<SummaryRow
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
label={t(
|
? !_.isEmpty(
|
||||||
"case:summary-interested-party-date-label"
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)}
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
value={_.has(
|
)
|
||||||
detailsObj,
|
: t(
|
||||||
"pinswg_otherpartiesstatement"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
}
|
||||||
)
|
/>
|
||||||
? formatDates(
|
{/* <SummaryRow
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: _.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_otherpartiesstatements"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-applicant-final-comments-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
{/* <SummaryRow
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inquiry-evidence-date-label"
|
"case:summary-inquiry-evidence-date-label"
|
||||||
)}
|
)}
|
||||||
@@ -407,79 +339,56 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-event-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={_.has(
|
value={
|
||||||
detailsObj,
|
_.has(detailsObj, "pinswg_startdateoftheevent")
|
||||||
"pinswg_dateeventrequested"
|
? !_.isEmpty(
|
||||||
)
|
detailsObj.pinswg_startdateoftheevent
|
||||||
? !_.isEmpty(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
? formatDates(
|
||||||
)
|
detailsObj.pinswg_startdateoftheevent
|
||||||
? formatDates(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
: t(
|
||||||
)
|
"case:summary-no-date-entered-label"
|
||||||
: t(
|
)
|
||||||
"case:summary-no-date-entered-label"
|
: t("case:summary-no-date-entered-label")
|
||||||
)
|
}
|
||||||
: t(
|
/>
|
||||||
"case:summary-no-date-entered-label"
|
<SummaryRow
|
||||||
)}
|
label={t("case:summary-decision-date-label")}
|
||||||
|
value={
|
||||||
/>
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
|
? !_.isEmpty(
|
||||||
<SummaryRow
|
detailsObj.pinswg_casedecisiondate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
label={t(
|
detailsObj.pinswg_casedecisiondate
|
||||||
"case:summary-start-event-date-label"
|
)
|
||||||
)}
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
value={_.has(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj,
|
}
|
||||||
"pinswg_startdateoftheevent"
|
/>
|
||||||
)
|
</dl>
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_startdateoftheevent
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdateoftheevent
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_casedecisiondate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_environmentalpermittingid = (props) => {
|
const Pinswg_environmentalpermittingid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -20,236 +21,209 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
title={t("case:summary-case-details-label")}
|
title={t("case:summary-case-details-label")}
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-case-type-label")}
|
||||||
label={t("case:summary-case-type-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath({
|
||||||
? jsonpath({
|
path:
|
||||||
path:
|
'$..[?(@ && @.value=="' +
|
||||||
'$..[?(@ && @.value=="' +
|
casesObj[
|
||||||
casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<SummaryRow
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
label={t("case:summary-lpa-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
value={router.locale == "cy"
|
/>
|
||||||
? jsonpath({
|
<SummaryRow
|
||||||
path:
|
label={t("case:summary-lpa-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
value={
|
||||||
casesObj[
|
<>
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
{getCaseLpaDisplayLines({
|
||||||
] +
|
casesObj,
|
||||||
'")].value_cy',
|
detailsObj,
|
||||||
json: transLookup,
|
locale: router.locale,
|
||||||
eval: true,
|
transLookup
|
||||||
})
|
}).map((name) => (
|
||||||
: casesObj[
|
<div key={name}>{name}</div>
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
))}
|
||||||
] || ""}
|
</>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-eia-required-label")}
|
||||||
label={t("case:summary-eia-required-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath(
|
||||||
? jsonpath(
|
'$..[?(@.value=="' +
|
||||||
'$..[?(@.value=="' +
|
detailsObj[
|
||||||
detailsObj[
|
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
transLookup
|
|
||||||
)
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-to-be-confirmed-label"
|
transLookup
|
||||||
)}
|
)
|
||||||
|
: detailsObj[
|
||||||
/>
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
<SummaryRow
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
label={t("case:summary-procedure-label")}
|
}
|
||||||
|
/>
|
||||||
value={router.locale == "cy"
|
<SummaryRow
|
||||||
? jsonpath({
|
label={t("case:summary-procedure-label")}
|
||||||
path:
|
value={
|
||||||
'$..[?(@ && @.value=="' +
|
router.locale == "cy"
|
||||||
detailsObj[
|
? jsonpath({
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
path:
|
||||||
] +
|
'$..[?(@ && @.value=="' +
|
||||||
'")].value_cy',
|
detailsObj[
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-type-of-event-label")}
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
detailsObj[
|
label={t("case:summary-type-of-event-label")}
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
detailsObj[
|
||||||
: detailsObj[
|
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-status-label")}
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
casesObj[
|
label={t("case:summary-status-label")}
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
casesObj[
|
||||||
: casesObj[
|
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<div className="govuk-summary-list__row">
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
<dt className="govuk-summary-list__key">
|
] ||
|
||||||
{t("case:summary-decision-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
</dt>
|
}
|
||||||
<dd className="govuk-summary-list__value">
|
/>
|
||||||
{router.locale == "cy"
|
<div className="govuk-summary-list__row">
|
||||||
? jsonpath({
|
<dt className="govuk-summary-list__key">
|
||||||
path:
|
{t("case:summary-decision-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
</dt>
|
||||||
detailsObj[
|
<dd className="govuk-summary-list__value">
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
{router.locale == "cy"
|
||||||
] +
|
? jsonpath({
|
||||||
'")].value_cy',
|
path:
|
||||||
json: transLookup,
|
'$..[?(@ && @.value=="' +
|
||||||
eval: true,
|
detailsObj[
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-information-to-date-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-information-to-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
{/* <Link href="/">
|
{/* <Link href="/">
|
||||||
<a>
|
<a>
|
||||||
{casesObj.caseDetails
|
{casesObj.caseDetails
|
||||||
.outcome_document || ""}
|
.outcome_document || ""}
|
||||||
</a>
|
</a>
|
||||||
</Link> */}
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
{t("case:summary-case-link-status-label")}
|
||||||
"case:summary-case-link-status-label"
|
</dt>
|
||||||
)}
|
<dd className="govuk-summary-list__value">
|
||||||
</dt>
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
<dd className="govuk-summary-list__value">
|
? casesObj.numberofchildincidents > 0
|
||||||
{_.has(casesObj, [
|
? t(
|
||||||
"numberofchildincidents",
|
"case:summary-case-link-status-linked"
|
||||||
])
|
)
|
||||||
? casesObj.numberofchildincidents >
|
: t(
|
||||||
0
|
"case:summary-case-link-status-not-linked"
|
||||||
? t(
|
)
|
||||||
"case:summary-case-link-status-linked"
|
: t(
|
||||||
)
|
"case:summary-case-link-status-not-linked"
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
</dd>
|
||||||
)
|
</div>
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
)}
|
<div className="govuk-summary-list__row">
|
||||||
</dd>
|
<dt className="govuk-summary-list__key">
|
||||||
</div>
|
{t("case:summary-linked-cases-label")}
|
||||||
)}
|
</dt>
|
||||||
{casesObj.numberofchildincidents > 0 ? (
|
<dd className="govuk-summary-list__value">
|
||||||
<div className="govuk-summary-list__row">
|
{linkedCasesList(
|
||||||
<dt className="govuk-summary-list__key">
|
props.currentView.linkedCaseReferences
|
||||||
{t(
|
)}
|
||||||
"case:summary-linked-cases-label"
|
</dd>
|
||||||
)}
|
</div>
|
||||||
</dt>
|
) : (
|
||||||
<dd className="govuk-summary-list__value">
|
""
|
||||||
{linkedCasesList(
|
)}
|
||||||
props.currentView
|
<SummaryRow
|
||||||
.linkedCaseReferences
|
label={t(
|
||||||
)}
|
"case:summary-case-relevant-authoritylabel"
|
||||||
</dd>
|
)}
|
||||||
</div>
|
value={
|
||||||
) : (
|
router.locale == "cy"
|
||||||
""
|
? jsonpath({
|
||||||
)}
|
path:
|
||||||
<SummaryRow
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
label={t(
|
'")].value_cy',
|
||||||
"case:summary-case-relevant-authoritylabel"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
value={router.locale == "cy"
|
: jsonpath({
|
||||||
? jsonpath({
|
path:
|
||||||
path:
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
'$..[?(@ && @.pinswg_lpa=="' +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
'")].value',
|
||||||
'")].value_cy',
|
json: transLookup,
|
||||||
json: transLookup,
|
eval: true
|
||||||
eval: true,
|
}) ||
|
||||||
})
|
t("case:summary-no-date-entered-label")
|
||||||
: jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.pinswg_lpa=="' +
|
</dl>
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
|
||||||
'")].value',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
}) ||
|
|
||||||
t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
<SummaryCard
|
<SummaryCard
|
||||||
id="key-dates-card"
|
id="key-dates-card"
|
||||||
@@ -257,164 +231,119 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
headingTag="h3"
|
headingTag="h3"
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-questionnaire-due-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
value={_.has(detailsObj, "pinswg_startdate")
|
<SummaryRow
|
||||||
? !_.isEmpty(
|
label={t("case:summary-statement-due-date-label")}
|
||||||
detailsObj.pinswg_startdate
|
value={
|
||||||
)
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: t(
|
? formatDates(
|
||||||
"case:summary-no-date-entered-label"
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: _.has(
|
: t(
|
||||||
detailsObj,
|
"case:summary-no-date-entered-label"
|
||||||
"pinswg_startdates"
|
)
|
||||||
)
|
: t("case:summary-no-date-entered-label")
|
||||||
? !_.isEmpty(
|
}
|
||||||
detailsObj.pinswg_startdates
|
/>
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdates
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
<SummaryRow
|
"case:summary-interested-party-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
label={t(
|
_.has(
|
||||||
"case:summary-questionnaire-due-date-label"
|
detailsObj,
|
||||||
)}
|
"pinswg_otherpartiesstatement"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
value={_.has(
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_questionnaireduedate"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_questionnaireduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-statement-due-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_statementduedate"
|
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? formatDates(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
)
|
||||||
? formatDates(
|
: t(
|
||||||
detailsObj.pinswg_statementduedate
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t("case:summary-no-date-entered-label")
|
||||||
"case:summary-no-date-entered-label"
|
}
|
||||||
)
|
/>
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
<SummaryRow
|
||||||
/>
|
label={t(
|
||||||
|
"case:summary-applicant-final-comments-date-label"
|
||||||
<SummaryRow
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
label={t(
|
? !_.isEmpty(
|
||||||
"case:summary-interested-party-date-label"
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)}
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
value={_.has(
|
)
|
||||||
detailsObj,
|
: t(
|
||||||
"pinswg_otherpartiesstatement"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
}
|
||||||
)
|
/>
|
||||||
? formatDates(
|
{/* <SummaryRow
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: _.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_otherpartiesstatements"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-applicant-final-comments-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
{/* <SummaryRow
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inquiry-evidence-date-label"
|
"case:summary-inquiry-evidence-date-label"
|
||||||
)}
|
)}
|
||||||
@@ -435,79 +364,56 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-event-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={_.has(
|
value={
|
||||||
detailsObj,
|
_.has(detailsObj, "pinswg_startdateofevent")
|
||||||
"pinswg_dateeventrequested"
|
? !_.isEmpty(
|
||||||
)
|
detailsObj.pinswg_startdateofevent
|
||||||
? !_.isEmpty(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
? formatDates(
|
||||||
)
|
detailsObj.pinswg_startdateofevent
|
||||||
? formatDates(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
: t(
|
||||||
)
|
"case:summary-no-date-entered-label"
|
||||||
: t(
|
)
|
||||||
"case:summary-no-date-entered-label"
|
: t("case:summary-no-date-entered-label")
|
||||||
)
|
}
|
||||||
: t(
|
/>
|
||||||
"case:summary-no-date-entered-label"
|
<SummaryRow
|
||||||
)}
|
label={t("case:summary-decision-date-label")}
|
||||||
|
value={
|
||||||
/>
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
|
? !_.isEmpty(
|
||||||
<SummaryRow
|
detailsObj.pinswg_casedecisiondate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
label={t(
|
detailsObj.pinswg_casedecisiondate
|
||||||
"case:summary-start-event-date-label"
|
)
|
||||||
)}
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
value={_.has(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj,
|
}
|
||||||
"pinswg_startdateofevent"
|
/>
|
||||||
)
|
</dl>
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_startdateofevent
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdateofevent
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_casedecisiondate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_harbourrevisionorderid = (props) => {
|
const Pinswg_harbourrevisionorderid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -62,11 +63,10 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
|
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
label={t("case:summary-case-type-label")}
|
"case:summary-case-type-label"
|
||||||
|
)}
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -76,7 +76,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -84,42 +84,28 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
<>
|
||||||
router.locale == "cy"
|
{getCaseLpaDisplayLines({
|
||||||
? jsonpath({
|
casesObj,
|
||||||
path:
|
detailsObj,
|
||||||
'$..[?(@ && @.value=="' +
|
locale: router.locale,
|
||||||
casesObj[
|
transLookup
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
}).map((name) => (
|
||||||
] +
|
<div key={name}>{name}</div>
|
||||||
'")].value_cy',
|
))}
|
||||||
json: transLookup,
|
</>
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] || ""
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-eia-required-label"
|
"case:summary-eia-required-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -135,9 +121,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -157,11 +141,10 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
label={t("case:summary-procedure-label")}
|
"case:summary-procedure-label"
|
||||||
|
)}
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -171,21 +154,16 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -195,7 +173,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -203,9 +181,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -221,7 +197,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -248,7 +224,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(casesObj, [
|
{_.has(casesObj, [
|
||||||
"numberofchildincidents",
|
"numberofchildincidents"
|
||||||
])
|
])
|
||||||
? casesObj.numberofchildincidents >
|
? casesObj.numberofchildincidents >
|
||||||
0
|
0
|
||||||
@@ -282,13 +258,10 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-recommendation-label"
|
"case:summary-case-recommendation-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -296,25 +269,20 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
detailsObj.pinswg_recommendation +
|
detailsObj.pinswg_recommendation +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: detailsObj.pinswg_recommendation ||
|
: detailsObj.pinswg_recommendation ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{detailsObj.pinswg_webaddress != null && (
|
{detailsObj.pinswg_webaddress != null && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-website-label"
|
"case:summary-case-website-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -322,15 +290,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true
|
||||||
})
|
})
|
||||||
: detailsObj.pinswg_webaddress ||
|
: detailsObj.pinswg_webaddress ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</dl>
|
</dl>
|
||||||
@@ -345,11 +311,10 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</h3>
|
</h3>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
label={t("case:summary-event-date-label")}
|
"case:summary-event-date-label"
|
||||||
|
)}
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateeventrequested"
|
"pinswg_dateeventrequested"
|
||||||
@@ -366,18 +331,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-decision-date-label"
|
"case:summary-decision-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_casedecisiondate"
|
"pinswg_casedecisiondate"
|
||||||
@@ -394,22 +354,14 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-application-accepted-as-valid"
|
"case:summary-application-accepted-as-valid"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationacceptedasvalid"
|
"pinswg_applicationacceptedasvalid"
|
||||||
@@ -426,20 +378,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-application-rejected-as-invalid"
|
"case:summary-application-rejected-as-invalid"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationrejectedasinvalid"
|
"pinswg_applicationrejectedasinvalid"
|
||||||
@@ -456,18 +401,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-confirm-request-to-vary-application"
|
"case:summary-confirm-request-to-vary-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_confirmrequesttovaryapplication"
|
"pinswg_confirmrequesttovaryapplication"
|
||||||
@@ -484,18 +424,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-decisions"
|
"case:summary-date-of-decisions"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofdecision"
|
"pinswg_dateofdecision"
|
||||||
@@ -512,18 +447,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-request-to-vary"
|
"case:summary-date-of-request-to-vary"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofrequesttovarytheapplication"
|
"pinswg_dateofrequesttovarytheapplication"
|
||||||
@@ -540,18 +470,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-submission-of-application"
|
"case:summary-date-of-submission-of-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofsubmissionofapplication"
|
"pinswg_dateofsubmissionofapplication"
|
||||||
@@ -568,18 +493,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-project-published-to-website"
|
"case:summary-date-project-published-to-website"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateprojectpublishedonwebsite"
|
"pinswg_dateprojectpublishedonwebsite"
|
||||||
@@ -596,18 +516,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-deadline-for-submission-of-application"
|
"case:summary-deadline-for-submission-of-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_deadlineforsubmissionofapplication"
|
"pinswg_deadlineforsubmissionofapplication"
|
||||||
@@ -624,18 +539,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-end-of-representation-period"
|
"case:summary-end-of-representation-period"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_endofrepresentationperiod"
|
"pinswg_endofrepresentationperiod"
|
||||||
@@ -652,18 +562,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inspector-report-submission-to-welsh-government"
|
"case:summary-inspector-report-submission-to-welsh-government"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
||||||
@@ -680,18 +585,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-procedure-confirmed"
|
"case:summary-procedure-confirmed"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_procedureconfirmed"
|
"pinswg_procedureconfirmed"
|
||||||
@@ -708,18 +608,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-reject-request-to-vary-application"
|
"case:summary-reject-request-to-vary-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_rejectrequesttovaryapplication"
|
"pinswg_rejectrequesttovaryapplication"
|
||||||
@@ -736,16 +631,11 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-report-due-by")}
|
label={t("case:summary-report-due-by")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_reportdueby"
|
"pinswg_reportdueby"
|
||||||
@@ -762,16 +652,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
label={t("case:summary-suspension-dates")}
|
"case:summary-suspension-dates"
|
||||||
|
)}
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensiondates"
|
"pinswg_suspensiondates"
|
||||||
@@ -788,18 +675,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-suspension-end-dates"
|
"case:summary-suspension-end-dates"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionenddates"
|
"pinswg_suspensionenddates"
|
||||||
@@ -816,18 +698,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-suspension-start-dates"
|
"case:summary-suspension-start-dates"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionstartdates"
|
"pinswg_suspensionstartdates"
|
||||||
@@ -844,18 +721,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
||||||
@@ -872,16 +744,11 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-withdrawn-date")}
|
label={t("case:summary-withdrawn-date")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_withdrawndate"
|
"pinswg_withdrawndate"
|
||||||
@@ -898,18 +765,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-written-acceptance-of-notice"
|
"case:summary-written-acceptance-of-notice"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_writtenacceptanceofnotification"
|
"pinswg_writtenacceptanceofnotification"
|
||||||
@@ -926,9 +788,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -20,264 +21,230 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
title={t("case:summary-case-details-label")}
|
title={t("case:summary-case-details-label")}
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-case-type-label")}
|
||||||
label={t("case:summary-case-type-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath({
|
||||||
? jsonpath({
|
path:
|
||||||
path:
|
'$..[?(@ && @.value=="' +
|
||||||
'$..[?(@ && @.value=="' +
|
casesObj[
|
||||||
casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
/>
|
<SummaryRow
|
||||||
|
label={"Specialist Case Process"}
|
||||||
<SummaryRow
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
label={"Specialist Case Process"}
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
value={router.locale == "cy"
|
|
||||||
? jsonpath({
|
|
||||||
path:
|
|
||||||
'$..[?(@ && @.value=="' +
|
|
||||||
detailsObj[
|
|
||||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<SummaryRow
|
||||||
/>
|
label={t("case:summary-lpa-label")}
|
||||||
|
value={
|
||||||
<SummaryRow
|
<>
|
||||||
|
{getCaseLpaDisplayLines({
|
||||||
|
casesObj,
|
||||||
label={t("case:summary-lpa-label")}
|
detailsObj,
|
||||||
|
locale: router.locale,
|
||||||
|
transLookup
|
||||||
value={router.locale == "cy"
|
}).map((name) => (
|
||||||
? jsonpath({
|
<div key={name}>{name}</div>
|
||||||
path:
|
))}
|
||||||
'$..[?(@ && @.value=="' +
|
</>
|
||||||
casesObj[
|
}
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
/>
|
||||||
] +
|
<SummaryRow
|
||||||
'")].value_cy',
|
label={t("case:summary-eia-required-label")}
|
||||||
json: transLookup,
|
value={
|
||||||
eval: true,
|
router.locale == "cy"
|
||||||
})
|
? jsonpath(
|
||||||
: casesObj[
|
'$..[?(@.value=="' +
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
detailsObj[
|
||||||
] || ""}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
label={t("case:summary-eia-required-label")}
|
|
||||||
|
|
||||||
value={router.locale == "cy"
|
|
||||||
? jsonpath(
|
|
||||||
'$..[?(@.value=="' +
|
|
||||||
detailsObj[
|
|
||||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
transLookup
|
|
||||||
)
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-to-be-confirmed-label"
|
transLookup
|
||||||
)}
|
)
|
||||||
|
: detailsObj[
|
||||||
/>
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
<SummaryRow
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
label={t("case:summary-procedure-label")}
|
}
|
||||||
|
/>
|
||||||
value={router.locale == "cy"
|
<SummaryRow
|
||||||
? jsonpath({
|
label={t("case:summary-procedure-label")}
|
||||||
path:
|
value={
|
||||||
'$..[?(@ && @.value=="' +
|
router.locale == "cy"
|
||||||
detailsObj[
|
? jsonpath({
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
path:
|
||||||
] +
|
'$..[?(@ && @.value=="' +
|
||||||
'")].value_cy',
|
detailsObj[
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-type-of-event-label")}
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
detailsObj[
|
label={t("case:summary-type-of-event-label")}
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
detailsObj[
|
||||||
: detailsObj[
|
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-status-label")}
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
casesObj[
|
label={t("case:summary-status-label")}
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
casesObj[
|
||||||
: casesObj[
|
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<div className="govuk-summary-list__row">
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
<dt className="govuk-summary-list__key">
|
] ||
|
||||||
{t("case:summary-decision-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
</dt>
|
}
|
||||||
<dd className="govuk-summary-list__value">
|
/>
|
||||||
{router.locale == "cy"
|
<div className="govuk-summary-list__row">
|
||||||
? jsonpath({
|
<dt className="govuk-summary-list__key">
|
||||||
path:
|
{t("case:summary-decision-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
</dt>
|
||||||
detailsObj[
|
<dd className="govuk-summary-list__value">
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
{router.locale == "cy"
|
||||||
] +
|
? jsonpath({
|
||||||
'")].value_cy',
|
path:
|
||||||
json: transLookup,
|
'$..[?(@ && @.value=="' +
|
||||||
eval: true,
|
detailsObj[
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-information-to-date-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-information-to-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
{/* <Link href="/">
|
{/* <Link href="/">
|
||||||
<a>
|
<a>
|
||||||
{casesObj.caseDetails
|
{casesObj.caseDetails
|
||||||
.outcome_document || ""}
|
.outcome_document || ""}
|
||||||
</a>
|
</a>
|
||||||
</Link> */}
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
{t("case:summary-case-link-status-label")}
|
||||||
"case:summary-case-link-status-label"
|
</dt>
|
||||||
)}
|
<dd className="govuk-summary-list__value">
|
||||||
</dt>
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
<dd className="govuk-summary-list__value">
|
? casesObj.numberofchildincidents > 0
|
||||||
{_.has(casesObj, [
|
? t(
|
||||||
"numberofchildincidents",
|
"case:summary-case-link-status-linked"
|
||||||
])
|
)
|
||||||
? casesObj.numberofchildincidents >
|
: t(
|
||||||
0
|
"case:summary-case-link-status-not-linked"
|
||||||
? t(
|
)
|
||||||
"case:summary-case-link-status-linked"
|
: t(
|
||||||
)
|
"case:summary-case-link-status-not-linked"
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
</dd>
|
||||||
)
|
</div>
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
)}
|
<div className="govuk-summary-list__row">
|
||||||
</dd>
|
<dt className="govuk-summary-list__key">
|
||||||
</div>
|
{t("case:summary-linked-cases-label")}
|
||||||
)}
|
</dt>
|
||||||
{casesObj.numberofchildincidents > 0 ? (
|
<dd className="govuk-summary-list__value">
|
||||||
<div className="govuk-summary-list__row">
|
{linkedCasesList(
|
||||||
<dt className="govuk-summary-list__key">
|
props.currentView.linkedCaseReferences
|
||||||
{t(
|
)}
|
||||||
"case:summary-linked-cases-label"
|
</dd>
|
||||||
)}
|
</div>
|
||||||
</dt>
|
) : (
|
||||||
<dd className="govuk-summary-list__value">
|
""
|
||||||
{linkedCasesList(
|
)}
|
||||||
props.currentView
|
<SummaryRow
|
||||||
.linkedCaseReferences
|
label={t(
|
||||||
)}
|
"case:summary-case-relevant-authoritylabel"
|
||||||
</dd>
|
)}
|
||||||
</div>
|
value={
|
||||||
) : (
|
router.locale == "cy"
|
||||||
""
|
? jsonpath({
|
||||||
)}
|
path:
|
||||||
<SummaryRow
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
label={t(
|
'")].value_cy',
|
||||||
"case:summary-case-relevant-authoritylabel"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
value={router.locale == "cy"
|
: jsonpath({
|
||||||
? jsonpath({
|
path:
|
||||||
path:
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
'$..[?(@ && @.pinswg_lpa=="' +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
'")].value',
|
||||||
'")].value_cy',
|
json: transLookup,
|
||||||
json: transLookup,
|
eval: true
|
||||||
eval: true,
|
}) ||
|
||||||
})
|
t("case:summary-no-date-entered-label")
|
||||||
: jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.pinswg_lpa=="' +
|
</dl>
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
|
||||||
'")].value',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
}) ||
|
|
||||||
t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
<SummaryCard
|
<SummaryCard
|
||||||
id="key-dates-card"
|
id="key-dates-card"
|
||||||
@@ -285,164 +252,119 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
headingTag="h3"
|
headingTag="h3"
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-questionnaire-due-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
value={_.has(detailsObj, "pinswg_startdate")
|
<SummaryRow
|
||||||
? !_.isEmpty(
|
label={t("case:summary-statement-due-date-label")}
|
||||||
detailsObj.pinswg_startdate
|
value={
|
||||||
)
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: t(
|
? formatDates(
|
||||||
"case:summary-no-date-entered-label"
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: _.has(
|
: t(
|
||||||
detailsObj,
|
"case:summary-no-date-entered-label"
|
||||||
"pinswg_startdates"
|
)
|
||||||
)
|
: t("case:summary-no-date-entered-label")
|
||||||
? !_.isEmpty(
|
}
|
||||||
detailsObj.pinswg_startdates
|
/>
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdates
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
<SummaryRow
|
"case:summary-interested-party-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
label={t(
|
_.has(
|
||||||
"case:summary-questionnaire-due-date-label"
|
detailsObj,
|
||||||
)}
|
"pinswg_otherpartiesstatement"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
value={_.has(
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_questionnaireduedate"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_questionnaireduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-statement-due-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_statementduedate"
|
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? formatDates(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
)
|
||||||
? formatDates(
|
: t(
|
||||||
detailsObj.pinswg_statementduedate
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t("case:summary-no-date-entered-label")
|
||||||
"case:summary-no-date-entered-label"
|
}
|
||||||
)
|
/>
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
<SummaryRow
|
||||||
/>
|
label={t(
|
||||||
|
"case:summary-applicant-final-comments-date-label"
|
||||||
<SummaryRow
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
label={t(
|
? !_.isEmpty(
|
||||||
"case:summary-interested-party-date-label"
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)}
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
value={_.has(
|
)
|
||||||
detailsObj,
|
: t(
|
||||||
"pinswg_otherpartiesstatement"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
}
|
||||||
)
|
/>
|
||||||
? formatDates(
|
{/* <SummaryRow
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: _.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_otherpartiesstatements"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-applicant-final-comments-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
{/* <SummaryRow
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inquiry-evidence-date-label"
|
"case:summary-inquiry-evidence-date-label"
|
||||||
)}
|
)}
|
||||||
@@ -463,79 +385,56 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-event-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={_.has(
|
value={
|
||||||
detailsObj,
|
_.has(detailsObj, "pinswg_startdateoftheevent")
|
||||||
"pinswg_dateeventrequested"
|
? !_.isEmpty(
|
||||||
)
|
detailsObj.pinswg_startdateoftheevent
|
||||||
? !_.isEmpty(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
? formatDates(
|
||||||
)
|
detailsObj.pinswg_startdateoftheevent
|
||||||
? formatDates(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
: t(
|
||||||
)
|
"case:summary-no-date-entered-label"
|
||||||
: t(
|
)
|
||||||
"case:summary-no-date-entered-label"
|
: t("case:summary-no-date-entered-label")
|
||||||
)
|
}
|
||||||
: t(
|
/>
|
||||||
"case:summary-no-date-entered-label"
|
<SummaryRow
|
||||||
)}
|
label={t("case:summary-decision-date-label")}
|
||||||
|
value={
|
||||||
/>
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
|
? !_.isEmpty(
|
||||||
<SummaryRow
|
detailsObj.pinswg_casedecisiondate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
label={t(
|
detailsObj.pinswg_casedecisiondate
|
||||||
"case:summary-start-event-date-label"
|
)
|
||||||
)}
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
value={_.has(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj,
|
}
|
||||||
"pinswg_startdateoftheevent"
|
/>
|
||||||
)
|
</dl>
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_startdateoftheevent
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdateoftheevent
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_casedecisiondate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_householderappealhasid = (props) => {
|
const Pinswg_householderappealhasid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -43,20 +44,16 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
value={
|
||||||
router.locale == "cy"
|
<>
|
||||||
? jsonpath({
|
{getCaseLpaDisplayLines({
|
||||||
path:
|
casesObj,
|
||||||
'$..[?(@ && @.value=="' +
|
detailsObj,
|
||||||
casesObj[
|
locale: router.locale,
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
transLookup
|
||||||
] +
|
}).map((name) => (
|
||||||
'")].value_cy',
|
<div key={name}>{name}</div>
|
||||||
json: transLookup,
|
))}
|
||||||
eval: true
|
</>
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] || ""
|
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -20,208 +21,184 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
title={t("case:summary-case-details-label")}
|
title={t("case:summary-case-details-label")}
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-case-type-label")}
|
||||||
label={t("case:summary-case-type-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath({
|
||||||
? jsonpath({
|
path:
|
||||||
path:
|
'$..[?(@ && @.value=="' +
|
||||||
'$..[?(@ && @.value=="' +
|
casesObj[
|
||||||
casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<SummaryRow
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
label={t("case:summary-lpa-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
value={router.locale == "cy"
|
/>
|
||||||
? jsonpath({
|
<SummaryRow
|
||||||
path:
|
label={t("case:summary-lpa-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
value={
|
||||||
casesObj[
|
<>
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
{getCaseLpaDisplayLines({
|
||||||
] +
|
casesObj,
|
||||||
'")].value_cy',
|
detailsObj,
|
||||||
json: transLookup,
|
locale: router.locale,
|
||||||
eval: true,
|
transLookup
|
||||||
})
|
}).map((name) => (
|
||||||
: casesObj[
|
<div key={name}>{name}</div>
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
))}
|
||||||
] || ""}
|
</>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-eia-required-label")}
|
||||||
label={t("case:summary-eia-required-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath(
|
||||||
? jsonpath(
|
'$..[?(@.value=="' +
|
||||||
'$..[?(@.value=="' +
|
detailsObj[
|
||||||
detailsObj[
|
|
||||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
transLookup
|
|
||||||
)
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-to-be-confirmed-label"
|
transLookup
|
||||||
)}
|
)
|
||||||
|
: detailsObj[
|
||||||
/>
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
<SummaryRow
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
label={t("case:summary-procedure-label")}
|
}
|
||||||
|
/>
|
||||||
value={router.locale == "cy"
|
<SummaryRow
|
||||||
? jsonpath({
|
label={t("case:summary-procedure-label")}
|
||||||
path:
|
value={
|
||||||
'$..[?(@ && @.value=="' +
|
router.locale == "cy"
|
||||||
detailsObj[
|
? jsonpath({
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
path:
|
||||||
] +
|
'$..[?(@ && @.value=="' +
|
||||||
'")].value_cy',
|
detailsObj[
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-type-of-event-label")}
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
detailsObj[
|
label={t("case:summary-type-of-event-label")}
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
detailsObj[
|
||||||
: detailsObj[
|
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-status-label")}
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
casesObj[
|
label={t("case:summary-status-label")}
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
casesObj[
|
||||||
: casesObj[
|
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<div className="govuk-summary-list__row">
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
<dt className="govuk-summary-list__key">
|
] ||
|
||||||
{t("case:summary-decision-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
</dt>
|
}
|
||||||
<dd className="govuk-summary-list__value">
|
/>
|
||||||
{router.locale == "cy"
|
<div className="govuk-summary-list__row">
|
||||||
? jsonpath({
|
<dt className="govuk-summary-list__key">
|
||||||
path:
|
{t("case:summary-decision-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
</dt>
|
||||||
detailsObj[
|
<dd className="govuk-summary-list__value">
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
{router.locale == "cy"
|
||||||
] +
|
? jsonpath({
|
||||||
'")].value_cy',
|
path:
|
||||||
json: transLookup,
|
'$..[?(@ && @.value=="' +
|
||||||
eval: true,
|
detailsObj[
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-information-to-date-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-information-to-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
{/* <Link href="/">
|
{/* <Link href="/">
|
||||||
<a>
|
<a>
|
||||||
{casesObj.caseDetails
|
{casesObj.caseDetails
|
||||||
.outcome_document || ""}
|
.outcome_document || ""}
|
||||||
</a>
|
</a>
|
||||||
</Link> */}
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
{t("case:summary-case-link-status-label")}
|
||||||
"case:summary-case-link-status-label"
|
</dt>
|
||||||
)}
|
<dd className="govuk-summary-list__value">
|
||||||
</dt>
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
<dd className="govuk-summary-list__value">
|
? casesObj.numberofchildincidents > 0
|
||||||
{_.has(casesObj, [
|
? t(
|
||||||
"numberofchildincidents",
|
"case:summary-case-link-status-linked"
|
||||||
])
|
)
|
||||||
? casesObj.numberofchildincidents >
|
: t(
|
||||||
0
|
"case:summary-case-link-status-not-linked"
|
||||||
? t(
|
)
|
||||||
"case:summary-case-link-status-linked"
|
: t(
|
||||||
)
|
"case:summary-case-link-status-not-linked"
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
</dd>
|
||||||
)
|
</div>
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
)}
|
<div className="govuk-summary-list__row">
|
||||||
</dd>
|
<dt className="govuk-summary-list__key">
|
||||||
</div>
|
{t("case:summary-linked-cases-label")}
|
||||||
)}
|
</dt>
|
||||||
{casesObj.numberofchildincidents > 0 ? (
|
<dd className="govuk-summary-list__value">
|
||||||
<div className="govuk-summary-list__row">
|
{linkedCasesList(
|
||||||
<dt className="govuk-summary-list__key">
|
props.currentView.linkedCaseReferences
|
||||||
{t(
|
)}
|
||||||
"case:summary-linked-cases-label"
|
</dd>
|
||||||
)}
|
</div>
|
||||||
</dt>
|
) : (
|
||||||
<dd className="govuk-summary-list__value">
|
""
|
||||||
{linkedCasesList(
|
)}
|
||||||
props.currentView
|
</dl>
|
||||||
.linkedCaseReferences
|
|
||||||
)}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)}
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
<SummaryCard
|
<SummaryCard
|
||||||
id="key-dates-card"
|
id="key-dates-card"
|
||||||
@@ -229,164 +206,119 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
headingTag="h3"
|
headingTag="h3"
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-questionnaire-due-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
value={_.has(detailsObj, "pinswg_startdate")
|
<SummaryRow
|
||||||
? !_.isEmpty(
|
label={t("case:summary-statement-due-date-label")}
|
||||||
detailsObj.pinswg_startdate
|
value={
|
||||||
)
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: t(
|
? formatDates(
|
||||||
"case:summary-no-date-entered-label"
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: _.has(
|
: t(
|
||||||
detailsObj,
|
"case:summary-no-date-entered-label"
|
||||||
"pinswg_startdates"
|
)
|
||||||
)
|
: t("case:summary-no-date-entered-label")
|
||||||
? !_.isEmpty(
|
}
|
||||||
detailsObj.pinswg_startdates
|
/>
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdates
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
<SummaryRow
|
"case:summary-interested-party-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
label={t(
|
_.has(
|
||||||
"case:summary-questionnaire-due-date-label"
|
detailsObj,
|
||||||
)}
|
"pinswg_otherpartiesstatement"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
value={_.has(
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_questionnaireduedate"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_questionnaireduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-statement-due-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_statementduedate"
|
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? formatDates(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
)
|
||||||
? formatDates(
|
: t(
|
||||||
detailsObj.pinswg_statementduedate
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t("case:summary-no-date-entered-label")
|
||||||
"case:summary-no-date-entered-label"
|
}
|
||||||
)
|
/>
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
<SummaryRow
|
||||||
/>
|
label={t(
|
||||||
|
"case:summary-applicant-final-comments-date-label"
|
||||||
<SummaryRow
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
label={t(
|
? !_.isEmpty(
|
||||||
"case:summary-interested-party-date-label"
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)}
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
value={_.has(
|
)
|
||||||
detailsObj,
|
: t(
|
||||||
"pinswg_otherpartiesstatement"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
}
|
||||||
)
|
/>
|
||||||
? formatDates(
|
{/* <SummaryRow
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: _.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_otherpartiesstatements"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-applicant-final-comments-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
{/* <SummaryRow
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inquiry-evidence-date-label"
|
"case:summary-inquiry-evidence-date-label"
|
||||||
)}
|
)}
|
||||||
@@ -407,79 +339,56 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-event-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={_.has(
|
value={
|
||||||
detailsObj,
|
_.has(detailsObj, "pinswg_startdateoftheevent")
|
||||||
"pinswg_dateeventrequested"
|
? !_.isEmpty(
|
||||||
)
|
detailsObj.pinswg_startdateoftheevent
|
||||||
? !_.isEmpty(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
? formatDates(
|
||||||
)
|
detailsObj.pinswg_startdateoftheevent
|
||||||
? formatDates(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
: t(
|
||||||
)
|
"case:summary-no-date-entered-label"
|
||||||
: t(
|
)
|
||||||
"case:summary-no-date-entered-label"
|
: t("case:summary-no-date-entered-label")
|
||||||
)
|
}
|
||||||
: t(
|
/>
|
||||||
"case:summary-no-date-entered-label"
|
<SummaryRow
|
||||||
)}
|
label={t("case:summary-decision-date-label")}
|
||||||
|
value={
|
||||||
/>
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
|
? !_.isEmpty(
|
||||||
<SummaryRow
|
detailsObj.pinswg_casedecisiondate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
label={t(
|
detailsObj.pinswg_casedecisiondate
|
||||||
"case:summary-start-event-date-label"
|
)
|
||||||
)}
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
value={_.has(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj,
|
}
|
||||||
"pinswg_startdateoftheevent"
|
/>
|
||||||
)
|
</dl>
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_startdateoftheevent
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdateoftheevent
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_casedecisiondate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_ldpid = (props) => {
|
const Pinswg_ldpid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -20,191 +21,167 @@ const Pinswg_ldpid = (props) => {
|
|||||||
title={t("case:summary-case-details-label")}
|
title={t("case:summary-case-details-label")}
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-case-type-label")}
|
||||||
label={t("case:summary-case-type-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath({
|
||||||
? jsonpath({
|
path:
|
||||||
path:
|
'$..[?(@ && @.value=="' +
|
||||||
'$..[?(@ && @.value=="' +
|
casesObj[
|
||||||
casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<SummaryRow
|
||||||
|
label={t("case:summary-lpa-label")}
|
||||||
|
value={
|
||||||
|
<>
|
||||||
|
{getCaseLpaDisplayLines({
|
||||||
|
casesObj,
|
||||||
|
detailsObj,
|
||||||
|
locale: router.locale,
|
||||||
|
transLookup
|
||||||
|
}).map((name) => (
|
||||||
|
<div key={name}>{name}</div>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
/>
|
<SummaryRow
|
||||||
<SummaryRow
|
label={t("case:summary-procedure-label")}
|
||||||
|
value={
|
||||||
label={t("case:summary-lpa-label")}
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
value={router.locale == "cy"
|
path:
|
||||||
? jsonpath({
|
'$..[?(@ && @.value=="' +
|
||||||
path:
|
detailsObj[
|
||||||
'$..[?(@ && @.value=="' +
|
|
||||||
casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] || ""}
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t("case:summary-procedure-label")}
|
|
||||||
|
|
||||||
|
|
||||||
value={router.locale == "cy"
|
|
||||||
? jsonpath({
|
|
||||||
path:
|
|
||||||
'$..[?(@ && @.value=="' +
|
|
||||||
detailsObj[
|
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
/>
|
eval: true
|
||||||
<SummaryRow
|
})
|
||||||
|
: detailsObj[
|
||||||
label={t("case:summary-type-of-event-label")}
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
value={router.locale == "cy"
|
}
|
||||||
? jsonpath({
|
/>
|
||||||
path:
|
<SummaryRow
|
||||||
'$..[?(@ && @.value=="' +
|
label={t("case:summary-type-of-event-label")}
|
||||||
detailsObj[
|
value={
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
router.locale == "cy"
|
||||||
] +
|
? jsonpath({
|
||||||
'")].value_cy',
|
path:
|
||||||
json: transLookup,
|
'$..[?(@ && @.value=="' +
|
||||||
eval: true,
|
detailsObj[
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-status-label")}
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
casesObj[
|
label={t("case:summary-status-label")}
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
casesObj[
|
||||||
: casesObj[
|
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<div className="govuk-summary-list__row">
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
<dt className="govuk-summary-list__key">
|
] ||
|
||||||
{t("case:summary-decision-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
</dt>
|
}
|
||||||
<dd className="govuk-summary-list__value">
|
/>
|
||||||
{router.locale == "cy"
|
<div className="govuk-summary-list__row">
|
||||||
? jsonpath({
|
<dt className="govuk-summary-list__key">
|
||||||
path:
|
{t("case:summary-decision-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
</dt>
|
||||||
detailsObj[
|
<dd className="govuk-summary-list__value">
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
{router.locale == "cy"
|
||||||
] +
|
? jsonpath({
|
||||||
'")].value_cy',
|
path:
|
||||||
json: transLookup,
|
'$..[?(@ && @.value=="' +
|
||||||
eval: true,
|
detailsObj[
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-information-to-date-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-information-to-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
{/* <Link href="/">
|
{/* <Link href="/">
|
||||||
<a>
|
<a>
|
||||||
{casesObj.caseDetails
|
{casesObj.caseDetails
|
||||||
.outcome_document || ""}
|
.outcome_document || ""}
|
||||||
</a>
|
</a>
|
||||||
</Link> */}
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
{t("case:summary-case-link-status-label")}
|
||||||
"case:summary-case-link-status-label"
|
</dt>
|
||||||
)}
|
<dd className="govuk-summary-list__value">
|
||||||
</dt>
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
<dd className="govuk-summary-list__value">
|
? casesObj.numberofchildincidents > 0
|
||||||
{_.has(casesObj, [
|
? t(
|
||||||
"numberofchildincidents",
|
"case:summary-case-link-status-linked"
|
||||||
])
|
)
|
||||||
? casesObj.numberofchildincidents >
|
: t(
|
||||||
0
|
"case:summary-case-link-status-not-linked"
|
||||||
? t(
|
)
|
||||||
"case:summary-case-link-status-linked"
|
: t(
|
||||||
)
|
"case:summary-case-link-status-not-linked"
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
</dd>
|
||||||
)
|
</div>
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
)}
|
<div className="govuk-summary-list__row">
|
||||||
</dd>
|
<dt className="govuk-summary-list__key">
|
||||||
</div>
|
{t("case:summary-linked-cases-label")}
|
||||||
)}
|
</dt>
|
||||||
{casesObj.numberofchildincidents > 0 ? (
|
<dd className="govuk-summary-list__value">
|
||||||
<div className="govuk-summary-list__row">
|
{linkedCasesList(
|
||||||
<dt className="govuk-summary-list__key">
|
props.currentView.linkedCaseReferences
|
||||||
{t(
|
)}
|
||||||
"case:summary-linked-cases-label"
|
</dd>
|
||||||
)}
|
</div>
|
||||||
</dt>
|
) : (
|
||||||
<dd className="govuk-summary-list__value">
|
""
|
||||||
{linkedCasesList(
|
)}
|
||||||
props.currentView
|
</dl>
|
||||||
.linkedCaseReferences
|
|
||||||
)}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)}
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
<SummaryCard
|
<SummaryCard
|
||||||
id="key-dates-card"
|
id="key-dates-card"
|
||||||
@@ -212,164 +189,119 @@ const Pinswg_ldpid = (props) => {
|
|||||||
headingTag="h3"
|
headingTag="h3"
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-questionnaire-due-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
value={_.has(detailsObj, "pinswg_startdate")
|
<SummaryRow
|
||||||
? !_.isEmpty(
|
label={t("case:summary-statement-due-date-label")}
|
||||||
detailsObj.pinswg_startdate
|
value={
|
||||||
)
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: t(
|
? formatDates(
|
||||||
"case:summary-no-date-entered-label"
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: _.has(
|
: t(
|
||||||
detailsObj,
|
"case:summary-no-date-entered-label"
|
||||||
"pinswg_startdates"
|
)
|
||||||
)
|
: t("case:summary-no-date-entered-label")
|
||||||
? !_.isEmpty(
|
}
|
||||||
detailsObj.pinswg_startdates
|
/>
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdates
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
<SummaryRow
|
"case:summary-interested-party-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
label={t(
|
_.has(
|
||||||
"case:summary-questionnaire-due-date-label"
|
detailsObj,
|
||||||
)}
|
"pinswg_otherpartiesstatement"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
value={_.has(
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_questionnaireduedate"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_questionnaireduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-statement-due-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_statementduedate"
|
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? formatDates(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
)
|
||||||
? formatDates(
|
: t(
|
||||||
detailsObj.pinswg_statementduedate
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t("case:summary-no-date-entered-label")
|
||||||
"case:summary-no-date-entered-label"
|
}
|
||||||
)
|
/>
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
<SummaryRow
|
||||||
/>
|
label={t(
|
||||||
|
"case:summary-applicant-final-comments-date-label"
|
||||||
<SummaryRow
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
label={t(
|
? !_.isEmpty(
|
||||||
"case:summary-interested-party-date-label"
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)}
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
value={_.has(
|
)
|
||||||
detailsObj,
|
: t(
|
||||||
"pinswg_otherpartiesstatement"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
}
|
||||||
)
|
/>
|
||||||
? formatDates(
|
{/* <SummaryRow
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: _.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_otherpartiesstatements"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-applicant-final-comments-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
{/* <SummaryRow
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inquiry-evidence-date-label"
|
"case:summary-inquiry-evidence-date-label"
|
||||||
)}
|
)}
|
||||||
@@ -390,79 +322,56 @@ const Pinswg_ldpid = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-event-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={_.has(
|
value={
|
||||||
detailsObj,
|
_.has(detailsObj, "pinswg_startdateofevent")
|
||||||
"pinswg_dateeventrequested"
|
? !_.isEmpty(
|
||||||
)
|
detailsObj.pinswg_startdateofevent
|
||||||
? !_.isEmpty(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
? formatDates(
|
||||||
)
|
detailsObj.pinswg_startdateofevent
|
||||||
? formatDates(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
: t(
|
||||||
)
|
"case:summary-no-date-entered-label"
|
||||||
: t(
|
)
|
||||||
"case:summary-no-date-entered-label"
|
: t("case:summary-no-date-entered-label")
|
||||||
)
|
}
|
||||||
: t(
|
/>
|
||||||
"case:summary-no-date-entered-label"
|
<SummaryRow
|
||||||
)}
|
label={t("case:summary-decision-date-label")}
|
||||||
|
value={
|
||||||
/>
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
|
? !_.isEmpty(
|
||||||
<SummaryRow
|
detailsObj.pinswg_casedecisiondate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
label={t(
|
detailsObj.pinswg_casedecisiondate
|
||||||
"case:summary-start-event-date-label"
|
)
|
||||||
)}
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
value={_.has(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj,
|
}
|
||||||
"pinswg_startdateofevent"
|
/>
|
||||||
)
|
</dl>
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_startdateofevent
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdateofevent
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_casedecisiondate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_listedbuildingandconservationrid = (props) => {
|
const Pinswg_listedbuildingandconservationrid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -20,208 +21,184 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
title={t("case:summary-case-details-label")}
|
title={t("case:summary-case-details-label")}
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-case-type-label")}
|
||||||
label={t("case:summary-case-type-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath({
|
||||||
? jsonpath({
|
path:
|
||||||
path:
|
'$..[?(@ && @.value=="' +
|
||||||
'$..[?(@ && @.value=="' +
|
casesObj[
|
||||||
casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<SummaryRow
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
label={t("case:summary-lpa-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
value={router.locale == "cy"
|
/>
|
||||||
? jsonpath({
|
<SummaryRow
|
||||||
path:
|
label={t("case:summary-lpa-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
value={
|
||||||
casesObj[
|
<>
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
{getCaseLpaDisplayLines({
|
||||||
] +
|
casesObj,
|
||||||
'")].value_cy',
|
detailsObj,
|
||||||
json: transLookup,
|
locale: router.locale,
|
||||||
eval: true,
|
transLookup
|
||||||
})
|
}).map((name) => (
|
||||||
: casesObj[
|
<div key={name}>{name}</div>
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
))}
|
||||||
] || ""}
|
</>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-eia-required-label")}
|
||||||
label={t("case:summary-eia-required-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath(
|
||||||
? jsonpath(
|
'$..[?(@.value=="' +
|
||||||
'$..[?(@.value=="' +
|
detailsObj[
|
||||||
detailsObj[
|
|
||||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
transLookup
|
|
||||||
)
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-to-be-confirmed-label"
|
transLookup
|
||||||
)}
|
)
|
||||||
|
: detailsObj[
|
||||||
/>
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
<SummaryRow
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
label={t("case:summary-procedure-label")}
|
}
|
||||||
|
/>
|
||||||
value={router.locale == "cy"
|
<SummaryRow
|
||||||
? jsonpath({
|
label={t("case:summary-procedure-label")}
|
||||||
path:
|
value={
|
||||||
'$..[?(@ && @.value=="' +
|
router.locale == "cy"
|
||||||
detailsObj[
|
? jsonpath({
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
path:
|
||||||
] +
|
'$..[?(@ && @.value=="' +
|
||||||
'")].value_cy',
|
detailsObj[
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-type-of-event-label")}
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
detailsObj[
|
label={t("case:summary-type-of-event-label")}
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
detailsObj[
|
||||||
: detailsObj[
|
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-status-label")}
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
casesObj[
|
label={t("case:summary-status-label")}
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
casesObj[
|
||||||
: casesObj[
|
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<div className="govuk-summary-list__row">
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
<dt className="govuk-summary-list__key">
|
] ||
|
||||||
{t("case:summary-decision-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
</dt>
|
}
|
||||||
<dd className="govuk-summary-list__value">
|
/>
|
||||||
{router.locale == "cy"
|
<div className="govuk-summary-list__row">
|
||||||
? jsonpath({
|
<dt className="govuk-summary-list__key">
|
||||||
path:
|
{t("case:summary-decision-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
</dt>
|
||||||
detailsObj[
|
<dd className="govuk-summary-list__value">
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
{router.locale == "cy"
|
||||||
] +
|
? jsonpath({
|
||||||
'")].value_cy',
|
path:
|
||||||
json: transLookup,
|
'$..[?(@ && @.value=="' +
|
||||||
eval: true,
|
detailsObj[
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-information-to-date-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-information-to-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
{/* <Link href="/">
|
{/* <Link href="/">
|
||||||
<a>
|
<a>
|
||||||
{casesObj.caseDetails
|
{casesObj.caseDetails
|
||||||
.outcome_document || ""}
|
.outcome_document || ""}
|
||||||
</a>
|
</a>
|
||||||
</Link> */}
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
{t("case:summary-case-link-status-label")}
|
||||||
"case:summary-case-link-status-label"
|
</dt>
|
||||||
)}
|
<dd className="govuk-summary-list__value">
|
||||||
</dt>
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
<dd className="govuk-summary-list__value">
|
? casesObj.numberofchildincidents > 0
|
||||||
{_.has(casesObj, [
|
? t(
|
||||||
"numberofchildincidents",
|
"case:summary-case-link-status-linked"
|
||||||
])
|
)
|
||||||
? casesObj.numberofchildincidents >
|
: t(
|
||||||
0
|
"case:summary-case-link-status-not-linked"
|
||||||
? t(
|
)
|
||||||
"case:summary-case-link-status-linked"
|
: t(
|
||||||
)
|
"case:summary-case-link-status-not-linked"
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
</dd>
|
||||||
)
|
</div>
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
)}
|
<div className="govuk-summary-list__row">
|
||||||
</dd>
|
<dt className="govuk-summary-list__key">
|
||||||
</div>
|
{t("case:summary-linked-cases-label")}
|
||||||
)}
|
</dt>
|
||||||
{casesObj.numberofchildincidents > 0 ? (
|
<dd className="govuk-summary-list__value">
|
||||||
<div className="govuk-summary-list__row">
|
{linkedCasesList(
|
||||||
<dt className="govuk-summary-list__key">
|
props.currentView.linkedCaseReferences
|
||||||
{t(
|
)}
|
||||||
"case:summary-linked-cases-label"
|
</dd>
|
||||||
)}
|
</div>
|
||||||
</dt>
|
) : (
|
||||||
<dd className="govuk-summary-list__value">
|
""
|
||||||
{linkedCasesList(
|
)}
|
||||||
props.currentView
|
</dl>
|
||||||
.linkedCaseReferences
|
|
||||||
)}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)}
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
<SummaryCard
|
<SummaryCard
|
||||||
id="key-dates-card"
|
id="key-dates-card"
|
||||||
@@ -229,164 +206,119 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
headingTag="h3"
|
headingTag="h3"
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-questionnaire-due-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
value={_.has(detailsObj, "pinswg_startdate")
|
<SummaryRow
|
||||||
? !_.isEmpty(
|
label={t("case:summary-statement-due-date-label")}
|
||||||
detailsObj.pinswg_startdate
|
value={
|
||||||
)
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: t(
|
? formatDates(
|
||||||
"case:summary-no-date-entered-label"
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: _.has(
|
: t(
|
||||||
detailsObj,
|
"case:summary-no-date-entered-label"
|
||||||
"pinswg_startdates"
|
)
|
||||||
)
|
: t("case:summary-no-date-entered-label")
|
||||||
? !_.isEmpty(
|
}
|
||||||
detailsObj.pinswg_startdates
|
/>
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdates
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
<SummaryRow
|
"case:summary-interested-party-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
label={t(
|
_.has(
|
||||||
"case:summary-questionnaire-due-date-label"
|
detailsObj,
|
||||||
)}
|
"pinswg_otherpartiesstatement"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
value={_.has(
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_questionnaireduedate"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_questionnaireduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-statement-due-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_statementduedate"
|
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? formatDates(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
)
|
||||||
? formatDates(
|
: t(
|
||||||
detailsObj.pinswg_statementduedate
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t("case:summary-no-date-entered-label")
|
||||||
"case:summary-no-date-entered-label"
|
}
|
||||||
)
|
/>
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
<SummaryRow
|
||||||
/>
|
label={t(
|
||||||
|
"case:summary-applicant-final-comments-date-label"
|
||||||
<SummaryRow
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
label={t(
|
? !_.isEmpty(
|
||||||
"case:summary-interested-party-date-label"
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)}
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
value={_.has(
|
)
|
||||||
detailsObj,
|
: t(
|
||||||
"pinswg_otherpartiesstatement"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
}
|
||||||
)
|
/>
|
||||||
? formatDates(
|
{/* <SummaryRow
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: _.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_otherpartiesstatements"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-applicant-final-comments-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
{/* <SummaryRow
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inquiry-evidence-date-label"
|
"case:summary-inquiry-evidence-date-label"
|
||||||
)}
|
)}
|
||||||
@@ -407,79 +339,56 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-event-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={_.has(
|
value={
|
||||||
detailsObj,
|
_.has(detailsObj, "pinswg_starttimeofevent")
|
||||||
"pinswg_dateeventrequested"
|
? !_.isEmpty(
|
||||||
)
|
detailsObj.pinswg_starttimeofevent
|
||||||
? !_.isEmpty(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
? formatDates(
|
||||||
)
|
detailsObj.pinswg_starttimeofevent
|
||||||
? formatDates(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
: t(
|
||||||
)
|
"case:summary-no-date-entered-label"
|
||||||
: t(
|
)
|
||||||
"case:summary-no-date-entered-label"
|
: t("case:summary-no-date-entered-label")
|
||||||
)
|
}
|
||||||
: t(
|
/>
|
||||||
"case:summary-no-date-entered-label"
|
<SummaryRow
|
||||||
)}
|
label={t("case:summary-decision-date-label")}
|
||||||
|
value={
|
||||||
/>
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
|
? !_.isEmpty(
|
||||||
<SummaryRow
|
detailsObj.pinswg_casedecisiondate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
label={t(
|
detailsObj.pinswg_casedecisiondate
|
||||||
"case:summary-start-event-date-label"
|
)
|
||||||
)}
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
value={_.has(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj,
|
}
|
||||||
"pinswg_starttimeofevent"
|
/>
|
||||||
)
|
</dl>
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_starttimeofevent
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_starttimeofevent
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_casedecisiondate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_maintenanceoflands217id = (props) => {
|
const Pinswg_maintenanceoflands217id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -20,208 +21,184 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
title={t("case:summary-case-details-label")}
|
title={t("case:summary-case-details-label")}
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-case-type-label")}
|
||||||
label={t("case:summary-case-type-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath({
|
||||||
? jsonpath({
|
path:
|
||||||
path:
|
'$..[?(@ && @.value=="' +
|
||||||
'$..[?(@ && @.value=="' +
|
casesObj[
|
||||||
casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<SummaryRow
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
label={t("case:summary-lpa-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
value={router.locale == "cy"
|
/>
|
||||||
? jsonpath({
|
<SummaryRow
|
||||||
path:
|
label={t("case:summary-lpa-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
value={
|
||||||
casesObj[
|
<>
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
{getCaseLpaDisplayLines({
|
||||||
] +
|
casesObj,
|
||||||
'")].value_cy',
|
detailsObj,
|
||||||
json: transLookup,
|
locale: router.locale,
|
||||||
eval: true,
|
transLookup
|
||||||
})
|
}).map((name) => (
|
||||||
: casesObj[
|
<div key={name}>{name}</div>
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
))}
|
||||||
] || ""}
|
</>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-eia-required-label")}
|
||||||
label={t("case:summary-eia-required-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath(
|
||||||
? jsonpath(
|
'$..[?(@.value=="' +
|
||||||
'$..[?(@.value=="' +
|
detailsObj[
|
||||||
detailsObj[
|
|
||||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
transLookup
|
|
||||||
)
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-to-be-confirmed-label"
|
transLookup
|
||||||
)}
|
)
|
||||||
|
: detailsObj[
|
||||||
/>
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
<SummaryRow
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
label={t("case:summary-procedure-label")}
|
}
|
||||||
|
/>
|
||||||
value={router.locale == "cy"
|
<SummaryRow
|
||||||
? jsonpath({
|
label={t("case:summary-procedure-label")}
|
||||||
path:
|
value={
|
||||||
'$..[?(@ && @.value=="' +
|
router.locale == "cy"
|
||||||
detailsObj[
|
? jsonpath({
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
path:
|
||||||
] +
|
'$..[?(@ && @.value=="' +
|
||||||
'")].value_cy',
|
detailsObj[
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-type-of-event-label")}
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
detailsObj[
|
label={t("case:summary-type-of-event-label")}
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
detailsObj[
|
||||||
: detailsObj[
|
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-status-label")}
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
casesObj[
|
label={t("case:summary-status-label")}
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
casesObj[
|
||||||
: casesObj[
|
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<div className="govuk-summary-list__row">
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
<dt className="govuk-summary-list__key">
|
] ||
|
||||||
{t("case:summary-decision-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
</dt>
|
}
|
||||||
<dd className="govuk-summary-list__value">
|
/>
|
||||||
{router.locale == "cy"
|
<div className="govuk-summary-list__row">
|
||||||
? jsonpath({
|
<dt className="govuk-summary-list__key">
|
||||||
path:
|
{t("case:summary-decision-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
</dt>
|
||||||
detailsObj[
|
<dd className="govuk-summary-list__value">
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
{router.locale == "cy"
|
||||||
] +
|
? jsonpath({
|
||||||
'")].value_cy',
|
path:
|
||||||
json: transLookup,
|
'$..[?(@ && @.value=="' +
|
||||||
eval: true,
|
detailsObj[
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-information-to-date-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-information-to-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
{/* <Link href="/">
|
{/* <Link href="/">
|
||||||
<a>
|
<a>
|
||||||
{casesObj.caseDetails
|
{casesObj.caseDetails
|
||||||
.outcome_document || ""}
|
.outcome_document || ""}
|
||||||
</a>
|
</a>
|
||||||
</Link> */}
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
{t("case:summary-case-link-status-label")}
|
||||||
"case:summary-case-link-status-label"
|
</dt>
|
||||||
)}
|
<dd className="govuk-summary-list__value">
|
||||||
</dt>
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
<dd className="govuk-summary-list__value">
|
? casesObj.numberofchildincidents > 0
|
||||||
{_.has(casesObj, [
|
? t(
|
||||||
"numberofchildincidents",
|
"case:summary-case-link-status-linked"
|
||||||
])
|
)
|
||||||
? casesObj.numberofchildincidents >
|
: t(
|
||||||
0
|
"case:summary-case-link-status-not-linked"
|
||||||
? t(
|
)
|
||||||
"case:summary-case-link-status-linked"
|
: t(
|
||||||
)
|
"case:summary-case-link-status-not-linked"
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
</dd>
|
||||||
)
|
</div>
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
)}
|
<div className="govuk-summary-list__row">
|
||||||
</dd>
|
<dt className="govuk-summary-list__key">
|
||||||
</div>
|
{t("case:summary-linked-cases-label")}
|
||||||
)}
|
</dt>
|
||||||
{casesObj.numberofchildincidents > 0 ? (
|
<dd className="govuk-summary-list__value">
|
||||||
<div className="govuk-summary-list__row">
|
{linkedCasesList(
|
||||||
<dt className="govuk-summary-list__key">
|
props.currentView.linkedCaseReferences
|
||||||
{t(
|
)}
|
||||||
"case:summary-linked-cases-label"
|
</dd>
|
||||||
)}
|
</div>
|
||||||
</dt>
|
) : (
|
||||||
<dd className="govuk-summary-list__value">
|
""
|
||||||
{linkedCasesList(
|
)}
|
||||||
props.currentView
|
</dl>
|
||||||
.linkedCaseReferences
|
|
||||||
)}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)}
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
<SummaryCard
|
<SummaryCard
|
||||||
id="key-dates-card"
|
id="key-dates-card"
|
||||||
@@ -229,164 +206,119 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
headingTag="h3"
|
headingTag="h3"
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-questionnaire-due-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
value={_.has(detailsObj, "pinswg_startdate")
|
<SummaryRow
|
||||||
? !_.isEmpty(
|
label={t("case:summary-statement-due-date-label")}
|
||||||
detailsObj.pinswg_startdate
|
value={
|
||||||
)
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: t(
|
? formatDates(
|
||||||
"case:summary-no-date-entered-label"
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: _.has(
|
: t(
|
||||||
detailsObj,
|
"case:summary-no-date-entered-label"
|
||||||
"pinswg_startdates"
|
)
|
||||||
)
|
: t("case:summary-no-date-entered-label")
|
||||||
? !_.isEmpty(
|
}
|
||||||
detailsObj.pinswg_startdates
|
/>
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdates
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
<SummaryRow
|
"case:summary-interested-party-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
label={t(
|
_.has(
|
||||||
"case:summary-questionnaire-due-date-label"
|
detailsObj,
|
||||||
)}
|
"pinswg_otherpartiesstatement"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
value={_.has(
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_questionnaireduedate"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_questionnaireduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-statement-due-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_statementduedate"
|
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? formatDates(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
)
|
||||||
? formatDates(
|
: t(
|
||||||
detailsObj.pinswg_statementduedate
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t("case:summary-no-date-entered-label")
|
||||||
"case:summary-no-date-entered-label"
|
}
|
||||||
)
|
/>
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
<SummaryRow
|
||||||
/>
|
label={t(
|
||||||
|
"case:summary-applicant-final-comments-date-label"
|
||||||
<SummaryRow
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
label={t(
|
? !_.isEmpty(
|
||||||
"case:summary-interested-party-date-label"
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)}
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
value={_.has(
|
)
|
||||||
detailsObj,
|
: t(
|
||||||
"pinswg_otherpartiesstatement"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
}
|
||||||
)
|
/>
|
||||||
? formatDates(
|
{/* <SummaryRow
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: _.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_otherpartiesstatements"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-applicant-final-comments-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
{/* <SummaryRow
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inquiry-evidence-date-label"
|
"case:summary-inquiry-evidence-date-label"
|
||||||
)}
|
)}
|
||||||
@@ -407,79 +339,56 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-event-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={_.has(
|
value={
|
||||||
detailsObj,
|
_.has(detailsObj, "pinswg_startdateofevent")
|
||||||
"pinswg_dateeventrequested"
|
? !_.isEmpty(
|
||||||
)
|
detailsObj.pinswg_startdateofevent
|
||||||
? !_.isEmpty(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
? formatDates(
|
||||||
)
|
detailsObj.pinswg_startdateofevent
|
||||||
? formatDates(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
: t(
|
||||||
)
|
"case:summary-no-date-entered-label"
|
||||||
: t(
|
)
|
||||||
"case:summary-no-date-entered-label"
|
: t("case:summary-no-date-entered-label")
|
||||||
)
|
}
|
||||||
: t(
|
/>
|
||||||
"case:summary-no-date-entered-label"
|
<SummaryRow
|
||||||
)}
|
label={t("case:summary-decision-date-label")}
|
||||||
|
value={
|
||||||
/>
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
|
? !_.isEmpty(
|
||||||
<SummaryRow
|
detailsObj.pinswg_casedecisiondate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
label={t(
|
detailsObj.pinswg_casedecisiondate
|
||||||
"case:summary-start-event-date-label"
|
)
|
||||||
)}
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
value={_.has(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj,
|
}
|
||||||
"pinswg_startdateofevent"
|
/>
|
||||||
)
|
</dl>
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_startdateofevent
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdateofevent
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_casedecisiondate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_miscellaneouscasewordid = (props) => {
|
const Pinswg_miscellaneouscasewordid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -20,236 +21,209 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
title={t("case:summary-case-details-label")}
|
title={t("case:summary-case-details-label")}
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-case-type-label")}
|
||||||
label={t("case:summary-case-type-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath({
|
||||||
? jsonpath({
|
path:
|
||||||
path:
|
'$..[?(@ && @.value=="' +
|
||||||
'$..[?(@ && @.value=="' +
|
casesObj[
|
||||||
casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<SummaryRow
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
label={t("case:summary-lpa-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
value={router.locale == "cy"
|
/>
|
||||||
? jsonpath({
|
<SummaryRow
|
||||||
path:
|
label={t("case:summary-lpa-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
value={
|
||||||
casesObj[
|
<>
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
{getCaseLpaDisplayLines({
|
||||||
] +
|
casesObj,
|
||||||
'")].value_cy',
|
detailsObj,
|
||||||
json: transLookup,
|
locale: router.locale,
|
||||||
eval: true,
|
transLookup
|
||||||
})
|
}).map((name) => (
|
||||||
: casesObj[
|
<div key={name}>{name}</div>
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
))}
|
||||||
] || ""}
|
</>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-eia-required-label")}
|
||||||
label={t("case:summary-eia-required-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath(
|
||||||
? jsonpath(
|
'$..[?(@.value=="' +
|
||||||
'$..[?(@.value=="' +
|
detailsObj[
|
||||||
detailsObj[
|
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
transLookup
|
|
||||||
)
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-to-be-confirmed-label"
|
transLookup
|
||||||
)}
|
)
|
||||||
|
: detailsObj[
|
||||||
/>
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
<SummaryRow
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
label={t("case:summary-procedure-label")}
|
}
|
||||||
|
/>
|
||||||
value={router.locale == "cy"
|
<SummaryRow
|
||||||
? jsonpath({
|
label={t("case:summary-procedure-label")}
|
||||||
path:
|
value={
|
||||||
'$..[?(@ && @.value=="' +
|
router.locale == "cy"
|
||||||
detailsObj[
|
? jsonpath({
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
path:
|
||||||
] +
|
'$..[?(@ && @.value=="' +
|
||||||
'")].value_cy',
|
detailsObj[
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-type-of-event-label")}
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
detailsObj[
|
label={t("case:summary-type-of-event-label")}
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
detailsObj[
|
||||||
: detailsObj[
|
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-status-label")}
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
casesObj[
|
label={t("case:summary-status-label")}
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
casesObj[
|
||||||
: casesObj[
|
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<div className="govuk-summary-list__row">
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
<dt className="govuk-summary-list__key">
|
] ||
|
||||||
{t("case:summary-decision-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
</dt>
|
}
|
||||||
<dd className="govuk-summary-list__value">
|
/>
|
||||||
{router.locale == "cy"
|
<div className="govuk-summary-list__row">
|
||||||
? jsonpath({
|
<dt className="govuk-summary-list__key">
|
||||||
path:
|
{t("case:summary-decision-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
</dt>
|
||||||
detailsObj[
|
<dd className="govuk-summary-list__value">
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
{router.locale == "cy"
|
||||||
] +
|
? jsonpath({
|
||||||
'")].value_cy',
|
path:
|
||||||
json: transLookup,
|
'$..[?(@ && @.value=="' +
|
||||||
eval: true,
|
detailsObj[
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-information-to-date-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-information-to-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
{/* <Link href="/">
|
{/* <Link href="/">
|
||||||
<a>
|
<a>
|
||||||
{casesObj.caseDetails
|
{casesObj.caseDetails
|
||||||
.outcome_document || ""}
|
.outcome_document || ""}
|
||||||
</a>
|
</a>
|
||||||
</Link> */}
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
{t("case:summary-case-link-status-label")}
|
||||||
"case:summary-case-link-status-label"
|
</dt>
|
||||||
)}
|
<dd className="govuk-summary-list__value">
|
||||||
</dt>
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
<dd className="govuk-summary-list__value">
|
? casesObj.numberofchildincidents > 0
|
||||||
{_.has(casesObj, [
|
? t(
|
||||||
"numberofchildincidents",
|
"case:summary-case-link-status-linked"
|
||||||
])
|
)
|
||||||
? casesObj.numberofchildincidents >
|
: t(
|
||||||
0
|
"case:summary-case-link-status-not-linked"
|
||||||
? t(
|
)
|
||||||
"case:summary-case-link-status-linked"
|
: t(
|
||||||
)
|
"case:summary-case-link-status-not-linked"
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
</dd>
|
||||||
)
|
</div>
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
)}
|
<div className="govuk-summary-list__row">
|
||||||
</dd>
|
<dt className="govuk-summary-list__key">
|
||||||
</div>
|
{t("case:summary-linked-cases-label")}
|
||||||
)}
|
</dt>
|
||||||
{casesObj.numberofchildincidents > 0 ? (
|
<dd className="govuk-summary-list__value">
|
||||||
<div className="govuk-summary-list__row">
|
{linkedCasesList(
|
||||||
<dt className="govuk-summary-list__key">
|
props.currentView.linkedCaseReferences
|
||||||
{t(
|
)}
|
||||||
"case:summary-linked-cases-label"
|
</dd>
|
||||||
)}
|
</div>
|
||||||
</dt>
|
) : (
|
||||||
<dd className="govuk-summary-list__value">
|
""
|
||||||
{linkedCasesList(
|
)}
|
||||||
props.currentView
|
<SummaryRow
|
||||||
.linkedCaseReferences
|
label={t(
|
||||||
)}
|
"case:summary-case-relevant-authoritylabel"
|
||||||
</dd>
|
)}
|
||||||
</div>
|
value={
|
||||||
) : (
|
router.locale == "cy"
|
||||||
""
|
? jsonpath({
|
||||||
)}
|
path:
|
||||||
<SummaryRow
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
label={t(
|
'")].value_cy',
|
||||||
"case:summary-case-relevant-authoritylabel"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
value={router.locale == "cy"
|
: jsonpath({
|
||||||
? jsonpath({
|
path:
|
||||||
path:
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
'$..[?(@ && @.pinswg_lpa=="' +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
'")].value',
|
||||||
'")].value_cy',
|
json: transLookup,
|
||||||
json: transLookup,
|
eval: true
|
||||||
eval: true,
|
}) ||
|
||||||
})
|
t("case:summary-no-date-entered-label")
|
||||||
: jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.pinswg_lpa=="' +
|
</dl>
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
|
||||||
'")].value',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
}) ||
|
|
||||||
t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
<SummaryCard
|
<SummaryCard
|
||||||
id="key-dates-card"
|
id="key-dates-card"
|
||||||
@@ -257,164 +231,119 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
headingTag="h3"
|
headingTag="h3"
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-questionnaire-due-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
value={_.has(detailsObj, "pinswg_startdate")
|
<SummaryRow
|
||||||
? !_.isEmpty(
|
label={t("case:summary-statement-due-date-label")}
|
||||||
detailsObj.pinswg_startdate
|
value={
|
||||||
)
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: t(
|
? formatDates(
|
||||||
"case:summary-no-date-entered-label"
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: _.has(
|
: t(
|
||||||
detailsObj,
|
"case:summary-no-date-entered-label"
|
||||||
"pinswg_startdates"
|
)
|
||||||
)
|
: t("case:summary-no-date-entered-label")
|
||||||
? !_.isEmpty(
|
}
|
||||||
detailsObj.pinswg_startdates
|
/>
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdates
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
<SummaryRow
|
"case:summary-interested-party-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
label={t(
|
_.has(
|
||||||
"case:summary-questionnaire-due-date-label"
|
detailsObj,
|
||||||
)}
|
"pinswg_otherpartiesstatement"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
value={_.has(
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_questionnaireduedate"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_questionnaireduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-statement-due-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_statementduedate"
|
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? formatDates(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
)
|
||||||
? formatDates(
|
: t(
|
||||||
detailsObj.pinswg_statementduedate
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t("case:summary-no-date-entered-label")
|
||||||
"case:summary-no-date-entered-label"
|
}
|
||||||
)
|
/>
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
<SummaryRow
|
||||||
/>
|
label={t(
|
||||||
|
"case:summary-applicant-final-comments-date-label"
|
||||||
<SummaryRow
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
label={t(
|
? !_.isEmpty(
|
||||||
"case:summary-interested-party-date-label"
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)}
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
value={_.has(
|
)
|
||||||
detailsObj,
|
: t(
|
||||||
"pinswg_otherpartiesstatement"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
}
|
||||||
)
|
/>
|
||||||
? formatDates(
|
{/* <SummaryRow
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: _.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_otherpartiesstatements"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-applicant-final-comments-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
{/* <SummaryRow
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inquiry-evidence-date-label"
|
"case:summary-inquiry-evidence-date-label"
|
||||||
)}
|
)}
|
||||||
@@ -435,79 +364,56 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-event-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={_.has(
|
value={
|
||||||
detailsObj,
|
_.has(detailsObj, "pinswg_startdateofevent")
|
||||||
"pinswg_dateeventrequested"
|
? !_.isEmpty(
|
||||||
)
|
detailsObj.pinswg_startdateofevent
|
||||||
? !_.isEmpty(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
? formatDates(
|
||||||
)
|
detailsObj.pinswg_startdateofevent
|
||||||
? formatDates(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
: t(
|
||||||
)
|
"case:summary-no-date-entered-label"
|
||||||
: t(
|
)
|
||||||
"case:summary-no-date-entered-label"
|
: t("case:summary-no-date-entered-label")
|
||||||
)
|
}
|
||||||
: t(
|
/>
|
||||||
"case:summary-no-date-entered-label"
|
<SummaryRow
|
||||||
)}
|
label={t("case:summary-decision-date-label")}
|
||||||
|
value={
|
||||||
/>
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
|
? !_.isEmpty(
|
||||||
<SummaryRow
|
detailsObj.pinswg_casedecisiondate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
label={t(
|
detailsObj.pinswg_casedecisiondate
|
||||||
"case:summary-start-event-date-label"
|
)
|
||||||
)}
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
value={_.has(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj,
|
}
|
||||||
"pinswg_startdateofevent"
|
/>
|
||||||
)
|
</dl>
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_startdateofevent
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdateofevent
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_casedecisiondate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_nonvalidationid = (props) => {
|
const Pinswg_nonvalidationid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -20,136 +21,95 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
title={t("case:summary-case-details-label")}
|
title={t("case:summary-case-details-label")}
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-case-type-label")}
|
||||||
label={t("case:summary-case-type-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={
|
? jsonpath({
|
||||||
|
path:
|
||||||
router.locale == "cy"
|
'$..[?(@ && @.value=="' +
|
||||||
? jsonpath({
|
casesObj[
|
||||||
path:
|
|
||||||
'$..[?(@ && @.value=="' +
|
|
||||||
casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<SummaryRow
|
||||||
|
label={t("case:summary-lpa-label")}
|
||||||
|
value={
|
||||||
|
<>
|
||||||
|
{getCaseLpaDisplayLines({
|
||||||
|
casesObj,
|
||||||
|
detailsObj,
|
||||||
|
locale: router.locale,
|
||||||
|
transLookup
|
||||||
|
}).map((name) => (
|
||||||
|
<div key={name}>{name}</div>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
}
|
<SummaryRow
|
||||||
|
label={t("case:summary-status-label")}
|
||||||
/>
|
value={
|
||||||
<SummaryRow
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
label={t("case:summary-lpa-label")}
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
value={
|
casesObj[
|
||||||
|
|
||||||
router.locale == "cy"
|
|
||||||
? jsonpath({
|
|
||||||
path:
|
|
||||||
'$..[?(@ && @.value=="' +
|
|
||||||
casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] || ""
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
{/* <SummaryRow
|
|
||||||
label={t("case:summary-procedure-label")}
|
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
|
||||||
? jsonpath({path:
|
|
||||||
'$..[?(@ && @.value=="' +
|
|
||||||
detailsObj[
|
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] || ""
|
|
||||||
}
|
|
||||||
/> */}
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
|
||||||
|
|
||||||
value={
|
|
||||||
|
|
||||||
router.locale == "cy"
|
|
||||||
? jsonpath({
|
|
||||||
path:
|
|
||||||
'$..[?(@ && @.value=="' +
|
|
||||||
casesObj[
|
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)
|
eval: true
|
||||||
|
})
|
||||||
}
|
: casesObj[
|
||||||
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
/>
|
] ||
|
||||||
<div className="govuk-summary-list__row">
|
t("case:summary-no-date-entered-label")
|
||||||
<dt className="govuk-summary-list__key">
|
}
|
||||||
{t("case:summary-decision-label")}
|
/>
|
||||||
</dt>
|
<div className="govuk-summary-list__row">
|
||||||
<dd className="govuk-summary-list__value">
|
<dt className="govuk-summary-list__key">
|
||||||
{router.locale == "cy"
|
{t("case:summary-decision-label")}
|
||||||
? jsonpath({
|
</dt>
|
||||||
path:
|
<dd className="govuk-summary-list__value">
|
||||||
'$..[?(@ && @.value=="' +
|
{router.locale == "cy"
|
||||||
detailsObj[
|
? jsonpath({
|
||||||
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
path:
|
||||||
] +
|
'$..[?(@ && @.value=="' +
|
||||||
'")].value_cy',
|
detailsObj[
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-information-to-date-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-information-to-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
{/* <Link href="/">
|
{/* <Link href="/">
|
||||||
<a>
|
<a>
|
||||||
{casesObj.caseDetails
|
{casesObj.caseDetails
|
||||||
.outcome_document || ""}
|
.outcome_document || ""}
|
||||||
</a>
|
</a>
|
||||||
</Link> */}
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
<SummaryCard
|
<SummaryCard
|
||||||
id="key-dates-card"
|
id="key-dates-card"
|
||||||
@@ -157,75 +117,46 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
headingTag="h3"
|
headingTag="h3"
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_validdate")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_validdate)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_validdate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
<SummaryRow
|
||||||
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_decisionissueddate")
|
||||||
_.has(detailsObj, "pinswg_validdate")
|
? !_.isEmpty(
|
||||||
? !_.isEmpty(
|
detailsObj.pinswg_decisionissueddate
|
||||||
detailsObj.pinswg_validdate
|
)
|
||||||
)
|
? formatDates(
|
||||||
? formatDates(
|
detailsObj.pinswg_decisionissueddate
|
||||||
detailsObj.pinswg_validdate
|
)
|
||||||
)
|
: t(
|
||||||
: t(
|
"case:summary-no-date-entered-label"
|
||||||
"case:summary-no-date-entered-label"
|
)
|
||||||
)
|
: t("case:summary-no-date-entered-label")
|
||||||
: _.has(
|
}
|
||||||
detailsObj,
|
/>
|
||||||
"pinswg_startdates"
|
</dl>
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_startdates
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdates
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
|
||||||
|
|
||||||
|
|
||||||
value={
|
|
||||||
|
|
||||||
|
|
||||||
_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_decisionissueddate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_decisionissueddate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_decisionissueddate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayValue, getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_planningappeals78id = (props) => {
|
const Pinswg_planningappeals78id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -41,35 +42,23 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
<>
|
||||||
router.locale == "cy"
|
{getCaseLpaDisplayLines({
|
||||||
? jsonpath({
|
casesObj,
|
||||||
path:
|
detailsObj,
|
||||||
'$..[?(@ && @.value=="' +
|
locale: router.locale,
|
||||||
casesObj[
|
transLookup
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
}).map((name) => (
|
||||||
] +
|
<div key={name}>{name}</div>
|
||||||
'")].value_cy',
|
))}
|
||||||
json: transLookup,
|
</>
|
||||||
eval: true
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] || ""
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -83,16 +72,11 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-to-be-confirmed-label")
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -107,16 +91,11 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -134,16 +113,11 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -159,9 +133,7 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -196,11 +168,8 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
@@ -212,9 +181,7 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -259,11 +226,8 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
@@ -281,24 +245,15 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-questionnaire-due-date-label"
|
||||||
label={t("case:summary-questionnaire-due-date-label")}
|
)}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
|
|
||||||
_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -309,24 +264,14 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-statement-interested-party-due-date-label"
|
"case:summary-statement-interested-party-due-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
|
|
||||||
_.has(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
@@ -338,11 +283,7 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
@@ -383,18 +324,9 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
/> */}
|
/> */}
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t("case:summary-final-comments-date-label")}
|
label={t("case:summary-final-comments-date-label")}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
|
|
||||||
_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -405,11 +337,7 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
@@ -457,14 +385,8 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
/> */}
|
/> */}
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_startdatetimeiftheevent"
|
"pinswg_startdatetimeiftheevent"
|
||||||
@@ -479,22 +401,15 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{detailsObj.pinswg_typeofevent == 846040002 ||
|
{detailsObj.pinswg_typeofevent == 846040002 ||
|
||||||
detailsObj.pinswg_typeofevent == 846040007 ||
|
detailsObj.pinswg_typeofevent == 846040007 ||
|
||||||
detailsObj.pinswg_typeofevent == 846040012 ||
|
detailsObj.pinswg_typeofevent == 846040012 ||
|
||||||
detailsObj.pinswg_typeofevent == 846040009 ? (
|
detailsObj.pinswg_typeofevent == 846040009 ? (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-event-time-label")}
|
label={t("case:summary-start-event-time-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_startdatetimeiftheevent"
|
"pinswg_startdatetimeiftheevent"
|
||||||
@@ -512,9 +427,7 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_planningconditionss73s79id = (props) => {
|
const Pinswg_planningconditionss73s79id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -41,35 +42,23 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
<>
|
||||||
router.locale == "cy"
|
{getCaseLpaDisplayLines({
|
||||||
? jsonpath({
|
casesObj,
|
||||||
path:
|
detailsObj,
|
||||||
'$..[?(@ && @.value=="' +
|
locale: router.locale,
|
||||||
casesObj[
|
transLookup
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
}).map((name) => (
|
||||||
] +
|
<div key={name}>{name}</div>
|
||||||
'")].value_cy',
|
))}
|
||||||
json: transLookup,
|
</>
|
||||||
eval: true
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] || ""
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -83,16 +72,11 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-to-be-confirmed-label")
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -107,16 +91,11 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -131,16 +110,11 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -156,9 +130,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -235,11 +207,8 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
@@ -257,24 +226,15 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-questionnaire-due-date-label"
|
||||||
label={t("case:summary-questionnaire-due-date-label")}
|
)}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
|
|
||||||
_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_questionnaireduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -285,22 +245,12 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
|
|
||||||
_.has(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
@@ -312,22 +262,14 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-interested-party-date-label"
|
||||||
label={t("case:summary-interested-party-date-label")}
|
)}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
@@ -355,28 +297,15 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
|
|
||||||
_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -387,11 +316,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
@@ -417,11 +342,8 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
}
|
}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
@@ -433,20 +355,12 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
|
|
||||||
_.has(detailsObj, "pinswg_startdateofevent")
|
_.has(detailsObj, "pinswg_startdateofevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent
|
||||||
@@ -458,18 +372,11 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
@@ -481,9 +388,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_planningobligationappeals106id = (props) => {
|
const Pinswg_planningobligationappeals106id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -20,208 +21,184 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
title={t("case:summary-case-details-label")}
|
title={t("case:summary-case-details-label")}
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-case-type-label")}
|
||||||
label={t("case:summary-case-type-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath({
|
||||||
? jsonpath({
|
path:
|
||||||
path:
|
'$..[?(@ && @.value=="' +
|
||||||
'$..[?(@ && @.value=="' +
|
casesObj[
|
||||||
casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<SummaryRow
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
label={t("case:summary-lpa-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
value={router.locale == "cy"
|
/>
|
||||||
? jsonpath({
|
<SummaryRow
|
||||||
path:
|
label={t("case:summary-lpa-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
value={
|
||||||
casesObj[
|
<>
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
{getCaseLpaDisplayLines({
|
||||||
] +
|
casesObj,
|
||||||
'")].value_cy',
|
detailsObj,
|
||||||
json: transLookup,
|
locale: router.locale,
|
||||||
eval: true,
|
transLookup
|
||||||
})
|
}).map((name) => (
|
||||||
: casesObj[
|
<div key={name}>{name}</div>
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
))}
|
||||||
] || ""}
|
</>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-eia-required-label")}
|
||||||
label={t("case:summary-eia-required-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath(
|
||||||
? jsonpath(
|
'$..[?(@.value=="' +
|
||||||
'$..[?(@.value=="' +
|
detailsObj[
|
||||||
detailsObj[
|
|
||||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
transLookup
|
|
||||||
)
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-to-be-confirmed-label"
|
transLookup
|
||||||
)}
|
)
|
||||||
|
: detailsObj[
|
||||||
/>
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
<SummaryRow
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
label={t("case:summary-procedure-label")}
|
}
|
||||||
|
/>
|
||||||
value={router.locale == "cy"
|
<SummaryRow
|
||||||
? jsonpath({
|
label={t("case:summary-procedure-label")}
|
||||||
path:
|
value={
|
||||||
'$..[?(@ && @.value=="' +
|
router.locale == "cy"
|
||||||
detailsObj[
|
? jsonpath({
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
path:
|
||||||
] +
|
'$..[?(@ && @.value=="' +
|
||||||
'")].value_cy',
|
detailsObj[
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-type-of-event-label")}
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
detailsObj[
|
label={t("case:summary-type-of-event-label")}
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
detailsObj[
|
||||||
: detailsObj[
|
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-status-label")}
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
casesObj[
|
label={t("case:summary-status-label")}
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
casesObj[
|
||||||
: casesObj[
|
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<div className="govuk-summary-list__row">
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
<dt className="govuk-summary-list__key">
|
] ||
|
||||||
{t("case:summary-decision-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
</dt>
|
}
|
||||||
<dd className="govuk-summary-list__value">
|
/>
|
||||||
{router.locale == "cy"
|
<div className="govuk-summary-list__row">
|
||||||
? jsonpath({
|
<dt className="govuk-summary-list__key">
|
||||||
path:
|
{t("case:summary-decision-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
</dt>
|
||||||
detailsObj[
|
<dd className="govuk-summary-list__value">
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
{router.locale == "cy"
|
||||||
] +
|
? jsonpath({
|
||||||
'")].value_cy',
|
path:
|
||||||
json: transLookup,
|
'$..[?(@ && @.value=="' +
|
||||||
eval: true,
|
detailsObj[
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-information-to-date-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-information-to-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
{/* <Link href="/">
|
{/* <Link href="/">
|
||||||
<a>
|
<a>
|
||||||
{casesObj.caseDetails
|
{casesObj.caseDetails
|
||||||
.outcome_document || ""}
|
.outcome_document || ""}
|
||||||
</a>
|
</a>
|
||||||
</Link> */}
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
{t("case:summary-case-link-status-label")}
|
||||||
"case:summary-case-link-status-label"
|
</dt>
|
||||||
)}
|
<dd className="govuk-summary-list__value">
|
||||||
</dt>
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
<dd className="govuk-summary-list__value">
|
? casesObj.numberofchildincidents > 0
|
||||||
{_.has(casesObj, [
|
? t(
|
||||||
"numberofchildincidents",
|
"case:summary-case-link-status-linked"
|
||||||
])
|
)
|
||||||
? casesObj.numberofchildincidents >
|
: t(
|
||||||
0
|
"case:summary-case-link-status-not-linked"
|
||||||
? t(
|
)
|
||||||
"case:summary-case-link-status-linked"
|
: t(
|
||||||
)
|
"case:summary-case-link-status-not-linked"
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
</dd>
|
||||||
)
|
</div>
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
)}
|
<div className="govuk-summary-list__row">
|
||||||
</dd>
|
<dt className="govuk-summary-list__key">
|
||||||
</div>
|
{t("case:summary-linked-cases-label")}
|
||||||
)}
|
</dt>
|
||||||
{casesObj.numberofchildincidents > 0 ? (
|
<dd className="govuk-summary-list__value">
|
||||||
<div className="govuk-summary-list__row">
|
{linkedCasesList(
|
||||||
<dt className="govuk-summary-list__key">
|
props.currentView.linkedCaseReferences
|
||||||
{t(
|
)}
|
||||||
"case:summary-linked-cases-label"
|
</dd>
|
||||||
)}
|
</div>
|
||||||
</dt>
|
) : (
|
||||||
<dd className="govuk-summary-list__value">
|
""
|
||||||
{linkedCasesList(
|
)}
|
||||||
props.currentView
|
</dl>
|
||||||
.linkedCaseReferences
|
|
||||||
)}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)}
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
<SummaryCard
|
<SummaryCard
|
||||||
id="key-dates-card"
|
id="key-dates-card"
|
||||||
@@ -229,164 +206,119 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
headingTag="h3"
|
headingTag="h3"
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-questionnaire-due-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
value={_.has(detailsObj, "pinswg_startdate")
|
<SummaryRow
|
||||||
? !_.isEmpty(
|
label={t("case:summary-statement-due-date-label")}
|
||||||
detailsObj.pinswg_startdate
|
value={
|
||||||
)
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: t(
|
? formatDates(
|
||||||
"case:summary-no-date-entered-label"
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: _.has(
|
: t(
|
||||||
detailsObj,
|
"case:summary-no-date-entered-label"
|
||||||
"pinswg_startdates"
|
)
|
||||||
)
|
: t("case:summary-no-date-entered-label")
|
||||||
? !_.isEmpty(
|
}
|
||||||
detailsObj.pinswg_startdates
|
/>
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdates
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
<SummaryRow
|
"case:summary-interested-party-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
label={t(
|
_.has(
|
||||||
"case:summary-questionnaire-due-date-label"
|
detailsObj,
|
||||||
)}
|
"pinswg_otherpartiesstatement"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
value={_.has(
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_questionnaireduedate"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_questionnaireduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-statement-due-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_statementduedate"
|
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? formatDates(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
)
|
||||||
? formatDates(
|
: t(
|
||||||
detailsObj.pinswg_statementduedate
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t("case:summary-no-date-entered-label")
|
||||||
"case:summary-no-date-entered-label"
|
}
|
||||||
)
|
/>
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
<SummaryRow
|
||||||
/>
|
label={t(
|
||||||
|
"case:summary-applicant-final-comments-date-label"
|
||||||
<SummaryRow
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
label={t(
|
? !_.isEmpty(
|
||||||
"case:summary-interested-party-date-label"
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)}
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
value={_.has(
|
)
|
||||||
detailsObj,
|
: t(
|
||||||
"pinswg_otherpartiesstatement"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
}
|
||||||
)
|
/>
|
||||||
? formatDates(
|
{/* <SummaryRow
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: _.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_otherpartiesstatements"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-applicant-final-comments-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
{/* <SummaryRow
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inquiry-evidence-date-label"
|
"case:summary-inquiry-evidence-date-label"
|
||||||
)}
|
)}
|
||||||
@@ -407,79 +339,56 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-event-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={_.has(
|
value={
|
||||||
detailsObj,
|
_.has(detailsObj, "pinswg_startdateoftheevent")
|
||||||
"pinswg_dateeventrequested"
|
? !_.isEmpty(
|
||||||
)
|
detailsObj.pinswg_startdateoftheevent
|
||||||
? !_.isEmpty(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
? formatDates(
|
||||||
)
|
detailsObj.pinswg_startdateoftheevent
|
||||||
? formatDates(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
: t(
|
||||||
)
|
"case:summary-no-date-entered-label"
|
||||||
: t(
|
)
|
||||||
"case:summary-no-date-entered-label"
|
: t("case:summary-no-date-entered-label")
|
||||||
)
|
}
|
||||||
: t(
|
/>
|
||||||
"case:summary-no-date-entered-label"
|
<SummaryRow
|
||||||
)}
|
label={t("case:summary-decision-date-label")}
|
||||||
|
value={
|
||||||
/>
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
|
? !_.isEmpty(
|
||||||
<SummaryRow
|
detailsObj.pinswg_casedecisiondate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
label={t(
|
detailsObj.pinswg_casedecisiondate
|
||||||
"case:summary-start-event-date-label"
|
)
|
||||||
)}
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
value={_.has(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj,
|
}
|
||||||
"pinswg_startdateoftheevent"
|
/>
|
||||||
)
|
</dl>
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_startdateoftheevent
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdateoftheevent
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_casedecisiondate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_rowid = (props) => {
|
const Pinswg_rowid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -20,264 +21,230 @@ const Pinswg_rowid = (props) => {
|
|||||||
title={t("case:summary-case-details-label")}
|
title={t("case:summary-case-details-label")}
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-case-type-label")}
|
||||||
label={t("case:summary-case-type-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath({
|
||||||
? jsonpath({
|
path:
|
||||||
path:
|
'$..[?(@ && @.value=="' +
|
||||||
'$..[?(@ && @.value=="' +
|
casesObj[
|
||||||
casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
/>
|
<SummaryRow
|
||||||
|
label={"Specialist Case Process"}
|
||||||
<SummaryRow
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
|
? jsonpath({
|
||||||
label={"Specialist Case Process"}
|
path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
value={router.locale == "cy"
|
|
||||||
? jsonpath({
|
|
||||||
path:
|
|
||||||
'$..[?(@ && @.value=="' +
|
|
||||||
detailsObj[
|
|
||||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<SummaryRow
|
||||||
/>
|
label={t("case:summary-lpa-label")}
|
||||||
|
value={
|
||||||
<SummaryRow
|
<>
|
||||||
|
{getCaseLpaDisplayLines({
|
||||||
|
casesObj,
|
||||||
label={t("case:summary-lpa-label")}
|
detailsObj,
|
||||||
|
locale: router.locale,
|
||||||
|
transLookup
|
||||||
value={router.locale == "cy"
|
}).map((name) => (
|
||||||
? jsonpath({
|
<div key={name}>{name}</div>
|
||||||
path:
|
))}
|
||||||
'$..[?(@ && @.value=="' +
|
</>
|
||||||
casesObj[
|
}
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
/>
|
||||||
] +
|
<SummaryRow
|
||||||
'")].value_cy',
|
label={t("case:summary-eia-required-label")}
|
||||||
json: transLookup,
|
value={
|
||||||
eval: true,
|
router.locale == "cy"
|
||||||
})
|
? jsonpath(
|
||||||
: casesObj[
|
'$..[?(@.value=="' +
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
detailsObj[
|
||||||
] || ""}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
label={t("case:summary-eia-required-label")}
|
|
||||||
|
|
||||||
value={router.locale == "cy"
|
|
||||||
? jsonpath(
|
|
||||||
'$..[?(@.value=="' +
|
|
||||||
detailsObj[
|
|
||||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
transLookup
|
|
||||||
)
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-to-be-confirmed-label"
|
transLookup
|
||||||
)}
|
)
|
||||||
|
: detailsObj[
|
||||||
/>
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
<SummaryRow
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
label={t("case:summary-procedure-label")}
|
}
|
||||||
|
/>
|
||||||
value={router.locale == "cy"
|
<SummaryRow
|
||||||
? jsonpath({
|
label={t("case:summary-procedure-label")}
|
||||||
path:
|
value={
|
||||||
'$..[?(@ && @.value=="' +
|
router.locale == "cy"
|
||||||
detailsObj[
|
? jsonpath({
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
path:
|
||||||
] +
|
'$..[?(@ && @.value=="' +
|
||||||
'")].value_cy',
|
detailsObj[
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-type-of-event-label")}
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
detailsObj[
|
label={t("case:summary-type-of-event-label")}
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
detailsObj[
|
||||||
: detailsObj[
|
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-status-label")}
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
casesObj[
|
label={t("case:summary-status-label")}
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
casesObj[
|
||||||
: casesObj[
|
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<div className="govuk-summary-list__row">
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
<dt className="govuk-summary-list__key">
|
] ||
|
||||||
{t("case:summary-decision-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
</dt>
|
}
|
||||||
<dd className="govuk-summary-list__value">
|
/>
|
||||||
{router.locale == "cy"
|
<div className="govuk-summary-list__row">
|
||||||
? jsonpath({
|
<dt className="govuk-summary-list__key">
|
||||||
path:
|
{t("case:summary-decision-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
</dt>
|
||||||
detailsObj[
|
<dd className="govuk-summary-list__value">
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
{router.locale == "cy"
|
||||||
] +
|
? jsonpath({
|
||||||
'")].value_cy',
|
path:
|
||||||
json: transLookup,
|
'$..[?(@ && @.value=="' +
|
||||||
eval: true,
|
detailsObj[
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-information-to-date-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-information-to-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
{/* <Link href="/">
|
{/* <Link href="/">
|
||||||
<a>
|
<a>
|
||||||
{casesObj.caseDetails
|
{casesObj.caseDetails
|
||||||
.outcome_document || ""}
|
.outcome_document || ""}
|
||||||
</a>
|
</a>
|
||||||
</Link> */}
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
{t("case:summary-case-link-status-label")}
|
||||||
"case:summary-case-link-status-label"
|
</dt>
|
||||||
)}
|
<dd className="govuk-summary-list__value">
|
||||||
</dt>
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
<dd className="govuk-summary-list__value">
|
? casesObj.numberofchildincidents > 0
|
||||||
{_.has(casesObj, [
|
? t(
|
||||||
"numberofchildincidents",
|
"case:summary-case-link-status-linked"
|
||||||
])
|
)
|
||||||
? casesObj.numberofchildincidents >
|
: t(
|
||||||
0
|
"case:summary-case-link-status-not-linked"
|
||||||
? t(
|
)
|
||||||
"case:summary-case-link-status-linked"
|
: t(
|
||||||
)
|
"case:summary-case-link-status-not-linked"
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
</dd>
|
||||||
)
|
</div>
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
)}
|
<div className="govuk-summary-list__row">
|
||||||
</dd>
|
<dt className="govuk-summary-list__key">
|
||||||
</div>
|
{t("case:summary-linked-cases-label")}
|
||||||
)}
|
</dt>
|
||||||
{casesObj.numberofchildincidents > 0 ? (
|
<dd className="govuk-summary-list__value">
|
||||||
<div className="govuk-summary-list__row">
|
{linkedCasesList(
|
||||||
<dt className="govuk-summary-list__key">
|
props.currentView.linkedCaseReferences
|
||||||
{t(
|
)}
|
||||||
"case:summary-linked-cases-label"
|
</dd>
|
||||||
)}
|
</div>
|
||||||
</dt>
|
) : (
|
||||||
<dd className="govuk-summary-list__value">
|
""
|
||||||
{linkedCasesList(
|
)}
|
||||||
props.currentView
|
<SummaryRow
|
||||||
.linkedCaseReferences
|
label={t(
|
||||||
)}
|
"case:summary-case-relevant-authoritylabel"
|
||||||
</dd>
|
)}
|
||||||
</div>
|
value={
|
||||||
) : (
|
router.locale == "cy"
|
||||||
""
|
? jsonpath({
|
||||||
)}
|
path:
|
||||||
<SummaryRow
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
label={t(
|
'")].value_cy',
|
||||||
"case:summary-case-relevant-authoritylabel"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
value={router.locale == "cy"
|
: jsonpath({
|
||||||
? jsonpath({
|
path:
|
||||||
path:
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
'$..[?(@ && @.pinswg_lpa=="' +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
'")].value',
|
||||||
'")].value_cy',
|
json: transLookup,
|
||||||
json: transLookup,
|
eval: true
|
||||||
eval: true,
|
}) ||
|
||||||
})
|
t("case:summary-no-date-entered-label")
|
||||||
: jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.pinswg_lpa=="' +
|
</dl>
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
|
||||||
'")].value',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
}) ||
|
|
||||||
t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
<SummaryCard
|
<SummaryCard
|
||||||
id="key-dates-card"
|
id="key-dates-card"
|
||||||
@@ -285,164 +252,119 @@ const Pinswg_rowid = (props) => {
|
|||||||
headingTag="h3"
|
headingTag="h3"
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-questionnaire-due-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
value={_.has(detailsObj, "pinswg_startdate")
|
<SummaryRow
|
||||||
? !_.isEmpty(
|
label={t("case:summary-statement-due-date-label")}
|
||||||
detailsObj.pinswg_startdate
|
value={
|
||||||
)
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: t(
|
? formatDates(
|
||||||
"case:summary-no-date-entered-label"
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: _.has(
|
: t(
|
||||||
detailsObj,
|
"case:summary-no-date-entered-label"
|
||||||
"pinswg_startdates"
|
)
|
||||||
)
|
: t("case:summary-no-date-entered-label")
|
||||||
? !_.isEmpty(
|
}
|
||||||
detailsObj.pinswg_startdates
|
/>
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdates
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
<SummaryRow
|
"case:summary-interested-party-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
label={t(
|
_.has(
|
||||||
"case:summary-questionnaire-due-date-label"
|
detailsObj,
|
||||||
)}
|
"pinswg_otherpartiesstatement"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
value={_.has(
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_questionnaireduedate"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_questionnaireduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-statement-due-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_statementduedate"
|
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? formatDates(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
)
|
||||||
? formatDates(
|
: t(
|
||||||
detailsObj.pinswg_statementduedate
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t("case:summary-no-date-entered-label")
|
||||||
"case:summary-no-date-entered-label"
|
}
|
||||||
)
|
/>
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
<SummaryRow
|
||||||
/>
|
label={t(
|
||||||
|
"case:summary-applicant-final-comments-date-label"
|
||||||
<SummaryRow
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
label={t(
|
? !_.isEmpty(
|
||||||
"case:summary-interested-party-date-label"
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)}
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
value={_.has(
|
)
|
||||||
detailsObj,
|
: t(
|
||||||
"pinswg_otherpartiesstatement"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
}
|
||||||
)
|
/>
|
||||||
? formatDates(
|
{/* <SummaryRow
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: _.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_otherpartiesstatements"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-applicant-final-comments-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
{/* <SummaryRow
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inquiry-evidence-date-label"
|
"case:summary-inquiry-evidence-date-label"
|
||||||
)}
|
)}
|
||||||
@@ -463,79 +385,56 @@ const Pinswg_rowid = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-event-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={_.has(
|
value={
|
||||||
detailsObj,
|
_.has(detailsObj, "pinswg_startdateoftheevent")
|
||||||
"pinswg_dateeventrequested"
|
? !_.isEmpty(
|
||||||
)
|
detailsObj.pinswg_startdateoftheevent
|
||||||
? !_.isEmpty(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
? formatDates(
|
||||||
)
|
detailsObj.pinswg_startdateoftheevent
|
||||||
? formatDates(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
: t(
|
||||||
)
|
"case:summary-no-date-entered-label"
|
||||||
: t(
|
)
|
||||||
"case:summary-no-date-entered-label"
|
: t("case:summary-no-date-entered-label")
|
||||||
)
|
}
|
||||||
: t(
|
/>
|
||||||
"case:summary-no-date-entered-label"
|
<SummaryRow
|
||||||
)}
|
label={t("case:summary-decision-date-label")}
|
||||||
|
value={
|
||||||
/>
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
|
? !_.isEmpty(
|
||||||
<SummaryRow
|
detailsObj.pinswg_casedecisiondate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
label={t(
|
detailsObj.pinswg_casedecisiondate
|
||||||
"case:summary-start-event-date-label"
|
)
|
||||||
)}
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
value={_.has(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj,
|
}
|
||||||
"pinswg_startdateoftheevent"
|
/>
|
||||||
)
|
</dl>
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_startdateoftheevent
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdateoftheevent
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_casedecisiondate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
import GoogleMapComponent from "../../mapping";
|
import GoogleMapComponent from "../../mapping";
|
||||||
|
|
||||||
@@ -86,11 +87,10 @@ const Pinswg_sipscase = (props) => {
|
|||||||
|
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
label={t("case:summary-case-type-label")}
|
"case:summary-case-type-label"
|
||||||
|
)}
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -106,9 +106,7 @@ const Pinswg_sipscase = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{hasValidKey(
|
{hasValidKey(
|
||||||
@@ -116,11 +114,8 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"_pinswg_projecttype_value"
|
"_pinswg_projecttype_value"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={"Project Type"}
|
label={"Project Type"}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -136,21 +131,16 @@ const Pinswg_sipscase = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{detailsObj.pinswg_webaddress != null && (
|
{detailsObj.pinswg_webaddress != null && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-website-label"
|
"case:summary-case-website-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -179,9 +169,7 @@ const Pinswg_sipscase = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{/* <div className="govuk-summary-list__row">
|
{/* <div className="govuk-summary-list__row">
|
||||||
@@ -190,32 +178,26 @@ const Pinswg_sipscase = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value"></dd>
|
<dd className="govuk-summary-list__value"></dd>
|
||||||
</div> */}
|
</div> */}
|
||||||
|
|
||||||
<div className="govuk-summary-list__row">
|
|
||||||
<dt className="govuk-summary-list__key">
|
|
||||||
{t("case:summary-lpa-label")}
|
|
||||||
</dt>
|
|
||||||
<dd className="govuk-summary-list__value">
|
|
||||||
{router.locale == "cy"
|
|
||||||
? jsonpath(
|
|
||||||
'$..[?(@.value=="' +
|
|
||||||
casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
transLookup
|
|
||||||
)
|
|
||||||
: casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] || ""}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-lpa-label")}
|
||||||
label={t("case:summary-procedure-label")}
|
value={
|
||||||
|
<>
|
||||||
|
{getCaseLpaDisplayLines({
|
||||||
|
casesObj,
|
||||||
|
detailsObj,
|
||||||
|
locale: router.locale,
|
||||||
|
transLookup
|
||||||
|
}).map((name) => (
|
||||||
|
<div key={name}>{name}</div>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-procedure-label"
|
||||||
|
)}
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -231,16 +213,11 @@ const Pinswg_sipscase = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={"ES Submitted"}
|
label={"ES Submitted"}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -256,16 +233,13 @@ const Pinswg_sipscase = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={
|
||||||
label={"Deemed Marine License Applied for"}
|
"Deemed Marine License Applied for"
|
||||||
|
}
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -281,9 +255,7 @@ const Pinswg_sipscase = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
@@ -422,13 +394,10 @@ const Pinswg_sipscase = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-decision-date-label"
|
"case:summary-decision-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofdecision"
|
"pinswg_dateofdecision"
|
||||||
@@ -445,9 +414,7 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -525,13 +492,10 @@ const Pinswg_sipscase = (props) => {
|
|||||||
</h4>
|
</h4>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_validnoticeofintentiontosubmit"
|
"pinswg_validnoticeofintentiontosubmit"
|
||||||
@@ -548,18 +512,13 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-written-acceptance-of-notice"
|
"case:summary-written-acceptance-of-notice"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_writtenacceptanceofnotification"
|
"pinswg_writtenacceptanceofnotification"
|
||||||
@@ -576,18 +535,13 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-deadline-for-submission-of-application"
|
"case:summary-deadline-for-submission-of-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_deadlineforsubmissionofapplication"
|
"pinswg_deadlineforsubmissionofapplication"
|
||||||
@@ -604,9 +558,7 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
@@ -635,13 +587,10 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"pinswg_validationdeadlineextension"
|
"pinswg_validationdeadlineextension"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-validation-deadline-extension"
|
"case:summary-validation-deadline-extension"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_validationdeadlineextension"
|
"pinswg_validationdeadlineextension"
|
||||||
@@ -658,9 +607,7 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{hasValidKey(
|
{hasValidKey(
|
||||||
@@ -668,13 +615,10 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"pinswg_casesuspensionstartdate"
|
"pinswg_casesuspensionstartdate"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-suspension-start-date"
|
"case:summary-case-suspension-start-date"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_casesuspensionstartdate"
|
"pinswg_casesuspensionstartdate"
|
||||||
@@ -691,9 +635,7 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{hasValidKey(
|
{hasValidKey(
|
||||||
@@ -701,13 +643,10 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"pinswg_casesuspensionenddate"
|
"pinswg_casesuspensionenddate"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-suspension-end-date"
|
"case:summary-case-suspension-end-date"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_casesuspensionenddate"
|
"pinswg_casesuspensionenddate"
|
||||||
@@ -724,9 +663,7 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</dl>
|
</dl>
|
||||||
@@ -757,13 +694,10 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"pinswg_reportissuedtowelshministers"
|
"pinswg_reportissuedtowelshministers"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-report-issued-to-welsh-ministers"
|
"case:summary-report-issued-to-welsh-ministers"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_reportissuedtowelshministers"
|
"pinswg_reportissuedtowelshministers"
|
||||||
@@ -780,9 +714,7 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{hasValidKey(
|
{hasValidKey(
|
||||||
@@ -790,13 +722,10 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"pinswg_decisionissuedtoapplicant"
|
"pinswg_decisionissuedtoapplicant"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-decision-issued-to-applicant"
|
"case:summary-decision-issued-to-applicant"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_decisionissuedtoapplicant"
|
"pinswg_decisionissuedtoapplicant"
|
||||||
@@ -813,9 +742,7 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{hasValidKey(
|
{hasValidKey(
|
||||||
@@ -823,13 +750,10 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"pinswg_decisionoutcome"
|
"pinswg_decisionoutcome"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-decision-outcome"
|
"case:summary-decision-outcome"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_decisionoutcome"
|
"pinswg_decisionoutcome"
|
||||||
@@ -846,9 +770,7 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</dl>
|
</dl>
|
||||||
@@ -872,13 +794,10 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"pinswg_redetermination"
|
"pinswg_redetermination"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-post-decision-redetermination-label"
|
"case:summary-post-decision-redetermination-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_redetermination@OData.Community.Display.V1.FormattedValue"
|
"pinswg_redetermination@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -897,9 +816,7 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{hasValidKey(
|
{hasValidKey(
|
||||||
@@ -907,13 +824,10 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"pinswg_redeterminationconsultationdeadline"
|
"pinswg_redeterminationconsultationdeadline"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-post-decision-redetermination-deadline-label"
|
"case:summary-post-decision-redetermination-deadline-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_redeterminationconsultationdeadline"
|
"pinswg_redeterminationconsultationdeadline"
|
||||||
@@ -930,9 +844,7 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</dl>
|
</dl>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
|
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||||
|
|
||||||
const Pinswg_wayleaveid = (props) => {
|
const Pinswg_wayleaveid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -20,236 +21,209 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
title={t("case:summary-case-details-label")}
|
title={t("case:summary-case-details-label")}
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-case-type-label")}
|
||||||
label={t("case:summary-case-type-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath({
|
||||||
? jsonpath({
|
path:
|
||||||
path:
|
'$..[?(@ && @.value=="' +
|
||||||
'$..[?(@ && @.value=="' +
|
casesObj[
|
||||||
casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: casesObj[
|
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<SummaryRow
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
label={t("case:summary-lpa-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
value={router.locale == "cy"
|
/>
|
||||||
? jsonpath({
|
<SummaryRow
|
||||||
path:
|
label={t("case:summary-lpa-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
value={
|
||||||
casesObj[
|
<>
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
{getCaseLpaDisplayLines({
|
||||||
] +
|
casesObj,
|
||||||
'")].value_cy',
|
detailsObj,
|
||||||
json: transLookup,
|
locale: router.locale,
|
||||||
eval: true,
|
transLookup
|
||||||
})
|
}).map((name) => (
|
||||||
: casesObj[
|
<div key={name}>{name}</div>
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
))}
|
||||||
] || ""}
|
</>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-eia-required-label")}
|
||||||
label={t("case:summary-eia-required-label")}
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
value={router.locale == "cy"
|
? jsonpath(
|
||||||
? jsonpath(
|
'$..[?(@.value=="' +
|
||||||
'$..[?(@.value=="' +
|
detailsObj[
|
||||||
detailsObj[
|
|
||||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] +
|
|
||||||
'")].value_cy',
|
|
||||||
transLookup
|
|
||||||
)
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-to-be-confirmed-label"
|
transLookup
|
||||||
)}
|
)
|
||||||
|
: detailsObj[
|
||||||
/>
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
<SummaryRow
|
] ||
|
||||||
|
t("case:summary-to-be-confirmed-label")
|
||||||
label={t("case:summary-procedure-label")}
|
}
|
||||||
|
/>
|
||||||
value={router.locale == "cy"
|
<SummaryRow
|
||||||
? jsonpath({
|
label={t("case:summary-procedure-label")}
|
||||||
path:
|
value={
|
||||||
'$..[?(@ && @.value=="' +
|
router.locale == "cy"
|
||||||
detailsObj[
|
? jsonpath({
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
path:
|
||||||
] +
|
'$..[?(@ && @.value=="' +
|
||||||
'")].value_cy',
|
detailsObj[
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-type-of-event-label")}
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
detailsObj[
|
label={t("case:summary-type-of-event-label")}
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
detailsObj[
|
||||||
: detailsObj[
|
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""}
|
] +
|
||||||
|
'")].value_cy',
|
||||||
/>
|
json: transLookup,
|
||||||
<SummaryRow
|
eval: true
|
||||||
|
})
|
||||||
label={t("case:summary-status-label")}
|
: detailsObj[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
value={router.locale == "cy"
|
] || ""
|
||||||
? jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.value=="' +
|
<SummaryRow
|
||||||
casesObj[
|
label={t("case:summary-status-label")}
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
value={
|
||||||
] +
|
router.locale == "cy"
|
||||||
'")].value_cy',
|
? jsonpath({
|
||||||
json: transLookup,
|
path:
|
||||||
eval: true,
|
'$..[?(@ && @.value=="' +
|
||||||
})
|
casesObj[
|
||||||
: casesObj[
|
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-date-entered-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
/>
|
: casesObj[
|
||||||
<div className="govuk-summary-list__row">
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
<dt className="govuk-summary-list__key">
|
] ||
|
||||||
{t("case:summary-decision-label")}
|
t("case:summary-no-date-entered-label")
|
||||||
</dt>
|
}
|
||||||
<dd className="govuk-summary-list__value">
|
/>
|
||||||
{router.locale == "cy"
|
<div className="govuk-summary-list__row">
|
||||||
? jsonpath({
|
<dt className="govuk-summary-list__key">
|
||||||
path:
|
{t("case:summary-decision-label")}
|
||||||
'$..[?(@ && @.value=="' +
|
</dt>
|
||||||
detailsObj[
|
<dd className="govuk-summary-list__value">
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
{router.locale == "cy"
|
||||||
] +
|
? jsonpath({
|
||||||
'")].value_cy',
|
path:
|
||||||
json: transLookup,
|
'$..[?(@ && @.value=="' +
|
||||||
eval: true,
|
detailsObj[
|
||||||
})
|
|
||||||
: detailsObj[
|
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] +
|
||||||
t(
|
'")].value_cy',
|
||||||
"case:summary-no-information-to-date-label"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
t(
|
||||||
|
"case:summary-no-information-to-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
{/* <Link href="/">
|
{/* <Link href="/">
|
||||||
<a>
|
<a>
|
||||||
{casesObj.caseDetails
|
{casesObj.caseDetails
|
||||||
.outcome_document || ""}
|
.outcome_document || ""}
|
||||||
</a>
|
</a>
|
||||||
</Link> */}
|
</Link> */}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
{t("case:summary-case-link-status-label")}
|
||||||
"case:summary-case-link-status-label"
|
</dt>
|
||||||
)}
|
<dd className="govuk-summary-list__value">
|
||||||
</dt>
|
{_.has(casesObj, ["numberofchildincidents"])
|
||||||
<dd className="govuk-summary-list__value">
|
? casesObj.numberofchildincidents > 0
|
||||||
{_.has(casesObj, [
|
? t(
|
||||||
"numberofchildincidents",
|
"case:summary-case-link-status-linked"
|
||||||
])
|
)
|
||||||
? casesObj.numberofchildincidents >
|
: t(
|
||||||
0
|
"case:summary-case-link-status-not-linked"
|
||||||
? t(
|
)
|
||||||
"case:summary-case-link-status-linked"
|
: t(
|
||||||
)
|
"case:summary-case-link-status-not-linked"
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
</dd>
|
||||||
)
|
</div>
|
||||||
: t(
|
)}
|
||||||
"case:summary-case-link-status-not-linked"
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
)}
|
<div className="govuk-summary-list__row">
|
||||||
</dd>
|
<dt className="govuk-summary-list__key">
|
||||||
</div>
|
{t("case:summary-linked-cases-label")}
|
||||||
)}
|
</dt>
|
||||||
{casesObj.numberofchildincidents > 0 ? (
|
<dd className="govuk-summary-list__value">
|
||||||
<div className="govuk-summary-list__row">
|
{linkedCasesList(
|
||||||
<dt className="govuk-summary-list__key">
|
props.currentView.linkedCaseReferences
|
||||||
{t(
|
)}
|
||||||
"case:summary-linked-cases-label"
|
</dd>
|
||||||
)}
|
</div>
|
||||||
</dt>
|
) : (
|
||||||
<dd className="govuk-summary-list__value">
|
""
|
||||||
{linkedCasesList(
|
)}
|
||||||
props.currentView
|
<SummaryRow
|
||||||
.linkedCaseReferences
|
label={t(
|
||||||
)}
|
"case:summary-case-relevant-authoritylabel"
|
||||||
</dd>
|
)}
|
||||||
</div>
|
value={
|
||||||
) : (
|
router.locale == "cy"
|
||||||
""
|
? jsonpath({
|
||||||
)}
|
path:
|
||||||
<SummaryRow
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
label={t(
|
'")].value_cy',
|
||||||
"case:summary-case-relevant-authoritylabel"
|
json: transLookup,
|
||||||
)}
|
eval: true
|
||||||
|
})
|
||||||
value={router.locale == "cy"
|
: jsonpath({
|
||||||
? jsonpath({
|
path:
|
||||||
path:
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
'$..[?(@ && @.pinswg_lpa=="' +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
'")].value',
|
||||||
'")].value_cy',
|
json: transLookup,
|
||||||
json: transLookup,
|
eval: true
|
||||||
eval: true,
|
}) ||
|
||||||
})
|
t("case:summary-no-date-entered-label")
|
||||||
: jsonpath({
|
}
|
||||||
path:
|
/>
|
||||||
'$..[?(@ && @.pinswg_lpa=="' +
|
</dl>
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
|
||||||
'")].value',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true,
|
|
||||||
}) ||
|
|
||||||
t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
<SummaryCard
|
<SummaryCard
|
||||||
id="key-dates-card"
|
id="key-dates-card"
|
||||||
@@ -257,164 +231,119 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
headingTag="h3"
|
headingTag="h3"
|
||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(detailsObj, "pinswg_startdates")
|
||||||
|
? !_.isEmpty(detailsObj.pinswg_startdates)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
|
"case:summary-questionnaire-due-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_questionnaireduedate")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_questionnaireduedate
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
value={_.has(detailsObj, "pinswg_startdate")
|
<SummaryRow
|
||||||
? !_.isEmpty(
|
label={t("case:summary-statement-due-date-label")}
|
||||||
detailsObj.pinswg_startdate
|
value={
|
||||||
)
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? formatDates(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: t(
|
? formatDates(
|
||||||
"case:summary-no-date-entered-label"
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
: _.has(
|
: t(
|
||||||
detailsObj,
|
"case:summary-no-date-entered-label"
|
||||||
"pinswg_startdates"
|
)
|
||||||
)
|
: t("case:summary-no-date-entered-label")
|
||||||
? !_.isEmpty(
|
}
|
||||||
detailsObj.pinswg_startdates
|
/>
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdates
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
<SummaryRow
|
||||||
|
label={t(
|
||||||
<SummaryRow
|
"case:summary-interested-party-date-label"
|
||||||
|
)}
|
||||||
|
value={
|
||||||
label={t(
|
_.has(
|
||||||
"case:summary-questionnaire-due-date-label"
|
detailsObj,
|
||||||
)}
|
"pinswg_otherpartiesstatement"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
value={_.has(
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_otherpartiesstatement
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: _.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_questionnaireduedate"
|
"pinswg_otherpartiesstatements"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_questionnaireduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-statement-due-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_statementduedate"
|
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? formatDates(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_otherpartiesstatements
|
||||||
)
|
)
|
||||||
? formatDates(
|
: t(
|
||||||
detailsObj.pinswg_statementduedate
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t(
|
: t("case:summary-no-date-entered-label")
|
||||||
"case:summary-no-date-entered-label"
|
}
|
||||||
)
|
/>
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
<SummaryRow
|
||||||
/>
|
label={t(
|
||||||
|
"case:summary-applicant-final-comments-date-label"
|
||||||
<SummaryRow
|
)}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
||||||
label={t(
|
? !_.isEmpty(
|
||||||
"case:summary-interested-party-date-label"
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)}
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
value={_.has(
|
)
|
||||||
detailsObj,
|
: t(
|
||||||
"pinswg_otherpartiesstatement"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
}
|
||||||
)
|
/>
|
||||||
? formatDates(
|
{/* <SummaryRow
|
||||||
detailsObj.pinswg_otherpartiesstatement
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: _.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_otherpartiesstatements"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_otherpartiesstatements
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
|
||||||
"case:summary-applicant-final-comments-date-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_finalcommentsduedate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
{/* <SummaryRow
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inquiry-evidence-date-label"
|
"case:summary-inquiry-evidence-date-label"
|
||||||
)}
|
)}
|
||||||
@@ -435,79 +364,56 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
label={t("case:summary-event-date-label")}
|
||||||
|
value={
|
||||||
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
|
detailsObj.pinswg_dateeventrequested
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
: t("case:summary-no-date-entered-label")
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
<SummaryRow
|
||||||
|
label={t("case:summary-start-event-date-label")}
|
||||||
value={_.has(
|
value={
|
||||||
detailsObj,
|
_.has(detailsObj, "pinswg_startdateofevent")
|
||||||
"pinswg_dateeventrequested"
|
? !_.isEmpty(
|
||||||
)
|
detailsObj.pinswg_startdateofevent
|
||||||
? !_.isEmpty(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
? formatDates(
|
||||||
)
|
detailsObj.pinswg_startdateofevent
|
||||||
? formatDates(
|
)
|
||||||
detailsObj.pinswg_dateeventrequested
|
: t(
|
||||||
)
|
"case:summary-no-date-entered-label"
|
||||||
: t(
|
)
|
||||||
"case:summary-no-date-entered-label"
|
: t("case:summary-no-date-entered-label")
|
||||||
)
|
}
|
||||||
: t(
|
/>
|
||||||
"case:summary-no-date-entered-label"
|
<SummaryRow
|
||||||
)}
|
label={t("case:summary-decision-date-label")}
|
||||||
|
value={
|
||||||
/>
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
|
? !_.isEmpty(
|
||||||
<SummaryRow
|
detailsObj.pinswg_casedecisiondate
|
||||||
|
)
|
||||||
|
? formatDates(
|
||||||
label={t(
|
detailsObj.pinswg_casedecisiondate
|
||||||
"case:summary-start-event-date-label"
|
)
|
||||||
)}
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
value={_.has(
|
: t("case:summary-no-date-entered-label")
|
||||||
detailsObj,
|
}
|
||||||
"pinswg_startdateofevent"
|
/>
|
||||||
)
|
</dl>
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_startdateofevent
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_startdateofevent
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
|
||||||
<SummaryRow
|
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
|
||||||
|
|
||||||
value={_.has(
|
|
||||||
detailsObj,
|
|
||||||
"pinswg_casedecisiondate"
|
|
||||||
)
|
|
||||||
? !_.isEmpty(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
? formatDates(
|
|
||||||
detailsObj.pinswg_casedecisiondate
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"case:summary-no-date-entered-label"
|
|
||||||
)}
|
|
||||||
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
|
|
||||||
|
const translateLpaName = ({ name, locale, transLookup }) => {
|
||||||
|
if (!name) return "";
|
||||||
|
|
||||||
|
if (locale !== "cy") return name;
|
||||||
|
|
||||||
|
return (
|
||||||
|
jsonpath({
|
||||||
|
path: '$..[?(@ && @.value=="' + name + '")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})?.[0] || name
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getCaseLpaNames = ({
|
||||||
|
casesObj,
|
||||||
|
detailsObj,
|
||||||
|
locale,
|
||||||
|
transLookup
|
||||||
|
}) => {
|
||||||
|
if (!casesObj) return [];
|
||||||
|
|
||||||
|
const primaryLpaName =
|
||||||
|
casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || "";
|
||||||
|
|
||||||
|
const translatedPrimaryLpaName = translateLpaName({
|
||||||
|
name: primaryLpaName,
|
||||||
|
locale,
|
||||||
|
transLookup
|
||||||
|
});
|
||||||
|
|
||||||
|
const additionalLpaNames = (detailsObj.additionalLPAs || []).map((lpa) =>
|
||||||
|
translateLpaName({
|
||||||
|
name: lpa?.name || "",
|
||||||
|
locale,
|
||||||
|
transLookup
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
return [
|
||||||
|
...new Set(
|
||||||
|
[translatedPrimaryLpaName, ...additionalLpaNames].filter(Boolean)
|
||||||
|
)
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getCaseLpaDisplayValue = ({
|
||||||
|
casesObj,
|
||||||
|
detailsObj,
|
||||||
|
locale,
|
||||||
|
transLookup
|
||||||
|
}) => {
|
||||||
|
return getCaseLpaNames({ casesObj, detailsObj, locale, transLookup }).join(
|
||||||
|
", "
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getCaseLpaDisplayLines = ({
|
||||||
|
casesObj,
|
||||||
|
locale,
|
||||||
|
detailsObj,
|
||||||
|
transLookup
|
||||||
|
}) => {
|
||||||
|
return getCaseLpaNames({ casesObj, detailsObj, locale, transLookup });
|
||||||
|
};
|
||||||
@@ -32,8 +32,8 @@
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
||||||
import { getNavigationPropertyByPrimaryAttribute } from "../../../components/utils";
|
import { getNavigationPropertyByPrimaryAttribute } from "../../../components/utils";
|
||||||
import { respondError } from "../middleware/apiResponse";
|
import { respondError, respondSuccess } from "../middleware/apiResponse";
|
||||||
import { relayGet } from "../middleware/relayForwarding";
|
import { relayGetData } from "../middleware/relayForwarding";
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
const appealTypeName = req.query.appealTypeName;
|
const appealTypeName = req.query.appealTypeName;
|
||||||
@@ -88,45 +88,50 @@ export default async function ApiProxy(req, res) {
|
|||||||
navigationProperty +
|
navigationProperty +
|
||||||
"($select=ticketnumber)";
|
"($select=ticketnumber)";
|
||||||
|
|
||||||
//" and statuscode eq 1&$count=true";
|
|
||||||
|
|
||||||
// queryUrl =
|
|
||||||
// queryUrl +
|
|
||||||
// getSelectQuery(appealTypeName) +
|
|
||||||
// ",_" +
|
|
||||||
// (primaryIdAttribute == "pinswg_sipscase"
|
|
||||||
// ? "pinswg_sipscase_value"
|
|
||||||
// : primaryIdAttribute + "s_value");
|
|
||||||
|
|
||||||
queryUrl = queryUrl + getSelectQuery(appealTypeName);
|
queryUrl = queryUrl + getSelectQuery(appealTypeName);
|
||||||
|
|
||||||
// console.log(
|
const incidentQueryUrl =
|
||||||
// "\n==========================================\n",
|
"incidents(" +
|
||||||
// "\nSearch Details query ",
|
incidentID +
|
||||||
// "\nAppealType: " + appealTypeName,
|
")?$select=title,ticketnumber" +
|
||||||
// "\nIncident ID: " + incidentID,
|
"&$expand=pinswg_Incident_Account_AdditionalLPAs($select=name,accountnumber)" +
|
||||||
// "\n\nQuery url: " + queryUrl,
|
"&$count=true";
|
||||||
// "\n==========================================\n"
|
|
||||||
// );
|
|
||||||
|
|
||||||
return relayGet({
|
try {
|
||||||
queryUrl,
|
const [searchResult, incidentResult] = await Promise.all([
|
||||||
res,
|
relayGetData({
|
||||||
requestOptionsBuilder: (accessToken) => azureHeaders(accessToken),
|
queryUrl,
|
||||||
transformData: (data) => {
|
requestOptionsBuilder: (accessToken) =>
|
||||||
let flattened = data.value.map((r) => ({
|
azureHeaders(accessToken)
|
||||||
...r,
|
}),
|
||||||
ticketnumber: r[navigationProperty]?.ticketnumber || null
|
relayGetData({
|
||||||
}));
|
queryUrl: incidentQueryUrl,
|
||||||
|
requestOptionsBuilder: (accessToken) =>
|
||||||
|
azureHeaders(accessToken)
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
|
||||||
data.value = flattened;
|
const data = searchResult.data;
|
||||||
|
const incidentData = incidentResult.data;
|
||||||
|
const additionalLPAs =
|
||||||
|
incidentData?.pinswg_Incident_Account_AdditionalLPAs || [];
|
||||||
|
|
||||||
return data;
|
data.value = (data.value || []).map((r) => ({
|
||||||
},
|
...r,
|
||||||
errorResponse: {
|
ticketnumber:
|
||||||
|
r[navigationProperty]?.ticketnumber ||
|
||||||
|
incidentData?.ticketnumber ||
|
||||||
|
null,
|
||||||
|
incidenttitle: incidentData?.title || null,
|
||||||
|
additionalLPAs
|
||||||
|
}));
|
||||||
|
|
||||||
|
return respondSuccess(res, data);
|
||||||
|
} catch (error) {
|
||||||
|
return respondError(res, {
|
||||||
status: 400,
|
status: 400,
|
||||||
code: "BASIC_SEARCH_DETAILS_FETCH_FAILED",
|
code: "BASIC_SEARCH_DETAILS_FETCH_FAILED",
|
||||||
message: "Failed to fetch basic search details"
|
message: "Failed to fetch basic search details"
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,11 +30,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
import { azureHeaders, azureHeadersPaged } from "../../../actions/core/headers";
|
||||||
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
||||||
import { getNavigationPropertyByPrimaryAttribute } from "../../../components/utils";
|
import { getNavigationPropertyByPrimaryAttribute } from "../../../components/utils";
|
||||||
import { respondError } from "../middleware/apiResponse";
|
import { respondError, respondSuccess } from "../middleware/apiResponse";
|
||||||
import { relayGet } from "../middleware/relayForwarding";
|
import { relayGetData } from "../middleware/relayForwarding";
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
const appealTypeName = req.query.appealTypeName;
|
const appealTypeName = req.query.appealTypeName;
|
||||||
@@ -76,13 +76,6 @@ export default async function ApiProxy(req, res) {
|
|||||||
primaryIdAttribute
|
primaryIdAttribute
|
||||||
).NavigationProperty;
|
).NavigationProperty;
|
||||||
|
|
||||||
// "?$filter=_" +
|
|
||||||
// (primaryIdAttribute == "pinswg_sipscase"
|
|
||||||
// ? "pinswg_sipscase_value"
|
|
||||||
// : primaryIdAttribute + "s_value ") +
|
|
||||||
// " eq " +
|
|
||||||
// incidentID +
|
|
||||||
|
|
||||||
let queryUrl =
|
let queryUrl =
|
||||||
appealTypeName +
|
appealTypeName +
|
||||||
"?$filter=" +
|
"?$filter=" +
|
||||||
@@ -92,8 +85,6 @@ export default async function ApiProxy(req, res) {
|
|||||||
navigationProperty +
|
navigationProperty +
|
||||||
"($select=ticketnumber)";
|
"($select=ticketnumber)";
|
||||||
|
|
||||||
//" and statuscode eq 1&$count=true";
|
|
||||||
|
|
||||||
queryUrl =
|
queryUrl =
|
||||||
queryUrl +
|
queryUrl +
|
||||||
getSelectQuery(appealTypeName) +
|
getSelectQuery(appealTypeName) +
|
||||||
@@ -102,29 +93,53 @@ export default async function ApiProxy(req, res) {
|
|||||||
? "pinswg_sipscase_value"
|
? "pinswg_sipscase_value"
|
||||||
: primaryIdAttribute + "s_value");
|
: primaryIdAttribute + "s_value");
|
||||||
|
|
||||||
return relayGet({
|
const incidentQueryUrl =
|
||||||
queryUrl,
|
"incidents(" +
|
||||||
res,
|
req.query.incidentID +
|
||||||
requestOptionsBuilder: (accessToken) => azureHeadersPaged(accessToken),
|
")?$select=title,ticketnumber" +
|
||||||
transformData: (data) => {
|
"&$expand=pinswg_Incident_Account_AdditionalLPAs($select=name,accountnumber)" +
|
||||||
let flattened = data.value.map((r) => ({
|
"&$count=true";
|
||||||
...r,
|
|
||||||
ticketnumber: r[navigationProperty]?.ticketnumber || null
|
|
||||||
}));
|
|
||||||
|
|
||||||
data.value = flattened;
|
try {
|
||||||
|
const [searchResult, incidentResult] = await Promise.all([
|
||||||
|
relayGetData({
|
||||||
|
queryUrl,
|
||||||
|
requestOptionsBuilder: (accessToken) =>
|
||||||
|
azureHeadersPaged(accessToken)
|
||||||
|
}),
|
||||||
|
relayGetData({
|
||||||
|
queryUrl: incidentQueryUrl,
|
||||||
|
requestOptionsBuilder: (accessToken) =>
|
||||||
|
azureHeaders(accessToken)
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
|
||||||
if (_.has(data, "@odata.nextLink") === true) {
|
const data = searchResult.data;
|
||||||
const dataStr = JSON.stringify(data["@odata.nextLink"]);
|
const incidentData = incidentResult.data;
|
||||||
data["@odata.nextLink"] = dataStr.split("/v8.2/")[1];
|
const additionalLPAs =
|
||||||
}
|
incidentData?.pinswg_Incident_Account_AdditionalLPAs || [];
|
||||||
|
|
||||||
return data;
|
data.value = (data.value || []).map((r) => ({
|
||||||
},
|
...r,
|
||||||
errorResponse: {
|
ticketnumber:
|
||||||
|
r[navigationProperty]?.ticketnumber ||
|
||||||
|
incidentData?.ticketnumber ||
|
||||||
|
null,
|
||||||
|
incidenttitle: incidentData?.title || null,
|
||||||
|
additionalLPAs
|
||||||
|
}));
|
||||||
|
|
||||||
|
if (_.has(data, "@odata.nextLink") === true) {
|
||||||
|
const dataStr = JSON.stringify(data["@odata.nextLink"]);
|
||||||
|
data["@odata.nextLink"] = dataStr.split("/v8.2/")[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
return respondSuccess(res, data);
|
||||||
|
} catch (error) {
|
||||||
|
return respondError(res, {
|
||||||
status: 400,
|
status: 400,
|
||||||
code: "BASIC_SEARCH_DETAILS_PAGED_FETCH_FAILED",
|
code: "BASIC_SEARCH_DETAILS_PAGED_FETCH_FAILED",
|
||||||
message: "Failed to fetch paged basic search details"
|
message: "Failed to fetch paged basic search details"
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user