Demo reset + dev banner suppression for DEMO company
- DemoController: company-code-gated reset action (DEMO only, CSRF protected) - SeedDataService.Remove: FK-safe topological pre-sweep, all deletes scoped to companyId - SeedDataService: clock entries, extra seed data, updated customer/worker/job-status seeders - CompanySettingsController + Index.cshtml: Reset Demo Data button for DEMO company users - ReportsController + FinancialReportService: supporting report fixes - _Layout.cshtml: suppress env banner when current company is DEMO (all auth paths) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -427,6 +427,7 @@ public partial class SeedDataService : ISeedDataService
|
||||
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("Clock entries", details, errors, result, () => SeedEmployeeClockEntriesAsync(company));
|
||||
await RunSeeder("Inv. txns", details, errors, result, () => SeedInventoryTransactionsAsync(company));
|
||||
await RunSeeder("Invoices", details, errors, result, () => SeedInvoicesAsync(company));
|
||||
await RunSeeder("AI predictions", details, errors, result, () => SeedAiPredictionsAsync(company));
|
||||
@@ -477,7 +478,12 @@ public partial class SeedDataService : ISeedDataService
|
||||
}
|
||||
catch (Exception ex) { errors.Add($"✗ Account opening balances: {ex.Message}"); _context.ChangeTracker.Clear(); }
|
||||
|
||||
await RunSeeder("Appointments", details, errors, result, () => SeedAppointmentsAsync(company));
|
||||
await RunSeeder("Appointments", details, errors, result, () => SeedAppointmentsAsync(company));
|
||||
await RunSeeder("Job notes", details, errors, result, () => SeedJobNotesAsync(company));
|
||||
await RunSeeder("Customer notes", details, errors, result, () => SeedCustomerNotesAsync(company));
|
||||
await RunSeeder("Rework records", details, errors, result, () => SeedReworkRecordsAsync(company));
|
||||
await RunSeeder("Deposits", details, errors, result, () => SeedDepositsAsync(company));
|
||||
await RunSeeder("Bank recon", details, errors, result, () => SeedBankReconciliationsAsync(company));
|
||||
|
||||
if (company.CompanyCode == "DEMO")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user