@@ -5,11 +5,13 @@ import { formatNhsNumber, formatDate } from "@/app/lib/utils";
55interface ExceptionsTableProps {
66 readonly exceptions : readonly ExceptionDetails [ ] ;
77 readonly caption ?: string ;
8+ readonly showServiceNowColumn ?: boolean ;
89}
910
1011export 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"
0 commit comments