Skip to content

Commit 377bcf6

Browse files
feat: display serviceNowCaseId conditionally for raised exceptions (#1778)
* feat: display serviceNowCaseId conditionally for raised exceptions * feat: Title change
1 parent 525f476 commit 377bcf6

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

application/CohortManager/src/Web/app/components/exceptionsTable.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ import { formatNhsNumber, formatDate } from "@/app/lib/utils";
55
interface ExceptionsTableProps {
66
readonly exceptions: readonly ExceptionDetails[];
77
readonly caption?: string;
8+
readonly showServiceNowColumn?: boolean;
89
}
910

1011
export default function ExceptionsTable({
1112
exceptions,
1213
caption,
14+
showServiceNowColumn = false,
1315
}: Readonly<ExceptionsTableProps>) {
1416
return (
1517
<table
@@ -23,7 +25,7 @@ export default function ExceptionsTable({
2325
<thead className="nhsuk-table__head">
2426
<tr role="row">
2527
<th role="columnheader" scope="col">
26-
Local reference <br /> Exception ID
28+
Local reference <br /> (exception ID)
2729
</th>
2830
<th role="columnheader" scope="col">
2931
NHS number
@@ -35,6 +37,11 @@ export default function ExceptionsTable({
3537
<th role="columnheader" scope="col">
3638
Short description
3739
</th>
40+
{showServiceNowColumn && (
41+
<th role="columnheader" scope="col">
42+
ServiceNow Case ID
43+
</th>
44+
)}
3845
<th role="columnheader" scope="col">
3946
Exception status
4047
</th>
@@ -86,6 +93,17 @@ export default function ExceptionsTable({
8693
</span>
8794
{exception.shortDescription}
8895
</td>
96+
{showServiceNowColumn && (
97+
<td className="nhsuk-table__cell">
98+
<span
99+
className="nhsuk-table-responsive__heading"
100+
aria-hidden="true"
101+
>
102+
SNow case ID
103+
</span>
104+
{exception.serviceNowId}
105+
</td>
106+
)}
89107
<td className="nhsuk-table__cell">
90108
<span
91109
className="nhsuk-table-responsive__heading"

application/CohortManager/src/Web/app/exceptions/[filter]/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ export default async function Page({
132132
<ExceptionsTable
133133
exceptions={exceptionDetails}
134134
caption="Breast screening exceptions which have been created today"
135+
showServiceNowColumn={true}
135136
/>
136137
</div>
137138
</div>

0 commit comments

Comments
 (0)