Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
36446d6
Add technical planning for VIBE-192: Verified User Email subscriptions
github-actions[bot] Nov 21, 2025
5156984
Add technical planning for VIBE-192
github-actions[bot] Nov 21, 2025
fe6062a
Add technical planning for VIBE-192
github-actions[bot] Nov 22, 2025
28afa43
docs: Add technical planning for VIBE-192 - Email subscriptions
github-actions[bot] Nov 22, 2025
c4b1947
docs: Add specification and technical plan for VIBE-192
github-actions[bot] Nov 24, 2025
c1dae48
Merge branch 'master' into feature/VIBE-192-verified-user-email-subsc…
junaidiqbalmoj Nov 24, 2025
72dcc10
WIP
junaidiqbalmoj Nov 24, 2025
d76ac66
fix sign in page
junaidiqbalmoj Nov 24, 2025
a67f20c
subscription journey include remove subscription
junaidiqbalmoj Nov 24, 2025
cb63eae
Merge branch 'master' into feature/VIBE-192-verified-user-email-subsc…
junaidiqbalmoj Nov 24, 2025
ab09143
improve code coverage
junaidiqbalmoj Nov 24, 2025
77ccd4e
fix build
junaidiqbalmoj Nov 24, 2025
89e0331
refactoring
junaidiqbalmoj Nov 25, 2025
647b1e3
refactoring, code review comments, adding e2e tests
junaidiqbalmoj Nov 25, 2025
049f9fd
Merge branch 'master' into feature/VIBE-192-verified-user-email-subsc…
junaidiqbalmoj Nov 25, 2025
01a31cf
refactoring, code review fixes and fixing end to end tests
junaidiqbalmoj Nov 25, 2025
bb1ced2
fix end to end tests
junaidiqbalmoj Nov 25, 2025
8cf16f9
Merge branch 'master' into feature/VIBE-192-verified-user-email-subsc…
junaidiqbalmoj Nov 25, 2025
efb511a
fix build
junaidiqbalmoj Nov 25, 2025
e234618
fix code review comments
junaidiqbalmoj Nov 25, 2025
6de235e
refactor css inline style
junaidiqbalmoj Nov 26, 2025
8e28595
Merge branch 'master' into feature/VIBE-192-verified-user-email-subsc…
junaidiqbalmoj Nov 26, 2025
d573144
Merge branch 'master' into feature/VIBE-192-verified-user-email-subsc…
junaidiqbalmoj Nov 26, 2025
4afb5d5
fix build
junaidiqbalmoj Nov 26, 2025
9ccc1f3
fix build
junaidiqbalmoj Nov 26, 2025
16845e0
fix build
junaidiqbalmoj Nov 26, 2025
e167e3f
Merge branch 'master' into feature/VIBE-192-verified-user-email-subsc…
junaidiqbalmoj Nov 27, 2025
942c672
fix code review comments
junaidiqbalmoj Nov 27, 2025
956d778
fix bug
junaidiqbalmoj Nov 27, 2025
0e1fb38
fix build
junaidiqbalmoj Nov 27, 2025
791752e
code review comment
junaidiqbalmoj Nov 27, 2025
d54f4e9
remove unnecessary files
junaidiqbalmoj Nov 27, 2025
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-- CreateTable
CREATE TABLE "subscription" (
"subscription_id" UUID NOT NULL,
"user_id" UUID NOT NULL,
"location_id" TEXT NOT NULL,
"date_added" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

CONSTRAINT "subscription_pkey" PRIMARY KEY ("subscription_id")
);

-- CreateIndex
CREATE INDEX "idx_subscription_user" ON "subscription"("user_id");

-- CreateIndex
CREATE INDEX "idx_subscription_location" ON "subscription"("location_id");

-- CreateIndex
CREATE UNIQUE INDEX "subscription_user_id_location_id_key" ON "subscription"("user_id", "location_id");

