From dbb31ca7d77e701ca646d2f164afeefe7ed237d1 Mon Sep 17 00:00:00 2001 From: Adam Moussa <166072409+amoussa1229@users.noreply.github.com> Date: Thu, 16 Apr 2026 16:54:28 -0400 Subject: [PATCH] Fix Contacts.Name references throughout Blazor project - Replace all Contacts.Name with (FirstName + " " + LastName) pattern - Fix ContactService, Index.razor, QuotesPDF, QuotesDetails, CreateQuotes - Fix WorkOrderPDF, Viewworkorder, UserViewWordOrder, Addworkorders - Fix ViewTemplate, AddTemplate, Templates settings pages - Blazor project now builds successfully --- .../Components/Pages/Contact/Index.razor | 10 ++++++++-- .../Components/Pages/Quotes/CreateQuotes.razor | 2 +- .../Components/Pages/Quotes/QuotesDetails.razor | 2 +- .../Components/Pages/Quotes/QuotesPDF.razor | 2 +- .../Components/Pages/Setting/AddTemplate.razor | 2 +- .../Components/Pages/Setting/Templates.razor | 2 +- .../Components/Pages/Setting/ViewTemplate.razor | 4 ++-- .../Components/Pages/Workorder/Addworkorders.razor | 3 +-- .../Components/Pages/Workorder/UserViewWordOrder.razor | 2 +- .../Components/Pages/Workorder/Viewworkorder.razor | 2 +- .../Components/Pages/Workorder/WorkOrderPDF.razor | 2 +- SeaHavenIndustries/Data/Services/ContactService.cs | 3 ++- 12 files changed, 21 insertions(+), 15 deletions(-) diff --git a/SeaHavenIndustries/Components/Pages/Contact/Index.razor b/SeaHavenIndustries/Components/Pages/Contact/Index.razor index f28a3a3..fe3e773 100644 --- a/SeaHavenIndustries/Components/Pages/Contact/Index.razor +++ b/SeaHavenIndustries/Components/Pages/Contact/Index.razor @@ -57,9 +57,15 @@ diff --git a/SeaHavenIndustries/Components/Pages/Workorder/Viewworkorder.razor b/SeaHavenIndustries/Components/Pages/Workorder/Viewworkorder.razor index 5ceea47..8f29eaf 100644 --- a/SeaHavenIndustries/Components/Pages/Workorder/Viewworkorder.razor +++ b/SeaHavenIndustries/Components/Pages/Workorder/Viewworkorder.razor @@ -139,7 +139,7 @@ else { foreach (var itm in order.WorkOrderContacts) { - @itm.POC.Name + @((itm.POC.FirstName + " " + itm.POC.LastName).Trim()) } } diff --git a/SeaHavenIndustries/Components/Pages/Workorder/WorkOrderPDF.razor b/SeaHavenIndustries/Components/Pages/Workorder/WorkOrderPDF.razor index 91ea702..36923b4 100644 --- a/SeaHavenIndustries/Components/Pages/Workorder/WorkOrderPDF.razor +++ b/SeaHavenIndustries/Components/Pages/Workorder/WorkOrderPDF.razor @@ -121,7 +121,7 @@
-

POC: @itm.POC.Name

+

POC: @((itm.POC.FirstName + " " + itm.POC.LastName).Trim())

Email: @itm.POC.Email

Phone Number: @itm.POC.PhoneNumber

diff --git a/SeaHavenIndustries/Data/Services/ContactService.cs b/SeaHavenIndustries/Data/Services/ContactService.cs index d534239..ecc7351 100644 --- a/SeaHavenIndustries/Data/Services/ContactService.cs +++ b/SeaHavenIndustries/Data/Services/ContactService.cs @@ -24,7 +24,8 @@ namespace SeaHavenIndustries.Data.Services var exist = _context.Contacts.Where(w => w.Id == contacts.Id).FirstOrDefault(); if (exist != null) { - exist.Name = contacts.Name; + exist.FirstName = contacts.FirstName; + exist.LastName = contacts.LastName; exist.PhoneNumber = contacts.PhoneNumber; exist.Email = contacts.Email; _context.Update(exist);