Repository navigation
Add civil-daily-cause-list and family-daily-cause-list modules (#594) #663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
junaidiqbalmoj
merged 28 commits into
master
from
feature/594-civil-family-daily-cause-list
Jun 12, 2026
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
047ac67
Add civil-daily-cause-list and family-daily-cause-list modules (#594)
junaidiqbalmoj 1f5f76b
Merge branch 'master' into feature/594-civil-family-daily-cause-list
junaidiqbalmoj 0876108
WIP
junaidiqbalmoj ce147cf
Merge branch 'master' into feature/594-civil-family-daily-cause-list
junaidiqbalmoj 59f2f71
fix bugs
junaidiqbalmoj 604b178
add tests
junaidiqbalmoj 2599d38
fix test
junaidiqbalmoj f1a52b6
chore: retrigger CI pipeline
junaidiqbalmoj e6cf868
fix: add civil-daily-cause-list and family-daily-cause-list to public…
junaidiqbalmoj 9fcc018
chore: update yarn.lock for civil-daily-cause-list and family-daily-c…
junaidiqbalmoj a0887f4
fix: resolve Sonar quality gate failures for civil and family daily c…
junaidiqbalmoj 969234e
revert this change
junaidiqbalmoj b557030
refactor: extract shared renderer into daily-cause-list-common lib
junaidiqbalmoj 8971c3a
not required for this PR
junaidiqbalmoj 39dbb49
Merge branch 'master' into feature/594-civil-family-daily-cause-list
junaidiqbalmoj 546ba1a
fix: resolve Sonar quality gate failures for civil/family daily cause…
junaidiqbalmoj cbdf84c
fix: break circular dependency by removing @hmcts/publication from da…
junaidiqbalmoj 053bbbf
fix: re-export PdfGenerationResult from daily-cause-list-common
junaidiqbalmoj 9f1e918
chore: merge master into feature/594-civil-family-daily-cause-list
junaidiqbalmoj f476da3
Merge branch 'master' into feature/594-civil-family-daily-cause-list
junaidiqbalmoj 679c147
code refactoring as result of master changes
junaidiqbalmoj 6530f17
fix bug
junaidiqbalmoj 1f601e5
Merge branch 'master' into feature/594-civil-family-daily-cause-list
junaidiqbalmoj d1fa63c
Merge branch 'master' into feature/594-civil-family-daily-cause-list
junaidiqbalmoj 6d00b05
Merge branch 'master' into feature/594-civil-family-daily-cause-list
junaidiqbalmoj 449085e
fix email download bug
junaidiqbalmoj fd99f09
fix sonar issue and build
junaidiqbalmoj 7970d28
fix: remove build:nunjucks step from civil and family daily cause lis…
junaidiqbalmoj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Tasks for Issue #594: Style Guide - Civil Daily Cause List and Family Daily Cause List | ||
|
|
||
| ## Implementation Tasks | ||
|
|
||
| ### civil-daily-cause-list module | ||
| - [ ] Create module directory structure for `libs/list-types/civil-daily-cause-list/` | ||
| - [ ] Create `package.json` for civil-daily-cause-list | ||
| - [ ] Create `tsconfig.json` for civil-daily-cause-list | ||
| - [ ] Create `src/models/types.ts` with TypeScript interfaces | ||
| - [ ] Create `src/schemas/civil-daily-cause-list.json` schema | ||
| - [ ] Create `src/validation/json-validator.ts` | ||
| - [ ] Create `src/rendering/renderer.ts` | ||
| - [ ] Create `src/pages/en.ts` with English translations | ||
| - [ ] Create `src/pages/cy.ts` with Welsh translations | ||
| - [ ] Create `src/pages/index.ts` page controller | ||
| - [ ] Create `src/pages/civil-daily-cause-list.njk` Nunjucks template | ||
| - [ ] Create `src/pdf/pdf-generator.ts` | ||
| - [ ] Create `src/pdf/pdf-template.njk` | ||
| - [ ] Create `src/index.ts` business logic exports | ||
| - [ ] Create `src/config.ts` module configuration | ||
|
|
||
| ### family-daily-cause-list module | ||
| - [ ] Create module directory structure for `libs/list-types/family-daily-cause-list/` | ||
| - [ ] Create `package.json` for family-daily-cause-list | ||
| - [ ] Create `tsconfig.json` for family-daily-cause-list | ||
| - [ ] Create `src/models/types.ts` with TypeScript interfaces | ||
| - [ ] Create `src/schemas/family-daily-cause-list.json` schema | ||
| - [ ] Create `src/validation/json-validator.ts` | ||
| - [ ] Create `src/rendering/renderer.ts` | ||
| - [ ] Create `src/pages/en.ts` with English translations | ||
| - [ ] Create `src/pages/cy.ts` with Welsh translations | ||
| - [ ] Create `src/pages/index.ts` page controller | ||
| - [ ] Create `src/pages/family-daily-cause-list.njk` Nunjucks template | ||
| - [ ] Create `src/pdf/pdf-generator.ts` | ||
| - [ ] Create `src/pdf/pdf-template.njk` | ||
| - [ ] Create `src/index.ts` business logic exports | ||
| - [ ] Create `src/config.ts` module configuration | ||
|
|
||
| ### Registration | ||
| - [ ] Add path aliases to root `tsconfig.json` | ||
| - [ ] Register modules in `apps/web/src/app.ts` | ||
| - [ ] Add packages as dependencies in `apps/web/package.json` | ||
|
|
||
| ## Testing Tasks | ||
|
|
||
| - [ ] Write unit tests for civil-daily-cause-list controller (`src/pages/index.test.ts`) | ||
| - [ ] Write unit tests for civil-daily-cause-list renderer (`src/rendering/renderer.test.ts`) | ||
| - [ ] Write unit tests for civil-daily-cause-list PDF generator (`src/pdf/pdf-generator.test.ts`) | ||
| - [ ] Write unit tests for civil-daily-cause-list JSON validator (`src/validation/json-validator.test.ts`) | ||
| - [ ] Write unit tests for family-daily-cause-list controller (`src/pages/index.test.ts`) | ||
| - [ ] Write unit tests for family-daily-cause-list renderer (`src/rendering/renderer.test.ts`) | ||
| - [ ] Write unit tests for family-daily-cause-list PDF generator (`src/pdf/pdf-generator.test.ts`) | ||
| - [ ] Write unit tests for family-daily-cause-list JSON validator (`src/validation/json-validator.test.ts`) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| { | ||
| "name": "@hmcts/civil-daily-cause-list", | ||
| "version": "1.0.0", | ||
| "type": "module", | ||
| "exports": { | ||
| ".": { | ||
| "production": "./dist/index.js", | ||
| "default": "./src/index.ts" | ||
| }, | ||
| "./config": { | ||
| "production": "./dist/config.js", | ||
| "default": "./src/config.ts" | ||
| } | ||
| }, | ||
| "scripts": { | ||
| "build": "tsc && yarn build:nunjucks && yarn build:pdf-templates", | ||
| "build:nunjucks": "mkdir -p dist/pages && cd src/pages && find . -name '*.njk' -exec sh -c 'mkdir -p ../../dist/pages/$(dirname {}) && cp {} ../../dist/pages/{}' \\;", | ||
| "build:pdf-templates": "mkdir -p dist/pdf && cp src/pdf/*.njk dist/pdf/", | ||
| "dev": "tsc --watch", | ||
| "test": "vitest run", | ||
| "test:watch": "vitest watch", | ||
| "format": "biome format --write .", | ||
| "lint": "biome check .", | ||
| "lint:fix": "biome check --write --unsafe ." | ||
| }, | ||
| "dependencies": { | ||
| "@hmcts/pdf-generation": "workspace:*", | ||
| "@hmcts/postgres-prisma": "workspace:*", | ||
| "luxon": "3.7.2", | ||
| "nunjucks": "3.2.4" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/luxon": "3.7.1", | ||
| "@types/node": "24.10.4", | ||
| "@types/nunjucks": "3.2.6", | ||
| "typescript": "5.9.3", | ||
| "vitest": "4.1.7" | ||
| }, | ||
| "peerDependencies": { | ||
| "express": "^5.2.0" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import path from "node:path"; | ||
| import { fileURLToPath } from "node:url"; | ||
|
|
||
| const __filename = fileURLToPath(import.meta.url); | ||
| const __dirname = path.dirname(__filename); | ||
|
|
||
| export const pageRoutes = { | ||
| path: path.join(__dirname, "pages"), | ||
| prefix: "/civil-daily-cause-list" | ||
| }; | ||
| export const moduleRoot = __dirname; | ||
| export const assets = path.join(__dirname, "../assets/"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| export type { ValidationResult } from "@hmcts/publication"; | ||
| export * from "./models/types.js"; | ||
| export * from "./pdf/pdf-generator.js"; | ||
| export * from "./rendering/renderer.js"; | ||
| export { validateCivilDailyCauseList } from "./validation/json-validator.js"; |
88 changes: 88 additions & 0 deletions
88
libs/list-types/civil-daily-cause-list/src/models/types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| export interface Party { | ||
| partyRole: string; | ||
| individualDetails?: { | ||
| title?: string; | ||
| individualForenames?: string; | ||
| individualMiddleName?: string; | ||
| individualSurname?: string; | ||
| }; | ||
| organisationDetails?: { | ||
| organisationName?: string; | ||
| }; | ||
| } | ||
|
|
||
| export interface CauseListCase { | ||
| caseName: string; | ||
| caseNumber: string; | ||
| caseType?: string; | ||
| caseSequenceIndicator?: string; | ||
| reportingRestrictionDetail?: string[]; | ||
| party?: Party[]; | ||
| } | ||
|
|
||
| export interface Hearing { | ||
| hearingType?: string; | ||
| case: CauseListCase[]; | ||
| } | ||
|
|
||
| export interface Sitting { | ||
| sittingStart: string; | ||
| sittingEnd?: string; | ||
| channel?: string[]; | ||
| hearing: Hearing[]; | ||
| } | ||
|
|
||
| export interface Session { | ||
| judiciary?: Array<{ | ||
| johKnownAs: string; | ||
| isPresiding?: boolean; | ||
| }>; | ||
| sessionChannel?: string[]; | ||
| sittings: Sitting[]; | ||
| } | ||
|
|
||
| export interface CourtRoom { | ||
| courtRoomName: string; | ||
| session: Session[]; | ||
| } | ||
|
|
||
| export interface CourtHouse { | ||
| courtHouseName: string; | ||
| courtHouseAddress?: { | ||
| line?: string[]; | ||
| town?: string; | ||
| county?: string; | ||
| postCode?: string; | ||
| }; | ||
| courtRoom: CourtRoom[]; | ||
| } | ||
|
|
||
| export interface CauseListData { | ||
| document: { | ||
| publicationDate: string; | ||
| documentName?: string; | ||
| version?: string; | ||
| }; | ||
| venue: { | ||
| venueName: string; | ||
| venueAddress: { | ||
| line: string[]; | ||
| town?: string; | ||
| county?: string; | ||
| postCode: string; | ||
| }; | ||
| venueContact?: { | ||
| venueTelephone?: string; | ||
| venueEmail?: string; | ||
| }; | ||
| }; | ||
| courtLists: Array<{ | ||
| courtHouse: CourtHouse; | ||
| }>; | ||
| } | ||
|
|
||
| export interface RenderOptions { | ||
| locationId: string; | ||
| contentDate: Date; | ||
| locale: string; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update checklist status for completed registration tasks.
These items are implemented in this PR but still marked unchecked. Please mark them as completed to keep ticket tracking accurate.