feat(#792): register Mental Health Tribunal Daily Hearing List - #866
feat(#792): register Mental Health Tribunal Daily Hearing List#866junaidiqbalmoj wants to merge 3 commits into
Conversation
Register MENTAL_HEALTH_TRIBUNAL_HEARING_LIST as a flat-file, strategic, manually-uploaded list type linked to the Mental Health Tribunal sub-jurisdiction (Tribunal jurisdiction), with Public default sensitivity. - Add catalogue entry to list-type-data.ts (CFT_IDAM, isNonStrategic: false, defaultSensitivity: Public, subJurisdictionIds: [20]) plus unit test - Add prod seed row (001) and sub-jurisdiction link by stable name (003) Flat-file list type: no JSON schema, validator, converter, PDF generator, or list page. Manual upload form auto-populates from findStrategicListTypes(). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThe PR registers ChangesMental Health Tribunal hearing list
Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
libs/list-types/common/src/list-type-data.test.ts (1)
5-93: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueReduce test boilerplate.
Consider extracting the repeated list type lookup into a
beforeEachhook to make the tests more concise and DRY.♻️ Proposed refactor
describe("MENTAL_HEALTH_TRIBUNAL_HEARING_LIST entry", () => { + let entry: typeof listTypeData[0] | undefined; + + beforeEach(() => { + entry = listTypeData.find((lt) => lt.name === "MENTAL_HEALTH_TRIBUNAL_HEARING_LIST"); + }); + it("should include a Mental Health Tribunal Daily Hearing List entry", () => { - // Arrange - // Act - const entry = listTypeData.find((lt) => lt.name === "MENTAL_HEALTH_TRIBUNAL_HEARING_LIST"); - // Assert expect(entry).toBeDefined(); }); it("should be a strategic list type", () => { - // Arrange - const entry = listTypeData.find((lt) => lt.name === "MENTAL_HEALTH_TRIBUNAL_HEARING_LIST"); - // Act const isNonStrategic = entry?.isNonStrategic;
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0864dfdd-0e5a-4b23-bc7c-32e4c6836047
📒 Files selected for processing (8)
apps/postgres/prisma/scripts/001_insert_missing_list_types.sqlapps/postgres/prisma/scripts/003_upsert_sub_jurisdictions_and_list_type_links.sqldocs/tickets/792/plan.mddocs/tickets/792/review.mddocs/tickets/792/tasks.mddocs/tickets/792/ticket.mdlibs/list-types/common/src/list-type-data.test.tslibs/list-types/common/src/list-type-data.ts
🎭 Playwright E2E Test Results84 tests 52 ✅ 4m 8s ⏱️ Results for commit c31b045. ♻️ This comment has been updated with latest results. |
Preview Deployment Successful 🚀Your preview environment is ready:
The environment will be automatically cleaned up when this PR is closed. |
| ('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()), | ||
| ('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()), | ||
| ('MENTAL_HEALTH_TRIBUNAL_HEARING_LIST', 'Mental Health Tribunal Daily Hearing List', 'Rhestr Wrandawiadau Dyddiol y Tribiwnlys Iechyd Meddwl', 'Mental Health Tribunal Daily Hearing List', '', 'Public', 'CFT_IDAM', false, NOW()), |
There was a problem hiding this comment.
On OG CaTH this is currently configured to have a provenance of PI_AAD
There was a problem hiding this comment.
As discussed, remove this script file.
| @@ -0,0 +1,107 @@ | |||
| import { describe, expect, it } from "vitest"; | |||
There was a problem hiding this comment.
Not sure of testing the static values in the list type array. Do we need to test that?
There was a problem hiding this comment.
as discussed, remove this file.
| name: "MENTAL_HEALTH_TRIBUNAL_HEARING_LIST", | ||
| englishFriendlyName: "Mental Health Tribunal Daily Hearing List", | ||
| welshFriendlyName: "Rhestr Wrandawiadau Dyddiol y Tribiwnlys Iechyd Meddwl", | ||
| provenance: "CFT_IDAM", |
There was a problem hiding this comment.
provenance on this list type is PI_AAD on OG CaTH
…o PI_AAD Change default/allowed provenance from CFT_IDAM to PI_AAD in the list type reference data and the insert-missing-list-types SQL script. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|



Summary
Registers
MENTAL_HEALTH_TRIBUNAL_HEARING_LISTas a flat-file, strategic, manually-uploaded list type, linked to the Mental Health Tribunal sub-jurisdiction (parent jurisdiction Tribunal), with Public default sensitivity.Resolves #792.
Changes
libs/list-types/common/src/list-type-data.ts— catalogue entry (provenance: CFT_IDAM,isNonStrategic: false,defaultSensitivity: "Public",shortenedFriendlyName= full name,subJurisdictionIds: [20], English + Welsh friendly names).libs/list-types/common/src/list-type-data.test.ts— new AAA unit test asserting the entry's fields andlistTypeData[].nameuniqueness.apps/postgres/prisma/scripts/001_insert_missing_list_types.sql— prod seed insert row (emptyurl,Public,CFT_IDAM,false).apps/postgres/prisma/scripts/003_upsert_sub_jurisdictions_and_list_type_links.sql— sub-jurisdiction link row (name → 20, id-independent join).Notes
findStrategicListTypes(), so no controller change is needed.listTypeId.Acceptance Criteria
isNonStrategic = false)Testing
list-type-data.test.ts— 9 tests passingyarn biome check— clean🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Tests