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:
Robert Bond
2026-04-21 08:39:37 +00:00
parent 05d83822f2
commit 5bf885933d
27 changed files with 4427 additions and 6127 deletions
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_advertsid = (props) => {
let { t } = useTranslation();
@@ -64,20 +65,16 @@ const Pinswg_advertsid = (props) => {
<SummaryRow
label={t("case:summary-lpa-label")}
value={
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"
] || ""
<>
{getCaseLpaDisplayLines({
casesObj,
detailsObj,
locale: router.locale,
transLookup
}).map((name) => (
<div key={name}>{name}</div>
))}
</>
}
/>
<SummaryRow
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_callinss77id = (props) => {
let { t } = useTranslation();
@@ -43,20 +44,16 @@ const Pinswg_callinss77id = (props) => {
<SummaryRow
label={t("case:summary-lpa-label")}
value={
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"
] || ""
<>
{getCaseLpaDisplayLines({
casesObj,
detailsObj,
locale: router.locale,
transLookup
}).map((name) => (
<div key={name}>{name}</div>
))}
</>
}
/>
<SummaryRow
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_commonlandid = (props) => {
let { t } = useTranslation();
@@ -43,20 +44,16 @@ const Pinswg_commonlandid = (props) => {
<SummaryRow
label={t("case:summary-lpa-label")}
value={
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"
] || ""
<>
{getCaseLpaDisplayLines({
casesObj,
detailsObj,
locale: router.locale,
transLookup
}).map((name) => (
<div key={name}>{name}</div>
))}
</>
}
/>
<SummaryRow
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_communityinfrastructurelevyid = (props) => {
let { t } = useTranslation();
@@ -43,20 +44,16 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
<SummaryRow
label={t("case:summary-lpa-label")}
value={
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"
] || ""
<>
{getCaseLpaDisplayLines({
casesObj,
detailsObj,
locale: router.locale,
transLookup
}).map((name) => (
<div key={name}>{name}</div>
))}
</>
}
/>
<SummaryRow
+168 -285
View File
@@ -5,6 +5,7 @@ import useTranslation from "next-translate/useTranslation";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
import GoogleMapComponent from "../../mapping/";
@@ -24,7 +25,7 @@ const Pinswg_dnsid = (props) => {
point = new OSPoint(
detailsObj.pinswg_anticipatedgridreferencenorthingtext,
detailsObj.pinswg_anticipatedgridreferenceeastingtext,
detailsObj.pinswg_anticipatedgridreferenceeastingtext
);
siteCoords = point.toOSGB36();
//console.log(siteCoords);
@@ -35,7 +36,7 @@ const Pinswg_dnsid = (props) => {
: parseFloat(siteCoords.latitude),
lng: isNaN(parseFloat(siteCoords.longitude))
? -3.437989
: parseFloat(siteCoords.longitude),
: parseFloat(siteCoords.longitude)
};
const zoom = isNaN(parseFloat(siteCoords.latitude)) ? 7 : 12;
@@ -58,7 +59,7 @@ const Pinswg_dnsid = (props) => {
<p className="govuk-body">
{getBilingualText(
detailsObj.pinswg_projectdescription,
router.locale,
router.locale
)}
</p>
</div>
@@ -67,7 +68,7 @@ const Pinswg_dnsid = (props) => {
<div
style={{
height: "40vh",
width: "100%",
width: "100%"
}}
>
<GoogleMapComponent
@@ -95,11 +96,10 @@ const Pinswg_dnsid = (props) => {
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t("case:summary-case-type-label")}
label={t(
"case:summary-case-type-label"
)}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -109,28 +109,23 @@ const Pinswg_dnsid = (props) => {
] +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-date-entered-label",
"case:summary-no-date-entered-label"
)
}
/>
{detailsObj.pinswg_webaddress != null && (
<SummaryRow
label={t(
"case:summary-case-website-label",
)}
"case:summary-case-website-label"
)}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -138,7 +133,7 @@ const Pinswg_dnsid = (props) => {
detailsObj.pinswg_webaddress +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: (
<a
@@ -146,7 +141,7 @@ const Pinswg_dnsid = (props) => {
rel="noreferrer"
href={
detailsObj.pinswg_webaddress.indexOf(
"https://",
"https://"
)
? "https://" +
detailsObj.pinswg_webaddress
@@ -159,45 +154,31 @@ const Pinswg_dnsid = (props) => {
</a>
) ||
t(
"case:summary-no-date-entered-label",
"case:summary-no-date-entered-label"
)
}
/>
)}
<SummaryRow
label={t("case:summary-lpa-label")}
value={
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"
] || ""
<>
{getCaseLpaDisplayLines({
casesObj,
detailsObj,
locale: router.locale,
transLookup
}).map((name) => (
<div key={name}>{name}</div>
))}
</>
}
/>
<SummaryRow
label={t(
"case:summary-eia-required-label",
)}
"case:summary-eia-required-label"
)}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
@@ -205,24 +186,21 @@ const Pinswg_dnsid = (props) => {
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
transLookup,
transLookup
)
: detailsObj[
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-to-be-confirmed-label",
"case:summary-to-be-confirmed-label"
)
}
/>
<SummaryRow
label={t("case:summary-procedure-label")}
label={t(
"case:summary-procedure-label"
)}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -232,17 +210,15 @@ const Pinswg_dnsid = (props) => {
] +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: detailsObj[
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-to-be-confirmed-label",
"case:summary-to-be-confirmed-label"
)
}
/>
{/* <SummaryRow
label={t("case:summary-status-label")}
@@ -277,13 +253,10 @@ const Pinswg_dnsid = (props) => {
}
/> */}
<SummaryRow
label={t(
"case:summary-type-of-event-label",
)}
"case:summary-type-of-event-label"
)}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -293,68 +266,58 @@ const Pinswg_dnsid = (props) => {
] +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t(
"case:summary-start-event-date-label",
)}
"case:summary-start-event-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_startdateofevent",
"pinswg_startdateofevent"
)
? !_.isEmpty(
detailsObj.pinswg_startdateofevent,
detailsObj.pinswg_startdateofevent
)
? formatDates(
detailsObj.pinswg_startdateofevent,
detailsObj.pinswg_startdateofevent
)
: t(
"case:summary-no-information-to-date-label",
"case:summary-no-information-to-date-label"
)
: t(
"case:summary-no-information-to-date-label",
"case:summary-no-information-to-date-label"
)
}
/>
<SummaryRow
label={t("case:summary-event-date-label")}
label={t(
"case:summary-event-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_dateeventrequested",
"pinswg_dateeventrequested"
)
? !_.isEmpty(
detailsObj.pinswg_dateeventrequested,
detailsObj.pinswg_dateeventrequested
)
? formatDates(
detailsObj.pinswg_dateeventrequested,
detailsObj.pinswg_dateeventrequested
)
: t(
"case:summary-to-be-confirmed-label",
"case:summary-to-be-confirmed-label"
)
: t(
"case:summary-to-be-confirmed-label",
"case:summary-to-be-confirmed-label"
)
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
@@ -370,13 +333,13 @@ const Pinswg_dnsid = (props) => {
] +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label",
"case:summary-no-information-to-date-label"
)}
<br />
@@ -389,54 +352,49 @@ const Pinswg_dnsid = (props) => {
</dd>
</div>
<SummaryRow
label={t(
"case:summary-decision-date-label",
)}
"case:summary-decision-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_dateofdecision",
"pinswg_dateofdecision"
)
? !_.isEmpty(
detailsObj.pinswg_dateofdecision,
detailsObj.pinswg_dateofdecision
)
? formatDates(
detailsObj.pinswg_dateofdecision,
detailsObj.pinswg_dateofdecision
)
: t(
"case:summary-no-information-to-date-label",
"case:summary-no-information-to-date-label"
)
: t(
"case:summary-no-information-to-date-label",
"case:summary-no-information-to-date-label"
)
}
/>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-case-link-status-label",
"case:summary-case-link-status-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, [
"numberofchildincidents",
"numberofchildincidents"
])
? casesObj.numberofchildincidents >
0
? t(
"case:summary-case-link-status-linked",
"case:summary-case-link-status-linked"
)
: t(
"case:summary-case-link-status-not-linked",
"case:summary-case-link-status-not-linked"
)
: t(
"case:summary-case-link-status-not-linked",
"case:summary-case-link-status-not-linked"
)}
</dd>
</div>
@@ -445,13 +403,13 @@ const Pinswg_dnsid = (props) => {
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-linked-cases-label",
"case:summary-linked-cases-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView
.linkedCaseReferences,
.linkedCaseReferences
)}
</dd>
</div>
@@ -509,370 +467,305 @@ const Pinswg_dnsid = (props) => {
}
/> */}
<SummaryRow
label={t(
"case:summary-written-acceptance-of-notice",
)}
"case:summary-written-acceptance-of-notice"
)}
value={
_.has(
detailsObj,
"pinswg_writtenacceptanceofnotification",
"pinswg_writtenacceptanceofnotification"
)
? !_.isEmpty(
detailsObj.pinswg_writtenacceptanceofnotification,
detailsObj.pinswg_writtenacceptanceofnotification
)
? formatDates(
detailsObj.pinswg_writtenacceptanceofnotification,
detailsObj.pinswg_writtenacceptanceofnotification
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-deadline-for-submission-of-application",
)}
"case:summary-deadline-for-submission-of-application"
)}
value={
_.has(
detailsObj,
"pinswg_deadlineforsubmissionofapplication",
"pinswg_deadlineforsubmissionofapplication"
)
? !_.isEmpty(
detailsObj.pinswg_deadlineforsubmissionofapplication,
detailsObj.pinswg_deadlineforsubmissionofapplication
)
? formatDates(
detailsObj.pinswg_deadlineforsubmissionofapplication,
detailsObj.pinswg_deadlineforsubmissionofapplication
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-date-of-submission-of-application",
)}
"case:summary-date-of-submission-of-application"
)}
value={
_.has(
detailsObj,
"pinswg_dateofsubmissionofapplication",
"pinswg_dateofsubmissionofapplication"
)
? !_.isEmpty(
detailsObj.pinswg_dateofsubmissionofapplication,
detailsObj.pinswg_dateofsubmissionofapplication
)
? formatDates(
detailsObj.pinswg_dateofsubmissionofapplication,
detailsObj.pinswg_dateofsubmissionofapplication
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
}
/>
{_.has(
detailsObj,
"pinswg_applicationacceptedasvalid",
"pinswg_applicationacceptedasvalid"
) &&
!_.isEmpty(
detailsObj.pinswg_applicationrejectedasinvalid,
detailsObj.pinswg_applicationrejectedasinvalid
) && (
<SummaryRow
label={t(
"case:summary-application-accepted-as-valid",
)}
"case:summary-application-accepted-as-valid"
)}
value={
!_.isEmpty(
detailsObj.pinswg_applicationacceptedasvalid,
detailsObj.pinswg_applicationacceptedasvalid
)
? formatDates(
detailsObj.pinswg_applicationacceptedasvalid,
detailsObj.pinswg_applicationacceptedasvalid
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
}
/>
)}
{_.has(
detailsObj,
"pinswg_applicationrejectedasinvalid",
"pinswg_applicationrejectedasinvalid"
) &&
!_.isEmpty(
detailsObj.pinswg_applicationrejectedasinvalid,
detailsObj.pinswg_applicationrejectedasinvalid
) && (
<SummaryRow
label={t(
"case:summary-application-rejected-as-invalid",
)}
"case:summary-application-rejected-as-invalid"
)}
value={
!_.isEmpty(
detailsObj.pinswg_applicationrejectedasinvalid,
detailsObj.pinswg_applicationrejectedasinvalid
)
? formatDates(
detailsObj.pinswg_applicationrejectedasinvalid,
detailsObj.pinswg_applicationrejectedasinvalid
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
}
/>
)}
<SummaryRow
label={t(
"case:summary-end-of-representation-period",
)}
"case:summary-end-of-representation-period"
)}
value={
_.has(
detailsObj,
"pinswg_endofrepresentationperiod",
"pinswg_endofrepresentationperiod"
)
? !_.isEmpty(
detailsObj.pinswg_endofrepresentationperiod,
detailsObj.pinswg_endofrepresentationperiod
)
? formatDates(
detailsObj.pinswg_endofrepresentationperiod,
detailsObj.pinswg_endofrepresentationperiod
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
}
/>
{_.has(
detailsObj,
"pinswg_dateofrequesttovarytheapplication",
"pinswg_dateofrequesttovarytheapplication"
) &&
!_.isEmpty(
detailsObj.pinswg_dateofrequesttovarytheapplication,
detailsObj.pinswg_dateofrequesttovarytheapplication
) && (
<SummaryRow
label={t(
"case:summary-date-of-request-to-vary",
)}
"case:summary-date-of-request-to-vary"
)}
value={
!_.isEmpty(
detailsObj.pinswg_dateofrequesttovarytheapplication,
detailsObj.pinswg_dateofrequesttovarytheapplication
)
? formatDates(
detailsObj.pinswg_dateofrequesttovarytheapplication,
detailsObj.pinswg_dateofrequesttovarytheapplication
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
}
/>
)}
{_.has(
detailsObj,
"pinswg_confirmrequesttovaryapplication",
"pinswg_confirmrequesttovaryapplication"
) &&
!_.isEmpty(
detailsObj.pinswg_confirmrequesttovaryapplication,
detailsObj.pinswg_confirmrequesttovaryapplication
) &&
(_.has(
detailsObj,
"pinswg_rejectrequesttovaryapplication",
"pinswg_rejectrequesttovaryapplication"
) &&
_.isEmpty(
detailsObj.pinswg_rejectrequesttovaryapplication,
detailsObj.pinswg_rejectrequesttovaryapplication
) ? (
<SummaryRow
label={t(
"case:summary-confirm-request-to-vary-application",
)}
"case:summary-confirm-request-to-vary-application"
)}
value={
!_.isEmpty(
detailsObj.pinswg_confirmrequesttovaryapplication,
detailsObj.pinswg_confirmrequesttovaryapplication
)
? formatDates(
detailsObj.pinswg_confirmrequesttovaryapplication,
detailsObj.pinswg_confirmrequesttovaryapplication
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
}
/>
) : (
""
))}
{_.has(
detailsObj,
"pinswg_rejectrequesttovaryapplication",
"pinswg_rejectrequesttovaryapplication"
) &&
!_.isEmpty(
detailsObj.pinswg_rejectrequesttovaryapplication,
detailsObj.pinswg_rejectrequesttovaryapplication
) &&
(_.has(
detailsObj,
"pinswg_confirmrequesttovaryapplication",
"pinswg_confirmrequesttovaryapplication"
) &&
_.isEmpty(
detailsObj.pinswg_confirmrequesttovaryapplication,
detailsObj.pinswg_confirmrequesttovaryapplication
) ? (
<SummaryRow
label={t(
"case:summary-reject-request-to-vary-application",
)}
"case:summary-reject-request-to-vary-application"
)}
value={
!_.isEmpty(
detailsObj.pinswg_rejectrequesttovaryapplication,
detailsObj.pinswg_rejectrequesttovaryapplication
)
? formatDates(
detailsObj.pinswg_rejectrequesttovaryapplication,
detailsObj.pinswg_rejectrequesttovaryapplication
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
}
/>
) : (
""
))}
{_.has(
detailsObj,
"pinswg_suspensionstartdates",
"pinswg_suspensionstartdates"
) &&
!_.isEmpty(
detailsObj.pinswg_suspensionstartdates,
detailsObj.pinswg_suspensionstartdates
) && (
<SummaryRow
label={t(
"case:summary-suspension-start-dates",
)}
"case:summary-suspension-start-dates"
)}
value={
!_.isEmpty(
detailsObj.pinswg_suspensionstartdates,
detailsObj.pinswg_suspensionstartdates
)
? formatDates(
detailsObj.pinswg_suspensionstartdates,
detailsObj.pinswg_suspensionstartdates
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
}
/>
)}
<SummaryRow
label={t(
"case:summary-suspension-end-dates",
)}
"case:summary-suspension-end-dates"
)}
value={
_.has(
detailsObj,
"pinswg_suspensionenddates",
"pinswg_suspensionenddates"
)
? !_.isEmpty(
detailsObj.pinswg_suspensionenddates,
detailsObj.pinswg_suspensionenddates
)
? formatDates(
detailsObj.pinswg_suspensionenddates,
detailsObj.pinswg_suspensionenddates
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
}
/>
<SummaryRow
label={t("case:summary-report-due-by")}
value={
_.has(
detailsObj,
"pinswg_reportdueby",
"pinswg_reportdueby"
)
? !_.isEmpty(
detailsObj.pinswg_reportdueby,
detailsObj.pinswg_reportdueby
)
? formatDates(
detailsObj.pinswg_reportdueby,
detailsObj.pinswg_reportdueby
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
}
/>
{/* <SummaryRow
label={t("case:summary-suspension-dates")}
@@ -896,60 +789,50 @@ const Pinswg_dnsid = (props) => {
}
/> */}
<SummaryRow
label={t(
"case:summary-inspector-report-submission-to-welsh-government",
)}
"case:summary-inspector-report-submission-to-welsh-government"
)}
value={
_.has(
detailsObj,
"pinswg_inspectorreportsubmittedtowelshgovernment",
"pinswg_inspectorreportsubmittedtowelshgovernment"
)
? !_.isEmpty(
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment,
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment
)
? formatDates(
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment,
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
}
/>
{_.has(
detailsObj,
"pinswg_withdrawndate",
"pinswg_withdrawndate"
) &&
!_.isEmpty(
detailsObj.pinswg_withdrawndate,
detailsObj.pinswg_withdrawndate
) && (
<SummaryRow
label={t(
"case:summary-withdrawn-date",
)}
"case:summary-withdrawn-date"
)}
value={
!_.isEmpty(
detailsObj.pinswg_withdrawndate,
detailsObj.pinswg_withdrawndate
)
? formatDates(
detailsObj.pinswg_withdrawndate,
detailsObj.pinswg_withdrawndate
)
: t(
"case:summary-awaiting-information-label",
"case:summary-awaiting-information-label"
)
}
/>
)}
</dl>
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_electricityactid = (props) => {
let { t } = useTranslation();
@@ -62,11 +63,10 @@ const Pinswg_electricityactid = (props) => {
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t("case:summary-case-type-label")}
label={t(
"case:summary-case-type-label"
)}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -76,7 +76,7 @@ const Pinswg_electricityactid = (props) => {
] +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
@@ -84,42 +84,28 @@ const Pinswg_electricityactid = (props) => {
t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t("case:summary-lpa-label")}
value={
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"
] || ""
<>
{getCaseLpaDisplayLines({
casesObj,
detailsObj,
locale: router.locale,
transLookup
}).map((name) => (
<div key={name}>{name}</div>
))}
</>
}
/>
<SummaryRow
label={t(
"case:summary-eia-required-label"
)}
"case:summary-eia-required-label"
)}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
@@ -135,9 +121,7 @@ const Pinswg_electricityactid = (props) => {
t(
"case:summary-to-be-confirmed-label"
)
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
@@ -157,11 +141,10 @@ const Pinswg_electricityactid = (props) => {
</dd>
</div>
<SummaryRow
label={t("case:summary-procedure-label")}
label={t(
"case:summary-procedure-label"
)}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -171,23 +154,18 @@ const Pinswg_electricityactid = (props) => {
] +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t(
"case:summary-type-of-event-label"
)}
"case:summary-type-of-event-label"
)}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -197,21 +175,16 @@ const Pinswg_electricityactid = (props) => {
] +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t("case:summary-status-label")}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -221,7 +194,7 @@ const Pinswg_electricityactid = (props) => {
] +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
@@ -229,9 +202,7 @@ const Pinswg_electricityactid = (props) => {
t(
"case:summary-no-date-entered-label"
)
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
@@ -247,7 +218,7 @@ const Pinswg_electricityactid = (props) => {
] +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
@@ -274,7 +245,7 @@ const Pinswg_electricityactid = (props) => {
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, [
"numberofchildincidents",
"numberofchildincidents"
])
? casesObj.numberofchildincidents >
0
@@ -308,13 +279,10 @@ const Pinswg_electricityactid = (props) => {
""
)}
<SummaryRow
label={t(
"case:summary-case-recommendation-label"
)}
"case:summary-case-recommendation-label"
)}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -322,25 +290,20 @@ const Pinswg_electricityactid = (props) => {
detailsObj.pinswg_recommendation +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: detailsObj.pinswg_recommendation ||
t(
"case:summary-no-date-entered-label"
)
}
/>
{detailsObj.pinswg_webaddress != null && (
<SummaryRow
label={t(
"case:summary-case-website-label"
)}
"case:summary-case-website-label"
)}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -348,15 +311,13 @@ const Pinswg_electricityactid = (props) => {
detailsObj.pinswg_webaddress +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: detailsObj.pinswg_webaddress ||
t(
"case:summary-no-date-entered-label"
)
}
/>
)}
</dl>
@@ -371,11 +332,10 @@ const Pinswg_electricityactid = (props) => {
</h3>
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t("case:summary-event-date-label")}
label={t(
"case:summary-event-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_dateeventrequested"
@@ -392,18 +352,13 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-decision-date-label"
)}
"case:summary-decision-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_casedecisiondate"
@@ -420,22 +375,14 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-application-accepted-as-valid"
)}
"case:summary-application-accepted-as-valid"
)}
value={
_.has(
detailsObj,
"pinswg_applicationacceptedasvalid"
@@ -452,20 +399,13 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-application-rejected-as-invalid"
)}
"case:summary-application-rejected-as-invalid"
)}
value={
_.has(
detailsObj,
"pinswg_applicationrejectedasinvalid"
@@ -482,18 +422,13 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-confirm-request-to-vary-application"
)}
"case:summary-confirm-request-to-vary-application"
)}
value={
_.has(
detailsObj,
"pinswg_confirmrequesttovaryapplication"
@@ -510,18 +445,13 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-date-of-decisions"
)}
"case:summary-date-of-decisions"
)}
value={
_.has(
detailsObj,
"pinswg_dateofdecision"
@@ -538,18 +468,13 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-date-of-request-to-vary"
)}
"case:summary-date-of-request-to-vary"
)}
value={
_.has(
detailsObj,
"pinswg_dateofrequesttovarytheapplication"
@@ -566,18 +491,13 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-date-of-submission-of-application"
)}
"case:summary-date-of-submission-of-application"
)}
value={
_.has(
detailsObj,
"pinswg_dateofsubmissionofapplication"
@@ -594,18 +514,13 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-date-project-published-to-website"
)}
"case:summary-date-project-published-to-website"
)}
value={
_.has(
detailsObj,
"pinswg_dateprojectpublishedonwebsite"
@@ -622,18 +537,13 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-deadline-for-submission-of-application"
)}
"case:summary-deadline-for-submission-of-application"
)}
value={
_.has(
detailsObj,
"pinswg_deadlineforsubmissionofapplication"
@@ -650,18 +560,13 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-end-of-representation-period"
)}
"case:summary-end-of-representation-period"
)}
value={
_.has(
detailsObj,
"pinswg_endofrepresentationperiod"
@@ -678,18 +583,13 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-inspector-report-submission-to-welsh-government"
)}
"case:summary-inspector-report-submission-to-welsh-government"
)}
value={
_.has(
detailsObj,
"pinswg_inspectorreportsubmittedtowelshgovernment"
@@ -706,18 +606,13 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-procedure-confirmed"
)}
"case:summary-procedure-confirmed"
)}
value={
_.has(
detailsObj,
"pinswg_procedureconfirmed"
@@ -734,18 +629,13 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-reject-request-to-vary-application"
)}
"case:summary-reject-request-to-vary-application"
)}
value={
_.has(
detailsObj,
"pinswg_rejectrequesttovaryapplication"
@@ -762,16 +652,11 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t("case:summary-report-due-by")}
value={
_.has(
detailsObj,
"pinswg_reportdueby"
@@ -788,16 +673,13 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t("case:summary-suspension-dates")}
label={t(
"case:summary-suspension-dates"
)}
value={
_.has(
detailsObj,
"pinswg_suspensiondates"
@@ -814,18 +696,13 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-suspension-end-dates"
)}
"case:summary-suspension-end-dates"
)}
value={
_.has(
detailsObj,
"pinswg_suspensionenddates"
@@ -842,18 +719,13 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-suspension-start-dates"
)}
"case:summary-suspension-start-dates"
)}
value={
_.has(
detailsObj,
"pinswg_suspensionstartdates"
@@ -870,18 +742,13 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-valid-notice-of-intention-to-submit-an-application"
)}
"case:summary-valid-notice-of-intention-to-submit-an-application"
)}
value={
_.has(
detailsObj,
"pinswg_validnoticeofintentiontosubmitanapplicati"
@@ -898,16 +765,11 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t("case:summary-withdrawn-date")}
value={
_.has(
detailsObj,
"pinswg_withdrawndate"
@@ -924,18 +786,13 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-written-acceptance-of-notice"
)}
"case:summary-written-acceptance-of-notice"
)}
value={
_.has(
detailsObj,
"pinswg_writtenacceptanceofnotification"
@@ -952,9 +809,7 @@ const Pinswg_electricityactid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
</dl>
</div>
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_enforcementlistedbuildingconseid = (props) => {
let { t } = useTranslation();
@@ -43,20 +44,16 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
<SummaryRow
label={t("case:summary-lpa-label")}
value={
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"
] || ""
<>
{getCaseLpaDisplayLines({
casesObj,
detailsObj,
locale: router.locale,
transLookup
}).map((name) => (
<div key={name}>{name}</div>
))}
</>
}
/>
<SummaryRow
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_enforcementnoticeappeals174id = (props) => {
let { t } = useTranslation();
@@ -20,208 +21,184 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
title={t("case:summary-case-details-label")}
>
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t("case:summary-case-type-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: casesObj[
<SummaryRow
label={t("case:summary-case-type-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<SummaryRow
label={t("case:summary-lpa-label")}
value={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-eia-required-label")}
value={router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
transLookup
)
: detailsObj[
] +
'")].value_cy',
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-eia-required-label")}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-to-be-confirmed-label"
)}
/>
<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[
] +
'")].value_cy',
transLookup
)
: detailsObj[
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-to-be-confirmed-label")
}
/>
<SummaryRow
label={t("case:summary-procedure-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@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[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_typeofevent@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"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-no-date-entered-label")
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
<br />
{/* <Link href="/">
<br />
{/* <Link href="/">
<a>
{casesObj.caseDetails
.outcome_document || ""}
</a>
</Link> */}
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-case-link-status-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, [
"numberofchildincidents",
])
? casesObj.numberofchildincidents >
0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-linked-cases-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView
.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
</dl>
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-case-link-status-label")}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, ["numberofchildincidents"])
? casesObj.numberofchildincidents > 0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-linked-cases-label")}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
</dl>
</SummaryCard>
<SummaryCard
id="key-dates-card"
@@ -229,164 +206,119 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
headingTag="h3"
>
<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")
? !_.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"
)}
<SummaryRow
label={t("case:summary-statement-due-date-label")}
value={
_.has(detailsObj, "pinswg_statementduedate")
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-questionnaire-due-date-label"
)}
value={_.has(
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
detailsObj.pinswg_otherpartiesstatement
)
: t(
"case:summary-no-date-entered-label"
)
: _.has(
detailsObj,
"pinswg_questionnaireduedate"
"pinswg_otherpartiesstatements"
)
? !_.isEmpty(
detailsObj.pinswg_questionnaireduedate
)
? 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(
detailsObj.pinswg_otherpartiesstatements
)
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t(
"case:summary-no-date-entered-label"
)}
? formatDates(
detailsObj.pinswg_otherpartiesstatements
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
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
<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(
"case:summary-inquiry-evidence-date-label"
)}
@@ -407,79 +339,56 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
"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")}
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"
)}
/>
<SummaryRow
label={t(
"case:summary-start-event-date-label"
)}
value={_.has(
detailsObj,
"pinswg_startdateoftheevent"
)
? !_.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>
<SummaryRow
label={t("case:summary-start-event-date-label")}
value={
_.has(detailsObj, "pinswg_startdateoftheevent")
? !_.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>
</div>
</div>
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_environmentalpermittingid = (props) => {
let { t } = useTranslation();
@@ -20,236 +21,209 @@ const Pinswg_environmentalpermittingid = (props) => {
title={t("case:summary-case-details-label")}
>
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t("case:summary-case-type-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: casesObj[
<SummaryRow
label={t("case:summary-case-type-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<SummaryRow
label={t("case:summary-lpa-label")}
value={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-eia-required-label")}
value={router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
transLookup
)
: detailsObj[
] +
'")].value_cy',
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-eia-required-label")}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-to-be-confirmed-label"
)}
/>
<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[
] +
'")].value_cy',
transLookup
)
: detailsObj[
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-to-be-confirmed-label")
}
/>
<SummaryRow
label={t("case:summary-procedure-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@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[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_typeofevent@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"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-no-date-entered-label")
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
<br />
{/* <Link href="/">
<br />
{/* <Link href="/">
<a>
{casesObj.caseDetails
.outcome_document || ""}
</a>
</Link> */}
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-case-link-status-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, [
"numberofchildincidents",
])
? casesObj.numberofchildincidents >
0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-linked-cases-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView
.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
<SummaryRow
label={t(
"case:summary-case-relevant-authoritylabel"
)}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value_cy',
json: transLookup,
eval: true,
})
: jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value',
json: transLookup,
eval: true,
}) ||
t(
"case:summary-no-date-entered-label"
)}
/>
</dl>
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-case-link-status-label")}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, ["numberofchildincidents"])
? casesObj.numberofchildincidents > 0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-linked-cases-label")}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
<SummaryRow
label={t(
"case:summary-case-relevant-authoritylabel"
)}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value_cy',
json: transLookup,
eval: true
})
: jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value',
json: transLookup,
eval: true
}) ||
t("case:summary-no-date-entered-label")
}
/>
</dl>
</SummaryCard>
<SummaryCard
id="key-dates-card"
@@ -257,164 +231,119 @@ const Pinswg_environmentalpermittingid = (props) => {
headingTag="h3"
>
<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")
? !_.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"
)}
<SummaryRow
label={t("case:summary-statement-due-date-label")}
value={
_.has(detailsObj, "pinswg_statementduedate")
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-questionnaire-due-date-label"
)}
value={_.has(
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
detailsObj.pinswg_otherpartiesstatement
)
: t(
"case:summary-no-date-entered-label"
)
: _.has(
detailsObj,
"pinswg_questionnaireduedate"
"pinswg_otherpartiesstatements"
)
? !_.isEmpty(
detailsObj.pinswg_questionnaireduedate
)
? 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(
detailsObj.pinswg_otherpartiesstatements
)
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t(
"case:summary-no-date-entered-label"
)}
? formatDates(
detailsObj.pinswg_otherpartiesstatements
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
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
<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(
"case:summary-inquiry-evidence-date-label"
)}
@@ -435,79 +364,56 @@ const Pinswg_environmentalpermittingid = (props) => {
"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")}
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"
)}
/>
<SummaryRow
label={t(
"case:summary-start-event-date-label"
)}
value={_.has(
detailsObj,
"pinswg_startdateofevent"
)
? !_.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>
<SummaryRow
label={t("case:summary-start-event-date-label")}
value={
_.has(detailsObj, "pinswg_startdateofevent")
? !_.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>
</div>
</div>
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_harbourrevisionorderid = (props) => {
let { t } = useTranslation();
@@ -62,11 +63,10 @@ const Pinswg_harbourrevisionorderid = (props) => {
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t("case:summary-case-type-label")}
label={t(
"case:summary-case-type-label"
)}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -76,7 +76,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
] +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
@@ -84,42 +84,28 @@ const Pinswg_harbourrevisionorderid = (props) => {
t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t("case:summary-lpa-label")}
value={
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"
] || ""
<>
{getCaseLpaDisplayLines({
casesObj,
detailsObj,
locale: router.locale,
transLookup
}).map((name) => (
<div key={name}>{name}</div>
))}
</>
}
/>
<SummaryRow
label={t(
"case:summary-eia-required-label"
)}
"case:summary-eia-required-label"
)}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
@@ -135,9 +121,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
t(
"case:summary-to-be-confirmed-label"
)
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
@@ -157,11 +141,10 @@ const Pinswg_harbourrevisionorderid = (props) => {
</dd>
</div>
<SummaryRow
label={t("case:summary-procedure-label")}
label={t(
"case:summary-procedure-label"
)}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -171,21 +154,16 @@ const Pinswg_harbourrevisionorderid = (props) => {
] +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t("case:summary-status-label")}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -195,7 +173,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
] +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
@@ -203,9 +181,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
t(
"case:summary-no-date-entered-label"
)
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
@@ -221,7 +197,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
] +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
@@ -248,7 +224,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, [
"numberofchildincidents",
"numberofchildincidents"
])
? casesObj.numberofchildincidents >
0
@@ -282,13 +258,10 @@ const Pinswg_harbourrevisionorderid = (props) => {
""
)}
<SummaryRow
label={t(
"case:summary-case-recommendation-label"
)}
"case:summary-case-recommendation-label"
)}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -296,25 +269,20 @@ const Pinswg_harbourrevisionorderid = (props) => {
detailsObj.pinswg_recommendation +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: detailsObj.pinswg_recommendation ||
t(
"case:summary-no-date-entered-label"
)
}
/>
{detailsObj.pinswg_webaddress != null && (
<SummaryRow
label={t(
"case:summary-case-website-label"
)}
"case:summary-case-website-label"
)}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -322,15 +290,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
detailsObj.pinswg_webaddress +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: detailsObj.pinswg_webaddress ||
t(
"case:summary-no-date-entered-label"
)
}
/>
)}
</dl>
@@ -345,11 +311,10 @@ const Pinswg_harbourrevisionorderid = (props) => {
</h3>
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t("case:summary-event-date-label")}
label={t(
"case:summary-event-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_dateeventrequested"
@@ -366,18 +331,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-decision-date-label"
)}
"case:summary-decision-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_casedecisiondate"
@@ -394,22 +354,14 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-application-accepted-as-valid"
)}
"case:summary-application-accepted-as-valid"
)}
value={
_.has(
detailsObj,
"pinswg_applicationacceptedasvalid"
@@ -426,20 +378,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-application-rejected-as-invalid"
)}
"case:summary-application-rejected-as-invalid"
)}
value={
_.has(
detailsObj,
"pinswg_applicationrejectedasinvalid"
@@ -456,18 +401,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-confirm-request-to-vary-application"
)}
"case:summary-confirm-request-to-vary-application"
)}
value={
_.has(
detailsObj,
"pinswg_confirmrequesttovaryapplication"
@@ -484,18 +424,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-date-of-decisions"
)}
"case:summary-date-of-decisions"
)}
value={
_.has(
detailsObj,
"pinswg_dateofdecision"
@@ -512,18 +447,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-date-of-request-to-vary"
)}
"case:summary-date-of-request-to-vary"
)}
value={
_.has(
detailsObj,
"pinswg_dateofrequesttovarytheapplication"
@@ -540,18 +470,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-date-of-submission-of-application"
)}
"case:summary-date-of-submission-of-application"
)}
value={
_.has(
detailsObj,
"pinswg_dateofsubmissionofapplication"
@@ -568,18 +493,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-date-project-published-to-website"
)}
"case:summary-date-project-published-to-website"
)}
value={
_.has(
detailsObj,
"pinswg_dateprojectpublishedonwebsite"
@@ -596,18 +516,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-deadline-for-submission-of-application"
)}
"case:summary-deadline-for-submission-of-application"
)}
value={
_.has(
detailsObj,
"pinswg_deadlineforsubmissionofapplication"
@@ -624,18 +539,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-end-of-representation-period"
)}
"case:summary-end-of-representation-period"
)}
value={
_.has(
detailsObj,
"pinswg_endofrepresentationperiod"
@@ -652,18 +562,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-inspector-report-submission-to-welsh-government"
)}
"case:summary-inspector-report-submission-to-welsh-government"
)}
value={
_.has(
detailsObj,
"pinswg_inspectorreportsubmittedtowelshgovernment"
@@ -680,18 +585,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-procedure-confirmed"
)}
"case:summary-procedure-confirmed"
)}
value={
_.has(
detailsObj,
"pinswg_procedureconfirmed"
@@ -708,18 +608,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-reject-request-to-vary-application"
)}
"case:summary-reject-request-to-vary-application"
)}
value={
_.has(
detailsObj,
"pinswg_rejectrequesttovaryapplication"
@@ -736,16 +631,11 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t("case:summary-report-due-by")}
value={
_.has(
detailsObj,
"pinswg_reportdueby"
@@ -762,16 +652,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t("case:summary-suspension-dates")}
label={t(
"case:summary-suspension-dates"
)}
value={
_.has(
detailsObj,
"pinswg_suspensiondates"
@@ -788,18 +675,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-suspension-end-dates"
)}
"case:summary-suspension-end-dates"
)}
value={
_.has(
detailsObj,
"pinswg_suspensionenddates"
@@ -816,18 +698,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-suspension-start-dates"
)}
"case:summary-suspension-start-dates"
)}
value={
_.has(
detailsObj,
"pinswg_suspensionstartdates"
@@ -844,18 +721,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-valid-notice-of-intention-to-submit-an-application"
)}
"case:summary-valid-notice-of-intention-to-submit-an-application"
)}
value={
_.has(
detailsObj,
"pinswg_validnoticeofintentiontosubmitanapplicati"
@@ -872,16 +744,11 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t("case:summary-withdrawn-date")}
value={
_.has(
detailsObj,
"pinswg_withdrawndate"
@@ -898,18 +765,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-written-acceptance-of-notice"
)}
"case:summary-written-acceptance-of-notice"
)}
value={
_.has(
detailsObj,
"pinswg_writtenacceptanceofnotification"
@@ -926,9 +788,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
</dl>
</div>
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
let { t } = useTranslation();
@@ -20,264 +21,230 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
title={t("case:summary-case-details-label")}
>
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t("case:summary-case-type-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: casesObj[
<SummaryRow
label={t("case:summary-case-type-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-date-entered-label"
)}
] +
'")].value_cy',
json: transLookup,
eval: true
})
: casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={"Specialist Case Process"}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
<SummaryRow
label={"Specialist Case Process"}
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"
] || ""
}
/>
/>
<SummaryRow
label={t("case:summary-lpa-label")}
value={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-eia-required-label")}
value={router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
transLookup
)
: detailsObj[
<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-eia-required-label")}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-to-be-confirmed-label"
)}
/>
<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[
] +
'")].value_cy',
transLookup
)
: detailsObj[
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-to-be-confirmed-label")
}
/>
<SummaryRow
label={t("case:summary-procedure-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@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[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_typeofevent@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"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-no-date-entered-label")
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
<br />
{/* <Link href="/">
<br />
{/* <Link href="/">
<a>
{casesObj.caseDetails
.outcome_document || ""}
</a>
</Link> */}
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-case-link-status-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, [
"numberofchildincidents",
])
? casesObj.numberofchildincidents >
0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-linked-cases-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView
.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
<SummaryRow
label={t(
"case:summary-case-relevant-authoritylabel"
)}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value_cy',
json: transLookup,
eval: true,
})
: jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value',
json: transLookup,
eval: true,
}) ||
t(
"case:summary-no-date-entered-label"
)}
/>
</dl>
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-case-link-status-label")}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, ["numberofchildincidents"])
? casesObj.numberofchildincidents > 0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-linked-cases-label")}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
<SummaryRow
label={t(
"case:summary-case-relevant-authoritylabel"
)}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value_cy',
json: transLookup,
eval: true
})
: jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value',
json: transLookup,
eval: true
}) ||
t("case:summary-no-date-entered-label")
}
/>
</dl>
</SummaryCard>
<SummaryCard
id="key-dates-card"
@@ -285,164 +252,119 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
headingTag="h3"
>
<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")
? !_.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"
)}
<SummaryRow
label={t("case:summary-statement-due-date-label")}
value={
_.has(detailsObj, "pinswg_statementduedate")
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-questionnaire-due-date-label"
)}
value={_.has(
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
detailsObj.pinswg_otherpartiesstatement
)
: t(
"case:summary-no-date-entered-label"
)
: _.has(
detailsObj,
"pinswg_questionnaireduedate"
"pinswg_otherpartiesstatements"
)
? !_.isEmpty(
detailsObj.pinswg_questionnaireduedate
)
? 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(
detailsObj.pinswg_otherpartiesstatements
)
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t(
"case:summary-no-date-entered-label"
)}
? formatDates(
detailsObj.pinswg_otherpartiesstatements
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
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
<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(
"case:summary-inquiry-evidence-date-label"
)}
@@ -463,79 +385,56 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
"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")}
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"
)}
/>
<SummaryRow
label={t(
"case:summary-start-event-date-label"
)}
value={_.has(
detailsObj,
"pinswg_startdateoftheevent"
)
? !_.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>
<SummaryRow
label={t("case:summary-start-event-date-label")}
value={
_.has(detailsObj, "pinswg_startdateoftheevent")
? !_.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>
</div>
</div>
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_householderappealhasid = (props) => {
let { t } = useTranslation();
@@ -43,20 +44,16 @@ const Pinswg_householderappealhasid = (props) => {
<SummaryRow
label={t("case:summary-lpa-label")}
value={
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"
] || ""
<>
{getCaseLpaDisplayLines({
casesObj,
detailsObj,
locale: router.locale,
transLookup
}).map((name) => (
<div key={name}>{name}</div>
))}
</>
}
/>
<SummaryRow
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
let { t } = useTranslation();
@@ -20,208 +21,184 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
title={t("case:summary-case-details-label")}
>
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t("case:summary-case-type-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: casesObj[
<SummaryRow
label={t("case:summary-case-type-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<SummaryRow
label={t("case:summary-lpa-label")}
value={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-eia-required-label")}
value={router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
transLookup
)
: detailsObj[
] +
'")].value_cy',
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-eia-required-label")}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-to-be-confirmed-label"
)}
/>
<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[
] +
'")].value_cy',
transLookup
)
: detailsObj[
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-to-be-confirmed-label")
}
/>
<SummaryRow
label={t("case:summary-procedure-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@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[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_typeofevent@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"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-no-date-entered-label")
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
<br />
{/* <Link href="/">
<br />
{/* <Link href="/">
<a>
{casesObj.caseDetails
.outcome_document || ""}
</a>
</Link> */}
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-case-link-status-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, [
"numberofchildincidents",
])
? casesObj.numberofchildincidents >
0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-linked-cases-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView
.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
</dl>
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-case-link-status-label")}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, ["numberofchildincidents"])
? casesObj.numberofchildincidents > 0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-linked-cases-label")}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
</dl>
</SummaryCard>
<SummaryCard
id="key-dates-card"
@@ -229,164 +206,119 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
headingTag="h3"
>
<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")
? !_.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"
)}
<SummaryRow
label={t("case:summary-statement-due-date-label")}
value={
_.has(detailsObj, "pinswg_statementduedate")
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-questionnaire-due-date-label"
)}
value={_.has(
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
detailsObj.pinswg_otherpartiesstatement
)
: t(
"case:summary-no-date-entered-label"
)
: _.has(
detailsObj,
"pinswg_questionnaireduedate"
"pinswg_otherpartiesstatements"
)
? !_.isEmpty(
detailsObj.pinswg_questionnaireduedate
)
? 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(
detailsObj.pinswg_otherpartiesstatements
)
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t(
"case:summary-no-date-entered-label"
)}
? formatDates(
detailsObj.pinswg_otherpartiesstatements
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
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
<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(
"case:summary-inquiry-evidence-date-label"
)}
@@ -407,79 +339,56 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
"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")}
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"
)}
/>
<SummaryRow
label={t(
"case:summary-start-event-date-label"
)}
value={_.has(
detailsObj,
"pinswg_startdateoftheevent"
)
? !_.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>
<SummaryRow
label={t("case:summary-start-event-date-label")}
value={
_.has(detailsObj, "pinswg_startdateoftheevent")
? !_.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>
</div>
</div>
+305 -396
View File
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_ldpid = (props) => {
let { t } = useTranslation();
@@ -20,191 +21,167 @@ const Pinswg_ldpid = (props) => {
title={t("case:summary-case-details-label")}
>
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t("case:summary-case-type-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: casesObj[
<SummaryRow
label={t("case:summary-case-type-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-date-entered-label"
)}
] +
'")].value_cy',
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-lpa-label")}
value={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[
<SummaryRow
label={t("case:summary-procedure-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@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[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_typeofevent@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"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-no-date-entered-label")
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
<br />
{/* <Link href="/">
<br />
{/* <Link href="/">
<a>
{casesObj.caseDetails
.outcome_document || ""}
</a>
</Link> */}
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-case-link-status-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, [
"numberofchildincidents",
])
? casesObj.numberofchildincidents >
0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-linked-cases-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView
.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
</dl>
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-case-link-status-label")}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, ["numberofchildincidents"])
? casesObj.numberofchildincidents > 0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-linked-cases-label")}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
</dl>
</SummaryCard>
<SummaryCard
id="key-dates-card"
@@ -212,164 +189,119 @@ const Pinswg_ldpid = (props) => {
headingTag="h3"
>
<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")
? !_.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"
)}
<SummaryRow
label={t("case:summary-statement-due-date-label")}
value={
_.has(detailsObj, "pinswg_statementduedate")
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-questionnaire-due-date-label"
)}
value={_.has(
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
detailsObj.pinswg_otherpartiesstatement
)
: t(
"case:summary-no-date-entered-label"
)
: _.has(
detailsObj,
"pinswg_questionnaireduedate"
"pinswg_otherpartiesstatements"
)
? !_.isEmpty(
detailsObj.pinswg_questionnaireduedate
)
? 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(
detailsObj.pinswg_otherpartiesstatements
)
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t(
"case:summary-no-date-entered-label"
)}
? formatDates(
detailsObj.pinswg_otherpartiesstatements
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
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
<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(
"case:summary-inquiry-evidence-date-label"
)}
@@ -390,79 +322,56 @@ const Pinswg_ldpid = (props) => {
"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")}
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"
)}
/>
<SummaryRow
label={t(
"case:summary-start-event-date-label"
)}
value={_.has(
detailsObj,
"pinswg_startdateofevent"
)
? !_.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>
<SummaryRow
label={t("case:summary-start-event-date-label")}
value={
_.has(detailsObj, "pinswg_startdateofevent")
? !_.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>
</div>
</div>
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_listedbuildingandconservationrid = (props) => {
let { t } = useTranslation();
@@ -20,208 +21,184 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
title={t("case:summary-case-details-label")}
>
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t("case:summary-case-type-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: casesObj[
<SummaryRow
label={t("case:summary-case-type-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<SummaryRow
label={t("case:summary-lpa-label")}
value={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-eia-required-label")}
value={router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
transLookup
)
: detailsObj[
] +
'")].value_cy',
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-eia-required-label")}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-to-be-confirmed-label"
)}
/>
<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[
] +
'")].value_cy',
transLookup
)
: detailsObj[
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-to-be-confirmed-label")
}
/>
<SummaryRow
label={t("case:summary-procedure-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@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[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_typeofevent@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"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-no-date-entered-label")
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
<br />
{/* <Link href="/">
<br />
{/* <Link href="/">
<a>
{casesObj.caseDetails
.outcome_document || ""}
</a>
</Link> */}
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-case-link-status-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, [
"numberofchildincidents",
])
? casesObj.numberofchildincidents >
0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-linked-cases-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView
.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
</dl>
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-case-link-status-label")}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, ["numberofchildincidents"])
? casesObj.numberofchildincidents > 0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-linked-cases-label")}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
</dl>
</SummaryCard>
<SummaryCard
id="key-dates-card"
@@ -229,164 +206,119 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
headingTag="h3"
>
<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")
? !_.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"
)}
<SummaryRow
label={t("case:summary-statement-due-date-label")}
value={
_.has(detailsObj, "pinswg_statementduedate")
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-questionnaire-due-date-label"
)}
value={_.has(
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
detailsObj.pinswg_otherpartiesstatement
)
: t(
"case:summary-no-date-entered-label"
)
: _.has(
detailsObj,
"pinswg_questionnaireduedate"
"pinswg_otherpartiesstatements"
)
? !_.isEmpty(
detailsObj.pinswg_questionnaireduedate
)
? 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(
detailsObj.pinswg_otherpartiesstatements
)
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t(
"case:summary-no-date-entered-label"
)}
? formatDates(
detailsObj.pinswg_otherpartiesstatements
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
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
<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(
"case:summary-inquiry-evidence-date-label"
)}
@@ -407,79 +339,56 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
"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")}
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"
)}
/>
<SummaryRow
label={t(
"case:summary-start-event-date-label"
)}
value={_.has(
detailsObj,
"pinswg_starttimeofevent"
)
? !_.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>
<SummaryRow
label={t("case:summary-start-event-date-label")}
value={
_.has(detailsObj, "pinswg_starttimeofevent")
? !_.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>
</div>
</div>
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_maintenanceoflands217id = (props) => {
let { t } = useTranslation();
@@ -20,208 +21,184 @@ const Pinswg_maintenanceoflands217id = (props) => {
title={t("case:summary-case-details-label")}
>
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t("case:summary-case-type-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: casesObj[
<SummaryRow
label={t("case:summary-case-type-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<SummaryRow
label={t("case:summary-lpa-label")}
value={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-eia-required-label")}
value={router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
transLookup
)
: detailsObj[
] +
'")].value_cy',
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-eia-required-label")}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-to-be-confirmed-label"
)}
/>
<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[
] +
'")].value_cy',
transLookup
)
: detailsObj[
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-to-be-confirmed-label")
}
/>
<SummaryRow
label={t("case:summary-procedure-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@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[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_typeofevent@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"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-no-date-entered-label")
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
<br />
{/* <Link href="/">
<br />
{/* <Link href="/">
<a>
{casesObj.caseDetails
.outcome_document || ""}
</a>
</Link> */}
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-case-link-status-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, [
"numberofchildincidents",
])
? casesObj.numberofchildincidents >
0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-linked-cases-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView
.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
</dl>
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-case-link-status-label")}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, ["numberofchildincidents"])
? casesObj.numberofchildincidents > 0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-linked-cases-label")}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
</dl>
</SummaryCard>
<SummaryCard
id="key-dates-card"
@@ -229,164 +206,119 @@ const Pinswg_maintenanceoflands217id = (props) => {
headingTag="h3"
>
<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")
? !_.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"
)}
<SummaryRow
label={t("case:summary-statement-due-date-label")}
value={
_.has(detailsObj, "pinswg_statementduedate")
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-questionnaire-due-date-label"
)}
value={_.has(
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
detailsObj.pinswg_otherpartiesstatement
)
: t(
"case:summary-no-date-entered-label"
)
: _.has(
detailsObj,
"pinswg_questionnaireduedate"
"pinswg_otherpartiesstatements"
)
? !_.isEmpty(
detailsObj.pinswg_questionnaireduedate
)
? 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(
detailsObj.pinswg_otherpartiesstatements
)
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t(
"case:summary-no-date-entered-label"
)}
? formatDates(
detailsObj.pinswg_otherpartiesstatements
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
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
<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(
"case:summary-inquiry-evidence-date-label"
)}
@@ -407,79 +339,56 @@ const Pinswg_maintenanceoflands217id = (props) => {
"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")}
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"
)}
/>
<SummaryRow
label={t(
"case:summary-start-event-date-label"
)}
value={_.has(
detailsObj,
"pinswg_startdateofevent"
)
? !_.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>
<SummaryRow
label={t("case:summary-start-event-date-label")}
value={
_.has(detailsObj, "pinswg_startdateofevent")
? !_.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>
</div>
</div>
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_miscellaneouscasewordid = (props) => {
let { t } = useTranslation();
@@ -20,236 +21,209 @@ const Pinswg_miscellaneouscasewordid = (props) => {
title={t("case:summary-case-details-label")}
>
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t("case:summary-case-type-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: casesObj[
<SummaryRow
label={t("case:summary-case-type-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<SummaryRow
label={t("case:summary-lpa-label")}
value={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-eia-required-label")}
value={router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
transLookup
)
: detailsObj[
] +
'")].value_cy',
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-eia-required-label")}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-to-be-confirmed-label"
)}
/>
<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[
] +
'")].value_cy',
transLookup
)
: detailsObj[
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-to-be-confirmed-label")
}
/>
<SummaryRow
label={t("case:summary-procedure-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@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[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_typeofevent@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"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-no-date-entered-label")
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
<br />
{/* <Link href="/">
<br />
{/* <Link href="/">
<a>
{casesObj.caseDetails
.outcome_document || ""}
</a>
</Link> */}
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-case-link-status-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, [
"numberofchildincidents",
])
? casesObj.numberofchildincidents >
0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-linked-cases-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView
.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
<SummaryRow
label={t(
"case:summary-case-relevant-authoritylabel"
)}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value_cy',
json: transLookup,
eval: true,
})
: jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value',
json: transLookup,
eval: true,
}) ||
t(
"case:summary-no-date-entered-label"
)}
/>
</dl>
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-case-link-status-label")}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, ["numberofchildincidents"])
? casesObj.numberofchildincidents > 0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-linked-cases-label")}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
<SummaryRow
label={t(
"case:summary-case-relevant-authoritylabel"
)}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value_cy',
json: transLookup,
eval: true
})
: jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value',
json: transLookup,
eval: true
}) ||
t("case:summary-no-date-entered-label")
}
/>
</dl>
</SummaryCard>
<SummaryCard
id="key-dates-card"
@@ -257,164 +231,119 @@ const Pinswg_miscellaneouscasewordid = (props) => {
headingTag="h3"
>
<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")
? !_.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"
)}
<SummaryRow
label={t("case:summary-statement-due-date-label")}
value={
_.has(detailsObj, "pinswg_statementduedate")
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-questionnaire-due-date-label"
)}
value={_.has(
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
detailsObj.pinswg_otherpartiesstatement
)
: t(
"case:summary-no-date-entered-label"
)
: _.has(
detailsObj,
"pinswg_questionnaireduedate"
"pinswg_otherpartiesstatements"
)
? !_.isEmpty(
detailsObj.pinswg_questionnaireduedate
)
? 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(
detailsObj.pinswg_otherpartiesstatements
)
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t(
"case:summary-no-date-entered-label"
)}
? formatDates(
detailsObj.pinswg_otherpartiesstatements
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
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
<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(
"case:summary-inquiry-evidence-date-label"
)}
@@ -435,79 +364,56 @@ const Pinswg_miscellaneouscasewordid = (props) => {
"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")}
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"
)}
/>
<SummaryRow
label={t(
"case:summary-start-event-date-label"
)}
value={_.has(
detailsObj,
"pinswg_startdateofevent"
)
? !_.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>
<SummaryRow
label={t("case:summary-start-event-date-label")}
value={
_.has(detailsObj, "pinswg_startdateofevent")
? !_.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>
</div>
</div>
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_nonvalidationid = (props) => {
let { t } = useTranslation();
@@ -20,136 +21,95 @@ const Pinswg_nonvalidationid = (props) => {
title={t("case:summary-case-details-label")}
>
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t("case:summary-case-type-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: casesObj[
<SummaryRow
label={t("case:summary-case-type-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-date-entered-label"
)
] +
'")].value_cy',
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-lpa-label")}
value={
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[
<SummaryRow
label={t("case:summary-status-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-date-entered-label"
)
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-no-date-entered-label")
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
<br />
{/* <Link href="/">
<br />
{/* <Link href="/">
<a>
{casesObj.caseDetails
.outcome_document || ""}
</a>
</Link> */}
</dd>
</div>
</dl>
</dd>
</div>
</dl>
</SummaryCard>
<SummaryCard
id="key-dates-card"
@@ -157,75 +117,46 @@ const Pinswg_nonvalidationid = (props) => {
headingTag="h3"
>
<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")}
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"
)
}
/>
<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>
<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>
</div>
</div>
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayValue, getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_planningappeals78id = (props) => {
let { t } = useTranslation();
@@ -41,35 +42,23 @@ const Pinswg_planningappeals78id = (props) => {
}
/>
<SummaryRow
label={t("case:summary-lpa-label")}
value={
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"
] || ""
<>
{getCaseLpaDisplayLines({
casesObj,
detailsObj,
locale: router.locale,
transLookup
}).map((name) => (
<div key={name}>{name}</div>
))}
</>
}
/>
<SummaryRow
label={t("case:summary-eia-required-label")}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
@@ -83,16 +72,11 @@ const Pinswg_planningappeals78id = (props) => {
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-to-be-confirmed-label")
}
/>
<SummaryRow
label={t("case:summary-procedure-label")}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -107,16 +91,11 @@ const Pinswg_planningappeals78id = (props) => {
: detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -134,16 +113,11 @@ const Pinswg_planningappeals78id = (props) => {
t(
"case:summary-no-information-to-date-label"
)
}
/>
<SummaryRow
label={t("case:summary-status-label")}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -159,9 +133,7 @@ const Pinswg_planningappeals78id = (props) => {
"statuscode@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-no-date-entered-label")
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
@@ -196,11 +168,8 @@ const Pinswg_planningappeals78id = (props) => {
</dd>
</div>
<SummaryRow
label={t("case:summary-decision-date-label")}
value={
_.has(detailsObj, "pinswg_casedecisiondate")
? !_.isEmpty(
detailsObj.pinswg_casedecisiondate
@@ -212,9 +181,7 @@ const Pinswg_planningappeals78id = (props) => {
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
{casesObj.numberofchildincidents > 0 && (
<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">
<SummaryRow
label={t("case:summary-start-date-label")}
value={
_.has(detailsObj, "pinswg_startdate")
? !_.isEmpty(detailsObj.pinswg_startdate)
? formatDates(
@@ -281,24 +245,15 @@ const Pinswg_planningappeals78id = (props) => {
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
<SummaryRow
label={t("case:summary-questionnaire-due-date-label")}
label={t(
"case:summary-questionnaire-due-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_questionnaireduedate"
)
_.has(detailsObj, "pinswg_questionnaireduedate")
? !_.isEmpty(
detailsObj.pinswg_questionnaireduedate
)
@@ -309,24 +264,14 @@ const Pinswg_planningappeals78id = (props) => {
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
<SummaryRow
label={t(
"case:summary-statement-interested-party-due-date-label"
)}
"case:summary-statement-interested-party-due-date-label"
)}
value={
_.has(detailsObj, "pinswg_statementduedate")
? !_.isEmpty(
detailsObj.pinswg_statementduedate
@@ -338,11 +283,7 @@ const Pinswg_planningappeals78id = (props) => {
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
{/* <SummaryRow
@@ -383,18 +324,9 @@ const Pinswg_planningappeals78id = (props) => {
/> */}
<SummaryRow
label={t("case:summary-final-comments-date-label")}
value={
_.has(
detailsObj,
"pinswg_finalcommentsduedate"
)
_.has(detailsObj, "pinswg_finalcommentsduedate")
? !_.isEmpty(
detailsObj.pinswg_finalcommentsduedate
)
@@ -405,11 +337,7 @@ const Pinswg_planningappeals78id = (props) => {
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
{/* <SummaryRow
label={t(
@@ -457,14 +385,8 @@ const Pinswg_planningappeals78id = (props) => {
/> */}
<SummaryRow
label={t("case:summary-event-date-label")}
value={
_.has(
detailsObj,
"pinswg_startdatetimeiftheevent"
@@ -479,22 +401,15 @@ const Pinswg_planningappeals78id = (props) => {
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
{detailsObj.pinswg_typeofevent == 846040002 ||
detailsObj.pinswg_typeofevent == 846040007 ||
detailsObj.pinswg_typeofevent == 846040012 ||
detailsObj.pinswg_typeofevent == 846040009 ? (
<SummaryRow
label={t("case:summary-start-event-time-label")}
value={
_.has(
detailsObj,
"pinswg_startdatetimeiftheevent"
@@ -512,9 +427,7 @@ const Pinswg_planningappeals78id = (props) => {
: t(
"case:summary-no-date-entered-label"
)
}
/>
) : (
""
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_planningconditionss73s79id = (props) => {
let { t } = useTranslation();
@@ -41,35 +42,23 @@ const Pinswg_planningconditionss73s79id = (props) => {
}
/>
<SummaryRow
label={t("case:summary-lpa-label")}
value={
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"
] || ""
<>
{getCaseLpaDisplayLines({
casesObj,
detailsObj,
locale: router.locale,
transLookup
}).map((name) => (
<div key={name}>{name}</div>
))}
</>
}
/>
<SummaryRow
label={t("case:summary-eia-required-label")}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
@@ -83,16 +72,11 @@ const Pinswg_planningconditionss73s79id = (props) => {
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-to-be-confirmed-label")
}
/>
<SummaryRow
label={t("case:summary-procedure-label")}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -107,16 +91,11 @@ const Pinswg_planningconditionss73s79id = (props) => {
: detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -131,16 +110,11 @@ const Pinswg_planningconditionss73s79id = (props) => {
: detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t("case:summary-status-label")}
value={
router.locale == "cy"
? jsonpath({
path:
@@ -156,9 +130,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
"statuscode@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-no-date-entered-label")
}
/>
<div className="govuk-summary-list__row">
<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">
<SummaryRow
label={t("case:summary-start-date-label")}
value={
_.has(detailsObj, "pinswg_startdate")
? !_.isEmpty(detailsObj.pinswg_startdate)
? formatDates(
@@ -257,24 +226,15 @@ const Pinswg_planningconditionss73s79id = (props) => {
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
<SummaryRow
label={t("case:summary-questionnaire-due-date-label")}
label={t(
"case:summary-questionnaire-due-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_questionnaireduedate"
)
_.has(detailsObj, "pinswg_questionnaireduedate")
? !_.isEmpty(
detailsObj.pinswg_questionnaireduedate
)
@@ -285,22 +245,12 @@ const Pinswg_planningconditionss73s79id = (props) => {
"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(
detailsObj.pinswg_statementduedate
@@ -312,22 +262,14 @@ const Pinswg_planningconditionss73s79id = (props) => {
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
<SummaryRow
label={t("case:summary-interested-party-date-label")}
label={t(
"case:summary-interested-party-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_otherpartiesstatement"
@@ -355,28 +297,15 @@ const Pinswg_planningconditionss73s79id = (props) => {
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
<SummaryRow
label={t(
"case:summary-applicant-final-comments-date-label"
)}
"case:summary-applicant-final-comments-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_finalcommentsduedate"
)
_.has(detailsObj, "pinswg_finalcommentsduedate")
? !_.isEmpty(
detailsObj.pinswg_finalcommentsduedate
)
@@ -387,11 +316,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
{/* <SummaryRow
label={t(
@@ -417,11 +342,8 @@ const Pinswg_planningconditionss73s79id = (props) => {
}
/> */}
<SummaryRow
label={t("case:summary-event-date-label")}
value={
_.has(detailsObj, "pinswg_dateeventrequested")
? !_.isEmpty(
detailsObj.pinswg_dateeventrequested
@@ -433,20 +355,12 @@ const Pinswg_planningconditionss73s79id = (props) => {
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
<SummaryRow
label={t("case:summary-start-event-date-label")}
value={
_.has(detailsObj, "pinswg_startdateofevent")
? !_.isEmpty(
detailsObj.pinswg_startdateofevent
@@ -458,18 +372,11 @@ const Pinswg_planningconditionss73s79id = (props) => {
"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
@@ -481,9 +388,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
</dl>
</SummaryCard>
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_planningobligationappeals106id = (props) => {
let { t } = useTranslation();
@@ -20,208 +21,184 @@ const Pinswg_planningobligationappeals106id = (props) => {
title={t("case:summary-case-details-label")}
>
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t("case:summary-case-type-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: casesObj[
<SummaryRow
label={t("case:summary-case-type-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<SummaryRow
label={t("case:summary-lpa-label")}
value={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-eia-required-label")}
value={router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
transLookup
)
: detailsObj[
] +
'")].value_cy',
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-eia-required-label")}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-to-be-confirmed-label"
)}
/>
<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[
] +
'")].value_cy',
transLookup
)
: detailsObj[
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-to-be-confirmed-label")
}
/>
<SummaryRow
label={t("case:summary-procedure-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@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[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_typeofevent@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"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-no-date-entered-label")
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
<br />
{/* <Link href="/">
<br />
{/* <Link href="/">
<a>
{casesObj.caseDetails
.outcome_document || ""}
</a>
</Link> */}
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-case-link-status-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, [
"numberofchildincidents",
])
? casesObj.numberofchildincidents >
0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-linked-cases-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView
.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
</dl>
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-case-link-status-label")}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, ["numberofchildincidents"])
? casesObj.numberofchildincidents > 0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-linked-cases-label")}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
</dl>
</SummaryCard>
<SummaryCard
id="key-dates-card"
@@ -229,164 +206,119 @@ const Pinswg_planningobligationappeals106id = (props) => {
headingTag="h3"
>
<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")
? !_.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"
)}
<SummaryRow
label={t("case:summary-statement-due-date-label")}
value={
_.has(detailsObj, "pinswg_statementduedate")
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-questionnaire-due-date-label"
)}
value={_.has(
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
detailsObj.pinswg_otherpartiesstatement
)
: t(
"case:summary-no-date-entered-label"
)
: _.has(
detailsObj,
"pinswg_questionnaireduedate"
"pinswg_otherpartiesstatements"
)
? !_.isEmpty(
detailsObj.pinswg_questionnaireduedate
)
? 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(
detailsObj.pinswg_otherpartiesstatements
)
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t(
"case:summary-no-date-entered-label"
)}
? formatDates(
detailsObj.pinswg_otherpartiesstatements
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
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
<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(
"case:summary-inquiry-evidence-date-label"
)}
@@ -407,79 +339,56 @@ const Pinswg_planningobligationappeals106id = (props) => {
"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")}
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"
)}
/>
<SummaryRow
label={t(
"case:summary-start-event-date-label"
)}
value={_.has(
detailsObj,
"pinswg_startdateoftheevent"
)
? !_.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>
<SummaryRow
label={t("case:summary-start-event-date-label")}
value={
_.has(detailsObj, "pinswg_startdateoftheevent")
? !_.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>
</div>
</div>
+365 -466
View File
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_rowid = (props) => {
let { t } = useTranslation();
@@ -20,264 +21,230 @@ const Pinswg_rowid = (props) => {
title={t("case:summary-case-details-label")}
>
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t("case:summary-case-type-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: casesObj[
<SummaryRow
label={t("case:summary-case-type-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-date-entered-label"
)}
] +
'")].value_cy',
json: transLookup,
eval: true
})
: casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={"Specialist Case Process"}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
<SummaryRow
label={"Specialist Case Process"}
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"
] || ""
}
/>
/>
<SummaryRow
label={t("case:summary-lpa-label")}
value={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-eia-required-label")}
value={router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
transLookup
)
: detailsObj[
<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-eia-required-label")}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-to-be-confirmed-label"
)}
/>
<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[
] +
'")].value_cy',
transLookup
)
: detailsObj[
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-to-be-confirmed-label")
}
/>
<SummaryRow
label={t("case:summary-procedure-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@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[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_typeofevent@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"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-no-date-entered-label")
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
<br />
{/* <Link href="/">
<br />
{/* <Link href="/">
<a>
{casesObj.caseDetails
.outcome_document || ""}
</a>
</Link> */}
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-case-link-status-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, [
"numberofchildincidents",
])
? casesObj.numberofchildincidents >
0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-linked-cases-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView
.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
<SummaryRow
label={t(
"case:summary-case-relevant-authoritylabel"
)}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value_cy',
json: transLookup,
eval: true,
})
: jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value',
json: transLookup,
eval: true,
}) ||
t(
"case:summary-no-date-entered-label"
)}
/>
</dl>
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-case-link-status-label")}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, ["numberofchildincidents"])
? casesObj.numberofchildincidents > 0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-linked-cases-label")}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
<SummaryRow
label={t(
"case:summary-case-relevant-authoritylabel"
)}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value_cy',
json: transLookup,
eval: true
})
: jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value',
json: transLookup,
eval: true
}) ||
t("case:summary-no-date-entered-label")
}
/>
</dl>
</SummaryCard>
<SummaryCard
id="key-dates-card"
@@ -285,164 +252,119 @@ const Pinswg_rowid = (props) => {
headingTag="h3"
>
<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")
? !_.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"
)}
<SummaryRow
label={t("case:summary-statement-due-date-label")}
value={
_.has(detailsObj, "pinswg_statementduedate")
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-questionnaire-due-date-label"
)}
value={_.has(
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
detailsObj.pinswg_otherpartiesstatement
)
: t(
"case:summary-no-date-entered-label"
)
: _.has(
detailsObj,
"pinswg_questionnaireduedate"
"pinswg_otherpartiesstatements"
)
? !_.isEmpty(
detailsObj.pinswg_questionnaireduedate
)
? 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(
detailsObj.pinswg_otherpartiesstatements
)
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t(
"case:summary-no-date-entered-label"
)}
? formatDates(
detailsObj.pinswg_otherpartiesstatements
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
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
<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(
"case:summary-inquiry-evidence-date-label"
)}
@@ -463,79 +385,56 @@ const Pinswg_rowid = (props) => {
"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")}
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"
)}
/>
<SummaryRow
label={t(
"case:summary-start-event-date-label"
)}
value={_.has(
detailsObj,
"pinswg_startdateoftheevent"
)
? !_.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>
<SummaryRow
label={t("case:summary-start-event-date-label")}
value={
_.has(detailsObj, "pinswg_startdateoftheevent")
? !_.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>
</div>
</div>
+51 -139
View File
@@ -5,6 +5,7 @@ import useTranslation from "next-translate/useTranslation";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
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">
<SummaryRow
label={t("case:summary-case-type-label")}
label={t(
"case:summary-case-type-label"
)}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
@@ -106,9 +106,7 @@ const Pinswg_sipscase = (props) => {
t(
"case:summary-no-date-entered-label"
)
}
/>
{hasValidKey(
@@ -116,11 +114,8 @@ const Pinswg_sipscase = (props) => {
"_pinswg_projecttype_value"
) && (
<SummaryRow
label={"Project Type"}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
@@ -136,21 +131,16 @@ const Pinswg_sipscase = (props) => {
t(
"case:summary-no-date-entered-label"
)
}
/>
)}
{detailsObj.pinswg_webaddress != null && (
<SummaryRow
label={t(
"case:summary-case-website-label"
)}
"case:summary-case-website-label"
)}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
@@ -179,9 +169,7 @@ const Pinswg_sipscase = (props) => {
t(
"case:summary-no-date-entered-label"
)
}
/>
)}
{/* <div className="govuk-summary-list__row">
@@ -190,32 +178,26 @@ const Pinswg_sipscase = (props) => {
</dt>
<dd className="govuk-summary-list__value"></dd>
</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
label={t("case:summary-procedure-label")}
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-procedure-label"
)}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
@@ -231,16 +213,11 @@ const Pinswg_sipscase = (props) => {
t(
"case:summary-to-be-confirmed-label"
)
}
/>
<SummaryRow
label={"ES Submitted"}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
@@ -256,16 +233,13 @@ const Pinswg_sipscase = (props) => {
t(
"case:summary-to-be-confirmed-label"
)
}
/>
<SummaryRow
label={"Deemed Marine License Applied for"}
label={
"Deemed Marine License Applied for"
}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
@@ -281,9 +255,7 @@ const Pinswg_sipscase = (props) => {
t(
"case:summary-to-be-confirmed-label"
)
}
/>
{/* <SummaryRow
@@ -422,13 +394,10 @@ const Pinswg_sipscase = (props) => {
</dd>
</div>
<SummaryRow
label={t(
"case:summary-decision-date-label"
)}
"case:summary-decision-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_dateofdecision"
@@ -445,9 +414,7 @@ const Pinswg_sipscase = (props) => {
: t(
"case:summary-no-information-to-date-label"
)
}
/>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
@@ -525,13 +492,10 @@ const Pinswg_sipscase = (props) => {
</h4>
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t(
"case:summary-valid-notice-of-intention-to-submit-an-application"
)}
"case:summary-valid-notice-of-intention-to-submit-an-application"
)}
value={
_.has(
detailsObj,
"pinswg_validnoticeofintentiontosubmit"
@@ -548,18 +512,13 @@ const Pinswg_sipscase = (props) => {
: t(
"case:summary-awaiting-information-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-written-acceptance-of-notice"
)}
"case:summary-written-acceptance-of-notice"
)}
value={
_.has(
detailsObj,
"pinswg_writtenacceptanceofnotification"
@@ -576,18 +535,13 @@ const Pinswg_sipscase = (props) => {
: t(
"case:summary-awaiting-information-label"
)
}
/>
<SummaryRow
label={t(
"case:summary-deadline-for-submission-of-application"
)}
"case:summary-deadline-for-submission-of-application"
)}
value={
_.has(
detailsObj,
"pinswg_deadlineforsubmissionofapplication"
@@ -604,9 +558,7 @@ const Pinswg_sipscase = (props) => {
: t(
"case:summary-awaiting-information-label"
)
}
/>
</dl>
</div>
@@ -635,13 +587,10 @@ const Pinswg_sipscase = (props) => {
"pinswg_validationdeadlineextension"
) && (
<SummaryRow
label={t(
"case:summary-validation-deadline-extension"
)}
"case:summary-validation-deadline-extension"
)}
value={
_.has(
detailsObj,
"pinswg_validationdeadlineextension"
@@ -658,9 +607,7 @@ const Pinswg_sipscase = (props) => {
: t(
"case:summary-awaiting-information-label"
)
}
/>
)}
{hasValidKey(
@@ -668,13 +615,10 @@ const Pinswg_sipscase = (props) => {
"pinswg_casesuspensionstartdate"
) && (
<SummaryRow
label={t(
"case:summary-case-suspension-start-date"
)}
"case:summary-case-suspension-start-date"
)}
value={
_.has(
detailsObj,
"pinswg_casesuspensionstartdate"
@@ -691,9 +635,7 @@ const Pinswg_sipscase = (props) => {
: t(
"case:summary-awaiting-information-label"
)
}
/>
)}
{hasValidKey(
@@ -701,13 +643,10 @@ const Pinswg_sipscase = (props) => {
"pinswg_casesuspensionenddate"
) && (
<SummaryRow
label={t(
"case:summary-case-suspension-end-date"
)}
"case:summary-case-suspension-end-date"
)}
value={
_.has(
detailsObj,
"pinswg_casesuspensionenddate"
@@ -724,9 +663,7 @@ const Pinswg_sipscase = (props) => {
: t(
"case:summary-awaiting-information-label"
)
}
/>
)}
</dl>
@@ -757,13 +694,10 @@ const Pinswg_sipscase = (props) => {
"pinswg_reportissuedtowelshministers"
) && (
<SummaryRow
label={t(
"case:summary-report-issued-to-welsh-ministers"
)}
"case:summary-report-issued-to-welsh-ministers"
)}
value={
_.has(
detailsObj,
"pinswg_reportissuedtowelshministers"
@@ -780,9 +714,7 @@ const Pinswg_sipscase = (props) => {
: t(
"case:summary-awaiting-information-label"
)
}
/>
)}
{hasValidKey(
@@ -790,13 +722,10 @@ const Pinswg_sipscase = (props) => {
"pinswg_decisionissuedtoapplicant"
) && (
<SummaryRow
label={t(
"case:summary-decision-issued-to-applicant"
)}
"case:summary-decision-issued-to-applicant"
)}
value={
_.has(
detailsObj,
"pinswg_decisionissuedtoapplicant"
@@ -813,9 +742,7 @@ const Pinswg_sipscase = (props) => {
: t(
"case:summary-awaiting-information-label"
)
}
/>
)}
{hasValidKey(
@@ -823,13 +750,10 @@ const Pinswg_sipscase = (props) => {
"pinswg_decisionoutcome"
) && (
<SummaryRow
label={t(
"case:summary-decision-outcome"
)}
"case:summary-decision-outcome"
)}
value={
_.has(
detailsObj,
"pinswg_decisionoutcome"
@@ -846,9 +770,7 @@ const Pinswg_sipscase = (props) => {
: t(
"case:summary-awaiting-information-label"
)
}
/>
)}
</dl>
@@ -872,13 +794,10 @@ const Pinswg_sipscase = (props) => {
"pinswg_redetermination"
) && (
<SummaryRow
label={t(
"case:summary-post-decision-redetermination-label"
)}
"case:summary-post-decision-redetermination-label"
)}
value={
_.has(
detailsObj,
"pinswg_redetermination@OData.Community.Display.V1.FormattedValue"
@@ -897,9 +816,7 @@ const Pinswg_sipscase = (props) => {
: t(
"case:summary-awaiting-information-label"
)
}
/>
)}
{hasValidKey(
@@ -907,13 +824,10 @@ const Pinswg_sipscase = (props) => {
"pinswg_redeterminationconsultationdeadline"
) && (
<SummaryRow
label={t(
"case:summary-post-decision-redetermination-deadline-label"
)}
"case:summary-post-decision-redetermination-deadline-label"
)}
value={
_.has(
detailsObj,
"pinswg_redeterminationconsultationdeadline"
@@ -930,9 +844,7 @@ const Pinswg_sipscase = (props) => {
: t(
"case:summary-awaiting-information-label"
)
}
/>
)}
</dl>
+347 -441
View File
@@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import transLookup from "../../../data/lookuptranslations.json";
import SummaryCard from "../summary/components/SummaryCard";
import SummaryRow from "../summary/components/SummaryRow";
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
const Pinswg_wayleaveid = (props) => {
let { t } = useTranslation();
@@ -20,236 +21,209 @@ const Pinswg_wayleaveid = (props) => {
title={t("case:summary-case-details-label")}
>
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={t("case:summary-case-type-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: casesObj[
<SummaryRow
label={t("case:summary-case-type-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
casesObj[
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<SummaryRow
label={t("case:summary-lpa-label")}
value={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-eia-required-label")}
value={router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
transLookup
)
: detailsObj[
] +
'")].value_cy',
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-eia-required-label")}
value={
router.locale == "cy"
? jsonpath(
'$..[?(@.value=="' +
detailsObj[
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-to-be-confirmed-label"
)}
/>
<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[
] +
'")].value_cy',
transLookup
)
: detailsObj[
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-to-be-confirmed-label")
}
/>
<SummaryRow
label={t("case:summary-procedure-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
] || ""
}
/>
<SummaryRow
label={t("case:summary-type-of-event-label")}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_typeofevent@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[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_typeofevent@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"
] ||
t(
"case:summary-no-date-entered-label"
)}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] +
'")].value_cy',
json: transLookup,
eval: true,
})
: detailsObj[
] +
'")].value_cy',
json: transLookup,
eval: true
})
: casesObj[
"statuscode@OData.Community.Display.V1.FormattedValue"
] ||
t("case:summary-no-date-entered-label")
}
/>
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-decision-label")}
</dt>
<dd className="govuk-summary-list__value">
{router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.value=="' +
detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
] +
'")].value_cy',
json: transLookup,
eval: true
})
: detailsObj[
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
] ||
t(
"case:summary-no-information-to-date-label"
)}
<br />
{/* <Link href="/">
<br />
{/* <Link href="/">
<a>
{casesObj.caseDetails
.outcome_document || ""}
</a>
</Link> */}
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-case-link-status-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, [
"numberofchildincidents",
])
? casesObj.numberofchildincidents >
0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t(
"case:summary-linked-cases-label"
)}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView
.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
<SummaryRow
label={t(
"case:summary-case-relevant-authoritylabel"
)}
value={router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value_cy',
json: transLookup,
eval: true,
})
: jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value',
json: transLookup,
eval: true,
}) ||
t(
"case:summary-no-date-entered-label"
)}
/>
</dl>
</dd>
</div>
{casesObj.numberofchildincidents > 0 && (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-case-link-status-label")}
</dt>
<dd className="govuk-summary-list__value">
{_.has(casesObj, ["numberofchildincidents"])
? casesObj.numberofchildincidents > 0
? 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>
)}
{casesObj.numberofchildincidents > 0 ? (
<div className="govuk-summary-list__row">
<dt className="govuk-summary-list__key">
{t("case:summary-linked-cases-label")}
</dt>
<dd className="govuk-summary-list__value">
{linkedCasesList(
props.currentView.linkedCaseReferences
)}
</dd>
</div>
) : (
""
)}
<SummaryRow
label={t(
"case:summary-case-relevant-authoritylabel"
)}
value={
router.locale == "cy"
? jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value_cy',
json: transLookup,
eval: true
})
: jsonpath({
path:
'$..[?(@ && @.pinswg_lpa=="' +
detailsObj.pinswg_relevantauthorityname +
'")].value',
json: transLookup,
eval: true
}) ||
t("case:summary-no-date-entered-label")
}
/>
</dl>
</SummaryCard>
<SummaryCard
id="key-dates-card"
@@ -257,164 +231,119 @@ const Pinswg_wayleaveid = (props) => {
headingTag="h3"
>
<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")
? !_.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"
)}
<SummaryRow
label={t("case:summary-statement-due-date-label")}
value={
_.has(detailsObj, "pinswg_statementduedate")
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-questionnaire-due-date-label"
)}
value={_.has(
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={
_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
detailsObj.pinswg_otherpartiesstatement
)
: t(
"case:summary-no-date-entered-label"
)
: _.has(
detailsObj,
"pinswg_questionnaireduedate"
"pinswg_otherpartiesstatements"
)
? !_.isEmpty(
detailsObj.pinswg_questionnaireduedate
)
? 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(
detailsObj.pinswg_otherpartiesstatements
)
? !_.isEmpty(
detailsObj.pinswg_statementduedate
)
? formatDates(
detailsObj.pinswg_statementduedate
)
: t(
"case:summary-no-date-entered-label"
)
: t(
"case:summary-no-date-entered-label"
)}
? formatDates(
detailsObj.pinswg_otherpartiesstatements
)
: t(
"case:summary-no-date-entered-label"
)
: t("case:summary-no-date-entered-label")
}
/>
/>
<SummaryRow
label={t(
"case:summary-interested-party-date-label"
)}
value={_.has(
detailsObj,
"pinswg_otherpartiesstatement"
)
? !_.isEmpty(
detailsObj.pinswg_otherpartiesstatement
)
? formatDates(
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
<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(
"case:summary-inquiry-evidence-date-label"
)}
@@ -435,79 +364,56 @@ const Pinswg_wayleaveid = (props) => {
"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")}
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"
)}
/>
<SummaryRow
label={t(
"case:summary-start-event-date-label"
)}
value={_.has(
detailsObj,
"pinswg_startdateofevent"
)
? !_.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>
<SummaryRow
label={t("case:summary-start-event-date-label")}
value={
_.has(detailsObj, "pinswg_startdateofevent")
? !_.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>
</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 });
};
+40 -35
View File
@@ -32,8 +32,8 @@
import { azureHeaders } from "../../../actions/core/headers";
import { getSelectQuery } from "../../../actions/selectQueryTypes";
import { getNavigationPropertyByPrimaryAttribute } from "../../../components/utils";
import { respondError } from "../middleware/apiResponse";
import { relayGet } from "../middleware/relayForwarding";
import { respondError, respondSuccess } from "../middleware/apiResponse";
import { relayGetData } from "../middleware/relayForwarding";
export default async function ApiProxy(req, res) {
const appealTypeName = req.query.appealTypeName;
@@ -88,45 +88,50 @@ export default async function ApiProxy(req, res) {
navigationProperty +
"($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);
// console.log(
// "\n==========================================\n",
// "\nSearch Details query ",
// "\nAppealType: " + appealTypeName,
// "\nIncident ID: " + incidentID,
// "\n\nQuery url: " + queryUrl,
// "\n==========================================\n"
// );
const incidentQueryUrl =
"incidents(" +
incidentID +
")?$select=title,ticketnumber" +
"&$expand=pinswg_Incident_Account_AdditionalLPAs($select=name,accountnumber)" +
"&$count=true";
return relayGet({
queryUrl,
res,
requestOptionsBuilder: (accessToken) => azureHeaders(accessToken),
transformData: (data) => {
let flattened = data.value.map((r) => ({
...r,
ticketnumber: r[navigationProperty]?.ticketnumber || null
}));
try {
const [searchResult, incidentResult] = await Promise.all([
relayGetData({
queryUrl,
requestOptionsBuilder: (accessToken) =>
azureHeaders(accessToken)
}),
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;
},
errorResponse: {
data.value = (data.value || []).map((r) => ({
...r,
ticketnumber:
r[navigationProperty]?.ticketnumber ||
incidentData?.ticketnumber ||
null,
incidenttitle: incidentData?.title || null,
additionalLPAs
}));
return respondSuccess(res, data);
} catch (error) {
return respondError(res, {
status: 400,
code: "BASIC_SEARCH_DETAILS_FETCH_FAILED",
message: "Failed to fetch basic search details"
}
});
});
}
}
@@ -30,11 +30,11 @@
*/
import _ from "lodash";
import { azureHeadersPaged } from "../../../actions/core/headers";
import { azureHeaders, azureHeadersPaged } from "../../../actions/core/headers";
import { getSelectQuery } from "../../../actions/selectQueryTypes";
import { getNavigationPropertyByPrimaryAttribute } from "../../../components/utils";
import { respondError } from "../middleware/apiResponse";
import { relayGet } from "../middleware/relayForwarding";
import { respondError, respondSuccess } from "../middleware/apiResponse";
import { relayGetData } from "../middleware/relayForwarding";
export default async function ApiProxy(req, res) {
const appealTypeName = req.query.appealTypeName;
@@ -76,13 +76,6 @@ export default async function ApiProxy(req, res) {
primaryIdAttribute
).NavigationProperty;
// "?$filter=_" +
// (primaryIdAttribute == "pinswg_sipscase"
// ? "pinswg_sipscase_value"
// : primaryIdAttribute + "s_value ") +
// " eq " +
// incidentID +
let queryUrl =
appealTypeName +
"?$filter=" +
@@ -92,8 +85,6 @@ export default async function ApiProxy(req, res) {
navigationProperty +
"($select=ticketnumber)";
//" and statuscode eq 1&$count=true";
queryUrl =
queryUrl +
getSelectQuery(appealTypeName) +
@@ -102,29 +93,53 @@ export default async function ApiProxy(req, res) {
? "pinswg_sipscase_value"
: primaryIdAttribute + "s_value");
return relayGet({
queryUrl,
res,
requestOptionsBuilder: (accessToken) => azureHeadersPaged(accessToken),
transformData: (data) => {
let flattened = data.value.map((r) => ({
...r,
ticketnumber: r[navigationProperty]?.ticketnumber || null
}));
const incidentQueryUrl =
"incidents(" +
req.query.incidentID +
")?$select=title,ticketnumber" +
"&$expand=pinswg_Incident_Account_AdditionalLPAs($select=name,accountnumber)" +
"&$count=true";
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 dataStr = JSON.stringify(data["@odata.nextLink"]);
data["@odata.nextLink"] = dataStr.split("/v8.2/")[1];
}
const data = searchResult.data;
const incidentData = incidentResult.data;
const additionalLPAs =
incidentData?.pinswg_Incident_Account_AdditionalLPAs || [];
return data;
},
errorResponse: {
data.value = (data.value || []).map((r) => ({
...r,
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,
code: "BASIC_SEARCH_DETAILS_PAGED_FETCH_FAILED",
message: "Failed to fetch paged basic search details"
}
});
});
}
}