From eb518b3429de0ff086467d57b1d92f1e72c00147 Mon Sep 17 00:00:00 2001 From: Frede Hundewadt Date: Wed, 6 Dec 2023 12:53:24 +0100 Subject: [PATCH] misc cosmetic changes office customer list office customer list added isHidden = 1 to custom page filter office create order added salesRep name draft - added property to use for enabling disabling submit button B2B page work --- .../OfficeCountryCustomerListComponent.razor | 10 +- .../Extensions/JsInteropExtenstions.cs | 12 ++ Wonky.Client/Models/Draft.cs | 3 +- Wonky.Client/Models/DraftItem.cs | 8 +- .../CustomerInvoiceViewOverlay.razor | 4 +- .../Pages/AdvisorActivityCreatePage.razor | 2 +- .../Pages/AdvisorActivityCreatePage.razor.cs | 2 +- ...AdvisorCustomerWorkplaceViewEditPage.razor | 8 +- .../Pages/BusinessOrderViewPage.razor | 56 ++++++ .../Pages/BusinessOrderViewPage.razor.cs | 167 +++++++++++++++--- ...fficeAdvisorCustomerPagedListPage.razor.cs | 1 + ...fficeCustomerCountryPagedListPage.razor.cs | 1 + .../Pages/OfficeCustomerOrderCreatePage.razor | 9 +- .../OfficeCustomerOrderCreatePage.razor.cs | 120 +++++-------- Wonky.Client/wwwroot/appsettings.json | 2 +- Wonky.Client/wwwroot/index.html | 3 +- Wonky.Client/wwwroot/scripts/focus-element.js | 5 + Wonky.Entity/DTO/B2BAdvisorInfo.cs | 5 +- Wonky.Entity/DTO/B2BBusinessInfo.cs | 10 +- 19 files changed, 302 insertions(+), 126 deletions(-) create mode 100644 Wonky.Client/Extensions/JsInteropExtenstions.cs create mode 100644 Wonky.Client/wwwroot/scripts/focus-element.js diff --git a/Wonky.Client/Components/OfficeCountryCustomerListComponent.razor b/Wonky.Client/Components/OfficeCountryCustomerListComponent.razor index 7c168ef6..d4efa34c 100644 --- a/Wonky.Client/Components/OfficeCountryCustomerListComponent.razor +++ b/Wonky.Client/Components/OfficeCountryCustomerListComponent.razor @@ -44,6 +44,8 @@ }
+ + @@ -64,7 +66,7 @@ - + @@ -86,12 +89,13 @@ +
Konto @company.Account
- Sælgernr. + Sælger Nr. @company.SalesRep @@ -72,9 +74,10 @@
Sidst besøgt + @(Mapper.MapVisitState(company.LastVisit) == "the-draw" ? "?" : company.LastVisit) @(company.IsHidden == 1 ? "Skjult af sælger." : "")
Næste besøg
- + + diff --git a/Wonky.Client/wwwroot/scripts/focus-element.js b/Wonky.Client/wwwroot/scripts/focus-element.js new file mode 100644 index 00000000..02708475 --- /dev/null +++ b/Wonky.Client/wwwroot/scripts/focus-element.js @@ -0,0 +1,5 @@ +function FormFocusElement(element) { + if (element instanceof HTMLElement) { + element.focus(); + } +} \ No newline at end of file diff --git a/Wonky.Entity/DTO/B2BAdvisorInfo.cs b/Wonky.Entity/DTO/B2BAdvisorInfo.cs index 589ad775..349ac2ee 100644 --- a/Wonky.Entity/DTO/B2BAdvisorInfo.cs +++ b/Wonky.Entity/DTO/B2BAdvisorInfo.cs @@ -2,7 +2,10 @@ namespace Wonky.Entity.DTO; public class B2BAdvisorInfo { + public string AdvisorId { get; set; } = ""; + public string CountryCode { get; set; } = ""; + public string Email { get; set; } = ""; public string Name { get; set; } = ""; public string Phone { get; set; } = ""; - public string Email { get; set; } = ""; + public string SalesRep { get; set; } = ""; } \ No newline at end of file diff --git a/Wonky.Entity/DTO/B2BBusinessInfo.cs b/Wonky.Entity/DTO/B2BBusinessInfo.cs index cd851bbe..0fcf1a6a 100644 --- a/Wonky.Entity/DTO/B2BBusinessInfo.cs +++ b/Wonky.Entity/DTO/B2BBusinessInfo.cs @@ -5,10 +5,16 @@ public class B2BBusinessInfo public string Account { get; set; } = ""; public string Address1 { get; set; } = ""; public string Address2 { get; set; } = ""; + public string AdvisorId { get; set; } = ""; + public string BcId { get; set; } = ""; public string City { get; set; } = ""; public string CompanyId { get; set; } = ""; + public string CountryCode { get; set; } = ""; + public string Email { get; set; } = ""; + public string Mobile { get; set; } = ""; public string Name { get; set; } = ""; - public string ZipCode { get; set; } = ""; public string Phone { get; set; } = ""; - public string Email { get; set; } = ""; + public string SalesRep { get; set; } = ""; + public string VatNumber { get; set; } = ""; + public string ZipCode { get; set; } = ""; } \ No newline at end of file