Merged PR 2274: case deadline and watch stream on results

case deadline and wat

Related work items: #22423, #22783
This commit is contained in:
Robert Bond
2026-04-27 13:07:46 +00:00
parent 138f03912b
commit b2945790b1
13 changed files with 172 additions and 11 deletions
@@ -29,6 +29,17 @@ const Pinswg_sipscase = (props) => {
);
}
const extensions =
detailsObj.pinswg_CaseDeadlineExtension_pinswg_sips || [];
const latest = extensions.sort(
(a, b) =>
new Date(b.pinswg_datedeadlineextended) -
new Date(a.pinswg_datedeadlineextended)
)[0];
console.log(latest);
return (
<>
{detailsObj.pinswg_projectdescription != null ? (
@@ -485,7 +496,48 @@ const Pinswg_sipscase = (props) => {
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
{t("case:summary-dates-label")}
</h3>
<h4 className="govuk-heading-s ">
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
<SummaryRow
label={"Case deadline"}
value={(() => {
const fallback = t(
"case:summary-awaiting-information-label"
);
const extensions =
detailsObj.pinswg_CaseDeadlineExtension_pinswg_sips ||
[];
const latestExtension =
extensions
.filter(
(extension) =>
!_.isEmpty(
extension.pinswg_datedeadlineextended
)
)
.sort(
(a, b) =>
new Date(
b.pinswg_datedeadlineextended
) -
new Date(
a.pinswg_datedeadlineextended
)
)[0];
const dateToDisplay =
latestExtension
? latestExtension.pinswg_datedeadlineextended
: detailsObj.pinswg_casedeadline;
return !_.isEmpty(dateToDisplay)
? formatDates(dateToDisplay)
: fallback;
})()}
/>
</dl>
<h4 className="govuk-heading-s">
{t(
"case:summary-pre-submission-sub-title"
)}