From e3c76ce7ce7066a9d7849156c513642cc51a672a Mon Sep 17 00:00:00 2001 From: Scott Pouliot Date: Wed, 6 May 2026 20:14:38 -0400 Subject: [PATCH] Fix missing customer contact fields on QuoteDto mapping CustomerEmail, CustomerMobilePhone, CustomerNotifyBySms, and CustomerNotifyByEmail were added to QuoteDto but never mapped in QuoteProfile, causing the email/SMS visibility logic on Quote Details to always see null and show the 'no contact info' warning. Co-Authored-By: Claude Sonnet 4.6 --- src/PowderCoating.Application/Mappings/QuoteProfile.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/PowderCoating.Application/Mappings/QuoteProfile.cs b/src/PowderCoating.Application/Mappings/QuoteProfile.cs index 280bf97..5def287 100644 --- a/src/PowderCoating.Application/Mappings/QuoteProfile.cs +++ b/src/PowderCoating.Application/Mappings/QuoteProfile.cs @@ -34,6 +34,14 @@ public class QuoteProfile : Profile src.OvenCost != null ? src.OvenCost.Label : null)) .ForMember(dest => dest.CustomerName, opt => opt.MapFrom(src => src.Customer != null ? src.Customer.CompanyName : null)) + .ForMember(dest => dest.CustomerEmail, opt => opt.MapFrom(src => + src.Customer != null ? src.Customer.Email : null)) + .ForMember(dest => dest.CustomerMobilePhone, opt => opt.MapFrom(src => + src.Customer != null ? src.Customer.MobilePhone : null)) + .ForMember(dest => dest.CustomerNotifyBySms, opt => opt.MapFrom(src => + src.Customer != null && src.Customer.NotifyBySms)) + .ForMember(dest => dest.CustomerNotifyByEmail, opt => opt.MapFrom(src => + src.Customer == null || src.Customer.NotifyByEmail)) .ForMember(dest => dest.PreparedByName, opt => opt.MapFrom(src => src.PreparedBy != null ? $"{src.PreparedBy.FirstName} {src.PreparedBy.LastName}" : null)) // Discount enum to string conversion