Patch export/import for missing fields; add CustomerContacts export

- DataExportController + AccountDataExportController: add ProjectName to
  Jobs, Quotes, Invoices (XLSX + CSV); add LeadSource + ShipTo fields to
  Customers (XLSX + CSV); add CustomerContacts sheet/CSV (new)
- Both export views: add Customer Contacts checkbox (checked by default)
- CustomerImportDto: add LeadSource + ShipTo* fields
- JobImportDto: add ProjectName
- QuoteImportDto: add ProjectName
- InvoiceImportDto: add Project Name (dual-name alias for round-trip)
- CsvImportService: wire all new import fields to entity creation;
  also patch invoice update path for ProjectName
- Add scripts/purge_imported_data.sql (dry-run T-SQL for data cleanup)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 15:14:27 -04:00
parent 427c52a499
commit 82fb48f7a5
10 changed files with 637 additions and 76 deletions
@@ -31,8 +31,9 @@
<div class="row g-2 mb-4">
@foreach (var item in new[]
{
("Customers", "people", "Customers"),
("Jobs", "tools", "Jobs"),
("Customers", "people", "Customers"),
("CustomerContacts", "person-lines-fill", "Customer Contacts"),
("Jobs", "tools", "Jobs"),
("Quotes", "file-earmark-text", "Quotes"),
("Invoices", "receipt", "Invoices"),
("Inventory", "boxes", "Inventory Items"),
@@ -180,6 +180,13 @@
<i class="bi bi-people me-1 text-muted"></i>Customers
</label>
</div>
<div class="form-check mb-1">
<input class="form-check-input sheet-check" type="checkbox" name="sheets"
value="CustomerContacts" id="chkCustomerContacts" checked />
<label class="form-check-label" for="chkCustomerContacts">
<i class="bi bi-person-lines-fill me-1 text-muted"></i>Customer Contacts
</label>
</div>
<div class="form-check mb-1">
<input class="form-check-input sheet-check" type="checkbox" name="sheets"
value="Jobs" id="chkJobs" checked />