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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user