Skip to content

Commit ce7d57d

Browse files
authored
CCM-11172: Add template ids to templates table (#724)
1 parent 91f1966 commit ce7d57d

File tree

3 files changed

+225
-0
lines changed

3 files changed

+225
-0
lines changed

frontend/src/__tests__/components/molecules/__snapshots__/MessageTemplates.test.tsx.snap

Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ exports[`MessageTemplates component matches snapshot with not submitted status 1
3232
>
3333
Name
3434
</th>
35+
<th
36+
class="nhsuk-table__header"
37+
data-testid="manage-template-table-header-template-id"
38+
scope="col"
39+
>
40+
ID
41+
</th>
3542
<th
3643
class="nhsuk-table__header"
3744
data-testid="manage-template-table-header-template-type"
@@ -84,6 +91,18 @@ exports[`MessageTemplates component matches snapshot with not submitted status 1
8491
Template 1
8592
</a>
8693
</td>
94+
<td
95+
class="nhsuk-table__cell"
96+
role="cell"
97+
>
98+
<span
99+
aria-hidden="true"
100+
class="nhsuk-table-responsive__heading"
101+
>
102+
ID
103+
</span>
104+
1
105+
</td>
87106
<td
88107
class="nhsuk-table__cell"
89108
role="cell"
@@ -184,6 +203,18 @@ exports[`MessageTemplates component matches snapshot with not submitted status 1
184203
Template 2
185204
</a>
186205
</td>
206+
<td
207+
class="nhsuk-table__cell"
208+
role="cell"
209+
>
210+
<span
211+
aria-hidden="true"
212+
class="nhsuk-table-responsive__heading"
213+
>
214+
ID
215+
</span>
216+
2
217+
</td>
187218
<td
188219
class="nhsuk-table__cell"
189220
role="cell"
@@ -273,6 +304,18 @@ exports[`MessageTemplates component matches snapshot with not submitted status 1
273304
Template 3
274305
</a>
275306
</td>
307+
<td
308+
class="nhsuk-table__cell"
309+
role="cell"
310+
>
311+
<span
312+
aria-hidden="true"
313+
class="nhsuk-table-responsive__heading"
314+
>
315+
ID
316+
</span>
317+
3
318+
</td>
276319
<td
277320
class="nhsuk-table__cell"
278321
role="cell"
@@ -349,6 +392,18 @@ exports[`MessageTemplates component matches snapshot with not submitted status 1
349392
Template 4
350393
</a>
351394
</td>
395+
<td
396+
class="nhsuk-table__cell"
397+
role="cell"
398+
>
399+
<span
400+
aria-hidden="true"
401+
class="nhsuk-table-responsive__heading"
402+
>
403+
ID
404+
</span>
405+
4
406+
</td>
352407
<td
353408
class="nhsuk-table__cell"
354409
role="cell"
@@ -457,6 +512,13 @@ exports[`MessageTemplates component matches snapshot with pending proof request
457512
>
458513
Name
459514
</th>
515+
<th
516+
class="nhsuk-table__header"
517+
data-testid="manage-template-table-header-template-id"
518+
scope="col"
519+
>
520+
ID
521+
</th>
460522
<th
461523
class="nhsuk-table__header"
462524
data-testid="manage-template-table-header-template-type"
@@ -509,6 +571,18 @@ exports[`MessageTemplates component matches snapshot with pending proof request
509571
Template 1
510572
</a>
511573
</td>
574+
<td
575+
class="nhsuk-table__cell"
576+
role="cell"
577+
>
578+
<span
579+
aria-hidden="true"
580+
class="nhsuk-table-responsive__heading"
581+
>
582+
ID
583+
</span>
584+
1
585+
</td>
512586
<td
513587
class="nhsuk-table__cell"
514588
role="cell"
@@ -609,6 +683,18 @@ exports[`MessageTemplates component matches snapshot with pending proof request
609683
Template 2
610684
</a>
611685
</td>
686+
<td
687+
class="nhsuk-table__cell"
688+
role="cell"
689+
>
690+
<span
691+
aria-hidden="true"
692+
class="nhsuk-table-responsive__heading"
693+
>
694+
ID
695+
</span>
696+
2
697+
</td>
612698
<td
613699
class="nhsuk-table__cell"
614700
role="cell"
@@ -698,6 +784,18 @@ exports[`MessageTemplates component matches snapshot with pending proof request
698784
Template 3
699785
</a>
700786
</td>
787+
<td
788+
class="nhsuk-table__cell"
789+
role="cell"
790+
>
791+
<span
792+
aria-hidden="true"
793+
class="nhsuk-table-responsive__heading"
794+
>
795+
ID
796+
</span>
797+
3
798+
</td>
701799
<td
702800
class="nhsuk-table__cell"
703801
role="cell"
@@ -774,6 +872,18 @@ exports[`MessageTemplates component matches snapshot with pending proof request
774872
Template 4
775873
</a>
776874
</td>
875+
<td
876+
class="nhsuk-table__cell"
877+
role="cell"
878+
>
879+
<span
880+
aria-hidden="true"
881+
class="nhsuk-table-responsive__heading"
882+
>
883+
ID
884+
</span>
885+
4
886+
</td>
777887
<td
778888
class="nhsuk-table__cell"
779889
role="cell"
@@ -882,6 +992,13 @@ exports[`MessageTemplates component matches snapshot with submitted status 1`] =
882992
>
883993
Name
884994
</th>
995+
<th
996+
class="nhsuk-table__header"
997+
data-testid="manage-template-table-header-template-id"
998+
scope="col"
999+
>
1000+
ID
1001+
</th>
8851002
<th
8861003
class="nhsuk-table__header"
8871004
data-testid="manage-template-table-header-template-type"
@@ -934,6 +1051,18 @@ exports[`MessageTemplates component matches snapshot with submitted status 1`] =
9341051
Template 1
9351052
</a>
9361053
</td>
1054+
<td
1055+
class="nhsuk-table__cell"
1056+
role="cell"
1057+
>
1058+
<span
1059+
aria-hidden="true"
1060+
class="nhsuk-table-responsive__heading"
1061+
>
1062+
ID
1063+
</span>
1064+
1
1065+
</td>
9371066
<td
9381067
class="nhsuk-table__cell"
9391068
role="cell"
@@ -1023,6 +1152,18 @@ exports[`MessageTemplates component matches snapshot with submitted status 1`] =
10231152
Template 2
10241153
</a>
10251154
</td>
1155+
<td
1156+
class="nhsuk-table__cell"
1157+
role="cell"
1158+
>
1159+
<span
1160+
aria-hidden="true"
1161+
class="nhsuk-table-responsive__heading"
1162+
>
1163+
ID
1164+
</span>
1165+
2
1166+
</td>
10261167
<td
10271168
class="nhsuk-table__cell"
10281169
role="cell"
@@ -1112,6 +1253,18 @@ exports[`MessageTemplates component matches snapshot with submitted status 1`] =
11121253
Template 3
11131254
</a>
11141255
</td>
1256+
<td
1257+
class="nhsuk-table__cell"
1258+
role="cell"
1259+
>
1260+
<span
1261+
aria-hidden="true"
1262+
class="nhsuk-table-responsive__heading"
1263+
>
1264+
ID
1265+
</span>
1266+
3
1267+
</td>
11151268
<td
11161269
class="nhsuk-table__cell"
11171270
role="cell"
@@ -1188,6 +1341,18 @@ exports[`MessageTemplates component matches snapshot with submitted status 1`] =
11881341
Template 4
11891342
</a>
11901343
</td>
1344+
<td
1345+
class="nhsuk-table__cell"
1346+
role="cell"
1347+
>
1348+
<span
1349+
aria-hidden="true"
1350+
class="nhsuk-table-responsive__heading"
1351+
>
1352+
ID
1353+
</span>
1354+
4
1355+
</td>
11911356
<td
11921357
class="nhsuk-table__cell"
11931358
role="cell"
@@ -1296,6 +1461,13 @@ exports[`MessageTemplates component matches snapshot with waiting for proof stat
12961461
>
12971462
Name
12981463
</th>
1464+
<th
1465+
class="nhsuk-table__header"
1466+
data-testid="manage-template-table-header-template-id"
1467+
scope="col"
1468+
>
1469+
ID
1470+
</th>
12991471
<th
13001472
class="nhsuk-table__header"
13011473
data-testid="manage-template-table-header-template-type"
@@ -1348,6 +1520,18 @@ exports[`MessageTemplates component matches snapshot with waiting for proof stat
13481520
Template 1
13491521
</a>
13501522
</td>
1523+
<td
1524+
class="nhsuk-table__cell"
1525+
role="cell"
1526+
>
1527+
<span
1528+
aria-hidden="true"
1529+
class="nhsuk-table-responsive__heading"
1530+
>
1531+
ID
1532+
</span>
1533+
1
1534+
</td>
13511535
<td
13521536
class="nhsuk-table__cell"
13531537
role="cell"
@@ -1424,6 +1608,18 @@ exports[`MessageTemplates component matches snapshot with waiting for proof stat
14241608
Template 2
14251609
</a>
14261610
</td>
1611+
<td
1612+
class="nhsuk-table__cell"
1613+
role="cell"
1614+
>
1615+
<span
1616+
aria-hidden="true"
1617+
class="nhsuk-table-responsive__heading"
1618+
>
1619+
ID
1620+
</span>
1621+
2
1622+
</td>
14271623
<td
14281624
class="nhsuk-table__cell"
14291625
role="cell"
@@ -1513,6 +1709,18 @@ exports[`MessageTemplates component matches snapshot with waiting for proof stat
15131709
Template 3
15141710
</a>
15151711
</td>
1712+
<td
1713+
class="nhsuk-table__cell"
1714+
role="cell"
1715+
>
1716+
<span
1717+
aria-hidden="true"
1718+
class="nhsuk-table-responsive__heading"
1719+
>
1720+
ID
1721+
</span>
1722+
3
1723+
</td>
15161724
<td
15171725
class="nhsuk-table__cell"
15181726
role="cell"
@@ -1589,6 +1797,18 @@ exports[`MessageTemplates component matches snapshot with waiting for proof stat
15891797
Template 4
15901798
</a>
15911799
</td>
1800+
<td
1801+
class="nhsuk-table__cell"
1802+
role="cell"
1803+
>
1804+
<span
1805+
aria-hidden="true"
1806+
class="nhsuk-table-responsive__heading"
1807+
>
1808+
ID
1809+
</span>
1810+
4
1811+
</td>
15921812
<td
15931813
class="nhsuk-table__cell"
15941814
role="cell"

frontend/src/components/molecules/MessageTemplates/MessageTemplates.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ export function MessageTemplates({
5757
<Table.Cell data-testid='manage-template-table-header-template-name'>
5858
{messageTemplatesContent.tableHeadings.name}
5959
</Table.Cell>
60+
<Table.Cell data-testid='manage-template-table-header-template-id'>
61+
{messageTemplatesContent.tableHeadings.id}
62+
</Table.Cell>
6063
<Table.Cell data-testid='manage-template-table-header-template-type'>
6164
{messageTemplatesContent.tableHeadings.type}
6265
</Table.Cell>
@@ -79,6 +82,7 @@ export function MessageTemplates({
7982
{template.name}
8083
</Link>
8184
</Table.Cell>
85+
<Table.Cell>{template.id}</Table.Cell>
8286
<Table.Cell>{typeDisplayMappings(template)}</Table.Cell>
8387
<Table.Cell>
8488
<Tag color={statusToColourMapping(template)}>

frontend/src/content/content.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ const messageTemplates = {
443443
listOfTemplates: 'List of templates',
444444
tableHeadings: {
445445
name: 'Name',
446+
id: 'ID',
446447
type: 'Type',
447448
status: 'Status',
448449
dateCreated: 'Date created',

0 commit comments

Comments
 (0)