Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
30741cb
feat(#593): implement Employment Tribunal daily and fortnightly press…
junaidiqbalmoj Jul 16, 2026
85b7e1f
Merge branch 'master' into feat/593-employment-tribunal-lists
junaidiqbalmoj Jul 16, 2026
e50d1d7
feat(#593): add prod seed scripts for ET list types + document requir…
junaidiqbalmoj Jul 16, 2026
2a6d202
refactor(#593): delegate ET PDF generation to shared cause-list gener…
junaidiqbalmoj Jul 16, 2026
016c4ca
feat(#593): add email summaries for ET daily and fortnightly press lists
junaidiqbalmoj Jul 16, 2026
a674760
Merge branch 'master' into feat/593-employment-tribunal-lists
junaidiqbalmoj Jul 16, 2026
4daa70d
fix(#593): align ET daily/fortnightly list styling with reference
junaidiqbalmoj Jul 16, 2026
f5a2ba9
Merge branch 'master' into feat/593-employment-tribunal-lists
junaidiqbalmoj Jul 16, 2026
a6ec5af
Merge branch 'master' into feat/593-employment-tribunal-lists
junaidiqbalmoj Jul 16, 2026
a59ddd5
fix(#593): give ET fortnightly list its own day-grouped renderer
junaidiqbalmoj Jul 16, 2026
3d23d1d
refactor(#593): move ET email summary builder out of shared common lib
junaidiqbalmoj Jul 16, 2026
0d2695c
fix(#593): break turbo build cycle from ET package dependencies
junaidiqbalmoj Jul 16, 2026
1ca6736
refactor(#593): extract shared ET list helpers into @hmcts/et-list-co…
junaidiqbalmoj Jul 16, 2026
44d9ad8
refactor(#593): move shared cause-list models to list-types-common
junaidiqbalmoj Jul 21, 2026
f54a44e
feat(#593): add prod reference-data script for magistrates adult cour…
junaidiqbalmoj Jul 21, 2026
3054af8
Merge branch 'master' into feat/593-employment-tribunal-lists
junaidiqbalmoj Jul 21, 2026
21fe848
refactor(postgres): seed list types from list-type-data.ts on deploy
junaidiqbalmoj Jul 21, 2026
0056d31
test(list-types): remove static-content list-type-data test
junaidiqbalmoj Jul 22, 2026
b9082ed
Update formatting
KianKwa Jul 22, 2026
a859ecc
Merge branch 'master' into feat/593-employment-tribunal-lists
junaidiqbalmoj Jul 23, 2026
29573c0
Merge branch 'master' into feat/593-employment-tribunal-lists
junaidiqbalmoj Jul 23, 2026
b2addf2
Merge branch 'master' into feat/593-employment-tribunal-lists
junaidiqbalmoj Jul 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,31 @@ describe("validateMyListType", () => {
- **Test every required field at every nesting depth** — a field buried 7 levels deep (e.g. `courtLists[0].courtHouse.courtRoom[0].session[0].sittings[0].hearing[0].case[0].caseNumber`) needs its own `it` block the same as a top-level field
- Do not export a `validate*` function solely to make it testable — it must be the real public API used by `validateListTypeJson`

**7. Database seed scripts are MANDATORY for every new list type — add them by default, without being asked**

Adding a `ListTypeData` entry to `libs/list-types/common/src/list-type-data.ts` seeds local and STG only. Seeding is **skipped in prod** (`ENVIRONMENT === "prod"`). Production reference data is populated exclusively by the idempotent SQL scripts in `apps/postgres/prisma/scripts/`. A list type that is missing from those scripts will simply **not exist in production**, so every new list type MUST update BOTH scripts in the same change as the `listTypeData` entry — three files kept in sync. Do this automatically as part of implementing any list type; never prompt the user about it.

The three files that MUST stay in sync (all keyed on the stable string `name`, never the numeric `id`):

1. `libs/list-types/common/src/list-type-data.ts` — the TS catalogue entry (drives local/STG seeding)
2. `apps/postgres/prisma/scripts/001_insert_missing_list_types.sql` — one `list_types` row (prod)
3. `apps/postgres/prisma/scripts/003_upsert_sub_jurisdictions_and_list_type_links.sql` — one link row per sub-jurisdiction (prod)

**Script 001 row** — column order is `(name, friendly_name, welsh_friendly_name, shortened_friendly_name, url, default_sensitivity, allowed_provenance, is_non_strategic, updated_at)`. The values MUST match the `listTypeData` entry exactly. `url` is the `urlPath` (empty string `''` for flat-file lists with no rendering page). Place the row mid-list and mind the trailing comma — the final row before `ON CONFLICT` must have no trailing comma:

```sql
('MY_LIST_TYPE_NAME', 'My Friendly Name', 'Welsh Friendly Name', 'Shortened Name', 'my-url-path', 'Public', 'CFT_IDAM', false, NOW()),
```

**Script 003 link(s)** — one row per entry in the `listTypeData` `subJurisdictionIds` array, joined on `list_types.name`. Add a preceding comment naming the sub-jurisdiction and id. Sub-jurisdiction ids are defined in Step 1 of the same script (e.g. Civil Court `1`, Family Court `2`, Employment Tribunal `3`). Mind the trailing comma — the final mapping row before `) AS mapping(...)` must have none:

```sql
-- MY_LIST_TYPE_NAME → Employment Tribunal (3)
('MY_LIST_TYPE_NAME', 3),
```

Both scripts are idempotent (`ON CONFLICT DO UPDATE` / `DO NOTHING`), so they are safe to re-run. Keep the values byte-for-byte identical across all three files (friendly names, Welsh names, shortened name, sensitivity, provenance, `is_non_strategic`, sub-jurisdiction ids).

## Testing Strategy

- **Unit/Integration Tests**: Vitest, co-located with source (`*.test.ts`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ VALUES
('CROWN_DAILY_LIST', 'Crown Daily List', 'Crown Daily List', 'Crown Daily List', 'crown-daily-cause-list', 'Public', 'CRIME_IDAM', false, NOW()),
('CROWN_FIRM_LIST', 'Crown Firm List', 'Crown Firm List', 'Crown Firm List', 'crown-firm-list', 'Classified', 'CRIME_IDAM', false, NOW()),
('CIVIL_AND_FAMILY_DAILY_CAUSE_LIST', 'Civil and Family Daily Cause List', 'Rhestr Achos Dyddiol Sifil a Theulu', 'Civil and Family Daily Cause List', 'civil-and-family-daily-cause-list', 'Public', 'CFT_IDAM', false, NOW()),
('ET_DAILY_LIST', 'Employment Tribunals Daily List', 'Rhestr Ddyddiol y Tribiwnlysoedd Cyflogaeth', 'ET Daily List', 'et-daily-list', 'Public', 'CFT_IDAM', false, NOW()),
('ET_FORTNIGHTLY_PRESS_LIST', 'Employment Tribunals Fortnightly Press List', 'Rhestr y Wasg Pob Pythefnos y Tribiwnlysoedd Cyflogaeth', 'ET Fortnightly List', 'et-fortnightly-list', 'Public', 'CFT_IDAM', false, NOW()),
('CARE_STANDARDS_TRIBUNAL_WEEKLY_HEARING_LIST', 'Care Standards Tribunal Weekly Hearing List', 'Rhestr Gwrandawiadau Wythnosol y Tribiwnlys Safonau Gofal', 'Care Standards Tribunal Weekly Hearing List', 'care-standards-tribunal-weekly-hearing-list', 'Public', 'CFT_IDAM', true, NOW()),
('CIVIL_COURTS_RCJ_DAILY_CAUSE_LIST', 'Civil Courts at the RCJ Daily Cause List', 'Rhestr Achosion Dyddiol Llys Sifil yn y Llysoedd Barn Brenhinol', 'Civil Courts at the RCJ Daily Cause List', 'civil-courts-rcj-daily-cause-list', 'Public', 'CFT_IDAM', true, NOW()),
('COUNTY_COURT_LONDON_CIVIL_DAILY_CAUSE_LIST', 'County Court at Central London Civil Daily Cause List', 'Rhestr Achosion Dyddiol Sifil yn y Llys Sirol yng Nghanol Llundain', 'County Court at Central London Civil Daily Cause List', 'county-court-central-london-civil-daily-cause-list', 'Public', 'CFT_IDAM', true, NOW()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ FROM (VALUES
-- CIVIL_AND_FAMILY_DAILY_CAUSE_LIST → Civil Court (1), Family Court (2)
('CIVIL_AND_FAMILY_DAILY_CAUSE_LIST', 1),
('CIVIL_AND_FAMILY_DAILY_CAUSE_LIST', 2),
-- ET_DAILY_LIST → Employment Tribunal (3)
('ET_DAILY_LIST', 3),
-- ET_FORTNIGHTLY_PRESS_LIST → Employment Tribunal (3)
('ET_FORTNIGHTLY_PRESS_LIST', 3),
-- CARE_STANDARDS_TRIBUNAL_WEEKLY_HEARING_LIST → Care Standards Tribunal (9)
('CARE_STANDARDS_TRIBUNAL_WEEKLY_HEARING_LIST', 9),
-- CIVIL_COURTS_RCJ_DAILY_CAUSE_LIST → Civil Court (1)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
-- Add the magistrates adult court list types (daily/future, public/non-public).
-- These exist in libs/list-types/common/src/list-type-data.ts (local/STG seed)
-- but were missing from the production reference-data scripts.
-- Idempotent: safe to re-run at any time.
-- Sub-jurisdiction 7 (Magistrates Court) already exists (see script 003).

-- Step 1: Upsert the list types (same shape as script 001)
INSERT INTO list_types (name, friendly_name, welsh_friendly_name, shortened_friendly_name, url, default_sensitivity, allowed_provenance, is_non_strategic, updated_at)
VALUES
('MAGISTRATES_ADULT_COURT_LIST_DAILY', 'Magistrates Adult Court List - Daily', 'Rhestr Llys Ynadon Oedolion - Dyddiol', 'Magistrates Adult Court List - Daily', 'magistrates-adult-court-list', 'Classified', 'CRIME_IDAM', false, NOW()),

Check failure on line 10 in apps/postgres/prisma/scripts/005_insert_magistrates_adult_lists.sql

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal 4 times.

See more on https://sonarcloud.io/project/issues?id=hmcts.cath&issues=AZ-FE6n4cRmzc0-YNOCK&open=AZ-FE6n4cRmzc0-YNOCK&pullRequest=864
('MAGISTRATES_ADULT_COURT_LIST_FUTURE', 'Magistrates Adult Court List - Future', 'Rhestr Llys Ynadon Oedolion – Dyfodol', 'Magistrates Adult Court List - Future', 'magistrates-adult-court-list', 'Classified', 'CRIME_IDAM', false, NOW()),
('MAGISTRATES_PUBLIC_ADULT_COURT_LIST_DAILY', 'Magistrates Public Adult Court List - Daily', 'Rhestr Achosion Cyhoeddus Llys Ynadon (Oedolion) - Dyddiol', 'Magistrates Public Adult Court List - Daily', 'magistrates-public-adult-court-list', 'Public', 'CRIME_IDAM', false, NOW()),
('MAGISTRATES_PUBLIC_ADULT_COURT_LIST_FUTURE', 'Magistrates Public Adult Court List - Future', 'Rhestr Achosion Cyhoeddus Llys Ynadon (Oedolion) - Dyfodol', 'Magistrates Public Adult Court List - Future', 'magistrates-public-adult-court-list', 'Public', 'CRIME_IDAM', false, NOW())
ON CONFLICT (name) DO UPDATE SET
friendly_name = EXCLUDED.friendly_name,
welsh_friendly_name = EXCLUDED.welsh_friendly_name,
shortened_friendly_name = EXCLUDED.shortened_friendly_name,
url = EXCLUDED.url,
default_sensitivity = EXCLUDED.default_sensitivity,
allowed_provenance = EXCLUDED.allowed_provenance,
is_non_strategic = EXCLUDED.is_non_strategic,
updated_at = EXCLUDED.updated_at;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Reactivate soft-deleted rows during the upsert.

Because list_types.deleted_at is not cleared, re-running this seed leaves a matching soft-deleted list type inactive. That contradicts the “safe to re-run at any time” guarantee and can prevent these lists from being discovered.

 ON CONFLICT (name) DO UPDATE SET
   friendly_name           = EXCLUDED.friendly_name,
   welsh_friendly_name     = EXCLUDED.welsh_friendly_name,
   shortened_friendly_name = EXCLUDED.shortened_friendly_name,
   url                     = EXCLUDED.url,
   default_sensitivity     = EXCLUDED.default_sensitivity,
   allowed_provenance      = EXCLUDED.allowed_provenance,
   is_non_strategic        = EXCLUDED.is_non_strategic,
+  deleted_at              = NULL,
   updated_at              = EXCLUDED.updated_at;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ON CONFLICT (name) DO UPDATE SET
friendly_name = EXCLUDED.friendly_name,
welsh_friendly_name = EXCLUDED.welsh_friendly_name,
shortened_friendly_name = EXCLUDED.shortened_friendly_name,
url = EXCLUDED.url,
default_sensitivity = EXCLUDED.default_sensitivity,
allowed_provenance = EXCLUDED.allowed_provenance,
is_non_strategic = EXCLUDED.is_non_strategic,
updated_at = EXCLUDED.updated_at;
ON CONFLICT (name) DO UPDATE SET
friendly_name = EXCLUDED.friendly_name,
welsh_friendly_name = EXCLUDED.welsh_friendly_name,
shortened_friendly_name = EXCLUDED.shortened_friendly_name,
url = EXCLUDED.url,
default_sensitivity = EXCLUDED.default_sensitivity,
allowed_provenance = EXCLUDED.allowed_provenance,
is_non_strategic = EXCLUDED.is_non_strategic,
deleted_at = NULL,
updated_at = EXCLUDED.updated_at;


-- Step 2: Link each list type to Magistrates Court (7)
INSERT INTO list_types_sub_jurisdictions (list_type_id, sub_jurisdiction_id)
SELECT lt.id, sj.sub_jurisdiction_id
FROM (VALUES
-- MAGISTRATES_ADULT_COURT_LIST_DAILY → Magistrates Court (7)
('MAGISTRATES_ADULT_COURT_LIST_DAILY', 7),
-- MAGISTRATES_ADULT_COURT_LIST_FUTURE → Magistrates Court (7)
('MAGISTRATES_ADULT_COURT_LIST_FUTURE', 7),
-- MAGISTRATES_PUBLIC_ADULT_COURT_LIST_DAILY → Magistrates Court (7)
('MAGISTRATES_PUBLIC_ADULT_COURT_LIST_DAILY', 7),
-- MAGISTRATES_PUBLIC_ADULT_COURT_LIST_FUTURE → Magistrates Court (7)
('MAGISTRATES_PUBLIC_ADULT_COURT_LIST_FUTURE', 7)
) AS mapping(list_type_name, sub_jurisdiction_id)
JOIN list_types lt ON lt.name = mapping.list_type_name
JOIN sub_jurisdiction sj ON sj.sub_jurisdiction_id = mapping.sub_jurisdiction_id
ON CONFLICT (list_type_id, sub_jurisdiction_id) DO NOTHING;
3 changes: 2 additions & 1 deletion apps/postgres/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ echo "Running reference data scripts..."
for script in prisma/scripts/001_insert_missing_list_types.sql \
prisma/scripts/002_update_list_type_provenances.sql \
prisma/scripts/003_upsert_sub_jurisdictions_and_list_type_links.sql \
prisma/scripts/004_soft_delete_crime_daily_list.sql; do
prisma/scripts/004_soft_delete_crime_daily_list.sql \
prisma/scripts/005_insert_magistrates_adult_lists.sql; do
echo " Applying $script..."
../../node_modules/.bin/prisma db execute --file "$script" --config=./prisma.config.ts
done
Expand Down
2 changes: 2 additions & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
"@hmcts/civil-daily-cause-list": "workspace:*",
"@hmcts/cookie-manager": "1.1.0",
"@hmcts/court-of-appeal-civil-daily-cause-list": "workspace:*",
"@hmcts/et-daily-list": "workspace:*",
"@hmcts/et-fortnightly-list": "workspace:*",
"@hmcts/family-daily-cause-list": "workspace:*",
"@hmcts/list-types-common": "workspace:*",
"@hmcts/location": "workspace:*",
Expand Down
4 changes: 4 additions & 0 deletions apps/web/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { moduleRoot as civilAppealModuleRoot } from "@hmcts/court-of-appeal-civi
import { moduleRoot as crownDailyListModuleRoot } from "@hmcts/crown-daily-list/config";
import { moduleRoot as crownFirmListModuleRoot } from "@hmcts/crown-firm-list/config";
import { moduleRoot as crownWarnedListModuleRoot } from "@hmcts/crown-warned-list/config";
import { moduleRoot as etDailyListModuleRoot } from "@hmcts/et-daily-list/config";
import { moduleRoot as etFortnightlyListModuleRoot } from "@hmcts/et-fortnightly-list/config";
import { moduleRoot as familyDailyCauseListModuleRoot } from "@hmcts/family-daily-cause-list/config";
import { moduleRoot as fttLrtModuleRoot } from "@hmcts/ftt-lands-registration-tribunal-weekly-hearing-list/config";
import { moduleRoot as fttRptModuleRoot } from "@hmcts/ftt-rpt-weekly-hearing-list/config";
Expand Down Expand Up @@ -127,6 +129,8 @@ export async function createApp(): Promise<Express> {
civilFamilyCauseListModuleRoot,
civilDailyCauseListModuleRoot,
familyDailyCauseListModuleRoot,
etDailyListModuleRoot,
etFortnightlyListModuleRoot,
sjpPressListModuleRoot,
sjpPublicListModuleRoot,
rcjStandardModuleRoot,
Expand Down
12 changes: 12 additions & 0 deletions apps/web/src/assets/css/list-types/et-lists.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Employment Tribunal list styles (et-daily-list, et-fortnightly-list).
// Keeps hearing table columns on a single line and allows the wide table to
// scroll horizontally within the accordion section on narrow viewports.

.no-wrap {
white-space: nowrap;
}

.govuk-accordion__section-content,
.govuk-table {
overflow: auto hidden;
}
1 change: 1 addition & 0 deletions apps/web/src/assets/css/web.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@use "./user-management.scss";
@use "./verified-pages.scss" as verified;
@use "./session-timeout.scss";
@use "./list-types/et-lists.scss";
@use "./list-types/magistrates-adult-court-list.scss";
@use "./list-types/magistrates-public-list.scss";
@use "./list-types/magistrates-standard-list.scss";
Expand Down
146 changes: 146 additions & 0 deletions apps/web/src/pages/(list-types)/et-daily-list/et-daily-list.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
{% extends "layouts/base-template.njk" %}

{% block page_content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">

<h1 class="govuk-heading-l" id="top">{{ t.title }}{% if header.regionName %}: {{ header.regionName }}{% endif %}</h1>

<p class="govuk-body">
<a class="govuk-link" href="{{ t.factLink }}">{{ t.factLinkText1 }}</a>{{ t.factLinkText2 }}
</p>

<p class="govuk-body">
{% for line in header.addressLines %}
{{ line }}{% if not loop.last %}<br>{% endif %}
{% endfor %}
</p>

<p class="govuk-body govuk-!-font-weight-bold govuk-!-margin-bottom-1">{{ t.listFor }} {{ header.contentDate }}</p>
<p class="govuk-body">{{ t.lastUpdated }} {{ header.lastUpdated }}</p>

<details class="govuk-details" data-module="govuk-details" open>
<summary class="govuk-details__summary">
<span class="govuk-details__summary-text">
{{ t.importantInformation }}
</span>
</summary>
<div class="govuk-details__text">
<p class="govuk-body">{{ t.openJustice1 }}</p>
<p class="govuk-body">{{ t.openJustice2 }}</p>
<p class="govuk-body">{{ t.openJustice3 }}</p>
<p class="govuk-body">{{ t.openJustice4 }}</p>
<p class="govuk-body">{{ openJustice.venueName }}, {{ openJustice.email }}, {{ openJustice.phone }}</p>
<p class="govuk-body">{{ t.openJustice5 }}</p>
<p class="govuk-body">{{ t.openJustice6 }}</p>
</div>
</details>

<div class="govuk-form-group govuk-!-margin-top-6">
<h2 class="govuk-label-wrapper"><label class="govuk-label govuk-label--s" for="case-search-input">{{ t.searchCases }}</label></h2>
<input class="govuk-input govuk-!-width-one-half" id="case-search-input" name="search" type="text">
</div>

<div id="court-lists-container">
{% for courtList in listData.courtLists %}
{% set courtHouse = courtList.courtHouse %}
<div class="govuk-!-margin-bottom-6">
<h2 class="govuk-heading-l">{{ t.venue }} {{ courtHouse.courtHouseName }}</h2>
{% if courtHouse.courtHouseAddress %}
{% for line in courtHouse.courtHouseAddress.line %}
{% if line | length %}
<p class="govuk-body">{{ line }}</p>
{% endif %}
{% endfor %}
{% if courtHouse.courtHouseAddress.town | length %}
<p class="govuk-body">{{ courtHouse.courtHouseAddress.town }}</p>
{% endif %}
{% if courtHouse.courtHouseAddress.county | length %}
<p class="govuk-body">{{ courtHouse.courtHouseAddress.county }}</p>
{% endif %}
{% if courtHouse.courtHouseAddress.postCode | length %}
<p class="govuk-body">{{ courtHouse.courtHouseAddress.postCode }}</p>
{% endif %}
{% endif %}
</div>

<div class="govuk-accordion" data-module="govuk-accordion">
{% for courtRoom in courtHouse.courtRoom %}
<div class="govuk-accordion__section govuk-accordion__section--expanded">
<div class="govuk-accordion__section-header">
<h2 class="govuk-accordion__section-heading">
<span class="govuk-accordion__section-button">
{{ courtRoom.courtRoomName }}
</span>
</h2>
</div>
<div class="govuk-accordion__section-content">
<table class="govuk-table hearings-table" data-module="moj-sortable-table">
<thead class="govuk-table__head">
<tr class="govuk-table__row">
<th scope="col" class="govuk-table__header no-wrap" aria-sort="none">{{ t.tableHeaders[0] }}</th>
<th scope="col" class="govuk-table__header no-wrap" aria-sort="none">{{ t.tableHeaders[1] }}</th>
<th scope="col" class="govuk-table__header no-wrap" aria-sort="none">{{ t.tableHeaders[2] }}</th>
<th scope="col" class="govuk-table__header no-wrap" aria-sort="none">{{ t.tableHeaders[3] }}</th>
<th scope="col" class="govuk-table__header no-wrap" aria-sort="none">{{ t.tableHeaders[4] }}</th>
<th scope="col" class="govuk-table__header no-wrap" aria-sort="none">{{ t.tableHeaders[5] }}</th>
<th scope="col" class="govuk-table__header no-wrap" aria-sort="none">{{ t.tableHeaders[6] }}</th>
</tr>
</thead>
<tbody class="govuk-table__body">
{% for session in courtRoom.session %}
{% for sitting in session.sittings %}
{% set durationText = '' %}
{% if sitting.durationAsHours > 0 %}
{% if sitting.durationAsHours > 1 %}
{% set durationText = sitting.durationAsHours ~ ' ' ~ t.hearingDurationHours %}
{% else %}
{% set durationText = sitting.durationAsHours ~ ' ' ~ t.hearingDurationHour %}
{% endif %}
{% endif %}
{% if sitting.durationAsMinutes > 0 %}
{% if durationText | length %}
{% set durationText = durationText ~ ' ' %}
{% endif %}
{% if sitting.durationAsMinutes > 1 %}
{% set durationText = durationText ~ sitting.durationAsMinutes ~ ' ' ~ t.hearingDurationMinutes %}
{% else %}
{% set durationText = durationText ~ sitting.durationAsMinutes ~ ' ' ~ t.hearingDurationMinute %}
{% endif %}
{% endif %}

{% for hearing in sitting.hearing %}
{% for case in hearing.case %}
<tr class="govuk-table__row">
<td class="govuk-table__cell no-wrap">{{ sitting.time }}</td>
<td class="govuk-table__cell no-wrap">{{ durationText }}{% if case.caseSequenceIndicator %}{% if durationText | length %} {% endif %}[{{ case.caseSequenceIndicator }}]{% endif %}</td>
<td class="govuk-table__cell no-wrap">{{ case.caseNumber }}</td>
<td class="govuk-table__cell">{{ case.applicant }}</td>
<td class="govuk-table__cell">{{ case.respondent }}</td>
<td class="govuk-table__cell no-wrap">{{ hearing.hearingType }}</td>
<td class="govuk-table__cell no-wrap">{{ sitting.caseHearingChannel }}</td>
</tr>
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endfor %}
</div>
{% endfor %}
</div>

<p class="govuk-body govuk-!-margin-top-6">
{{ t.dataSource }}: {{ dataSource }}
</p>

<p class="govuk-body">
<a href="#top" class="govuk-link">{{ t.linkToTop }}</a>
</p>

</div>
</div>
{% endblock %}
Loading
Loading