diff --git a/Wonky.Client/App.razor b/Wonky.Client/App.razor index a1252801..1cbdbe2f 100644 --- a/Wonky.Client/App.razor +++ b/Wonky.Client/App.razor @@ -13,8 +13,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] *@ -@using Wonky.Client.Pages - @@ -31,7 +29,7 @@ - + diff --git a/Wonky.Client/Components/OfficeCountryCustomerListComponent.razor b/Wonky.Client/Components/OfficeCountryCustomerListComponent.razor index d4efa34c..7f704770 100644 --- a/Wonky.Client/Components/OfficeCountryCustomerListComponent.razor +++ b/Wonky.Client/Components/OfficeCountryCustomerListComponent.razor @@ -18,105 +18,100 @@ @using Wonky.Client.Helpers; @using Wonky.Client.OverlayOffice -@if (CompanyList.Any()) -{ -
- @foreach (var company in CompanyList) - { -
- @* -
- -
-
- *@ - @if (string.IsNullOrWhiteSpace(company.Blocked)) - { -
- @company.Name @(company.HasFolded == 1 ? "(OPHØRT)" : "") +
+ @if (CompanyList.Any()) + { +
+ @foreach (var company in CompanyList) + { +
+ @if (string.IsNullOrWhiteSpace(company.Blocked)) + { +
+ @company.Name @(company.HasFolded == 1 ? "(OPHØRT)" : "") +
+ } + else + { +
+ @company.Name (spærret med kode '@company.Blocked') +
+ } +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Konto@company.AccountOrg Nr.@(string.IsNullOrWhiteSpace(company.VatNumber) ? "mangler" : company.VatNumber)
Telefon@company.Phone
Adresse@company.Address1 @(string.IsNullOrWhiteSpace(company.Address2) ? "" : ",") @company.Address2
Post By@company.CountryCode.ToUpper()-@company.ZipCode @company.City
+ Sælger Nr. + + @company.SalesRep +
Sidst besøgt + @(Mapper.MapVisitState(company.LastVisit) == "the-draw" ? "?" : company.LastVisit) + @(company.IsHidden == 1 ? "Skjult af sælger." : "")
Næste besøg + @(Mapper.MapVisitState(company.LastVisit) == "the-draw" ? "?" : company.NextVisit) + + +
- } - else - { -
- @company.Name (spærret med kode '@company.Blocked') -
- } -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Konto@company.AccountOrg Nr.@(string.IsNullOrWhiteSpace(company.VatNumber) ? "mangler" : company.VatNumber)
Telefon@company.Phone
Adresse@company.Address1 @(string.IsNullOrWhiteSpace(company.Address2) ? "" : ",") @company.Address2
Post By@company.CountryCode.ToUpper()-@company.ZipCode @company.City
- Sælger Nr. - - @company.SalesRep -
Sidst besøgt - @(Mapper.MapVisitState(company.LastVisit) == "the-draw" ? "?" : company.LastVisit) - @(company.IsHidden == 1 ? "Skjult af sælger." : "")
Næste besøg - @(Mapper.MapVisitState(company.LastVisit) == "the-draw" ? "?" : company.NextVisit) - - -
-
- - } -
- - - -} -else -{ -
Ingen data
-} \ No newline at end of file + } +
+ + + + } + else + { +
Ingen data
+ } +
\ No newline at end of file diff --git a/Wonky.Client/Components/SearchPhraseComponent.razor b/Wonky.Client/Components/SearchPhraseComponent.razor index 7bed00ac..9cd73e50 100644 --- a/Wonky.Client/Components/SearchPhraseComponent.razor +++ b/Wonky.Client/Components/SearchPhraseComponent.razor @@ -14,8 +14,9 @@ *@
- - -
- + + + + +
\ No newline at end of file diff --git a/Wonky.Client/Components/SearchPhraseComponent.razor.cs b/Wonky.Client/Components/SearchPhraseComponent.razor.cs index 1d679bf9..523fd114 100644 --- a/Wonky.Client/Components/SearchPhraseComponent.razor.cs +++ b/Wonky.Client/Components/SearchPhraseComponent.razor.cs @@ -15,7 +15,9 @@ using System.Timers; using Microsoft.AspNetCore.Components; +using Toolbelt.Blazor.HotKeys2; using Timer = System.Timers.Timer; +using Wonky.Client.Helpers; namespace Wonky.Client.Components; @@ -23,7 +25,7 @@ public partial class SearchPhraseComponent { private string SearchTerm { get; set; } = ""; [Parameter] public EventCallback OnChanged { get; set; } - + private void ClearSearch() { SearchTerm = ""; diff --git a/Wonky.Client/HttpRepository/CountryCustomerRepository.cs b/Wonky.Client/HttpRepository/CountryCustomerRepository.cs index 88fd6b7e..f51d098f 100644 --- a/Wonky.Client/HttpRepository/CountryCustomerRepository.cs +++ b/Wonky.Client/HttpRepository/CountryCustomerRepository.cs @@ -78,8 +78,8 @@ public class CountryCustomerRepository : ICountryCustomerRepository var content = await response.Content.ReadAsStringAsync(); var pagingResponse = new PagingResponse { - Items = JsonSerializer.Deserialize>(content, _options) ?? new List(), - MetaData = JsonSerializer.Deserialize(response.Headers.GetValues("X-Pagination").First(), _options) ?? new MetaData() + Items = JsonSerializer.Deserialize>(content, _options), + MetaData = JsonSerializer.Deserialize(response.Headers.GetValues("X-Pagination").First(), _options) }; return pagingResponse; } @@ -91,8 +91,7 @@ public class CountryCustomerRepository : ICountryCustomerRepository /// /// /// - public async Task> GetCompaniesPaged(string countryCode, string salesRepId, - CustomerPaging paging) + public async Task> GetCompaniesPaged(string countryCode, string salesRepId, CustomerPaging paging) { var queryDictionary = new Dictionary { diff --git a/Wonky.Client/Pages/BusinessOrderViewPage.razor b/Wonky.Client/Pages/BusinessOrderViewPage.razor index bbbcb025..66d90731 100644 --- a/Wonky.Client/Pages/BusinessOrderViewPage.razor +++ b/Wonky.Client/Pages/BusinessOrderViewPage.razor @@ -42,6 +42,16 @@ @CountryCode.ToUpper()-@Activity.DlvZipCode @Activity.DlvCity
+
+
+
+ + + + +
+
+
@@ -71,4 +81,15 @@ }
+
+
+
Bestillingen følger de til enhver tid gældende listepriser
+
Individuelle aftaler honoreres
+
Priser tillægges moms og afgifter
+
Ved tvivl om gældede priser kontaktes Innotec's konsulent
+
Fragt og Leveringomkostninger tillægges
+
Betaling netto kontant
+
Varer forbliver Innotec's ejendom til betaling er modtaget
+
+
\ No newline at end of file diff --git a/Wonky.Client/Pages/BusinessOrderViewPage.razor.cs b/Wonky.Client/Pages/BusinessOrderViewPage.razor.cs index caf20013..4199b779 100644 --- a/Wonky.Client/Pages/BusinessOrderViewPage.razor.cs +++ b/Wonky.Client/Pages/BusinessOrderViewPage.razor.cs @@ -40,6 +40,7 @@ public partial class BusinessOrderViewPage private ActivityDto Activity { get; set; } = new(); private DateTime SelectedDate { get; set; } private bool Working { get; set; } = true; + private bool ConditionsAccepted { get; set; } protected override async Task OnInitializedAsync() @@ -83,7 +84,7 @@ public partial class BusinessOrderViewPage Activity.BcId = _businessInfo.BcId; Activity.CompanyId = _businessInfo.CompanyId; // assign activity properties - + // var lineNo = 0; // foreach (var item in DraftProvider.Draft.Items) // { diff --git a/Wonky.Client/Pages/OfficeCustomerCountryPagedListPage.razor.cs b/Wonky.Client/Pages/OfficeCustomerCountryPagedListPage.razor.cs index 1224677d..dca961d4 100644 --- a/Wonky.Client/Pages/OfficeCustomerCountryPagedListPage.razor.cs +++ b/Wonky.Client/Pages/OfficeCustomerCountryPagedListPage.razor.cs @@ -21,7 +21,6 @@ using Wonky.Client.HttpRepository; using Wonky.Client.Local.Services; using Wonky.Entity.DTO; using Wonky.Entity.Requests; -using Wonky.Entity.Views; #pragma warning disable CS8618 namespace Wonky.Client.Pages; @@ -40,7 +39,7 @@ public partial class OfficeCustomerCountryPagedListPage : IDisposable [Parameter] public string CountryCode { get; set; } = ""; // ############################################################# - private List Companies { get; set; } = new(); + private List Companies { get; set; } = []; private UserPreference Preference { get; set; } = new(); private UserManagerEditView XUserInfo { get; set; } = new(); private string SavedSearch { get; set; } = ""; @@ -50,11 +49,11 @@ public partial class OfficeCustomerCountryPagedListPage : IDisposable private CustomerPaging Paging { get; set; } = new(); private string ToggleFoldedText { get; set; } = "Vis Lukkede"; - protected override async Task OnParametersSetAsync() + protected override Task OnParametersSetAsync() { Interceptor.RegisterEvent(); Interceptor.RegisterBeforeSendEvent(); - await FetchCustomers(); + return FetchCustomers(); } protected override async Task OnInitializedAsync() @@ -71,8 +70,12 @@ public partial class OfficeCustomerCountryPagedListPage : IDisposable Paging.HasFolded = ShowFolded ? 1 : 0; // load saved search - SavedSearch = string.IsNullOrWhiteSpace(Preference.CompanyFilterPhrase) ? "" : Preference.CompanyFilterPhrase; + SavedSearch = string.IsNullOrWhiteSpace(Preference.CompanyFilterPhrase) + ? "" + : Preference.CompanyFilterPhrase; + await SetSearchPhrase(SavedSearch); + Working = false; } @@ -93,70 +96,70 @@ public partial class OfficeCustomerCountryPagedListPage : IDisposable } else { - Companies = new List(); + Companies = []; PageData = new MetaData(); } Working = false; } - private async Task ToggleFolded() + private Task ToggleFolded() { Working = true; ShowFolded = !ShowFolded; ToggleFoldedText = ShowFolded ? "Normal Visning" : "Vis Lukkede"; - Companies = new List(); + Companies = []; Paging.PageNumber = 1; Paging.HasFolded = ShowFolded ? 1 : 0; - await FetchCustomers(); + return FetchCustomers(); } - private async Task SetSelectedPage(int page) + private Task SetSelectedPage(int page) { Working = true; Companies = new List(); Paging.PageNumber = page; - await FetchCustomers(); + return FetchCustomers(); } - private async Task SetSearchCol(string searchColumn) + private Task SetSearchCol(string searchColumn) { Working = true; - Companies = new List(); + Companies = []; Paging.SearchColumn = searchColumn; Paging.PageNumber = 1; - await FetchCustomers(); + return FetchCustomers(); } - private async Task SetPageSize(string pageSize) + private Task SetPageSize(string pageSize) { Working = true; - Companies = new List(); + Companies = []; Paging.PageSize = Convert.ToInt32(pageSize); Paging.PageNumber = 1; - await FetchCustomers(); + return FetchCustomers(); } - private async Task SetSearchPhrase(string searchTerm) + private Task SetSearchPhrase(string searchTerm) { Working = true; - Companies = new List(); + Companies = []; Paging.PageNumber = 1; Paging.SearchTerm = searchTerm; - await FetchCustomers(); + return FetchCustomers(); } - private async Task SetSortCol(string orderBy) + private Task SetSortCol(string orderBy) { Working = true; - Companies = new List(); + Companies = []; Paging.OrderBy = orderBy; - await FetchCustomers(); + return FetchCustomers(); } diff --git a/Wonky.Client/Program.cs b/Wonky.Client/Program.cs index 7a6255c3..1cfe8040 100644 --- a/Wonky.Client/Program.cs +++ b/Wonky.Client/Program.cs @@ -50,6 +50,8 @@ builder.Services.AddHttpClient("inno-api", (sp, cl) => builder.Services.AddBlazoredToast(); builder.Services.AddHttpClientInterceptor(); +builder.Services.AddHotKeys2(); + // api config object builder.Services.Configure(builder.Configuration.GetSection("ApiConfig")); // app info object diff --git a/Wonky.Client/Wonky.Client.csproj b/Wonky.Client/Wonky.Client.csproj index ce46834f..2ec6d26e 100644 --- a/Wonky.Client/Wonky.Client.csproj +++ b/Wonky.Client/Wonky.Client.csproj @@ -19,6 +19,7 @@ + diff --git a/Wonky.Client/wwwroot/appsettings.json b/Wonky.Client/wwwroot/appsettings.json index a0299a0c..28e6f7b4 100644 --- a/Wonky.Client/wwwroot/appsettings.json +++ b/Wonky.Client/wwwroot/appsettings.json @@ -1,7 +1,7 @@ { "appInfo": { "name": "Wonky Online", - "version": "316.0", + "version": "316.1", "rc": false, "sandBox": true, "image": "grumpy-coder.png", diff --git a/Wonky.Client/wwwroot/css/app.css b/Wonky.Client/wwwroot/css/app.css index 707b5f93..0dccf555 100644 --- a/Wonky.Client/wwwroot/css/app.css +++ b/Wonky.Client/wwwroot/css/app.css @@ -3,6 +3,10 @@ /*background-color: #eeeeee;*/ } +.office-customer-paged { + left: 0; + width: 100%; +} .draft-expires-msg { font-size: 0.8em; }