94a89ee175
- New CustomerContact entity + migration (AddCustomerContactsAndCrmFields) - Customer.LeadSource + ShipToAddress/City/State/ZipCode/Country fields - Additional Contacts card on Customer Details with AJAX add/edit/delete - Lead Source dropdown on Create/Edit; Ship-To section on Create/Edit - Customer Details: side-by-side billing/ship-to when ship-to is set - Help docs: Customers (contacts, ship-to, lead source, preferred powders, outstanding pickups) - Help docs: Jobs (clone job, project name), Quotes (project name), Invoices (project name), Inventory (low stock clickable filter) - HelpKnowledgeBase.cs updated for all features above Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
65 lines
1.7 KiB
C#
65 lines
1.7 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace PowderCoating.Application.DTOs.Customer;
|
|
|
|
public class CustomerContactDto
|
|
{
|
|
public int Id { get; set; }
|
|
public int CustomerId { get; set; }
|
|
public string FirstName { get; set; } = string.Empty;
|
|
public string? LastName { get; set; }
|
|
public string? Title { get; set; }
|
|
public string? ContactRole { get; set; }
|
|
public string? Email { get; set; }
|
|
public string? Phone { get; set; }
|
|
public string? MobilePhone { get; set; }
|
|
public string? Notes { get; set; }
|
|
|
|
public string DisplayName => string.IsNullOrWhiteSpace(LastName) ? FirstName : $"{FirstName} {LastName}";
|
|
}
|
|
|
|
public class CreateCustomerContactDto
|
|
{
|
|
[Required(ErrorMessage = "First name is required.")]
|
|
[StringLength(100)]
|
|
[Display(Name = "First Name")]
|
|
public string FirstName { get; set; } = string.Empty;
|
|
|
|
[StringLength(100)]
|
|
[Display(Name = "Last Name")]
|
|
public string? LastName { get; set; }
|
|
|
|
[StringLength(100)]
|
|
[Display(Name = "Job Title")]
|
|
public string? Title { get; set; }
|
|
|
|
[StringLength(50)]
|
|
[Display(Name = "Role")]
|
|
public string? ContactRole { get; set; }
|
|
|
|
[EmailAddress]
|
|
[StringLength(200)]
|
|
[Display(Name = "Email")]
|
|
public string? Email { get; set; }
|
|
|
|
[Phone]
|
|
[StringLength(20)]
|
|
[Display(Name = "Phone")]
|
|
public string? Phone { get; set; }
|
|
|
|
[Phone]
|
|
[StringLength(20)]
|
|
[Display(Name = "Mobile Phone")]
|
|
public string? MobilePhone { get; set; }
|
|
|
|
[StringLength(500)]
|
|
[Display(Name = "Notes")]
|
|
public string? Notes { get; set; }
|
|
}
|
|
|
|
public class UpdateCustomerContactDto : CreateCustomerContactDto
|
|
{
|
|
public int Id { get; set; }
|
|
public int CustomerId { get; set; }
|
|
}
|