diff --git a/Wonky.Client/Components/ActivityListComponent.razor b/Wonky.Client/Components/ActivityListComponent.razor index 55626896..833ebb8b 100644 --- a/Wonky.Client/Components/ActivityListComponent.razor +++ b/Wonky.Client/Components/ActivityListComponent.razor @@ -38,7 +38,7 @@ @foreach (var activity in ActivityList) { - @activity.Company.Name + @activity.Company.Name @activity.Company.City @activity.Demo @activity.Sales diff --git a/Wonky.Client/Components/AdvisorCompanyTableComponent.razor b/Wonky.Client/Components/AdvisorCompanyTableComponent.razor index 6475f738..bfa7ad6a 100644 --- a/Wonky.Client/Components/AdvisorCompanyTableComponent.razor +++ b/Wonky.Client/Components/AdvisorCompanyTableComponent.razor @@ -58,7 +58,7 @@ @company.City - diff --git a/Wonky.Client/Components/AdvisorCompanyTableComponent.razor.cs b/Wonky.Client/Components/AdvisorCompanyTableComponent.razor.cs index f09fd526..dcd88100 100644 --- a/Wonky.Client/Components/AdvisorCompanyTableComponent.razor.cs +++ b/Wonky.Client/Components/AdvisorCompanyTableComponent.razor.cs @@ -43,7 +43,7 @@ namespace Wonky.Client.Components private void ViewCustomer(string companyId) { - Navigator.NavigateTo($"/companies/{companyId}"); + Navigator.NavigateTo($"/customers/{companyId}"); } private void CallInformationModal(string info) diff --git a/Wonky.Client/Components/CountryCustomerListComponent.razor b/Wonky.Client/Components/CountryCustomerListComponent.razor index 002cd873..f928c6c4 100644 --- a/Wonky.Client/Components/CountryCustomerListComponent.razor +++ b/Wonky.Client/Components/CountryCustomerListComponent.razor @@ -23,16 +23,16 @@
-
+
Sælger
-
+
Konto
-
+
Telefon
-
+
Navn
@@ -42,18 +42,18 @@
@foreach (var company in CompanyList) { - +
-
+
@company.SalesRep
-
+
@company.Account
-
+
@company.Phone
-
+
@company.Name
diff --git a/Wonky.Client/Components/CountryCustomerListComponent.razor.cs b/Wonky.Client/Components/CountryCustomerListComponent.razor.cs index f5d4eb7b..627ecbc9 100644 --- a/Wonky.Client/Components/CountryCustomerListComponent.razor.cs +++ b/Wonky.Client/Components/CountryCustomerListComponent.razor.cs @@ -26,7 +26,8 @@ namespace Wonky.Client.Components { public partial class CountryCustomerListComponent { - [Parameter] public List CompanyList { get; set; } = new(); + [Parameter] public List CompanyList { get; set; } = new(); + [Parameter] public string CountryCode { get; set; } = ""; } } diff --git a/Wonky.Client/Components/LandingComponentAdmin.razor b/Wonky.Client/Components/LandingComponentAdmin.razor index 30227cab..2c52239d 100644 --- a/Wonky.Client/Components/LandingComponentAdmin.razor +++ b/Wonky.Client/Components/LandingComponentAdmin.razor @@ -18,29 +18,38 @@ @using Microsoft.AspNetCore.Authorization @using Wonky.Client.Components -
-
-
- Danmark -
- Danmark -
-
+
+ -
-
- Norge -
- Norge -
-
+
+ +
+
+

+ Norge +

+

+ Kunder, Prisliste +

+ Norge ....
-
-
- Sverige -
- Sverige -
-
+
+ +
+
+

+ Sverige +

+

+ Kunder, Prisliste +

+ Sverige ....
-
\ No newline at end of file +
diff --git a/Wonky.Client/Components/LandingComponentAdmin.razor.cs b/Wonky.Client/Components/LandingComponentAdmin.razor.cs index 03b0c2d1..ecc05952 100644 --- a/Wonky.Client/Components/LandingComponentAdmin.razor.cs +++ b/Wonky.Client/Components/LandingComponentAdmin.razor.cs @@ -44,13 +44,20 @@ public partial class LandingComponentAdmin private string WorkDate { get; set; } = $"{DateTime.Now:yyyy-MM-dd}"; private string Today { get; set; } = $"{DateTime.Now:yyyy-MM-dd}"; - protected override async Task OnInitializedAsync() { + ProfileService.OnChange += ProfileChanged; Prefs = await ProfileService.GetPreferences(); - if(!string.IsNullOrWhiteSpace(Prefs.WorkDate)) - WorkDate = Prefs.WorkDate; + if (string.IsNullOrWhiteSpace(Prefs.WorkDate)) + { + await ProfileService.SetWorkDate(DateTime.Now); + } + } + + private void ProfileChanged(UserPref newPrefs) + { + Prefs = newPrefs; + WorkDate = Prefs.WorkDate; } - } diff --git a/Wonky.Client/Components/LandingComponentAdmin.razor.css b/Wonky.Client/Components/LandingComponentAdmin.razor.css deleted file mode 100644 index 6d753f3d..00000000 --- a/Wonky.Client/Components/LandingComponentAdmin.razor.css +++ /dev/null @@ -1,6 +0,0 @@ - -.workDate { - font-size: 1.2em; - font-weight: bold; - font-variant: small-caps; -} \ No newline at end of file diff --git a/Wonky.Client/Components/QuoteListComponent.razor b/Wonky.Client/Components/QuoteListComponent.razor index 31c3ffc8..ef741305 100644 --- a/Wonky.Client/Components/QuoteListComponent.razor +++ b/Wonky.Client/Components/QuoteListComponent.razor @@ -64,7 +64,7 @@
@quote.ESalesNumber + href="/customers/@quote.Company.CompanyId/quotes/@quote.ActivityId">@quote.ESalesNumber
@if (!string.IsNullOrWhiteSpace(quote.OfficeNote)) { diff --git a/Wonky.Client/Components/TaskItemTableComponent.razor b/Wonky.Client/Components/TaskItemTableComponent.razor index 6ad590c8..43068588 100644 --- a/Wonky.Client/Components/TaskItemTableComponent.razor +++ b/Wonky.Client/Components/TaskItemTableComponent.razor @@ -64,7 +64,7 @@ @if (task.TaskTypeEnum is "Recall") { - + } diff --git a/Wonky.Client/Components/WarehouseListComponent.razor b/Wonky.Client/Components/WarehouseListComponent.razor index ecfebb74..552bb7ef 100644 --- a/Wonky.Client/Components/WarehouseListComponent.razor +++ b/Wonky.Client/Components/WarehouseListComponent.razor @@ -1,3 +1,4 @@ +@using Wonky.Client.Models @* // Copyright (C) 2022 FCS Frede's Computer Services. // This program is free software: you can redistribute it and/or modify @@ -15,101 +16,86 @@ // *@ -
-
-
- - +@if (OrderList != null) +{ +
+
+
+ + - - + + - - -
-
-
- -
-
- @if (ReadyToShip && OrderList.Any()) - { - - } -
-
-
-
-
-
-

Ordredato

-
-
-

Kundenavn

-
-
-

Postnr. Bynavn

-
-
-

- -

-
-
-

Status

+ +
+
+ +
+
+ @if (ReadyToShip && Orders.Any()) + { + + } +
- @if (OrderList.Any()) - { - @foreach (var order in OrderList) +
+
+
+
+

Modtager

+
+
+
Post By
+
+
+
Dato
+
+
+
Status
+
+
+
+ @foreach (var order in Orders) { - +
-
- @order.OrderDate -
-
+
@order.Company.Name
-
} - } - else - { -
- Flot klaret - bordet er ryddet -
- } -
\ No newline at end of file +
+} \ No newline at end of file diff --git a/Wonky.Client/Components/WarehouseListComponent.razor.cs b/Wonky.Client/Components/WarehouseListComponent.razor.cs index 8c42e1fd..54aeaa61 100644 --- a/Wonky.Client/Components/WarehouseListComponent.razor.cs +++ b/Wonky.Client/Components/WarehouseListComponent.razor.cs @@ -13,131 +13,43 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - -using System.Text.Json; -using Blazored.Toast.Services; using Microsoft.AspNetCore.Components; -using Wonky.Client.HttpInterceptors; -using Wonky.Client.HttpInterfaces; -using Wonky.Client.HttpRepository; +using Wonky.Client.Models; using Wonky.Entity.Views; namespace Wonky.Client.Components; public partial class WarehouseListComponent { - [Parameter] public string Status { get; set; } = "none"; - [Inject] public HttpInterceptorService Interceptor { get; set; } - [Inject] public IWarehouseRepository WarehouseRepo { get; set; } - [Inject] public IToastService Toaster { get; set; } - - private string ItemList { get; set; } = ""; - private bool ReadyToShip; - private string Header = "Ubehandlet"; + [Parameter] public string Header { get; set; } = ""; + [Parameter] public List? OrderList { get; set; } + [Parameter] public bool ReadyToShip { get; set; } + [Parameter] public EventCallback OnGetStatus { get; set; } + [Parameter] public EventCallback OnSetShipped { get; set; } + [Parameter] public EventCallback OnQPak { get; set; } - private List OrderList { get; set; } - private bool Working { get; set; } = true; + private List Orders { get; set; } = new(); - protected override async Task OnInitializedAsync() + protected override async Task OnParametersSetAsync() { - Interceptor.RegisterEvent(); - Interceptor.RegisterBeforeSendEvent(); - - switch (Status.ToLower()) - { - case "none": - Header = "Ubehandlede ordrer"; - await GetOrderStatusNone(); - break; - case "picked": - Header = "Plukkede ordrer"; - await GetOrderStatusPicked(); - break; - case "packed": - Header = "Pakkede ordrer"; - await GetOrderStatusPacked(); - break; - case "shipped": - Header = "Afsendte ordrer"; - await GetOrderStatusShipped(); - break; - default: - await GetOrderStatusNone(); - break; - } - } - - private async Task GetOrderStatusNone() - { - Working = true; - OrderList = new List(); - Header = "Ubehandlede ordrer"; - ReadyToShip = false; - Working = true; - OrderList = new List(); - OrderList = await WarehouseRepo.GetWarehouseOrderListByStatus("none"); - if(OrderList.Any(x => x.Express)) - OrderList = OrderList.OrderByDescending(x => x.Express).ToList(); - Working = false; - } - - private async Task GetOrderStatusPicked() - { - Working = true; - OrderList = new List(); - Header = "Plukkede ordrer"; - ReadyToShip = false; - Working = true; - OrderList = new List(); - OrderList = await WarehouseRepo.GetWarehouseOrderListByStatus("picked"); - Working = false; - } - - private async Task GetOrderStatusPacked() - { - Working = true; - OrderList = new List(); - Header = "Pakkede ordrer"; - Working = true; - OrderList = new List(); - OrderList = await WarehouseRepo.GetWarehouseOrderListByStatus("packed"); - ReadyToShip = true; - Working = false; - } - - private async Task GetOrderStatusShipped() - { - Working = true; - OrderList = new List(); - Header = "Afsendte ordrer"; - ReadyToShip = false; - Toaster.ShowWarning("Det kan tage lidt tid at hente alle.\nVent venligst.\nMåske skal vi tænke over hvor mange vi henter?"); - Working = true; - OrderList = new List(); - var orderList = await WarehouseRepo.GetWarehouseOrderListByStatus("shipped"); - OrderList = orderList.OrderByDescending(x => x.OrderDate).ToList(); - Toaster.ShowInfo("Her er de så ...."); - Working = false; + while (OrderList == null) + await Task.Delay(500); + + Orders = OrderList; } - private async Task SetAllPackedStatusToShipped() + private async Task SetShipStatus() { - Working = true; - foreach (var order in OrderList.Where(order => order.ProcessStatusEnum.ToLower() == "packed")) - { - order.ProcessStatusEnum = "shipped"; - var process = new WarehouseProcess - { - OrderId = order.OrderId, - ProcessStatusEnum = "shipped" - }; - await WarehouseRepo.UpdateWarehouseOrderStatus(process); - } - Working = false; + await OnSetShipped.InvokeAsync(); } - public void Dispose() + private async Task GetWithStatus(PStatus status) { - Interceptor.DisposeEvent(); + await OnGetStatus.InvokeAsync(status); + } + + private async Task QuickPak(string orderId) + { + await OnQPak.InvokeAsync(orderId); } } \ No newline at end of file diff --git a/Wonky.Client/Components/WorkplaceListComponent.razor b/Wonky.Client/Components/WorkplaceListComponent.razor index 8d0acc90..1c86ad95 100644 --- a/Wonky.Client/Components/WorkplaceListComponent.razor +++ b/Wonky.Client/Components/WorkplaceListComponent.razor @@ -14,7 +14,7 @@
@foreach (var workplace in Workplaces) { - +
@workplace.Name diff --git a/Wonky.Client/Helpers/Utils.cs b/Wonky.Client/Helpers/Utils.cs index 82da8565..74fd9cdb 100644 --- a/Wonky.Client/Helpers/Utils.cs +++ b/Wonky.Client/Helpers/Utils.cs @@ -75,7 +75,16 @@ public static class Utils { return value.ToString(); } - + /// + /// Parse string to enum of T + /// + /// + /// + /// + public static T StringToEnum(string value) + { + return (T)Enum.Parse(typeof(T), value, true); + } /// /// Generate unique hashcode from time /// diff --git a/Wonky.Client/HttpInterfaces/ICountryCustomerRepository.cs b/Wonky.Client/HttpInterfaces/ICountryCustomerRepository.cs index e8d0811e..259e9fab 100644 --- a/Wonky.Client/HttpInterfaces/ICountryCustomerRepository.cs +++ b/Wonky.Client/HttpInterfaces/ICountryCustomerRepository.cs @@ -28,29 +28,33 @@ public interface ICountryCustomerRepository /// Get customers paged for given country /// /// + /// /// - Task> GetCompaniesPaged(CustomerPaging paging); + Task> GetCompaniesPaged(string countryCode, CustomerPaging paging); /// /// Get customers paged for given sales rep /// + /// /// /// /// - Task> GetCompaniesPagedSalesRep(string salesRepId, CustomerPaging paging); + Task> GetCompaniesPaged(string countryCode, string salesRepId, CustomerPaging paging); /// /// Get customer by Id /// + /// /// /// - Task GetByCustomerId(string companyId); + Task GetByCustomerId(string countryCode, string companyId); /// /// Update Company data /// + /// /// /// /// - Task UpdateCompany(string companyId, CompanyDto model); + Task UpdateCompany(string countryCode, string companyId, CompanyDto model); } \ No newline at end of file diff --git a/Wonky.Client/HttpRepository/AdvisorCatalogRepository.cs b/Wonky.Client/HttpRepository/AdvisorCatalogRepository.cs index 1b82dadb..1dbdb3a0 100644 --- a/Wonky.Client/HttpRepository/AdvisorCatalogRepository.cs +++ b/Wonky.Client/HttpRepository/AdvisorCatalogRepository.cs @@ -68,7 +68,6 @@ public class AdvisorCatalogRepository : IAdvisorCatalogRepository ["searchColumn"] = pagingParameters.SearchColumn, ["searchTerm"] = pagingParameters.SearchTerm, ["selectGroup"] = pagingParameters.SelectGroup == "0" ? "" : pagingParameters.SelectGroup, - ["countryCode"] = pagingParameters.CountryCode }; var response = await _client .GetAsync(QueryHelpers.AddQueryString($"{_apiConfig.Catalog}/page", queryString)); @@ -108,7 +107,6 @@ public class AdvisorCatalogRepository : IAdvisorCatalogRepository ["searchColumn"] = pagingParameters.SearchColumn, ["searchTerm"] = pagingParameters.SearchTerm, ["selectGroup"] = pagingParameters.SelectGroup == "0" ? "" : pagingParameters.SelectGroup, - ["countryCode"] = pagingParameters.CountryCode }; var response = await _client .GetAsync(QueryHelpers.AddQueryString($"{_apiConfig.Catalog}/{countryCode}/page", queryString)); diff --git a/Wonky.Client/HttpRepository/CountryCatalogRepository.cs b/Wonky.Client/HttpRepository/CountryCatalogRepository.cs index ff573a2c..a1006d0d 100644 --- a/Wonky.Client/HttpRepository/CountryCatalogRepository.cs +++ b/Wonky.Client/HttpRepository/CountryCatalogRepository.cs @@ -68,8 +68,7 @@ public class CountryCatalogRepository : ICountryCatalogRepository ["orderBy"] = paging.OrderBy, ["searchColumn"] = paging.SearchColumn, ["searchTerm"] = paging.SearchTerm, - ["selectGroup"] = paging.SelectGroup == "0" ? "" : paging.SelectGroup, - ["countryCode"] = countryCode + ["selectGroup"] = paging.SelectGroup == "0" ? "" : paging.SelectGroup }; var response = await _client .GetAsync(QueryHelpers.AddQueryString($"{_apiConfig.Catalog}/country/{countryCode}/page", queryString)); diff --git a/Wonky.Client/HttpRepository/CountryCustomerRepository.cs b/Wonky.Client/HttpRepository/CountryCustomerRepository.cs index c677e978..5f99aac7 100644 --- a/Wonky.Client/HttpRepository/CountryCustomerRepository.cs +++ b/Wonky.Client/HttpRepository/CountryCustomerRepository.cs @@ -61,8 +61,9 @@ public class CountryCustomerRepository : ICountryCustomerRepository /// Get customers paged for given sales rep /// /// + /// /// - public async Task> GetCompaniesPaged(CustomerPaging paging) + public async Task> GetCompaniesPaged(string countryCode, CustomerPaging paging) { var queryString = new Dictionary { @@ -73,10 +74,9 @@ public class CountryCustomerRepository : ICountryCustomerRepository ["orderBy"] = paging.OrderBy, ["isHidden"] = paging.IsHidden.ToString(), ["hasFolded"] = paging.HasFolded.ToString(), - ["countryCode"] = paging.CountryCode }; - var response = await _client.GetAsync(QueryHelpers.AddQueryString($"{_api.OfficeCustomers}", queryString)); + var response = await _client.GetAsync(QueryHelpers.AddQueryString($"{_api.OfficeCustomers}/{countryCode}", queryString)); var content = await response.Content.ReadAsStringAsync(); var pagingResponse = new PagingResponse @@ -86,14 +86,16 @@ public class CountryCustomerRepository : ICountryCustomerRepository }; return pagingResponse; } - + /// /// Get customers paged for given sales rep /// + /// /// /// /// - public async Task> GetCompaniesPagedSalesRep(string salesRepId, CustomerPaging paging) + public async Task> GetCompaniesPaged(string countryCode, string salesRepId, + CustomerPaging paging) { var queryString = new Dictionary { @@ -104,7 +106,6 @@ public class CountryCustomerRepository : ICountryCustomerRepository ["orderBy"] = paging.OrderBy, ["isHidden"] = paging.IsHidden.ToString(), ["hasFolded"] = paging.HasFolded.ToString(), - ["countryCode"] = paging.CountryCode }; var response = await _client.GetAsync(QueryHelpers.AddQueryString($"{_api.OfficeCustomers}/salesRep/{salesRepId}/", queryString)); @@ -116,25 +117,28 @@ public class CountryCustomerRepository : ICountryCustomerRepository }; return pagingResponse; - } + } + /// /// Get customer entity by id /// + /// /// /// - public async Task GetByCustomerId(string companyId) + public async Task GetByCustomerId(string countryCode, string companyId) { var company = await _client.GetFromJsonAsync($"{_api.OfficeCustomers}/id/{companyId}"); return company ?? new CompanyDto(); } - + /// /// Update Company data /// + /// /// /// /// - public async Task UpdateCompany(string companyId, CompanyDto model) + public async Task UpdateCompany(string countryCode, string companyId, CompanyDto model) { var response = await _client.PutAsJsonAsync($"{_api.OfficeCustomers}/{companyId}", model); var content = await response.Content.ReadAsStringAsync(); diff --git a/Wonky.Client/Models/PStatus.cs b/Wonky.Client/Models/PStatus.cs new file mode 100644 index 00000000..bb693341 --- /dev/null +++ b/Wonky.Client/Models/PStatus.cs @@ -0,0 +1,11 @@ +namespace Wonky.Client.Models; + +public enum PStatus +{ + None, + Picked, + Packed, + Shipped, + All, + Express +} \ No newline at end of file diff --git a/Wonky.Client/Pages/AdvisorCatalogPage.razor.cs b/Wonky.Client/Pages/AdvisorCatalogPage.razor.cs index 8361f462..ef9426af 100644 --- a/Wonky.Client/Pages/AdvisorCatalogPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorCatalogPage.razor.cs @@ -47,8 +47,6 @@ public partial class AdvisorCatalogPage : IDisposable Prefs = await ProfileService.GetPreferences(); UserInfo = await Storage.GetItemAsync("_xu"); - _page.CountryCode = UserInfo.CountryCode; - _page.OrderBy = Prefs.ItemSort; _page.SearchColumn = Prefs.ItemSearch; _page.PageSize = Convert.ToInt32(Prefs.PageSize); diff --git a/Wonky.Client/Pages/AdvisorCreateActivityPage.razor b/Wonky.Client/Pages/AdvisorCreateActivityPage.razor index 3bf9a1ac..b55921e8 100644 --- a/Wonky.Client/Pages/AdvisorCreateActivityPage.razor +++ b/Wonky.Client/Pages/AdvisorCreateActivityPage.razor @@ -18,7 +18,7 @@ @using Microsoft.AspNetCore.Authorization @using Wonky.Client.Components @attribute [Authorize(Roles = "Advisor")] -@page "/companies/{CompanyId}/activities/new" +@page "/customers/{CompanyId}/activities/new"
@@ -314,7 +314,7 @@ else
diff --git a/Wonky.Client/Pages/AdvisorCreateActivityPage.razor.cs b/Wonky.Client/Pages/AdvisorCreateActivityPage.razor.cs index c2fb4325..eae826e2 100644 --- a/Wonky.Client/Pages/AdvisorCreateActivityPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorCreateActivityPage.razor.cs @@ -370,7 +370,7 @@ public partial class AdvisorCreateActivityPage : IDisposable Toast.ShowSuccess($"{result.Message}", DraftProvider.Draft.Items.Count == 0 ? "Besøg er oprettet" : "Bestilling/Tilbud er oprettet"); await DeleteDraft(); - Navigator.NavigateTo($"/companies"); + Navigator.NavigateTo($"/customers"); return; } // lower working flag diff --git a/Wonky.Client/Pages/AdvisorCreateCustomerPage.razor b/Wonky.Client/Pages/AdvisorCreateCustomerPage.razor index fbf7f30c..fbd4df92 100644 --- a/Wonky.Client/Pages/AdvisorCreateCustomerPage.razor +++ b/Wonky.Client/Pages/AdvisorCreateCustomerPage.razor @@ -15,7 +15,7 @@ // *@ -@page "/companies/new" +@page "/customers/new" @using Microsoft.AspNetCore.Authorization @using Wonky.Client.Components @using System.Xml diff --git a/Wonky.Client/Pages/AdvisorCreateCustomerPage.razor.cs b/Wonky.Client/Pages/AdvisorCreateCustomerPage.razor.cs index de11e42d..9f116c88 100644 --- a/Wonky.Client/Pages/AdvisorCreateCustomerPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorCreateCustomerPage.razor.cs @@ -177,7 +177,7 @@ namespace Wonky.Client.Pages if (!string.IsNullOrWhiteSpace(newId)) { Toaster.ShowSuccess($"'{Company.Name}' er oprettet i CRM."); - Navigator.NavigateTo($"/companies/{newId}"); + Navigator.NavigateTo($"/customers/{newId}"); } else { diff --git a/Wonky.Client/Pages/AdvisorCustomerActivityListPage.razor b/Wonky.Client/Pages/AdvisorCustomerActivityListPage.razor index 582f0365..ed762f6b 100644 --- a/Wonky.Client/Pages/AdvisorCustomerActivityListPage.razor +++ b/Wonky.Client/Pages/AdvisorCustomerActivityListPage.razor @@ -18,7 +18,7 @@ @using Wonky.Client.Components @using Microsoft.AspNetCore.Authorization @attribute [Authorize(Roles = "Advisor")] -@page "/companies/{CompanyId}/activities" +@page "/customers/{CompanyId}/activities" @if (!string.IsNullOrWhiteSpace(Company.Name)) { @@ -27,10 +27,10 @@

@Company.Name

diff --git a/Wonky.Client/Pages/AdvisorCustomerInventoryListPage.razor b/Wonky.Client/Pages/AdvisorCustomerInventoryListPage.razor index 0af0d3bf..5c63728a 100644 --- a/Wonky.Client/Pages/AdvisorCustomerInventoryListPage.razor +++ b/Wonky.Client/Pages/AdvisorCustomerInventoryListPage.razor @@ -17,7 +17,7 @@ @using Wonky.Client.Components @using Microsoft.AspNetCore.Authorization -@page "/companies/{CompanyId}/h/i" +@page "/customers/{CompanyId}/h/i" @attribute [Authorize(Roles = "Advisor")]
@@ -25,10 +25,10 @@

@Company.Name

diff --git a/Wonky.Client/Pages/AdvisorCustomerInvoiceListPage.razor b/Wonky.Client/Pages/AdvisorCustomerInvoiceListPage.razor index 6f8ef55a..0b574d42 100644 --- a/Wonky.Client/Pages/AdvisorCustomerInvoiceListPage.razor +++ b/Wonky.Client/Pages/AdvisorCustomerInvoiceListPage.razor @@ -16,7 +16,7 @@ *@ @using Wonky.Client.Components @using Microsoft.AspNetCore.Authorization -@page "/companies/{CompanyId}/invoices" +@page "/customers/{CompanyId}/invoices" @attribute [Authorize(Roles = "Advisor")] @if (!string.IsNullOrWhiteSpace(Company.Name)) @@ -26,10 +26,10 @@

@Company.Name

diff --git a/Wonky.Client/Pages/AdvisorCustomerListPage.razor b/Wonky.Client/Pages/AdvisorCustomerListPage.razor index 7c8153f0..6cd8f5fe 100644 --- a/Wonky.Client/Pages/AdvisorCustomerListPage.razor +++ b/Wonky.Client/Pages/AdvisorCustomerListPage.razor @@ -17,7 +17,7 @@ @using Wonky.Client.Components @using Microsoft.AspNetCore.Authorization -@page "/companies" +@page "/customers" @attribute [Authorize(Roles = "Advisor")]
@@ -44,7 +44,7 @@
diff --git a/Wonky.Client/Pages/AdvisorCustomerListPage.razor.cs b/Wonky.Client/Pages/AdvisorCustomerListPage.razor.cs index 233d55a1..96d68f32 100644 --- a/Wonky.Client/Pages/AdvisorCustomerListPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorCustomerListPage.razor.cs @@ -60,8 +60,7 @@ namespace Wonky.Client.Pages Paging.SearchColumn = Prefs.CompanySearch; Paging.PageSize = Convert.ToInt32(Prefs.PageSize); Paging.HasFolded = IncludeFolded ? 1 : 0; - Paging.CountryCode = UserInfo.CountryCode; - + // load saved search SavedSearch = string.IsNullOrWhiteSpace(Prefs.CompanyFilterPhrase) ? "" : Prefs.CompanyFilterPhrase; Paging.SearchTerm = SavedSearch; diff --git a/Wonky.Client/Pages/AdvisorCustomerViewPage.razor b/Wonky.Client/Pages/AdvisorCustomerViewPage.razor index fb9a987a..bcf63fd6 100644 --- a/Wonky.Client/Pages/AdvisorCustomerViewPage.razor +++ b/Wonky.Client/Pages/AdvisorCustomerViewPage.razor @@ -19,7 +19,7 @@ @using Microsoft.AspNetCore.Components @using Wonky.Client.Components @attribute [Authorize(Roles = "Advisor")] -@page "/companies/{CompanyId}" +@page "/customers/{CompanyId}" @if (!string.IsNullOrWhiteSpace(Company.Account)) @@ -128,13 +128,13 @@ @* activity buttons *@
diff --git a/Wonky.Client/Pages/AdvisorViewActivityPage.razor b/Wonky.Client/Pages/AdvisorViewActivityPage.razor index 17b3a784..9fa87e67 100644 --- a/Wonky.Client/Pages/AdvisorViewActivityPage.razor +++ b/Wonky.Client/Pages/AdvisorViewActivityPage.razor @@ -19,8 +19,8 @@ @using Wonky.Client.Components @attribute [Authorize(Roles = "Admin,Advisor,Warehouse")] -@page "/companies/{CompanyId}/orders/{OrderId}" -@page "/companies/{CompanyId}/quotes/{OrderId}" +@page "/customers/{CompanyId}/orders/{OrderId}" +@page "/customers/{CompanyId}/quotes/{OrderId}" @* *@ diff --git a/Wonky.Client/Pages/AdvisorWorkplaceDocumentListPage.razor b/Wonky.Client/Pages/AdvisorWorkplaceDocumentListPage.razor index 37db7090..15f157e5 100644 --- a/Wonky.Client/Pages/AdvisorWorkplaceDocumentListPage.razor +++ b/Wonky.Client/Pages/AdvisorWorkplaceDocumentListPage.razor @@ -17,8 +17,8 @@ @using Microsoft.AspNetCore.Authorization @using Wonky.Client.Components -@attribute [Authorize(Roles = "Admin,Warehouse,Office")] -@page "/companies/{CompanyId}/workplaces/{WorkplaceId}/documents" +@attribute [Authorize(Roles = "Advisor")] +@page "/customers/{CompanyId}/workplaces/{WorkplaceId}/documents"

Dokumenter

diff --git a/Wonky.Client/Pages/AdvisorWorkplaceListPage.razor b/Wonky.Client/Pages/AdvisorWorkplaceListPage.razor index c31ee858..e26c8218 100644 --- a/Wonky.Client/Pages/AdvisorWorkplaceListPage.razor +++ b/Wonky.Client/Pages/AdvisorWorkplaceListPage.razor @@ -18,7 +18,7 @@ @using Microsoft.AspNetCore.Authorization @using Wonky.Client.Components @attribute [Authorize(Roles = "Advisor")] -@page "/companies/{CompanyId}/workplaces" +@page "/customers/{CompanyId}/workplaces"
diff --git a/Wonky.Client/Pages/AdvisorWorkplaceViewPage.razor b/Wonky.Client/Pages/AdvisorWorkplaceViewPage.razor index d95453d3..9c920599 100644 --- a/Wonky.Client/Pages/AdvisorWorkplaceViewPage.razor +++ b/Wonky.Client/Pages/AdvisorWorkplaceViewPage.razor @@ -19,7 +19,7 @@ @using Microsoft.AspNetCore.Authorization @using Wonky.Client.Components @attribute [Authorize(Roles = "Advisor")] -@page "/companies/{CompanyId}/workplaces/{WorkplaceId}" +@page "/customers/{CompanyId}/workplaces/{WorkplaceId}"
@@ -114,7 +114,7 @@
diff --git a/Wonky.Client/Pages/AdvisorWorkplaceViewPage.razor.cs b/Wonky.Client/Pages/AdvisorWorkplaceViewPage.razor.cs index 75962c0b..7f1bac00 100644 --- a/Wonky.Client/Pages/AdvisorWorkplaceViewPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorWorkplaceViewPage.razor.cs @@ -62,7 +62,7 @@ public partial class AdvisorWorkplaceViewPage : IDisposable { Working = true; await WorkplaceCrmRepo.DeleteWorkplace(CompanyId, _workplace.WorkplaceId); - _navigator.NavigateTo($"/companies/{CompanyId}/workplaces"); + _navigator.NavigateTo($"/customers/{CompanyId}/workplaces"); } public void Dispose() diff --git a/Wonky.Client/Pages/CountryCatalogPage.razor b/Wonky.Client/Pages/CountryCatalogPage.razor index 4ae355d8..31a64d03 100644 --- a/Wonky.Client/Pages/CountryCatalogPage.razor +++ b/Wonky.Client/Pages/CountryCatalogPage.razor @@ -18,7 +18,7 @@ @using Wonky.Client.Components @using Microsoft.AspNetCore.Authorization @attribute [Authorize(Roles = "Admin,Warehouse")] -@page "/price-catalog/{CountryCode}" +@page "/office/catalog/{CountryCode}"
diff --git a/Wonky.Client/Pages/CountryCatalogPage.razor.cs b/Wonky.Client/Pages/CountryCatalogPage.razor.cs index ccc5a01c..2be19ada 100644 --- a/Wonky.Client/Pages/CountryCatalogPage.razor.cs +++ b/Wonky.Client/Pages/CountryCatalogPage.razor.cs @@ -26,7 +26,7 @@ namespace Wonky.Client.Pages; public partial class CountryCatalogPage : IDisposable { [Inject] public ILocalStorageService Storage { get; set; } - [Inject] public IAdvisorCatalogRepository ItemRepo { get; set; } + [Inject] public ICountryCatalogRepository Catalog { get; set; } [Inject] public HttpInterceptorService Interceptor { get; set; } [Inject] public UserProfileService ProfileService { get; set; } @@ -43,14 +43,11 @@ public partial class CountryCatalogPage : IDisposable { Prefs = await ProfileService.GetPreferences(); UserInfo = await Storage.GetItemAsync("_xu"); - - Paging.CountryCode = UserInfo.CountryCode; Paging.OrderBy = Prefs.ItemSort; Paging.SearchColumn = Prefs.ItemSearch; Paging.PageSize = Convert.ToInt32(Prefs.PageSize); - Paging.CountryCode = CountryCode.ToLower(); - + Interceptor.RegisterEvent(); Interceptor.RegisterBeforeSendEvent(); @@ -106,13 +103,12 @@ public partial class CountryCatalogPage : IDisposable private async Task FetchSalesItems() { Working = true; - var pagingResponse = await ItemRepo.GetSalesItemsPaged(Paging); + var pagingResponse = await Catalog.GetSalesItemsPaged(CountryCode, Paging); Working = false; Items = pagingResponse.Items!; - MetaInfo = pagingResponse.MetaData; + MetaInfo = pagingResponse.MetaData!; } - - + public void Dispose() => Interceptor.DisposeEvent(); } \ No newline at end of file diff --git a/Wonky.Client/Pages/CountryCustomerListPage.razor b/Wonky.Client/Pages/CountryCustomerListPage.razor index f5a5cd4a..1b0df42b 100644 --- a/Wonky.Client/Pages/CountryCustomerListPage.razor +++ b/Wonky.Client/Pages/CountryCustomerListPage.razor @@ -18,9 +18,7 @@ @using Wonky.Client.Components @using Microsoft.AspNetCore.Authorization @attribute [Authorize(Roles = "Admin,Warehouse")] -@page "/office/{countryCode}/customers" - - +@page "/office/customers/{countryCode}"
@@ -43,12 +41,14 @@
- +
+ + @if (Working) { diff --git a/Wonky.Client/Pages/CountryCustomerListPage.razor.cs b/Wonky.Client/Pages/CountryCustomerListPage.razor.cs index bec7d63d..43562e4d 100644 --- a/Wonky.Client/Pages/CountryCustomerListPage.razor.cs +++ b/Wonky.Client/Pages/CountryCustomerListPage.razor.cs @@ -33,7 +33,7 @@ namespace Wonky.Client.Pages [Parameter] public string CountryCode { get; set; } = ""; [Inject] public ILocalStorageService Storage { get; set; } [Inject] public UserProfileService ProfileService { get; set; } - [Inject] public ICountryCustomerRepository CompanyRepo { get; set; } + [Inject] public ICountryCustomerRepository Customers { get; set; } [Inject] public HttpInterceptorService Interceptor { get; set; } [Inject] public NavigationManager Navigator { get; set; } private List Companies { get; set; } = new(); @@ -42,13 +42,14 @@ namespace Wonky.Client.Pages private string SavedSearch { get; set; } = ""; private bool IncludeFolded { get; set; } private bool Working { get; set; } = true; - private MetaData PageData { get; set; } = new(); + private MetaData ResponseMeta { get; set; } = new(); private CustomerPaging Paging { get; set; } = new(); protected override async Task OnParametersSetAsync() { Interceptor.RegisterEvent(); Interceptor.RegisterBeforeSendEvent(); + // set preferences Prefs = await ProfileService.GetPreferences(); UserInfo = await Storage.GetItemAsync("_xu"); @@ -56,8 +57,7 @@ namespace Wonky.Client.Pages Paging.SearchColumn = Prefs.CompanySearch; Paging.PageSize = Convert.ToInt32(Prefs.PageSize); Paging.HasFolded = IncludeFolded ? 1 : 0; - Paging.CountryCode = CountryCode.ToLower(); - + // load saved search SavedSearch = string.IsNullOrWhiteSpace(Prefs.CompanyFilterPhrase) ? "" : Prefs.CompanyFilterPhrase; Paging.SearchTerm = SavedSearch; @@ -117,18 +117,10 @@ namespace Wonky.Client.Pages private async Task FetchCustomers() { Working = true; - var pageRes = await CompanyRepo.GetCompaniesPaged(Paging); + var pageRes = await Customers.GetCompaniesPaged(CountryCode, Paging); Working = false; - if (pageRes.Items.Any()) - { - Companies = pageRes.Items; - PageData = pageRes.MetaData; - } - else - { - Companies = new List(); - PageData = new MetaData(); - } + Companies = pageRes.Items; + ResponseMeta = pageRes.MetaData; } public void Dispose() => Interceptor.DisposeEvent(); diff --git a/Wonky.Client/Pages/CountryCustomerViewPage.razor b/Wonky.Client/Pages/CountryCustomerViewPage.razor new file mode 100644 index 00000000..e1372503 --- /dev/null +++ b/Wonky.Client/Pages/CountryCustomerViewPage.razor @@ -0,0 +1,28 @@ +@* +// Copyright (C) 2022 FCS Frede's Computer Services. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] +// +*@ + +@using Microsoft.AspNetCore.Authorization +@using Microsoft.AspNetCore.Components +@using Wonky.Client.Components +@attribute [Authorize(Roles = "Admin,Warehouse")] +@page "/office/customers/{CountryCode}/{CompanyId}/view" + +
+
+

Data for @CountryCode.ToUpper() Id '@CompanyId' er ikke klar

+
+
diff --git a/Wonky.Client/Pages/KrvItemViewAdminPage.razor.cs b/Wonky.Client/Pages/CountryCustomerViewPage.razor.cs similarity index 53% rename from Wonky.Client/Pages/KrvItemViewAdminPage.razor.cs rename to Wonky.Client/Pages/CountryCustomerViewPage.razor.cs index 9bcea523..13341fb2 100644 --- a/Wonky.Client/Pages/KrvItemViewAdminPage.razor.cs +++ b/Wonky.Client/Pages/CountryCustomerViewPage.razor.cs @@ -13,37 +13,26 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System; -using System.Threading.Tasks; +using System.Text.Json; +using System.Text.RegularExpressions; +using Blazored.LocalStorage; +using Blazored.Toast.Services; using Wonky.Client.HttpInterceptors; -using Wonky.Client.HttpRepository; using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Forms; +using Wonky.Client.Helpers; using Wonky.Client.HttpInterfaces; +using Wonky.Client.Models; +using Wonky.Client.Services; +using Wonky.Client.Shared; using Wonky.Entity.DTO; +using Wonky.Entity.Models; using Wonky.Entity.Views; namespace Wonky.Client.Pages; -public partial class KrvItemViewAdminPage : IDisposable +public partial class CountryCustomerViewPage { - [Parameter] public string SalesItemId { get; set; } = ""; - private SalesItemView _item { get; set; } = new (); - [Inject] public IAdvisorCatalogRepository _itemRepo { get; set; } - [Inject] public HttpInterceptorService _interceptor { get; set; } - - - protected override async Task OnInitializedAsync() - { - _interceptor.RegisterEvent(); - _interceptor.RegisterBeforeSendEvent(); - _item = await _itemRepo.GetSalesVariantId(SalesItemId); - } - - /// - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - /// - public void Dispose() - { - _interceptor!.DisposeEvent(); - } + [Parameter] public string CompanyId { get; set; } = ""; + [Parameter] public string CountryCode { get; set; } = ""; } \ No newline at end of file diff --git a/Wonky.Client/Pages/CountryLandingPage.razor b/Wonky.Client/Pages/CountryLandingPage.razor index 1b15878e..1e06bd51 100644 --- a/Wonky.Client/Pages/CountryLandingPage.razor +++ b/Wonky.Client/Pages/CountryLandingPage.razor @@ -17,48 +17,41 @@ @using Microsoft.AspNetCore.Authorization @attribute [Authorize(Roles = "Admin,Warehouse")] -@page "/office/{CountryCode}" +@page "/office/country/{CountryCode}" -
- -
-
-
-

- @CountryCode.ToUpper() Sælgere -

-

- Sælger kundeliste, Rapporter, Stamdata -

- Sælgere -
-
-
-
-
-
-
-

- @CountryCode.ToUpper() Kunder -

-

- Filtrer og søg kunder -

- Kundeliste -
+ + +
+
+

+ @CountryCode.ToUpper() Sælgere +

+

+ Sælger kundeliste, Rapporter, Stamdata +

+ Sælgere
-
-
-
-

- @CountryCode.ToUpper() Priskatalog -

-

- Produkter og priser -

- Priskatalog -
-
+ +
+
+

+ @CountryCode.ToUpper() Kunder +

+

+ Filtrer og søg kunder +

+ Kundeliste +
+
+
+
+

+ @CountryCode.ToUpper() Priskatalog +

+

+ Produkter og priser +

+ Priskatalog
\ No newline at end of file diff --git a/Wonky.Client/Pages/CountrySalesRepCustomerListPage.razor b/Wonky.Client/Pages/CountrySalesRepCustomerListPage.razor index 7e7abe74..6cca392e 100644 --- a/Wonky.Client/Pages/CountrySalesRepCustomerListPage.razor +++ b/Wonky.Client/Pages/CountrySalesRepCustomerListPage.razor @@ -39,20 +39,20 @@
- +
- +
- + @if (Working) diff --git a/Wonky.Client/Pages/CountrySalesRepCustomerListPage.razor.cs b/Wonky.Client/Pages/CountrySalesRepCustomerListPage.razor.cs index 1f0dc396..6b37dbb3 100644 --- a/Wonky.Client/Pages/CountrySalesRepCustomerListPage.razor.cs +++ b/Wonky.Client/Pages/CountrySalesRepCustomerListPage.razor.cs @@ -26,17 +26,15 @@ public partial class CountrySalesRepCustomerListPage : IDisposable { [Parameter] public string UserId { get; set; } = ""; [Parameter] public string CountryCode { get; set; } = "dk"; - - [Inject] public ILogger Logger { get; set; } [Inject] public HttpInterceptorService Interceptor { get; set; } [Inject] public ICountryCustomerRepository CustomerRepo { get; set; } [Inject] public UserProfileService UserProfileService { get; set; } - private List _companyList { get; set; } = new(); - private MetaData _metaData { get; set; } = new(); - private CustomerPaging _paging = new(); + private List CompanyList { get; set; } = new(); + private MetaData ResponseMeta { get; set; } = new(); + private CustomerPaging Paging = new(); private UserPref UserPref { get; set; } = new(); - private string _savedSearch { get; set; } = ""; - private bool _includeFolded { get; set; } + private string SavedSearch { get; set; } = ""; + private bool IncludeFolded { get; set; } private bool Working { get; set; } = true; protected override async Task OnParametersSetAsync() @@ -46,15 +44,14 @@ public partial class CountrySalesRepCustomerListPage : IDisposable // set preferences UserPref = await UserProfileService.GetPreferences(); - _paging.CountryCode = CountryCode.ToLower(); - _paging.OrderBy = UserPref.CompanySort; - _paging.SearchColumn = UserPref.CompanySearch; - _paging.PageSize = Convert.ToInt32(UserPref.PageSize); - _paging.HasFolded = _includeFolded ? 1 : 0; + Paging.OrderBy = UserPref.CompanySort; + Paging.SearchColumn = UserPref.CompanySearch; + Paging.PageSize = Convert.ToInt32(UserPref.PageSize); + Paging.HasFolded = IncludeFolded ? 1 : 0; // load saved search - _savedSearch = UserPref.CompanyFilterPhrase; - _paging.SearchTerm = _savedSearch; + SavedSearch = UserPref.CompanyFilterPhrase; + Paging.SearchTerm = SavedSearch; await FetchCompanies(); Working = false; @@ -62,33 +59,33 @@ public partial class CountrySalesRepCustomerListPage : IDisposable private async Task OnFoldedClick() { - _includeFolded = !_includeFolded; - _companyList = new List(); - _paging.PageNumber = 1; - _paging.HasFolded = _includeFolded ? 1 : 0; + IncludeFolded = !IncludeFolded; + CompanyList = new List(); + Paging.PageNumber = 1; + Paging.HasFolded = IncludeFolded ? 1 : 0; await FetchCompanies(); } private async Task SelectedPage(int page) { - _companyList = new List(); - _paging.PageNumber = page; + CompanyList = new List(); + Paging.PageNumber = page; await FetchCompanies(); } private async Task SetSearchCol(string searchColumn) { - _companyList = new List(); - _paging.SearchColumn = searchColumn; - _paging.PageNumber = 1; + CompanyList = new List(); + Paging.SearchColumn = searchColumn; + Paging.PageNumber = 1; await FetchCompanies(); } private async Task SetPageSize(string pageSize) { - _companyList = new List(); - _paging.PageSize = Convert.ToInt32(pageSize); - _paging.PageNumber = 1; + CompanyList = new List(); + Paging.PageSize = Convert.ToInt32(pageSize); + Paging.PageNumber = 1; await FetchCompanies(); } @@ -96,30 +93,30 @@ public partial class CountrySalesRepCustomerListPage : IDisposable { // if (!string.IsNullOrWhiteSpace(searchTerm) && searchTerm.Length < 3) return; - _companyList = new List(); - _paging.PageNumber = 1; - _paging.SearchTerm = searchTerm; + CompanyList = new List(); + Paging.PageNumber = 1; + Paging.SearchTerm = searchTerm; await FetchCompanies(); if (!string.IsNullOrWhiteSpace(searchTerm) && searchTerm.TrimEnd().Length > 2) { - _savedSearch = searchTerm; + SavedSearch = searchTerm; await UserProfileService.SetCompanyFilterPhrase(searchTerm.Trim()); } } private async Task SetSortCol(string orderBy) { - _companyList = new List(); - _paging.OrderBy = orderBy; + CompanyList = new List(); + Paging.OrderBy = orderBy; await FetchCompanies(); } private async Task FetchCompanies() { Working = true; - var pagingResponse = await CustomerRepo.GetCompaniesPagedSalesRep(UserId, _paging); - _companyList = pagingResponse.Items; - _metaData = pagingResponse.MetaData; + var pagingResponse = await CustomerRepo.GetCompaniesPaged(CountryCode, UserId, Paging); + CompanyList = pagingResponse.Items; + ResponseMeta = pagingResponse.MetaData; Working = false; } diff --git a/Wonky.Client/Pages/KrvItemViewAdminPage.razor b/Wonky.Client/Pages/KrvItemViewAdminPage.razor deleted file mode 100644 index 9603d279..00000000 --- a/Wonky.Client/Pages/KrvItemViewAdminPage.razor +++ /dev/null @@ -1,68 +0,0 @@ -@* -// Copyright (C) 2022 FCS Frede's Computer Services. -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] -// -*@ - -@page "/sales-item/{salesItemId}" -@using Microsoft.AspNetCore.Authorization -@attribute [Authorize(Roles = "Advisor,Admin")] - - -
-
-

@_item.Name

-
-
- - - - - - - - - - - - - - - - - - - -
Navn@_item.Name
Varenr@_item.Sku
@_item.ProductGroup
Kort Navn@_item.ShortName
- - - - - - - - @foreach (var rate in _item.Rates) - { - - - - - } - -
Priser
@rate.Quantity@rate.Rate
-
- -
\ No newline at end of file diff --git a/Wonky.Client/Pages/KrvItemViewAdminPage.razor.css b/Wonky.Client/Pages/KrvItemViewAdminPage.razor.css deleted file mode 100644 index 50839936..00000000 --- a/Wonky.Client/Pages/KrvItemViewAdminPage.razor.css +++ /dev/null @@ -1,10 +0,0 @@ -/* item image preview */ -.image-name { - margin-left: 10px; -} -.image-preview { - width: auto; - max-width: 200px; - height: 100px; - margin-top: 15px; -} \ No newline at end of file diff --git a/Wonky.Client/Pages/SsystemPrintCatalogPage.razor b/Wonky.Client/Pages/PrintCatalogPage.razor similarity index 93% rename from Wonky.Client/Pages/SsystemPrintCatalogPage.razor rename to Wonky.Client/Pages/PrintCatalogPage.razor index 90b3cc8b..5236afb3 100644 --- a/Wonky.Client/Pages/SsystemPrintCatalogPage.razor +++ b/Wonky.Client/Pages/PrintCatalogPage.razor @@ -17,7 +17,7 @@ @using Wonky.Client.Components @using Microsoft.AspNetCore.Authorization -@attribute [Authorize(Roles = "Admin,Advisor,Office,Warehouse")] +@attribute [Authorize(Roles = "Admin,Advisor,Warehouse")] @page "/print/catalog" diff --git a/Wonky.Client/Pages/SsystemPrintCatalogPage.razor.cs b/Wonky.Client/Pages/PrintCatalogPage.razor.cs similarity index 97% rename from Wonky.Client/Pages/SsystemPrintCatalogPage.razor.cs rename to Wonky.Client/Pages/PrintCatalogPage.razor.cs index 0207d8d5..7b054de0 100644 --- a/Wonky.Client/Pages/SsystemPrintCatalogPage.razor.cs +++ b/Wonky.Client/Pages/PrintCatalogPage.razor.cs @@ -29,7 +29,7 @@ using Wonky.Entity.Views; namespace Wonky.Client.Pages; -public partial class SsystemPrintCatalogPage : IDisposable +public partial class PrintCatalogPage : IDisposable { [Inject] public ILocalStorageService Storage { get; set; } [Inject] public IAdvisorCatalogRepository ItemRepo { get; set; } diff --git a/Wonky.Client/Pages/SystemPrintFrontPage.razor b/Wonky.Client/Pages/PrintFrontPage.razor similarity index 97% rename from Wonky.Client/Pages/SystemPrintFrontPage.razor rename to Wonky.Client/Pages/PrintFrontPage.razor index 3cd029d0..7d2a0ebc 100644 --- a/Wonky.Client/Pages/SystemPrintFrontPage.razor +++ b/Wonky.Client/Pages/PrintFrontPage.razor @@ -17,7 +17,7 @@ @using Wonky.Client.Components @using Microsoft.AspNetCore.Authorization -@attribute [Authorize(Roles = "Admin,Advisor,Office")] +@attribute [Authorize(Roles = "Admin,Advisor")] @page "/print/report/{CountryCode}/{UserId}/{ReportDate}"
diff --git a/Wonky.Client/Pages/SystemPrintFrontPage.razor.cs b/Wonky.Client/Pages/PrintFrontPage.razor.cs similarity index 95% rename from Wonky.Client/Pages/SystemPrintFrontPage.razor.cs rename to Wonky.Client/Pages/PrintFrontPage.razor.cs index c98974e9..11ccbd1a 100644 --- a/Wonky.Client/Pages/SystemPrintFrontPage.razor.cs +++ b/Wonky.Client/Pages/PrintFrontPage.razor.cs @@ -22,7 +22,7 @@ using Wonky.Entity.Views; namespace Wonky.Client.Pages; -public partial class SystemPrintFrontPage +public partial class PrintFrontPage { [Parameter] public string CountryCode { get; set; } = ""; [Parameter] public string UserId { get; set; } = ""; @@ -30,7 +30,7 @@ public partial class SystemPrintFrontPage [Inject] public ILocalStorageService Storage { get; set; } [Inject] public NavigationManager Navigator { get; set; } [Inject] private IJSRuntime JSRuntime { get; set; } - [Inject] public ILogger Logger { get; set; } + [Inject] public ILogger Logger { get; set; } private ReportView Report { get; set; } = new(); private IJSObjectReference JsModule { get; set; } private string ReturnUrl { get; set; } = ""; diff --git a/Wonky.Client/Pages/SystemPrintOrderPage.razor b/Wonky.Client/Pages/PrintOrderPage.razor similarity index 96% rename from Wonky.Client/Pages/SystemPrintOrderPage.razor rename to Wonky.Client/Pages/PrintOrderPage.razor index f2a89c5b..f2371a6f 100644 --- a/Wonky.Client/Pages/SystemPrintOrderPage.razor +++ b/Wonky.Client/Pages/PrintOrderPage.razor @@ -17,7 +17,7 @@ @using Wonky.Client.Components @using Microsoft.AspNetCore.Authorization -@attribute [Authorize(Roles = "Admin,Advisor,Office")] +@attribute [Authorize(Roles = "Admin,Advisor")] @page "/print/orders/{CountryCode}/{UserId}/{ReportDate}"
diff --git a/Wonky.Client/Pages/SystemPrintOrderPage.razor.cs b/Wonky.Client/Pages/PrintOrderPage.razor.cs similarity index 95% rename from Wonky.Client/Pages/SystemPrintOrderPage.razor.cs rename to Wonky.Client/Pages/PrintOrderPage.razor.cs index d45bcff7..f42ceb12 100644 --- a/Wonky.Client/Pages/SystemPrintOrderPage.razor.cs +++ b/Wonky.Client/Pages/PrintOrderPage.razor.cs @@ -21,7 +21,7 @@ using Wonky.Entity.Views; namespace Wonky.Client.Pages; -public partial class SystemPrintOrderPage +public partial class PrintOrderPage { [Parameter] public string CountryCode { get; set; } = ""; [Parameter] public string UserId { get; set; } = ""; @@ -29,7 +29,7 @@ public partial class SystemPrintOrderPage [Inject] public ILocalStorageService Storage { get; set; } [Inject] public NavigationManager Navigator { get; set; } [Inject] private IJSRuntime JSRuntime { get; set; } - [Inject] public ILogger Logger { get; set; } + [Inject] public ILogger Logger { get; set; } private ReportView Report { get; set; } = new(); private List Items { get; set; } = new(); private IJSObjectReference JsModule { get; set; } diff --git a/Wonky.Client/Pages/WarehouseOrderListPage.razor b/Wonky.Client/Pages/WarehouseOrderListPage.razor index 67c52ae1..8a2b7315 100644 --- a/Wonky.Client/Pages/WarehouseOrderListPage.razor +++ b/Wonky.Client/Pages/WarehouseOrderListPage.razor @@ -17,7 +17,20 @@ @using Wonky.Client.Components @using Microsoft.AspNetCore.Authorization -@attribute [Authorize(Roles = "Admin,Warehouse,Office")] +@attribute [Authorize(Roles = "Admin,Warehouse")] @page "/warehouse/orders/{Status}" - +
+
+

Forsendelser

+
+
+
+
+ Loading... +
+
+
+
+ \ No newline at end of file diff --git a/Wonky.Client/Pages/WarehouseOrderListPage.razor.cs b/Wonky.Client/Pages/WarehouseOrderListPage.razor.cs index 932c265c..5e40b2f6 100644 --- a/Wonky.Client/Pages/WarehouseOrderListPage.razor.cs +++ b/Wonky.Client/Pages/WarehouseOrderListPage.razor.cs @@ -1,8 +1,108 @@ using Microsoft.AspNetCore.Components; +using Wonky.Client.Helpers; +using Wonky.Client.HttpInterceptors; +using Wonky.Client.HttpInterfaces; +using Wonky.Client.Models; +using Wonky.Entity.Views; namespace Wonky.Client.Pages; -public partial class WarehouseOrderListPage +public partial class WarehouseOrderListPage : IDisposable { - [Parameter] public string Status { get; set; } = "none"; + [Parameter] public string Status { get; set; } = "none"; + + [Inject] public HttpInterceptorService Interceptor { get; set; } + [Inject] public IWarehouseRepository WarehouseRepo { get; set; } + [Inject] public NavigationManager Navigator { get; set; } + private List OrderList { get; set; } + private bool Working { get; set; } = true; + private string Header { get; set; } = "Ubehandlet"; + private bool ReadyToShip { get; set; } + protected override async Task OnParametersSetAsync() + { + Interceptor.RegisterEvent(); + Interceptor.RegisterBeforeSendEvent(); + OrderList = await FetchOrders(Status); + } + + private async Task GetStatusCallback(PStatus status) + { + Working = true; + OrderList = new List(); + switch (status) + { + case PStatus.None: + Header = "Ubehandlede ordrer"; + ReadyToShip = false; + break; + case PStatus.Picked: + Header = "Plukkede ordrer"; + ReadyToShip = false; + break; + case PStatus.Packed: + Header = "Pakkede ordrer"; + ReadyToShip = true; + break; + case PStatus.Shipped: + break; + case PStatus.All: + break; + case PStatus.Express: + break; + default: + throw new ArgumentOutOfRangeException(nameof(status), status, null); + } + Status = Utils.EnumToString(status).ToLower(); + OrderList = await FetchOrders(Status); + Working = false; + } + + /// + /// QPak - quick mark an order as shipped + /// + /// + private async Task QPakCallback(string orderId) + { + Working = true; + var order = OrderList.First(x => x.OrderId == orderId); + order.ProcessStatusEnum = "packed"; + var process = new WarehouseProcess + { + OrderId = order.OrderId, + ProcessStatusEnum = "packed" + }; + await WarehouseRepo.UpdateWarehouseOrderStatus(process); + OrderList.Remove(order); + Working = false; + } + /// + /// Set status shipped where status is packed + /// + private async Task SetShippedCallback() + { + Working = true; + foreach (var order in OrderList.Where(order => order.ProcessStatusEnum.ToLower() == "packed")) + { + order.ProcessStatusEnum = "shipped"; + var process = new WarehouseProcess + { + OrderId = order.OrderId, + ProcessStatusEnum = "shipped" + }; + await WarehouseRepo.UpdateWarehouseOrderStatus(process); + } + Working = false; + } + + private async Task> FetchOrders(string status) + { + Working = true; + var orderList = await WarehouseRepo.GetWarehouseOrderListByStatus(status.ToLower()); + if(orderList.Any(x => x.Express)) + orderList = orderList.OrderByDescending(x => x.Express).ToList(); + Working = false; + return orderList; + } + + public void Dispose() => Interceptor.DisposeEvent(); } \ No newline at end of file diff --git a/Wonky.Client/Pages/WarehouseOrderViewPage.razor b/Wonky.Client/Pages/WarehouseOrderViewPage.razor index 135c3642..3d8f45e3 100644 --- a/Wonky.Client/Pages/WarehouseOrderViewPage.razor +++ b/Wonky.Client/Pages/WarehouseOrderViewPage.razor @@ -17,53 +17,53 @@ @using Microsoft.AspNetCore.Authorization @using Wonky.Client.Components -@attribute [Authorize(Roles = "Admin,Warehouse,Office")] +@attribute [Authorize(Roles = "Admin,Warehouse")] @page "/warehouse/orders/process/{OrderId}" -@if (!string.IsNullOrWhiteSpace(_order.OrderDate)) +@if (!string.IsNullOrWhiteSpace(Order.OrderDate)) { - + - + - + - + - + - + - + - + - + - +
- @if (_order.Express) + @if (Order.Express) {

HASTE ORDRE

} -

@_order.Company.Name

+

@Order.Company.Name

Konto@_order.Company.Account@Order.Company.Account Telefon@_order.Company.Phone@Order.Company.Phone
Kunde@_order.Company.Name@Order.Company.Name Lev.Navn@_order.DlvName@Order.DlvName
Adresse@_order.Company.Address1@Order.Company.Address1 Lev.Adresse@_order.DlvAddress1@Order.DlvAddress1
Adresse@_order.Company.Address2@Order.Company.Address2 Lev.Adresse@_order.DlvAddress2@Order.DlvAddress2
Postnr By@_order.Company.ZipCode @_order.Company.City@Order.Company.ZipCode @Order.Company.City Lev.Postnr By@_order.DlvZipCity@Order.DlvZipCity
@@ -77,7 +77,7 @@ - @foreach (var line in _order.Lines) + @foreach (var line in Order.Lines) { @line.Location @@ -93,10 +93,10 @@ } - @if (!string.IsNullOrWhiteSpace(_order.OfficeNote)) + @if (!string.IsNullOrWhiteSpace(Order.OfficeNote)) {
-

@_order.OfficeNote

+

@Order.OfficeNote

}
@@ -106,15 +106,15 @@
- @if (_order.ProcessStatusEnum.ToLower() == "none") + @if (Order.ProcessStatusEnum.ToLower() == "none") { } - @if (_order.ProcessStatusEnum.ToLower() == "picked") + @if (Order.ProcessStatusEnum.ToLower() == "picked") { } - @if (_order.ProcessStatusEnum.ToLower() == "packed") + @if (Order.ProcessStatusEnum.ToLower() == "packed") { } diff --git a/Wonky.Client/Pages/WarehouseOrderViewPage.razor.cs b/Wonky.Client/Pages/WarehouseOrderViewPage.razor.cs index 6f6d811f..8242936b 100644 --- a/Wonky.Client/Pages/WarehouseOrderViewPage.razor.cs +++ b/Wonky.Client/Pages/WarehouseOrderViewPage.razor.cs @@ -28,63 +28,71 @@ namespace Wonky.Client.Pages; public partial class WarehouseOrderViewPage : IDisposable { [Parameter] public string OrderId { get; set; } = ""; - [Inject] public HttpInterceptorService _interceptor { get; set; } - [Inject] public IWarehouseRepository _warehouseRepo { get; set; } - [Inject] public NavigationManager _navigator { get; set; } - [Inject] public IToastService _toast { get; set; } - [Inject] public ILogger _logger { get; set; } + [Inject] public HttpInterceptorService Interceptor { get; set; } + [Inject] public IWarehouseRepository WarehouseRepo { get; set; } + [Inject] public NavigationManager Navigator { get; set; } + [Inject] public IToastService Toast { get; set; } + [Inject] public ILogger Logger { get; set; } - private WarehouseOrderView _order { get; set; } = new(); - private bool Working { get; set; } + private WarehouseOrderView Order { get; set; } = new(); + private bool Working { get; set; } = true; protected override async Task OnParametersSetAsync() { - _interceptor.RegisterEvent(); - _interceptor.RegisterBeforeSendEvent(); + Interceptor.RegisterEvent(); + Interceptor.RegisterBeforeSendEvent(); if (!string.IsNullOrWhiteSpace(OrderId)) - _order = await _warehouseRepo.GetWarehouseOrder(OrderId); + Order = await WarehouseRepo.GetWarehouseOrder(OrderId); - _logger.LogDebug("Warehouse OrderView =>\n{}", JsonSerializer.Serialize(_order)); + Logger.LogDebug("Warehouse OrderView =>\n{}", JsonSerializer.Serialize(Order)); + Working = false; } private async Task SetProcessStatusPicked() { + if (Working) + return; + Working = true; var process = new WarehouseProcess { - OrderId = _order.OrderId, + OrderId = Order.OrderId, ProcessStatusEnum = "picked" }; - await _warehouseRepo.UpdateWarehouseOrderStatus(process); - _navigator.NavigateTo("/warehouse/orders/none"); + await WarehouseRepo.UpdateWarehouseOrderStatus(process); + Navigator.NavigateTo("/warehouse/orders/none"); } private async Task SetProcessStatusPacked() { + if (Working) + return; Working = true; var process = new WarehouseProcess { - OrderId = _order.OrderId, + OrderId = Order.OrderId, ProcessStatusEnum = "packed" }; - await _warehouseRepo.UpdateWarehouseOrderStatus(process); - _navigator.NavigateTo("/warehouse/orders/picked"); + await WarehouseRepo.UpdateWarehouseOrderStatus(process); + Navigator.NavigateTo("/warehouse/orders/picked"); } private async Task SetProcessStatusShipped() { + if (Working) + return; Working = true; var process = new WarehouseProcess { - OrderId = _order.OrderId, + OrderId = Order.OrderId, ProcessStatusEnum = "shipped" }; - await _warehouseRepo.UpdateWarehouseOrderStatus(process); - _navigator.NavigateTo("/warehouse/orders/none"); + await WarehouseRepo.UpdateWarehouseOrderStatus(process); + Navigator.NavigateTo("/warehouse/orders/none"); } public void Dispose() { - _interceptor.DisposeEvent(); + Interceptor.DisposeEvent(); } } \ No newline at end of file diff --git a/Wonky.Client/Shared/InformationModal.razor.cs b/Wonky.Client/Shared/InformationModal.razor.cs index f17ba663..6b771658 100644 --- a/Wonky.Client/Shared/InformationModal.razor.cs +++ b/Wonky.Client/Shared/InformationModal.razor.cs @@ -31,6 +31,7 @@ public partial class InformationModal StateHasChanged(); } + // ReSharper disable once MemberCanBePrivate.Global public void Hide() { _modalDisplay = "none;"; diff --git a/Wonky.Client/Shared/InventoryReorderModal.razor.cs b/Wonky.Client/Shared/InventoryReorderModal.razor.cs index 2172a50c..6980fea6 100644 --- a/Wonky.Client/Shared/InventoryReorderModal.razor.cs +++ b/Wonky.Client/Shared/InventoryReorderModal.razor.cs @@ -29,7 +29,7 @@ public partial class InventoryReorderModal { [Parameter] public string CompanyId { get; set; } = ""; [Parameter] public SalesItemView SalesItem { get; set; } = new(); - [Inject] public ICustomerHistoryRepository CustomerHistoryCrmRepo { get; set; } + [Inject] public ICustomerHistoryRepository HistoryRepo { get; set; } [Parameter] public EventCallback OnSelected { get; set; } private List? History { get; set; } = new(); private DraftItem SelectedItem { get; set; } = new(); @@ -43,7 +43,7 @@ public partial class InventoryReorderModal if (string.IsNullOrWhiteSpace(SalesItem.Sku)) return; - History = await CustomerHistoryCrmRepo.FetchHistory(CompanyId, SalesItem.Sku); + History = await HistoryRepo.FetchHistory(CompanyId, SalesItem.Sku); if (!History.Any()) await Task.Delay(1000); SelectedItem.Item = SalesItem; diff --git a/Wonky.Client/Shared/NavMenu.razor b/Wonky.Client/Shared/NavMenu.razor index eebb17e4..d25a5066 100644 --- a/Wonky.Client/Shared/NavMenu.razor +++ b/Wonky.Client/Shared/NavMenu.razor @@ -44,19 +44,19 @@ - + @@ -75,7 +75,7 @@
diff --git a/Wonky.Client/Shared/PriceListModal.razor b/Wonky.Client/Shared/PriceListModal.razor index a39bd430..768c3027 100644 --- a/Wonky.Client/Shared/PriceListModal.razor +++ b/Wonky.Client/Shared/PriceListModal.razor @@ -41,7 +41,7 @@
- +
@@ -53,10 +53,10 @@
- @if (_items.Any()) + @if (Items.Any()) {
    - @foreach (var item in _items) + @foreach (var item in Items) {
  • diff --git a/Wonky.Client/Shared/PriceListModal.razor.cs b/Wonky.Client/Shared/PriceListModal.razor.cs index 2acb843a..9513817d 100644 --- a/Wonky.Client/Shared/PriceListModal.razor.cs +++ b/Wonky.Client/Shared/PriceListModal.razor.cs @@ -28,21 +28,20 @@ public partial class PriceListModal : IDisposable { [Parameter] public string CountryCode { get; set; } = "dk"; [Parameter] public EventCallback OnSelected { get; set; } - [Inject] public IAdvisorCatalogRepository ItemRepo { get; set; } + [Inject] public IAdvisorCatalogRepository Catalog { get; set; } [Inject] public HttpInterceptorService Interceptor { get; set; } - [Inject] public UserProfileService UserProfileService { get; set; } + [Inject] public UserProfileService ProfileService { get; set; } private string _modalDisplay = ""; private bool _showBackdrop; - private List _items { get; set; } = new(); - private MetaData? _metaData { get; set; } = new(); + private List Items { get; set; } = new(); + private MetaData? ResponseMeta { get; set; } = new(); private CatalogPaging _paging = new(); private UserPref _userPref = new(); protected override async Task OnInitializedAsync() { - _userPref = await UserProfileService.GetPreferences(); - _paging.CountryCode = CountryCode; + _userPref = await ProfileService.GetPreferences(); _paging.OrderBy = _userPref.ItemSort; _paging.SearchColumn = _userPref.ItemSearch; _paging.PageSize = Convert.ToInt32(_userPref.PageSize); @@ -59,13 +58,13 @@ public partial class PriceListModal : IDisposable private async Task SelectedPage(int page) { - _items = new List(); + Items = new List(); _paging.PageNumber = page; await GetSalesItems(); } private async Task SetSearchPhrase(string searchTerm) { - _items = new List(); + Items = new List(); _paging.PageNumber = 1; _paging.SearchTerm = searchTerm; await GetSalesItems(); @@ -73,14 +72,14 @@ public partial class PriceListModal : IDisposable private async Task GetSalesItems() { - var pagingResponse = await ItemRepo.GetSalesItemsPaged(_paging); - _items = pagingResponse.Items!; - _metaData = pagingResponse.MetaData; + var pagingResponse = await Catalog.GetSalesItemsPaged(_paging); + Items = pagingResponse.Items!; + ResponseMeta = pagingResponse.MetaData; } private async Task SetPageSize(string pageSize) { - _items = new List(); + Items = new List(); _paging.PageSize = Convert.ToInt32(pageSize); _paging.PageNumber = 1; await GetSalesItems(); @@ -88,7 +87,7 @@ public partial class PriceListModal : IDisposable private async Task SetSearchCol(string columnName) { - _items = new List(); + Items = new List(); _paging.PageNumber = 1; _paging.SearchColumn = columnName; await GetSalesItems(); @@ -96,7 +95,7 @@ public partial class PriceListModal : IDisposable private async Task SetSortCol(string orderBy) { - _items = new List(); + Items = new List(); _paging.OrderBy = orderBy; await GetSalesItems(); } diff --git a/Wonky.Client/Shared/ProductHistoryModal.razor.cs b/Wonky.Client/Shared/ProductHistoryModal.razor.cs index 8574a82a..1daa2872 100644 --- a/Wonky.Client/Shared/ProductHistoryModal.razor.cs +++ b/Wonky.Client/Shared/ProductHistoryModal.razor.cs @@ -29,7 +29,7 @@ public partial class ProductHistoryModal // [Parameter] public EventCallback OnSelected { get; set; } [Parameter] public string CompanyId { get; set; } = ""; [Parameter] public string ItemSku { get; set; } = ""; - [Inject] public ICustomerHistoryRepository CustomerHistoryCrmRepo { get; set; } + [Inject] public ICustomerHistoryRepository HistoryRepo { get; set; } private List? History { get; set; } private string ProductName { get; set; } = ""; private string _modalDisplay = ""; @@ -37,7 +37,7 @@ public partial class ProductHistoryModal protected override async Task OnParametersSetAsync() { - History = await CustomerHistoryCrmRepo.FetchHistory(CompanyId, ItemSku); + History = await HistoryRepo.FetchHistory(CompanyId, ItemSku); if (History.Any()) { ProductName = History[0].Description; diff --git a/Wonky.Client/Shared/ProductPriceHistoryModal.razor.cs b/Wonky.Client/Shared/ProductPriceHistoryModal.razor.cs index de314f02..d8afefe0 100644 --- a/Wonky.Client/Shared/ProductPriceHistoryModal.razor.cs +++ b/Wonky.Client/Shared/ProductPriceHistoryModal.razor.cs @@ -29,7 +29,7 @@ public partial class ProductPriceHistoryModal [Parameter] public EventCallback OnSelected { get; set; } [Parameter] public string CompanyId { get; set; } = ""; [Parameter] public string Sku { get; set; } = ""; - [Inject] public ICustomerHistoryRepository CustomerHistoryCrmRepo { get; set; } + [Inject] public ICustomerHistoryRepository HistoryRepo { get; set; } private List? History { get; set; } private string ProductName { get; set; } = ""; private string _modalDisplay = ""; @@ -40,7 +40,7 @@ public partial class ProductPriceHistoryModal if (string.IsNullOrWhiteSpace(Sku)) return; - History = await CustomerHistoryCrmRepo.FetchHistory(CompanyId, Sku); + History = await HistoryRepo.FetchHistory(CompanyId, Sku); if (History.Any()) { ProductName = History[0].Description; diff --git a/Wonky.Client/wwwroot/css/app.css b/Wonky.Client/wwwroot/css/app.css index 2cb2a5d5..11012adf 100644 --- a/Wonky.Client/wwwroot/css/app.css +++ b/Wonky.Client/wwwroot/css/app.css @@ -6,8 +6,12 @@ body { .draft-expires-msg { font-size: 0.8em; } -.spinner { - height: 48px; +.busy-signal { + float: right; + z-index: 100; + position: relative; + top: 1px; + right: 10px; } .workDate { font-variant: small-caps; diff --git a/Wonky.Entity/Requests/CatalogPaging.cs b/Wonky.Entity/Requests/CatalogPaging.cs index 8ab6ea2a..fd7ecb96 100644 --- a/Wonky.Entity/Requests/CatalogPaging.cs +++ b/Wonky.Entity/Requests/CatalogPaging.cs @@ -60,9 +60,4 @@ public class CatalogPaging /// Set product group filter /// public string SelectGroup { get; set; } = ""; - - /// - /// Country code - /// - public string CountryCode { get; set; } = "dk"; } \ No newline at end of file diff --git a/Wonky.Entity/Requests/CustomerPaging.cs b/Wonky.Entity/Requests/CustomerPaging.cs index cdb7391b..7ca546dc 100644 --- a/Wonky.Entity/Requests/CustomerPaging.cs +++ b/Wonky.Entity/Requests/CustomerPaging.cs @@ -71,6 +71,4 @@ public class CustomerPaging /// public int HasFolded { get; set; } - public string CountryCode { get; set; } = "dk"; - } \ No newline at end of file