Demo seed Phase 2: workers, time entries, maintenance records
- 5 named shop workers seeded as ApplicationUser (Employee role): Mike Sanders (Coater), Jake Wilson (Sandblaster), Sarah Brooks (Inspector), Tyler Green (General), Chris Mason (Lead) — @pcldemo.com fingerprint domain - Job time entries seeded for all in-progress and completed jobs; Worker Productivity report will have data from day one - Maintenance history seeded per equipment: 2 completed records + 1 upcoming scheduled + 1 overdue record on Pressure Pot for overdue alert demo - Equipment renamed to spec names: Main Batch Oven, Small Batch Oven, Powder Coating Booth, Blast Cabinet, Pressure Pot Blaster, Air Compressor, Wash Station, Forklift (replaced Overhead Conveyor which wasn't in spec) - RemoveSeedDataOptions.Workers added; Remove.cs cleans up workers + time entries on Demo Reset; SeedDataController resets workers in ResetDemoCompany Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -411,13 +411,17 @@ public partial class SeedDataService : ISeedDataService
|
||||
}
|
||||
catch (Exception ex) { errors.Add($"✗ Customers: {ex.Message}"); _context.ChangeTracker.Clear(); }
|
||||
|
||||
// Workers must be seeded before jobs so AssignedUserId FK resolves
|
||||
await RunSeeder("Shop workers", details, errors, result, () => SeedShopWorkersAsync(company));
|
||||
await RunSeeder("Equipment", details, errors, result, () => SeedEquipmentAsync(company));
|
||||
await RunSeeder("Maintenance", details, errors, result, () => SeedMaintenanceRecordsAsync(company));
|
||||
await RunSeeder("Vendors", details, errors, result, () => SeedVendorsAsync(company));
|
||||
await RunSeeder("Named ovens", details, errors, result, () => SeedOvenCostsAsync(company));
|
||||
await RunSeeder("Catalog", details, errors, result, () => SeedCatalogAsync(company));
|
||||
await RunSeeder("Quotes", details, errors, result, () => SeedQuotesAsync(company));
|
||||
await RunSeeder("Jobs", details, errors, result, () => SeedJobsAsync(company));
|
||||
await RunSeeder("Job history", details, errors, result, () => SeedJobStatusHistoryAsync(company));
|
||||
await RunSeeder("Time entries", details, errors, result, () => SeedJobTimeEntriesAsync(company));
|
||||
await RunSeeder("Inv. txns", details, errors, result, () => SeedInventoryTransactionsAsync(company));
|
||||
await RunSeeder("Invoices", details, errors, result, () => SeedInvoicesAsync(company));
|
||||
await RunSeeder("Vendor bills", details, errors, result, () => SeedBillsAsync(company));
|
||||
|
||||
Reference in New Issue
Block a user