-- AddForeignKey
ALTER TABLE "subscription" ADD CONSTRAINT "subscription_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "user"("user_id") ON DELETE CASCADE ON UPDATE CASCADE;
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
Warnings:
- Changed the type of `location_id` on the `subscription` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
*/
-- Drop existing indexes and constraints
DROP INDEX IF EXISTS "idx_subscription_location";
DROP INDEX IF EXISTS "subscription_user_id_location_id_key";

-- AlterTable - Cast location_id from TEXT to INTEGER
ALTER TABLE "subscription"
ALTER COLUMN "location_id" TYPE INTEGER USING "location_id"::INTEGER;

-- Recreate indexes
CREATE INDEX "idx_subscription_location" ON "subscription"("location_id");
CREATE UNIQUE INDEX "subscription_user_id_location_id_key" ON "subscription"("user_id", "location_id");

-- AddForeignKey
ALTER TABLE "subscription" ADD CONSTRAINT "subscription_location_id_fkey" FOREIGN KEY ("location_id") REFERENCES "location"("location_id") ON DELETE RESTRICT ON UPDATE CASCADE;
19 changes: 10 additions & 9 deletions apps/postgres/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ model Artefact {
}

model User {
userId String @id @default(uuid()) @map("user_id") @db.Uuid
email String @db.VarChar(255)
firstName String? @map("first_name") @db.VarChar(255)
surname String? @db.VarChar(255)
userProvenance String @map("user_provenance") @db.VarChar(20)
userProvenanceId String @unique @map("user_provenance_id") @db.VarChar(255)
role String @db.VarChar(20)
createdDate DateTime @default(now()) @map("created_date")
lastSignedInDate DateTime? @map("last_signed_in_date")
userId String @id @default(uuid()) @map("user_id") @db.Uuid
email String @db.VarChar(255)
firstName String? @map("first_name") @db.VarChar(255)
surname String? @db.VarChar(255)
userProvenance String @map("user_provenance") @db.VarChar(20)
userProvenanceId String @unique @map("user_provenance_id") @db.VarChar(255)
role String @db.VarChar(20)
createdDate DateTime @default(now()) @map("created_date")
lastSignedInDate DateTime? @map("last_signed_in_date")
subscriptions Subscription[]

@@map("user")
}
Expand Down
7 changes: 4 additions & 3 deletions apps/postgres/src/schema-discovery.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ describe("Schema Discovery", () => {
expect(Array.isArray(result)).toBe(true);
});

it("should return schema paths", () => {
it("should return array with subscriptions and location schemas", () => {
const result = getPrismaSchemas();
expect(result.length).toBeGreaterThanOrEqual(0);
expect(result.every((path) => typeof path === "string")).toBe(true);
expect(result.length).toBe(2);
expect(result[0]).toContain("subscriptions");
expect(result[1]).toContain("location");
});

it("should return a new array on each call", () => {
Expand Down
3 changes: 2 additions & 1 deletion apps/postgres/src/schema-discovery.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Schema discovery functionality for module integration
import { prismaSchemas as locationSchemas } from "@hmcts/location/config";
import { prismaSchemas as subscriptionsSchemas } from "@hmcts/subscriptions/config";

export function getPrismaSchemas(): string[] {
return [locationSchemas];
return [subscriptionsSchemas, locationSchemas];
}
1 change: 1 addition & 0 deletions apps/web/src/assets/css/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@use "@hmcts/web-core/src/assets/css/search-autocomplete.scss";
@use "@hmcts/web-core/src/assets/css/filter-panel.scss";
@use "@hmcts/web-core/src/assets/css/back-to-top.scss";
@use "@hmcts/web-core/src/assets/css/button-as-link.scss";
@use "@hmcts/admin-pages/src/assets/css/index.scss" as admin;
@use "@hmcts/system-admin-pages/src/assets/css/dashboard.scss";
@use "@hmcts/verified-pages/src/assets/css/index.scss" as verified;
Expand Down
Loading
Loading