From 16bb0b5246a721b94b865c3240deddf73d9c3962 Mon Sep 17 00:00:00 2001 From: Marshal Date: Thu, 18 Jun 2026 06:58:01 +0000 Subject: [PATCH] changes --- apps/edr-freight-api/src/app.module.ts | 11 ++++++----- .../src/seed/demo-freight-data.seeder.ts | 6 ++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/apps/edr-freight-api/src/app.module.ts b/apps/edr-freight-api/src/app.module.ts index 4d855e055..a148a9ed7 100644 --- a/apps/edr-freight-api/src/app.module.ts +++ b/apps/edr-freight-api/src/app.module.ts @@ -144,11 +144,12 @@ export class AppModule implements OnApplicationBootstrap { await this.edrOrgSeeder.run(); await this.demoUsersSeeder.run(); await this.freightStaffUsersSeeder.run(); - await this.demoBookingsSeeder.run(); - await this.pricingDataSeeder.run(); - await this.fileUploadSettingsSeeder.run(); - // Idempotent demo data: ≥100 wagons/type, approval chains, 4 staff users. - // Each block self-guards on an empty-table check, so this is safe every boot. + // Demo data seeds disabled — keep only user/permission/role seeds. + // await this.demoBookingsSeeder.run(); + // await this.pricingDataSeeder.run(); + // await this.fileUploadSettingsSeeder.run(); + // demoFreightDataSeeder now seeds ONLY the 4 staff users (wagons + approval + // rules are disabled inside the seeder). Kept running for the staff users. await this.demoFreightDataSeeder.run(); } } diff --git a/apps/edr-freight-api/src/seed/demo-freight-data.seeder.ts b/apps/edr-freight-api/src/seed/demo-freight-data.seeder.ts index f4931f77b..e52861722 100644 --- a/apps/edr-freight-api/src/seed/demo-freight-data.seeder.ts +++ b/apps/edr-freight-api/src/seed/demo-freight-data.seeder.ts @@ -42,8 +42,10 @@ export class DemoFreightDataSeeder { async run() { await this.dataSource.transaction(async (manager) => { - await this.seedWagons(manager); - await this.seedApprovalRules(manager); + // Demo freight data (wagons + approval rules) disabled — keep only the + // 4 staff users. + // await this.seedWagons(manager); + // await this.seedApprovalRules(manager); await this.seedStaffUsers(manager); }); }