From 5427c78dbe11e4464e37b6abb10ff5544b5960c0 Mon Sep 17 00:00:00 2001 From: Frede Hundewadt Date: Tue, 7 Feb 2023 09:01:03 +0100 Subject: [PATCH] header check --- .../AdvisorActivityKmStartComponent.razor | 23 +++++- .../AdvisorActivityListComponent.razor | 3 +- ...AdvisorReportActivityLedgerComponent.razor | 6 +- .../Components/CatalogGroupComponent.razor.cs | 2 +- .../CatalogSearchComponent.razor.cs | 12 ++-- .../Components/CatalogSortComponent.razor.cs | 12 ++-- .../CustomerInventoryListComponent.razor | 5 +- .../CustomerInvoiceListComponent.razor | 17 +++++ .../CustomerInvoiceListComponent.razor.cs | 16 +++++ .../CustomerProductCheckListComponent.razor | 6 +- .../CustomerProductLineListComponent.razor.cs | 1 - .../CustomerSearchColumnComponent.razor.cs | 10 +-- .../CustomerSearchPhraseComponent.razor.cs | 6 +- .../Components/CustomerSortComponent.razor.cs | 10 +-- .../Components/InfoAdvisorComponent.razor | 16 +++++ .../Components/InfoBrowserComponent.razor | 16 +++++ .../Components/InfoCommonComponent.razor | 16 +++++ .../Components/InfoOfficeComponent.razor | 16 +++++ .../Components/InfoOpenSourceComponent.razor | 16 +++++ .../InfoProcessStateComponent.razor | 17 ++++- .../InfoQuoteToolbarComponent.razor | 16 +++++ .../Components/InfoWarehouseComponent.razor | 16 +++++ .../LandingComponentAdvisor.razor.cs | 6 +- .../LandingComponentOffice.razor.cs | 12 ++-- .../OfficeCountryAdvisorListComponent.razor | 2 +- ...OfficeCountryAdvisorListComponent.razor.cs | 2 +- .../OfficeCountryCustomerListComponent.razor | 70 +++++++------------ ...fficeCountryCustomerListComponent.razor.cs | 16 ++++- .../OfficeCountryUserListComponent.razor.cs | 4 +- .../Components/PageSizeComponent.razor.cs | 10 +-- .../Components/QuoteListComponent.razor | 16 +++++ .../Components/QuoteListComponent.razor.cs | 15 ++++ .../Components/ReportItemComponent.razor.cs | 15 ++++ .../Components/WorkDateComponent.razor.cs | 14 ++-- .../Components/WorkingThreeDots.razor.cs | 14 ++++ .../Components/WorkplaceListComponent.razor | 16 +++++ .../WorkplaceListComponent.razor.cs | 15 ++++ Wonky.Client/Features/PagingResponse.cs | 1 - Wonky.Client/Helpers/InputDateTime.cs | 2 +- Wonky.Client/Helpers/StringExtensions.cs | 1 + Wonky.Client/Helpers/Utils.cs | 14 ++-- Wonky.Client/Helpers/VatUtils.cs | 4 +- .../HttpInterceptorService.cs | 3 +- .../HttpInterceptors/HttpResponseException.cs | 2 +- .../IAdvisorActivityRepository.cs | 1 + .../IAdvisorContactRepository.cs | 1 + .../IAdvisorCustomerHistoryRepository.cs | 2 +- .../IAdvisorCustomerRepository.cs | 1 + .../IAdvisorReportRepository.cs | 1 + .../IAdvisorTaskItemRepository.cs | 2 +- .../IAdvisorWorkplaceRepository.cs | 1 + .../IOfficeCatalogRepository.cs | 1 + .../IOfficeCustomerHistoryRepository.cs | 2 +- .../IOfficeCustomerRepository.cs | 1 + .../HttpInterfaces/IOfficeReportRepository.cs | 2 +- .../HttpInterfaces/IOrderProcessRepository.cs | 1 + .../HttpInterfaces/ISystemSendMailService.cs | 16 +++++ .../HttpInterfaces/ISystemUserRepository.cs | 5 +- .../AdvisorActivityRepository.cs | 2 +- .../AdvisorContactRepository.cs | 16 +++++ .../AdvisorCustomerHistoryRepository.cs | 3 +- .../AdvisorCustomerRepository.cs | 7 +- .../HttpRepository/AdvisorReportRepository.cs | 2 +- .../AdvisorTaskItemRepository.cs | 4 +- .../AdvisorWorkplaceRepository.cs | 1 + .../CountryCatalogRepository.cs | 6 +- .../OfficeCustomerHistoryRepository.cs | 3 +- .../OfficeCustomerRepository.cs | 7 +- .../HttpRepository/OfficeReportRepository.cs | 3 +- .../HttpRepository/OrderProcessRepository.cs | 1 + .../HttpRepository/SystemSendMailService.cs | 17 ++++- .../HttpRepository/SystemUserRepository.cs | 10 +-- Wonky.Client/Models/Draft.cs | 17 +---- Wonky.Client/Models/DraftItem.cs | 32 +++++++++ Wonky.Client/Models/PSort.cs | 16 +++++ Wonky.Client/Models/PStatus.cs | 16 +++++ Wonky.Client/Models/PTarget.cs | 16 +++++ Wonky.Client/Models/QCallbackArgs.cs | 16 +++++ Wonky.Client/Models/QStatus.cs | 16 +++++ Wonky.Client/Models/SelectedSku.cs | 1 + Wonky.Client/Models/VatAddress.cs | 2 +- .../Pages/AdvisorActivityCreatePage.razor | 2 +- .../Pages/AdvisorActivityCreatePage.razor.cs | 17 ++--- .../AdvisorActivityTodayListPage.razor.cs | 9 ++- .../Pages/AdvisorActivityViewPage.razor.cs | 4 -- .../AdvisorCustomerActivityListPage.razor.cs | 2 - .../Pages/AdvisorCustomerCreatePage.razor | 1 - .../Pages/AdvisorCustomerCreatePage.razor.cs | 8 +-- .../AdvisorCustomerInventoryListPage.razor.cs | 1 + .../AdvisorCustomerInvoiceListPage.razor.cs | 18 ++++- .../Pages/AdvisorCustomerListPage.razor.cs | 17 ++--- .../Pages/AdvisorCustomerViewPage.razor.cs | 1 + .../Pages/AdvisorQuoteListPage.razor.cs | 21 ++++-- .../Pages/AdvisorReportCreatePage.razor | 3 +- .../Pages/AdvisorReportCreatePage.razor.cs | 17 ++--- .../Pages/AdvisorReportListPage.razor.cs | 3 +- .../Pages/AdvisorReportViewPage.razor.cs | 9 +-- .../Pages/AdvisorTaskItemListCrmPage.razor.cs | 12 ++-- .../Pages/AdvisorTaskItemViewCrmPage.razor.cs | 3 +- .../AdvisorWorkplaceDocumentListPage.razor.cs | 3 +- .../Pages/AdvisorWorkplaceListPage.razor.cs | 4 +- .../Pages/AdvisorWorkplaceViewPage.razor | 1 - .../Pages/AdvisorWorkplaceViewPage.razor.cs | 5 +- .../Pages/CatalogCountryPage.razor.cs | 12 ++-- .../Pages/CatalogCountryPrintPage.razor.cs | 9 +-- Wonky.Client/Pages/ErrorPage404.razor.cs | 1 + Wonky.Client/Pages/ErrorReportPage.razor.cs | 1 + Wonky.Client/Pages/Login.razor.cs | 2 +- Wonky.Client/Pages/Logout.razor.cs | 2 +- .../OfficeCustomerCountryListPage.razor.cs | 17 ++--- ...fficeCustomerCreatePhoneOrderPage.razor.cs | 2 +- .../OfficeCustomerOrderViewPage.razor.cs | 6 +- Wonky.Client/Pages/OfficeLandingPage.razor.cs | 18 ++++- ...OfficeUserAdvisorCustomerListPage.razor.cs | 13 ++-- .../Pages/OfficeUserAdvisorListPage.razor.cs | 22 +++++- .../OfficeUserAdvisorReportListPage.razor.cs | 4 +- .../OfficeUserAdvisorReportViewPage.razor.cs | 12 ++-- .../OfficeUserAdvisorViewEditPage.razor.cs | 3 +- .../Pages/ReportPrintOrderPage.razor.cs | 2 +- .../Pages/ReportPrintSummaryPage.razor.cs | 2 +- .../Pages/WarehouseOrderListPage.razor.cs | 16 +++++ .../Pages/WarehouseOrderViewPage.razor.cs | 4 +- Wonky.Client/Program.cs | 1 + .../Services/AuthenticationService.cs | 4 +- .../Services/IAuthenticationService.cs | 2 +- Wonky.Client/Services/OrderDraftService.cs | 1 + Wonky.Client/Services/RefreshTokenService.cs | 4 +- Wonky.Client/Services/UserProfileService.cs | 9 +-- Wonky.Client/Services/VatInfoLookupService.cs | 2 +- Wonky.Client/Shared/AuthStateProvider.cs | 2 +- .../ConfirmProductCheckModalOverlay.razor.cs | 1 + .../ConfirmWorkDateModalOverlay.razor.cs | 1 + .../Shared/ConfirmationModal.razor.cs | 1 + Wonky.Client/Shared/ContactModal.razor.cs | 1 + .../CustomerActivityListModalOverlay.razor | 16 +++++ .../CustomerActivityListModalOverlay.razor.cs | 16 +++++ .../CustomerActivityViewModalOverlay.razor.cs | 1 + .../CustomerInventoryListModalOverlay.razor | 16 +++++ ...CustomerInventoryListModalOverlay.razor.cs | 16 +++++ ...tomerInventoryReorderModalOverlay.razor.cs | 1 + .../CustomerInvoiceListModalOverlay.razor | 16 +++++ .../CustomerInvoiceListModalOverlay.razor.cs | 17 ++++- .../CustomerInvoiceViewModalOverlay.razor.cs | 1 + .../Shared/DraftStateProvider.razor.cs | 3 +- Wonky.Client/Shared/InformationModal.razor.cs | 1 + .../Shared/PriceCatalogModalOverlay.razor.cs | 10 +-- .../ProductHistoryModalOverlay.razor.cs | 1 + ... => ProductPriceHistoryModalOverlay.razor} | 25 +++---- ... ProductPriceHistoryModalOverlay.razor.cs} | 8 +-- Wonky.Client/Shared/VatLookupDkModal.razor.cs | 1 + Wonky.Client/wwwroot/appsettings.json | 2 +- Wonky.Entity/Configuration/ApiConfig.cs | 1 + Wonky.Entity/Configuration/AppInfo.cs | 1 + Wonky.Entity/DTO/ActivityDto.cs | 3 +- Wonky.Entity/DTO/ActivityLineDto.cs | 3 +- Wonky.Entity/DTO/ActivityOfficeNote.cs | 16 +++++ Wonky.Entity/DTO/CompanyDto.cs | 3 +- Wonky.Entity/DTO/ContactDto.cs | 16 +++++ Wonky.Entity/DTO/CredentialDto.cs | 1 + Wonky.Entity/DTO/EmailContact.cs | 23 ++++++ Wonky.Entity/DTO/EmailMessage.cs | 22 ++++-- Wonky.Entity/DTO/KrvProductDto.cs | 1 + Wonky.Entity/DTO/KrvVariantDto.cs | 1 + Wonky.Entity/DTO/OrderProcessState.cs | 2 +- Wonky.Entity/DTO/ReportDto.cs | 1 + Wonky.Entity/DTO/ReportFiguresDto.cs | 1 + Wonky.Entity/DTO/ReportInitDto.cs | 2 +- Wonky.Entity/DTO/ResetPasswordDto.cs | 1 + Wonky.Entity/DTO/TaskItemDto.cs | 1 + Wonky.Entity/DTO/UpdateCrmDto.cs | 16 +++++ Wonky.Entity/DTO/UpdateErpDto.cs | 16 +++++ Wonky.Entity/DTO/UserInfoDto.cs | 2 +- Wonky.Entity/DTO/UserManagerEditView.cs | 38 ++++++++++ .../UserManagerListView.cs} | 13 ++-- Wonky.Entity/DTO/UserRoleAssignment.cs | 23 ++++++ Wonky.Entity/DTO/UserUpdateDto.cs | 1 + Wonky.Entity/DTO/WorkplaceDto.cs | 2 +- Wonky.Entity/Models/TimeFrame.cs | 1 + Wonky.Entity/Models/VatLifeCycle.cs | 1 + Wonky.Entity/Models/VatRegState.cs | 1 + Wonky.Entity/Models/VirkRegInfo.cs | 1 + Wonky.Entity/Requests/CatalogPager.cs | 1 + Wonky.Entity/Requests/CustomerPaging.cs | 1 + Wonky.Entity/Requests/MetaData.cs | 1 + Wonky.Entity/Requests/VirkParams.cs | 1 + Wonky.Entity/Views/ApiResponseView.cs | 3 +- Wonky.Entity/Views/AuthResponseView.cs | 1 + Wonky.Entity/Views/InvoiceCompanyView.cs | 16 +++++ Wonky.Entity/Views/InvoiceLineView.cs | 16 +++++ Wonky.Entity/Views/InvoiceListItemView.cs | 16 +++++ Wonky.Entity/Views/InvoiceListView.cs | 16 +++++ Wonky.Entity/Views/InvoiceView.cs | 16 +++++ Wonky.Entity/Views/ProductHistoryView.cs | 1 + Wonky.Entity/Views/ProductInventoryView.cs | 1 + Wonky.Entity/Views/RefreshTokenView.cs | 1 + Wonky.Entity/Views/ReportActivityInfoView.cs | 1 + Wonky.Entity/Views/ReportClosedView.cs | 1 + Wonky.Entity/Views/ReportData.cs | 1 + Wonky.Entity/Views/ReportItemCustomer.cs | 1 + Wonky.Entity/Views/ReportItemLine.cs | 1 + Wonky.Entity/Views/ReportItemView.cs | 1 + Wonky.Entity/Views/ReportStatusView.cs | 1 + Wonky.Entity/Views/ReportView.cs | 1 + Wonky.Entity/Views/SalesItemView.cs | 3 +- Wonky.Entity/Views/SalesRateView.cs | 1 + Wonky.Entity/Views/SalesReportListView.cs | 1 + Wonky.Entity/Views/UploadResponseView.cs | 1 + Wonky.Entity/Views/UserInfoView.cs | 1 + Wonky.Entity/Views/WarehouseOrderView.cs | 2 +- Wonky.Entity/Views/WebUserInfoView.cs | 1 + Wonky.Entity/Views/WorkplaceListView.cs | 2 +- 211 files changed, 1195 insertions(+), 382 deletions(-) create mode 100644 Wonky.Client/Models/DraftItem.cs rename Wonky.Client/Shared/{ProductPriceHistoryModal.razor => ProductPriceHistoryModalOverlay.razor} (74%) rename Wonky.Client/Shared/{ProductPriceHistoryModal.razor.cs => ProductPriceHistoryModalOverlay.razor.cs} (90%) create mode 100644 Wonky.Entity/DTO/EmailContact.cs create mode 100644 Wonky.Entity/DTO/UserManagerEditView.cs rename Wonky.Entity/{Views/UserListAdminView.cs => DTO/UserManagerListView.cs} (94%) create mode 100644 Wonky.Entity/DTO/UserRoleAssignment.cs diff --git a/Wonky.Client/Components/AdvisorActivityKmStartComponent.razor b/Wonky.Client/Components/AdvisorActivityKmStartComponent.razor index 749f83e6..3e6784cc 100644 --- a/Wonky.Client/Components/AdvisorActivityKmStartComponent.razor +++ b/Wonky.Client/Components/AdvisorActivityKmStartComponent.razor @@ -1,3 +1,20 @@ +@* +// 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 Wonky.Client.Services
@@ -10,12 +27,12 @@ [Inject] private UserProfileService ProfileService { get; set; } private int KmMorning { get; set; } - private UserPref Prefs { get; set; } = new(); + private UserProfile Profiles { get; set; } = new(); protected override async Task OnInitializedAsync() { - Prefs = await ProfileService.GetPreferences(); - KmMorning = Prefs.KmMorning; + Profiles = await ProfileService.GetPreferences(); + KmMorning = Profiles.KmMorning; } private async Task OnKmChanged() diff --git a/Wonky.Client/Components/AdvisorActivityListComponent.razor b/Wonky.Client/Components/AdvisorActivityListComponent.razor index 6edc5e8e..352bd2f8 100644 --- a/Wonky.Client/Components/AdvisorActivityListComponent.razor +++ b/Wonky.Client/Components/AdvisorActivityListComponent.razor @@ -1,4 +1,4 @@ -@using Wonky.Client.Helpers + @* // Copyright (C) 2022 FCS Frede's Computer Services. // This program is free software: you can redistribute it and/or modify @@ -16,6 +16,7 @@ // *@ +@using Wonky.Client.Helpers @if (ActivityList.Any()) { diff --git a/Wonky.Client/Components/AdvisorReportActivityLedgerComponent.razor b/Wonky.Client/Components/AdvisorReportActivityLedgerComponent.razor index bb2f8831..23a79202 100644 --- a/Wonky.Client/Components/AdvisorReportActivityLedgerComponent.razor +++ b/Wonky.Client/Components/AdvisorReportActivityLedgerComponent.razor @@ -1,5 +1,4 @@ -@using Wonky.Entity.Views -@using Wonky.Entity.DTO + @* // Copyright (C) 2022 FCS Frede's Computer Services. // This program is free software: you can redistribute it and/or modify @@ -17,6 +16,9 @@ // *@ +@using Wonky.Entity.Views +@using Wonky.Entity.DTO +
diff --git a/Wonky.Client/Components/CatalogGroupComponent.razor.cs b/Wonky.Client/Components/CatalogGroupComponent.razor.cs index 72f23c18..671937ec 100644 --- a/Wonky.Client/Components/CatalogGroupComponent.razor.cs +++ b/Wonky.Client/Components/CatalogGroupComponent.razor.cs @@ -26,7 +26,7 @@ public partial class CatalogGroupComponent [Inject] private UserProfileService ProfileService { get; set; } [Parameter] public EventCallback OnChanged { get; set; } private Dictionary Items { get; set; } = new(); - private UserPref Prefs = new(); + private UserProfile _profiles = new(); private string? GroupCol { get; set; } diff --git a/Wonky.Client/Components/CatalogSearchComponent.razor.cs b/Wonky.Client/Components/CatalogSearchComponent.razor.cs index eee8cf03..b85933ae 100644 --- a/Wonky.Client/Components/CatalogSearchComponent.razor.cs +++ b/Wonky.Client/Components/CatalogSearchComponent.razor.cs @@ -34,7 +34,7 @@ public partial class CatalogSearchComponent : IDisposable /// /// User preferences /// - private UserPref Prefs { get; set; } = new(); + private UserProfile Profiles { get; set; } = new(); /// /// Selected item @@ -47,8 +47,8 @@ public partial class CatalogSearchComponent : IDisposable protected override async Task OnInitializedAsync() { ProfileService.OnChange += ProfileServiceOnOnChange; - Prefs = await ProfileService.GetPreferences(); - SearchCol = Prefs.ItemSearch; + Profiles = await ProfileService.GetPreferences(); + SearchCol = Profiles.ItemSearch; await OnChanged.InvokeAsync(SearchCol); } @@ -67,10 +67,10 @@ public partial class CatalogSearchComponent : IDisposable /// /// Preference update from profile service /// - /// - private void ProfileServiceOnOnChange(UserPref newUserPref) + /// + private void ProfileServiceOnOnChange(UserProfile newUserProfile) { - Prefs = newUserPref; + Profiles = newUserProfile; StateHasChanged(); } diff --git a/Wonky.Client/Components/CatalogSortComponent.razor.cs b/Wonky.Client/Components/CatalogSortComponent.razor.cs index 989c3ee1..ce6d0e82 100644 --- a/Wonky.Client/Components/CatalogSortComponent.razor.cs +++ b/Wonky.Client/Components/CatalogSortComponent.razor.cs @@ -34,7 +34,7 @@ public partial class CatalogSortComponent : IDisposable /// /// User's preferences /// - private UserPref Prefs = new(); + private UserProfile _profiles = new(); /// /// Item selected by user @@ -47,8 +47,8 @@ public partial class CatalogSortComponent : IDisposable protected override async Task OnInitializedAsync() { ProfileService.OnChange += ProfileServiceOnOnChange; - Prefs = await ProfileService.GetPreferences(); - SortCol = Prefs.ItemSort; + _profiles = await ProfileService.GetPreferences(); + SortCol = _profiles.ItemSort; } /// @@ -66,10 +66,10 @@ public partial class CatalogSortComponent : IDisposable /// /// Get updated settings from preference service /// - /// - private void ProfileServiceOnOnChange(UserPref newUserPref) + /// + private void ProfileServiceOnOnChange(UserProfile newUserProfile) { - Prefs = newUserPref; + _profiles = newUserProfile; StateHasChanged(); } diff --git a/Wonky.Client/Components/CustomerInventoryListComponent.razor b/Wonky.Client/Components/CustomerInventoryListComponent.razor index 35dd233b..9e6e646d 100644 --- a/Wonky.Client/Components/CustomerInventoryListComponent.razor +++ b/Wonky.Client/Components/CustomerInventoryListComponent.razor @@ -1,5 +1,4 @@ -@using Wonky.Client.Models -@using System.ComponentModel.Design + @* // Copyright (C) 2022 FCS Frede's Computer Services. // This program is free software: you can redistribute it and/or modify @@ -17,6 +16,8 @@ // *@ +@using Wonky.Client.Models +@using System.ComponentModel.Design
@if (Inventory.Any()) diff --git a/Wonky.Client/Components/CustomerInvoiceListComponent.razor b/Wonky.Client/Components/CustomerInvoiceListComponent.razor index 365e56e3..225cd453 100644 --- a/Wonky.Client/Components/CustomerInvoiceListComponent.razor +++ b/Wonky.Client/Components/CustomerInvoiceListComponent.razor @@ -1,3 +1,20 @@ + +@* +// 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 Wonky.Entity.Views @using System.Linq.Expressions diff --git a/Wonky.Client/Components/CustomerInvoiceListComponent.razor.cs b/Wonky.Client/Components/CustomerInvoiceListComponent.razor.cs index 844043b1..a84686ff 100644 --- a/Wonky.Client/Components/CustomerInvoiceListComponent.razor.cs +++ b/Wonky.Client/Components/CustomerInvoiceListComponent.razor.cs @@ -1,3 +1,19 @@ + +// 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.Components; using Wonky.Client.Shared; using Wonky.Entity.Views; diff --git a/Wonky.Client/Components/CustomerProductCheckListComponent.razor b/Wonky.Client/Components/CustomerProductCheckListComponent.razor index 9cef7991..8c6826c2 100644 --- a/Wonky.Client/Components/CustomerProductCheckListComponent.razor +++ b/Wonky.Client/Components/CustomerProductCheckListComponent.razor @@ -1,5 +1,4 @@ -@using Wonky.Client.Models -@using System.ComponentModel.Design + @* // Copyright (C) 2022 FCS Frede's Computer Services. // This program is free software: you can redistribute it and/or modify @@ -16,7 +15,8 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // *@ - +@using Wonky.Client.Models +@using System.ComponentModel.Design
@if (ProductList.Any()) diff --git a/Wonky.Client/Components/CustomerProductLineListComponent.razor.cs b/Wonky.Client/Components/CustomerProductLineListComponent.razor.cs index 8d7e8ebd..9d022fb7 100644 --- a/Wonky.Client/Components/CustomerProductLineListComponent.razor.cs +++ b/Wonky.Client/Components/CustomerProductLineListComponent.razor.cs @@ -14,7 +14,6 @@ // using Microsoft.AspNetCore.Components; -using Wonky.Entity.DTO; using Wonky.Entity.Views; namespace Wonky.Client.Components; diff --git a/Wonky.Client/Components/CustomerSearchColumnComponent.razor.cs b/Wonky.Client/Components/CustomerSearchColumnComponent.razor.cs index e771be7d..ba435914 100644 --- a/Wonky.Client/Components/CustomerSearchColumnComponent.razor.cs +++ b/Wonky.Client/Components/CustomerSearchColumnComponent.razor.cs @@ -28,13 +28,13 @@ public partial class CustomerSearchColumnComponent : IDisposable [Inject] private UserProfileService ProfileService { get; set; } [Parameter] public EventCallback OnChanged { get; set; } private Dictionary Items { get; set; } = new(); - private UserPref Prefs { get; set; } = new(); + private UserProfile Profiles { get; set; } = new(); private string SearchCol { get; set; } = "name"; protected override async Task OnInitializedAsync() { ProfileService.OnChange += ProfileServiceOnOnChange; - Prefs = await ProfileService.GetPreferences(); - SearchCol = Prefs.CompanySearch; + Profiles = await ProfileService.GetPreferences(); + SearchCol = Profiles.CompanySearch; } private async Task OnSelectionChanged(ChangeEventArgs e) { @@ -43,9 +43,9 @@ public partial class CustomerSearchColumnComponent : IDisposable await OnChanged.InvokeAsync(val); await ProfileService.SetCompanySearch(val); } - private void ProfileServiceOnOnChange(UserPref newUserPref) + private void ProfileServiceOnOnChange(UserProfile newUserProfile) { - Prefs = newUserPref; + Profiles = newUserProfile; StateHasChanged(); } public void Dispose() diff --git a/Wonky.Client/Components/CustomerSearchPhraseComponent.razor.cs b/Wonky.Client/Components/CustomerSearchPhraseComponent.razor.cs index 158b33eb..7769d262 100644 --- a/Wonky.Client/Components/CustomerSearchPhraseComponent.razor.cs +++ b/Wonky.Client/Components/CustomerSearchPhraseComponent.razor.cs @@ -24,14 +24,14 @@ namespace Wonky.Client.Components { private Timer InputTimer { get; set; } = new(); private string SearchTerm { get; set; } = ""; - private UserPref Prefs { get; set; } = new (); + private UserProfile Profiles { get; set; } = new (); [Inject] private UserProfileService ProfileService { get; set; } [Parameter] public EventCallback OnChanged { get; set; } protected override async Task OnInitializedAsync() { - Prefs = await ProfileService.GetPreferences(); - SearchTerm = string.IsNullOrWhiteSpace(Prefs.CompanyFilterPhrase) ? "" : Prefs.CompanyFilterPhrase.Trim(); + Profiles = await ProfileService.GetPreferences(); + SearchTerm = string.IsNullOrWhiteSpace(Profiles.CompanyFilterPhrase) ? "" : Profiles.CompanyFilterPhrase.Trim(); if(!string.IsNullOrWhiteSpace(SearchTerm)) await OnChanged.InvokeAsync(SearchTerm); diff --git a/Wonky.Client/Components/CustomerSortComponent.razor.cs b/Wonky.Client/Components/CustomerSortComponent.razor.cs index f2f5567f..52c0c22d 100644 --- a/Wonky.Client/Components/CustomerSortComponent.razor.cs +++ b/Wonky.Client/Components/CustomerSortComponent.razor.cs @@ -27,13 +27,13 @@ namespace Wonky.Client.Components [Inject] private UserProfileService ProfileService { get; set; } [Parameter] public EventCallback OnChanged { get; set; } private Dictionary Items { get; set; } = new(); - private UserPref Prefs = new(); + private UserProfile _profiles = new(); private string SortCol { get; set; } = "name"; protected override async Task OnInitializedAsync() { ProfileService.OnChange += ProfileServiceOnOnChange; - Prefs = await ProfileService.GetPreferences(); - SortCol = Prefs.CompanySort; + _profiles = await ProfileService.GetPreferences(); + SortCol = _profiles.CompanySort; } private async Task OnSelectionChanged(ChangeEventArgs e) { @@ -42,9 +42,9 @@ namespace Wonky.Client.Components await OnChanged.InvokeAsync(val); await ProfileService.SetCompanySort(val); } - private void ProfileServiceOnOnChange(UserPref newUserPref) + private void ProfileServiceOnOnChange(UserProfile newUserProfile) { - Prefs = newUserPref; + _profiles = newUserProfile; StateHasChanged(); } public void Dispose() diff --git a/Wonky.Client/Components/InfoAdvisorComponent.razor b/Wonky.Client/Components/InfoAdvisorComponent.razor index 092c4913..21f5df08 100644 --- a/Wonky.Client/Components/InfoAdvisorComponent.razor +++ b/Wonky.Client/Components/InfoAdvisorComponent.razor @@ -1,3 +1,19 @@ +@* +// 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] +// +*@

Sælger

diff --git a/Wonky.Client/Components/InfoBrowserComponent.razor b/Wonky.Client/Components/InfoBrowserComponent.razor index c89a7e63..2c42a1c4 100644 --- a/Wonky.Client/Components/InfoBrowserComponent.razor +++ b/Wonky.Client/Components/InfoBrowserComponent.razor @@ -1,3 +1,19 @@ +@* +// 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] +// +*@

Testede browsere

diff --git a/Wonky.Client/Components/InfoOfficeComponent.razor b/Wonky.Client/Components/InfoOfficeComponent.razor index abe77131..247d2e4e 100644 --- a/Wonky.Client/Components/InfoOfficeComponent.razor +++ b/Wonky.Client/Components/InfoOfficeComponent.razor @@ -1,3 +1,19 @@ +@* +// 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] +// +*@

Kontor

diff --git a/Wonky.Client/Components/InfoOpenSourceComponent.razor b/Wonky.Client/Components/InfoOpenSourceComponent.razor index ca542448..779ff7a9 100644 --- a/Wonky.Client/Components/InfoOpenSourceComponent.razor +++ b/Wonky.Client/Components/InfoOpenSourceComponent.razor @@ -1,3 +1,19 @@ +@* +// 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] +// +*@

Open Source

diff --git a/Wonky.Client/Components/InfoQuoteToolbarComponent.razor b/Wonky.Client/Components/InfoQuoteToolbarComponent.razor index 5f76cc6e..cf25962f 100644 --- a/Wonky.Client/Components/InfoQuoteToolbarComponent.razor +++ b/Wonky.Client/Components/InfoQuoteToolbarComponent.razor @@ -1,3 +1,19 @@ +@* +// 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] +// +*@

Aftaler / Tilbud

diff --git a/Wonky.Client/Components/InfoWarehouseComponent.razor b/Wonky.Client/Components/InfoWarehouseComponent.razor index ee8efefd..cbcc8b71 100644 --- a/Wonky.Client/Components/InfoWarehouseComponent.razor +++ b/Wonky.Client/Components/InfoWarehouseComponent.razor @@ -1,3 +1,19 @@ +@* +// 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] +// +*@

Lager

diff --git a/Wonky.Client/Components/LandingComponentAdvisor.razor.cs b/Wonky.Client/Components/LandingComponentAdvisor.razor.cs index d341023e..a757f940 100644 --- a/Wonky.Client/Components/LandingComponentAdvisor.razor.cs +++ b/Wonky.Client/Components/LandingComponentAdvisor.razor.cs @@ -40,13 +40,13 @@ public partial class LandingComponentAdvisor PropertyNamingPolicy = JsonNamingPolicy.CamelCase }; - private UserPref Prefs { get; set; } = new(); + private UserProfile Profiles { get; set; } = new(); private DateTime SelectedDate { get; set; } protected override async Task OnInitializedAsync() { - Prefs = await ProfileService.GetPreferences(); - SelectedDate = string.IsNullOrWhiteSpace(Prefs.WorkDate) ? DateTime.Now : DateTime.Parse(Prefs.WorkDate); + Profiles = await ProfileService.GetPreferences(); + SelectedDate = string.IsNullOrWhiteSpace(Profiles.WorkDate) ? DateTime.Now : DateTime.Parse(Profiles.WorkDate); } } diff --git a/Wonky.Client/Components/LandingComponentOffice.razor.cs b/Wonky.Client/Components/LandingComponentOffice.razor.cs index b210bb90..857674b2 100644 --- a/Wonky.Client/Components/LandingComponentOffice.razor.cs +++ b/Wonky.Client/Components/LandingComponentOffice.razor.cs @@ -40,24 +40,24 @@ public partial class LandingComponentOffice PropertyNamingPolicy = JsonNamingPolicy.CamelCase }; - private UserPref Prefs { get; set; } = new(); + private UserProfile Profiles { get; set; } = new(); 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)) + Profiles = await ProfileService.GetPreferences(); + if (string.IsNullOrWhiteSpace(Profiles.WorkDate)) { await ProfileService.SetWorkDate(DateTime.Now); } } - private void ProfileChanged(UserPref newPrefs) + private void ProfileChanged(UserProfile newProfiles) { - Prefs = newPrefs; - WorkDate = Prefs.WorkDate; + Profiles = newProfiles; + WorkDate = Profiles.WorkDate; } } diff --git a/Wonky.Client/Components/OfficeCountryAdvisorListComponent.razor b/Wonky.Client/Components/OfficeCountryAdvisorListComponent.razor index 63e0165e..e69cceda 100644 --- a/Wonky.Client/Components/OfficeCountryAdvisorListComponent.razor +++ b/Wonky.Client/Components/OfficeCountryAdvisorListComponent.razor @@ -32,7 +32,7 @@ Kunder
- + Rediger diff --git a/Wonky.Client/Components/OfficeCountryAdvisorListComponent.razor.cs b/Wonky.Client/Components/OfficeCountryAdvisorListComponent.razor.cs index b8a57bbc..33e03f8b 100644 --- a/Wonky.Client/Components/OfficeCountryAdvisorListComponent.razor.cs +++ b/Wonky.Client/Components/OfficeCountryAdvisorListComponent.razor.cs @@ -21,5 +21,5 @@ namespace Wonky.Client.Components; public partial class OfficeCountryAdvisorListComponent { - [Parameter] public List UserList { get; set; } = new(); + [Parameter] public List UserList { get; set; } = new(); } \ No newline at end of file diff --git a/Wonky.Client/Components/OfficeCountryCustomerListComponent.razor b/Wonky.Client/Components/OfficeCountryCustomerListComponent.razor index 6127319b..cfed0aa4 100644 --- a/Wonky.Client/Components/OfficeCountryCustomerListComponent.razor +++ b/Wonky.Client/Components/OfficeCountryCustomerListComponent.razor @@ -20,28 +20,6 @@ @if (CompanyList.Any()) { - @* -
-
-
-
- Sælger -
-
- Konto -
-
- Telefon -
-
- Navn -
-
- Bynavn -
-
-
- *@
@foreach (var company in CompanyList) { @@ -71,33 +49,37 @@
@company.CountryCode.ToUpper()-@company.ZipCode @company.City
+
- @* - -
-
- @company.SalesRep -
-
- @company.Account -
-
- @company.Phone -
-
- @company.Name -
-
- @company.CountryCode.ToUpper()-@company.ZipCode @company.City -
-
-
- *@ } } else {
Ingen data
-} \ No newline at end of file +} +@* + + + + + + *@ + diff --git a/Wonky.Client/Components/OfficeCountryCustomerListComponent.razor.cs b/Wonky.Client/Components/OfficeCountryCustomerListComponent.razor.cs index aa8efc17..9ebce072 100644 --- a/Wonky.Client/Components/OfficeCountryCustomerListComponent.razor.cs +++ b/Wonky.Client/Components/OfficeCountryCustomerListComponent.razor.cs @@ -29,5 +29,19 @@ namespace Wonky.Client.Components [Parameter] public List CompanyList { get; set; } = new(); [Parameter] public string CountryCode { get; set; } = ""; - } + private CustomerInvoiceListModalOverlay InvoiceListOverlay { get; set; } = new(); + private CustomerInventoryListModalOverlay InventoryListOverlay { get; set; } = new(); + private CustomerActivityListModalOverlay ActivityListOverlay { get; set; } = new(); + + private string CompanyName { get; set; } = ""; + private string CompanyId { get; set; } = ""; + private InvoiceListView Invoices { get; set; } = new(); + private List Activities { get; set; } = new(); + private List Inventory { get; set; } = new(); + + private void OnInventoryCallback() + { + + } + } } diff --git a/Wonky.Client/Components/OfficeCountryUserListComponent.razor.cs b/Wonky.Client/Components/OfficeCountryUserListComponent.razor.cs index 1d098669..e60ebac4 100644 --- a/Wonky.Client/Components/OfficeCountryUserListComponent.razor.cs +++ b/Wonky.Client/Components/OfficeCountryUserListComponent.razor.cs @@ -14,11 +14,11 @@ // using Microsoft.AspNetCore.Components; -using Wonky.Entity.Views; +using Wonky.Entity.DTO; namespace Wonky.Client.Components; public partial class OfficeCountryUserListComponent { - [Parameter] public List UserList { get; set; } = new(); + [Parameter] public List UserList { get; set; } = new(); } \ No newline at end of file diff --git a/Wonky.Client/Components/PageSizeComponent.razor.cs b/Wonky.Client/Components/PageSizeComponent.razor.cs index f0ea009b..473992a8 100644 --- a/Wonky.Client/Components/PageSizeComponent.razor.cs +++ b/Wonky.Client/Components/PageSizeComponent.razor.cs @@ -27,14 +27,14 @@ namespace Wonky.Client.Components [Inject] private UserProfileService ProfileService { get; set; } [Parameter] public EventCallback OnChanged { get; set; } private Dictionary Items { get; set; } = new(); - private UserPref Prefs = new(); + private UserProfile _profiles = new(); private string PageSize { get; set; } = ""; protected override async Task OnInitializedAsync() { ProfileService.OnChange += ProfileServiceOnOnChange; - Prefs = await ProfileService.GetPreferences(); - PageSize = Prefs.PageSize; + _profiles = await ProfileService.GetPreferences(); + PageSize = _profiles.PageSize; } private async Task OnSelectChanged(ChangeEventArgs e) @@ -45,9 +45,9 @@ namespace Wonky.Client.Components await ProfileService.SetPageSize(val); } - private void ProfileServiceOnOnChange(UserPref newUserPref) + private void ProfileServiceOnOnChange(UserProfile newUserProfile) { - Prefs = newUserPref; + _profiles = newUserProfile; StateHasChanged(); } diff --git a/Wonky.Client/Components/QuoteListComponent.razor b/Wonky.Client/Components/QuoteListComponent.razor index e7231e02..7e809d04 100644 --- a/Wonky.Client/Components/QuoteListComponent.razor +++ b/Wonky.Client/Components/QuoteListComponent.razor @@ -1,3 +1,19 @@ +@* +// 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 Wonky.Entity.Views @using Wonky.Client.Models diff --git a/Wonky.Client/Components/QuoteListComponent.razor.cs b/Wonky.Client/Components/QuoteListComponent.razor.cs index d5fcb0d6..c37f9738 100644 --- a/Wonky.Client/Components/QuoteListComponent.razor.cs +++ b/Wonky.Client/Components/QuoteListComponent.razor.cs @@ -1,3 +1,18 @@ +// 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.Components; using Wonky.Client.Models; using Wonky.Entity.Views; diff --git a/Wonky.Client/Components/ReportItemComponent.razor.cs b/Wonky.Client/Components/ReportItemComponent.razor.cs index ff0ea6dc..6754a9f5 100644 --- a/Wonky.Client/Components/ReportItemComponent.razor.cs +++ b/Wonky.Client/Components/ReportItemComponent.razor.cs @@ -1,3 +1,18 @@ +// 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.Components; using Wonky.Entity.Views; diff --git a/Wonky.Client/Components/WorkDateComponent.razor.cs b/Wonky.Client/Components/WorkDateComponent.razor.cs index 31964c32..adb7e575 100644 --- a/Wonky.Client/Components/WorkDateComponent.razor.cs +++ b/Wonky.Client/Components/WorkDateComponent.razor.cs @@ -49,7 +49,7 @@ public partial class WorkDateComponent : IDisposable /// /// user preferences /// - private UserPref Prefs = new(); + private UserProfile _profiles = new(); /// /// Component Initialization @@ -58,10 +58,10 @@ public partial class WorkDateComponent : IDisposable { WorkDateContext = new EditContext(SelectedDate); Profiles.OnChange += ProfileServiceOnOnChange; - Prefs = await Profiles.GetPreferences(); - SelectedDate = string.IsNullOrWhiteSpace(Prefs.WorkDate) + _profiles = await Profiles.GetPreferences(); + SelectedDate = string.IsNullOrWhiteSpace(_profiles.WorkDate) ? DateTime.Now - : DateTime.Parse(Prefs.WorkDate); + : DateTime.Parse(_profiles.WorkDate); } /// @@ -81,10 +81,10 @@ public partial class WorkDateComponent : IDisposable /// /// ProfileService /// - /// - private void ProfileServiceOnOnChange(UserPref newUserPref) + /// + private void ProfileServiceOnOnChange(UserProfile newUserProfile) { - Prefs = newUserPref; + _profiles = newUserProfile; StateHasChanged(); } diff --git a/Wonky.Client/Components/WorkingThreeDots.razor.cs b/Wonky.Client/Components/WorkingThreeDots.razor.cs index 29ad0bd6..2cf878e0 100644 --- a/Wonky.Client/Components/WorkingThreeDots.razor.cs +++ b/Wonky.Client/Components/WorkingThreeDots.razor.cs @@ -1,3 +1,17 @@ +// 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 Blazored.Toast.Services; using Microsoft.AspNetCore.Components; diff --git a/Wonky.Client/Components/WorkplaceListComponent.razor b/Wonky.Client/Components/WorkplaceListComponent.razor index 04aedadf..131c5978 100644 --- a/Wonky.Client/Components/WorkplaceListComponent.razor +++ b/Wonky.Client/Components/WorkplaceListComponent.razor @@ -1,3 +1,19 @@ +@* +// 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 Wonky.Entity.DTO @using Wonky.Entity.Views diff --git a/Wonky.Client/Components/WorkplaceListComponent.razor.cs b/Wonky.Client/Components/WorkplaceListComponent.razor.cs index 43dae261..022fdfeb 100644 --- a/Wonky.Client/Components/WorkplaceListComponent.razor.cs +++ b/Wonky.Client/Components/WorkplaceListComponent.razor.cs @@ -1,3 +1,18 @@ +// 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.Components; using Wonky.Entity.Views; diff --git a/Wonky.Client/Features/PagingResponse.cs b/Wonky.Client/Features/PagingResponse.cs index da8245c8..9e3037c2 100644 --- a/Wonky.Client/Features/PagingResponse.cs +++ b/Wonky.Client/Features/PagingResponse.cs @@ -13,7 +13,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System.Collections.Generic; using Wonky.Entity.Requests; namespace Wonky.Client.Features; diff --git a/Wonky.Client/Helpers/InputDateTime.cs b/Wonky.Client/Helpers/InputDateTime.cs index 5ae2983f..c75a2b92 100644 --- a/Wonky.Client/Helpers/InputDateTime.cs +++ b/Wonky.Client/Helpers/InputDateTime.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - using System.Globalization; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Forms; diff --git a/Wonky.Client/Helpers/StringExtensions.cs b/Wonky.Client/Helpers/StringExtensions.cs index 51a5c3a4..66bdcdf2 100644 --- a/Wonky.Client/Helpers/StringExtensions.cs +++ b/Wonky.Client/Helpers/StringExtensions.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/Helpers/Utils.cs b/Wonky.Client/Helpers/Utils.cs index 58d333b2..2ab59d30 100644 --- a/Wonky.Client/Helpers/Utils.cs +++ b/Wonky.Client/Helpers/Utils.cs @@ -1,4 +1,5 @@ -// Copyright (C) 2022 FCS Frede's Computer Services. + +// 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 @@ -13,11 +14,10 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System; using System.Net.Mail; -using Wonky.Entity.DTO; namespace Wonky.Client.Helpers; + /// /// Utilities /// @@ -38,7 +38,7 @@ public static class Utils _ => "" }; } - + /// /// Helper to parse querystring /// @@ -70,7 +70,7 @@ public static class Utils if (trimmedEmail.EndsWith(".")) { - return false; // suggested by @TK-421 + return false; } try @@ -93,6 +93,7 @@ public static class Utils { return value.ToString(); } + /// /// Parse string to enum of T /// @@ -102,7 +103,8 @@ public static class Utils public static T StringToEnum(string value) { return (T)Enum.Parse(typeof(T), value, true); - } + } + /// /// Generate unique hashcode from time /// diff --git a/Wonky.Client/Helpers/VatUtils.cs b/Wonky.Client/Helpers/VatUtils.cs index d01aa955..4bd3a242 100644 --- a/Wonky.Client/Helpers/VatUtils.cs +++ b/Wonky.Client/Helpers/VatUtils.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,9 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System.Globalization; -using System.Reflection.Metadata.Ecma335; -using System.Runtime.CompilerServices; using System.Text.RegularExpressions; namespace Wonky.Client.Helpers; diff --git a/Wonky.Client/HttpInterceptors/HttpInterceptorService.cs b/Wonky.Client/HttpInterceptors/HttpInterceptorService.cs index 59ea29f4..608fce7a 100644 --- a/Wonky.Client/HttpInterceptors/HttpInterceptorService.cs +++ b/Wonky.Client/HttpInterceptors/HttpInterceptorService.cs @@ -1,3 +1,4 @@ + // 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 @@ -16,12 +17,10 @@ using System.Net; using System.Net.Http.Headers; using System.Text.Json; -using System.Threading.Tasks; using Blazored.LocalStorage; using Blazored.Toast.Services; using Wonky.Client.Services; using Microsoft.AspNetCore.Components; -using Microsoft.Extensions.Logging; using Toolbelt.Blazor; namespace Wonky.Client.HttpInterceptors diff --git a/Wonky.Client/HttpInterceptors/HttpResponseException.cs b/Wonky.Client/HttpInterceptors/HttpResponseException.cs index 568355a9..df188f78 100644 --- a/Wonky.Client/HttpInterceptors/HttpResponseException.cs +++ b/Wonky.Client/HttpInterceptors/HttpResponseException.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System; using System.Runtime.Serialization; namespace Wonky.Client.HttpInterceptors diff --git a/Wonky.Client/HttpInterfaces/IAdvisorActivityRepository.cs b/Wonky.Client/HttpInterfaces/IAdvisorActivityRepository.cs index 1a6ff1bc..7f8190c5 100644 --- a/Wonky.Client/HttpInterfaces/IAdvisorActivityRepository.cs +++ b/Wonky.Client/HttpInterfaces/IAdvisorActivityRepository.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/HttpInterfaces/IAdvisorContactRepository.cs b/Wonky.Client/HttpInterfaces/IAdvisorContactRepository.cs index 178358f7..9d34702c 100644 --- a/Wonky.Client/HttpInterfaces/IAdvisorContactRepository.cs +++ b/Wonky.Client/HttpInterfaces/IAdvisorContactRepository.cs @@ -1,3 +1,4 @@ + using Wonky.Entity.DTO; namespace Wonky.Client.HttpInterfaces; diff --git a/Wonky.Client/HttpInterfaces/IAdvisorCustomerHistoryRepository.cs b/Wonky.Client/HttpInterfaces/IAdvisorCustomerHistoryRepository.cs index 8233c00d..71ffe643 100644 --- a/Wonky.Client/HttpInterfaces/IAdvisorCustomerHistoryRepository.cs +++ b/Wonky.Client/HttpInterfaces/IAdvisorCustomerHistoryRepository.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - using Wonky.Entity.Views; namespace Wonky.Client.HttpInterfaces; diff --git a/Wonky.Client/HttpInterfaces/IAdvisorCustomerRepository.cs b/Wonky.Client/HttpInterfaces/IAdvisorCustomerRepository.cs index 7c16359a..a71417f6 100644 --- a/Wonky.Client/HttpInterfaces/IAdvisorCustomerRepository.cs +++ b/Wonky.Client/HttpInterfaces/IAdvisorCustomerRepository.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/HttpInterfaces/IAdvisorReportRepository.cs b/Wonky.Client/HttpInterfaces/IAdvisorReportRepository.cs index 9827598a..79ed2f6c 100644 --- a/Wonky.Client/HttpInterfaces/IAdvisorReportRepository.cs +++ b/Wonky.Client/HttpInterfaces/IAdvisorReportRepository.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/HttpInterfaces/IAdvisorTaskItemRepository.cs b/Wonky.Client/HttpInterfaces/IAdvisorTaskItemRepository.cs index 29d17a31..51d51b0b 100644 --- a/Wonky.Client/HttpInterfaces/IAdvisorTaskItemRepository.cs +++ b/Wonky.Client/HttpInterfaces/IAdvisorTaskItemRepository.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - using Wonky.Entity.DTO; namespace Wonky.Client.HttpInterfaces; diff --git a/Wonky.Client/HttpInterfaces/IAdvisorWorkplaceRepository.cs b/Wonky.Client/HttpInterfaces/IAdvisorWorkplaceRepository.cs index 2bbf1c44..dc9dd9fa 100644 --- a/Wonky.Client/HttpInterfaces/IAdvisorWorkplaceRepository.cs +++ b/Wonky.Client/HttpInterfaces/IAdvisorWorkplaceRepository.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/HttpInterfaces/IOfficeCatalogRepository.cs b/Wonky.Client/HttpInterfaces/IOfficeCatalogRepository.cs index f905a02d..a076745f 100644 --- a/Wonky.Client/HttpInterfaces/IOfficeCatalogRepository.cs +++ b/Wonky.Client/HttpInterfaces/IOfficeCatalogRepository.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/HttpInterfaces/IOfficeCustomerHistoryRepository.cs b/Wonky.Client/HttpInterfaces/IOfficeCustomerHistoryRepository.cs index 1fa695b4..c47344bd 100644 --- a/Wonky.Client/HttpInterfaces/IOfficeCustomerHistoryRepository.cs +++ b/Wonky.Client/HttpInterfaces/IOfficeCustomerHistoryRepository.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - using Wonky.Entity.Views; namespace Wonky.Client.HttpInterfaces; diff --git a/Wonky.Client/HttpInterfaces/IOfficeCustomerRepository.cs b/Wonky.Client/HttpInterfaces/IOfficeCustomerRepository.cs index 259e9fab..6000d2f3 100644 --- a/Wonky.Client/HttpInterfaces/IOfficeCustomerRepository.cs +++ b/Wonky.Client/HttpInterfaces/IOfficeCustomerRepository.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/HttpInterfaces/IOfficeReportRepository.cs b/Wonky.Client/HttpInterfaces/IOfficeReportRepository.cs index 914cd7de..0e0d1546 100644 --- a/Wonky.Client/HttpInterfaces/IOfficeReportRepository.cs +++ b/Wonky.Client/HttpInterfaces/IOfficeReportRepository.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - using Wonky.Entity.Views; namespace Wonky.Client.HttpInterfaces; diff --git a/Wonky.Client/HttpInterfaces/IOrderProcessRepository.cs b/Wonky.Client/HttpInterfaces/IOrderProcessRepository.cs index 033184d2..e273340c 100644 --- a/Wonky.Client/HttpInterfaces/IOrderProcessRepository.cs +++ b/Wonky.Client/HttpInterfaces/IOrderProcessRepository.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/HttpInterfaces/ISystemSendMailService.cs b/Wonky.Client/HttpInterfaces/ISystemSendMailService.cs index 2dd82936..1bbefbc8 100644 --- a/Wonky.Client/HttpInterfaces/ISystemSendMailService.cs +++ b/Wonky.Client/HttpInterfaces/ISystemSendMailService.cs @@ -1,3 +1,19 @@ + +// 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 Wonky.Entity.DTO; using Wonky.Entity.Views; diff --git a/Wonky.Client/HttpInterfaces/ISystemUserRepository.cs b/Wonky.Client/HttpInterfaces/ISystemUserRepository.cs index f6e3ecf8..a0e8d976 100644 --- a/Wonky.Client/HttpInterfaces/ISystemUserRepository.cs +++ b/Wonky.Client/HttpInterfaces/ISystemUserRepository.cs @@ -1,3 +1,4 @@ + // 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 @@ -27,7 +28,7 @@ public interface ISystemUserRepository /// Get Advisors (Office) /// /// - Task> GetAdvisors(); + Task> GetAdvisors(); /// /// Get Advisor Info for given userId @@ -48,7 +49,7 @@ public interface ISystemUserRepository /// Get Administrative Users /// /// - Task> GetAdminUsers(); + Task> GetAdminUsers(); /// /// Get Admin Info for giver userId diff --git a/Wonky.Client/HttpRepository/AdvisorActivityRepository.cs b/Wonky.Client/HttpRepository/AdvisorActivityRepository.cs index fd63cc42..ccd1c2b9 100644 --- a/Wonky.Client/HttpRepository/AdvisorActivityRepository.cs +++ b/Wonky.Client/HttpRepository/AdvisorActivityRepository.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System.Net; using System.Net.Http.Json; using System.Text.Json; using Microsoft.AspNetCore.Components; diff --git a/Wonky.Client/HttpRepository/AdvisorContactRepository.cs b/Wonky.Client/HttpRepository/AdvisorContactRepository.cs index 59f962ed..9038a745 100644 --- a/Wonky.Client/HttpRepository/AdvisorContactRepository.cs +++ b/Wonky.Client/HttpRepository/AdvisorContactRepository.cs @@ -1,3 +1,19 @@ + +// 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 System.Net.Http.Json; using System.Text.Json; using Microsoft.AspNetCore.Components; diff --git a/Wonky.Client/HttpRepository/AdvisorCustomerHistoryRepository.cs b/Wonky.Client/HttpRepository/AdvisorCustomerHistoryRepository.cs index fc292b80..73d139ca 100644 --- a/Wonky.Client/HttpRepository/AdvisorCustomerHistoryRepository.cs +++ b/Wonky.Client/HttpRepository/AdvisorCustomerHistoryRepository.cs @@ -1,3 +1,4 @@ + // 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 @@ -18,9 +19,7 @@ using System.Text.Json; using Microsoft.AspNetCore.Components; using Microsoft.Extensions.Options; using Wonky.Client.HttpInterfaces; -using Wonky.Client.Pages; using Wonky.Entity.Configuration; -using Wonky.Entity.DTO; using Wonky.Entity.Views; namespace Wonky.Client.HttpRepository; diff --git a/Wonky.Client/HttpRepository/AdvisorCustomerRepository.cs b/Wonky.Client/HttpRepository/AdvisorCustomerRepository.cs index 1c74a002..f228e022 100644 --- a/Wonky.Client/HttpRepository/AdvisorCustomerRepository.cs +++ b/Wonky.Client/HttpRepository/AdvisorCustomerRepository.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,22 +14,16 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; using System.Net.Http.Json; using System.Text.Json; -using System.Threading.Tasks; using Wonky.Client.Features; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.WebUtilities; -using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Wonky.Client.HttpInterfaces; using Wonky.Entity.Configuration; using Wonky.Entity.DTO; using Wonky.Entity.Requests; -using Wonky.Entity.Views; #pragma warning disable CS8601 diff --git a/Wonky.Client/HttpRepository/AdvisorReportRepository.cs b/Wonky.Client/HttpRepository/AdvisorReportRepository.cs index 03454ca0..68775256 100644 --- a/Wonky.Client/HttpRepository/AdvisorReportRepository.cs +++ b/Wonky.Client/HttpRepository/AdvisorReportRepository.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - using System.Net.Http.Json; using System.Text.Json; using Microsoft.AspNetCore.Components; diff --git a/Wonky.Client/HttpRepository/AdvisorTaskItemRepository.cs b/Wonky.Client/HttpRepository/AdvisorTaskItemRepository.cs index 09a5005b..c31f43fb 100644 --- a/Wonky.Client/HttpRepository/AdvisorTaskItemRepository.cs +++ b/Wonky.Client/HttpRepository/AdvisorTaskItemRepository.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,16 +14,13 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - using System.Net.Http.Json; using System.Text.Json; using Microsoft.AspNetCore.Components; using Microsoft.Extensions.Options; using Wonky.Client.HttpInterfaces; -using Wonky.Client.Pages; using Wonky.Entity.Configuration; using Wonky.Entity.DTO; -using Wonky.Entity.Views; namespace Wonky.Client.HttpRepository; diff --git a/Wonky.Client/HttpRepository/AdvisorWorkplaceRepository.cs b/Wonky.Client/HttpRepository/AdvisorWorkplaceRepository.cs index ec67ba9a..b10288a0 100644 --- a/Wonky.Client/HttpRepository/AdvisorWorkplaceRepository.cs +++ b/Wonky.Client/HttpRepository/AdvisorWorkplaceRepository.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/HttpRepository/CountryCatalogRepository.cs b/Wonky.Client/HttpRepository/CountryCatalogRepository.cs index f8f18e64..6d11c6ae 100644 --- a/Wonky.Client/HttpRepository/CountryCatalogRepository.cs +++ b/Wonky.Client/HttpRepository/CountryCatalogRepository.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,19 +14,14 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; using System.Net.Http.Json; using System.Text.Json; -using System.Threading.Tasks; using Wonky.Client.Features; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.WebUtilities; using Microsoft.Extensions.Options; using Wonky.Client.HttpInterfaces; using Wonky.Entity.Configuration; -using Wonky.Entity.DTO; using Wonky.Entity.Requests; using Wonky.Entity.Views; diff --git a/Wonky.Client/HttpRepository/OfficeCustomerHistoryRepository.cs b/Wonky.Client/HttpRepository/OfficeCustomerHistoryRepository.cs index 5b3a9e54..2a49b0d5 100644 --- a/Wonky.Client/HttpRepository/OfficeCustomerHistoryRepository.cs +++ b/Wonky.Client/HttpRepository/OfficeCustomerHistoryRepository.cs @@ -1,3 +1,4 @@ + // 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 @@ -18,9 +19,7 @@ using System.Text.Json; using Microsoft.AspNetCore.Components; using Microsoft.Extensions.Options; using Wonky.Client.HttpInterfaces; -using Wonky.Client.Pages; using Wonky.Entity.Configuration; -using Wonky.Entity.DTO; using Wonky.Entity.Views; namespace Wonky.Client.HttpRepository; diff --git a/Wonky.Client/HttpRepository/OfficeCustomerRepository.cs b/Wonky.Client/HttpRepository/OfficeCustomerRepository.cs index 8cc6b9b8..fb5143fc 100644 --- a/Wonky.Client/HttpRepository/OfficeCustomerRepository.cs +++ b/Wonky.Client/HttpRepository/OfficeCustomerRepository.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,22 +14,16 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; using System.Net.Http.Json; using System.Text.Json; -using System.Threading.Tasks; using Wonky.Client.Features; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.WebUtilities; -using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Wonky.Client.HttpInterfaces; using Wonky.Entity.Configuration; using Wonky.Entity.DTO; using Wonky.Entity.Requests; -using Wonky.Entity.Views; #pragma warning disable CS8601 diff --git a/Wonky.Client/HttpRepository/OfficeReportRepository.cs b/Wonky.Client/HttpRepository/OfficeReportRepository.cs index 79e2192f..d5ba8f25 100644 --- a/Wonky.Client/HttpRepository/OfficeReportRepository.cs +++ b/Wonky.Client/HttpRepository/OfficeReportRepository.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,14 +14,12 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - using System.Net.Http.Json; using System.Text.Json; using Microsoft.AspNetCore.Components; using Microsoft.Extensions.Options; using Wonky.Client.HttpInterfaces; using Wonky.Entity.Configuration; -using Wonky.Entity.DTO; using Wonky.Entity.Views; namespace Wonky.Client.HttpRepository; diff --git a/Wonky.Client/HttpRepository/OrderProcessRepository.cs b/Wonky.Client/HttpRepository/OrderProcessRepository.cs index edf9f3a0..0c4ac23f 100644 --- a/Wonky.Client/HttpRepository/OrderProcessRepository.cs +++ b/Wonky.Client/HttpRepository/OrderProcessRepository.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/HttpRepository/SystemSendMailService.cs b/Wonky.Client/HttpRepository/SystemSendMailService.cs index bdbb0aa5..699d2838 100644 --- a/Wonky.Client/HttpRepository/SystemSendMailService.cs +++ b/Wonky.Client/HttpRepository/SystemSendMailService.cs @@ -1,4 +1,19 @@ -using System.Net; + +// 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 System.Net.Http.Json; using System.Text.Json; using Microsoft.AspNetCore.Components; diff --git a/Wonky.Client/HttpRepository/SystemUserRepository.cs b/Wonky.Client/HttpRepository/SystemUserRepository.cs index d2eadf3c..a67006e3 100644 --- a/Wonky.Client/HttpRepository/SystemUserRepository.cs +++ b/Wonky.Client/HttpRepository/SystemUserRepository.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - using System.Net.Http.Json; using System.Text.Json; using Microsoft.AspNetCore.Components; @@ -50,9 +50,9 @@ public class SystemUserRepository : ISystemUserRepository /// Get Advisors (Office) /// /// - public async Task> GetAdvisors() + public async Task> GetAdvisors() { - return await _client.GetFromJsonAsync>(_api.OfficeAdvisors); + return await _client.GetFromJsonAsync>(_api.OfficeAdvisors); } /// @@ -80,9 +80,9 @@ public class SystemUserRepository : ISystemUserRepository /// Get Administrative Users /// /// - public async Task> GetAdminUsers() + public async Task> GetAdminUsers() { - return await _client.GetFromJsonAsync>(_api.OfficeUsers); + return await _client.GetFromJsonAsync>(_api.OfficeUsers); } /// diff --git a/Wonky.Client/Models/Draft.cs b/Wonky.Client/Models/Draft.cs index 42d14ea4..b6778e14 100644 --- a/Wonky.Client/Models/Draft.cs +++ b/Wonky.Client/Models/Draft.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,22 +14,8 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using Wonky.Entity.DTO; -using Wonky.Entity.Views; - namespace Wonky.Client.Models; -/// -/// Draft Item model class -/// -public class DraftItem -{ - public int Quantity { get; set; } - public SalesItemView Item { get; set; } - public decimal Price { get; set; } - public decimal Discount { get; set; } - public bool Sas { get; set; } - public decimal LineTotal => (Price - Price * Discount / 100) * Quantity; -} + /// /// Draft model class /// diff --git a/Wonky.Client/Models/DraftItem.cs b/Wonky.Client/Models/DraftItem.cs new file mode 100644 index 00000000..90bd2581 --- /dev/null +++ b/Wonky.Client/Models/DraftItem.cs @@ -0,0 +1,32 @@ + +// 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 Wonky.Entity.Views; + +namespace Wonky.Client.Models; + +/// +/// Draft Item model class +/// +public class DraftItem +{ + public int Quantity { get; set; } + public SalesItemView Item { get; set; } + public decimal Price { get; set; } + public decimal Discount { get; set; } + public bool Sas { get; set; } + public decimal LineTotal => (Price - Price * Discount / 100) * Quantity; +} \ No newline at end of file diff --git a/Wonky.Client/Models/PSort.cs b/Wonky.Client/Models/PSort.cs index 147f27f7..29d29e5b 100644 --- a/Wonky.Client/Models/PSort.cs +++ b/Wonky.Client/Models/PSort.cs @@ -1,3 +1,19 @@ + +// 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] +// + namespace Wonky.Client.Models; public enum PSort diff --git a/Wonky.Client/Models/PStatus.cs b/Wonky.Client/Models/PStatus.cs index efc39909..fc788c8a 100644 --- a/Wonky.Client/Models/PStatus.cs +++ b/Wonky.Client/Models/PStatus.cs @@ -1,3 +1,19 @@ + +// 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] +// + namespace Wonky.Client.Models; public enum PStatus diff --git a/Wonky.Client/Models/PTarget.cs b/Wonky.Client/Models/PTarget.cs index 92df3749..98aa303c 100644 --- a/Wonky.Client/Models/PTarget.cs +++ b/Wonky.Client/Models/PTarget.cs @@ -1,3 +1,19 @@ + +// 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] +// + namespace Wonky.Client.Models; public enum PTarget diff --git a/Wonky.Client/Models/QCallbackArgs.cs b/Wonky.Client/Models/QCallbackArgs.cs index 7813233f..fe0d7d4e 100644 --- a/Wonky.Client/Models/QCallbackArgs.cs +++ b/Wonky.Client/Models/QCallbackArgs.cs @@ -1,3 +1,19 @@ + +// 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] +// + namespace Wonky.Client.Models; public class QCallbackArgs diff --git a/Wonky.Client/Models/QStatus.cs b/Wonky.Client/Models/QStatus.cs index f8b3e346..a6d79d07 100644 --- a/Wonky.Client/Models/QStatus.cs +++ b/Wonky.Client/Models/QStatus.cs @@ -1,3 +1,19 @@ + +// 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] +// + namespace Wonky.Client.Models; public enum QStatus diff --git a/Wonky.Client/Models/SelectedSku.cs b/Wonky.Client/Models/SelectedSku.cs index acc19134..d18ac3dd 100644 --- a/Wonky.Client/Models/SelectedSku.cs +++ b/Wonky.Client/Models/SelectedSku.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/Models/VatAddress.cs b/Wonky.Client/Models/VatAddress.cs index f5bf5049..f927ce8f 100644 --- a/Wonky.Client/Models/VatAddress.cs +++ b/Wonky.Client/Models/VatAddress.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - using System.ComponentModel.DataAnnotations; namespace Wonky.Client.Models; diff --git a/Wonky.Client/Pages/AdvisorActivityCreatePage.razor b/Wonky.Client/Pages/AdvisorActivityCreatePage.razor index 2261bb63..91fbe18d 100644 --- a/Wonky.Client/Pages/AdvisorActivityCreatePage.razor +++ b/Wonky.Client/Pages/AdvisorActivityCreatePage.razor @@ -345,7 +345,7 @@ else + OnSelected="PriceHistoryCallback" @ref="PriceModalOverlay"/> diff --git a/Wonky.Client/Pages/AdvisorActivityCreatePage.razor.cs b/Wonky.Client/Pages/AdvisorActivityCreatePage.razor.cs index ec4393f7..be00596e 100644 --- a/Wonky.Client/Pages/AdvisorActivityCreatePage.razor.cs +++ b/Wonky.Client/Pages/AdvisorActivityCreatePage.razor.cs @@ -1,4 +1,5 @@ -// Copyright (C) 2022 FCS Frede's Computer Services. + +// 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 @@ -51,7 +52,7 @@ public partial class AdvisorActivityCreatePage : IDisposable // variables private readonly JsonSerializerOptions _options = new() {PropertyNameCaseInsensitive = true}; private SalesItemView SelectedItem { get; set; } = new(); - private UserPref UserPrefs { get; set; } = new(); + private UserProfile UserProfile { get; set; } = new(); private ActivityDto Activity { get; set; } = new(); private CompanyDto Company = new(); private EditContext? ActivityContext { get; set; } @@ -73,7 +74,7 @@ public partial class AdvisorActivityCreatePage : IDisposable // OVERLAY PAGES private PriceCatalogModalOverlay CatalogOverlay { get; set; } = new(); private ProductHistoryModalOverlay ProductOverlay { get; set; } = new(); - private ProductPriceHistoryModal PriceOverlay { get; set; } = new(); + private ProductPriceHistoryModalOverlay PriceModalOverlay { get; set; } = new(); private ConfirmWorkDateModalOverlay WorkDateOverlay { get; set; } = new(); private ConfirmProductCheckModalOverlay ProductCheckOverlay { get; set; } = new(); private CustomerInvoiceListModalOverlay InvoiceListOverlay { get; set; } = new(); @@ -101,7 +102,7 @@ public partial class AdvisorActivityCreatePage : IDisposable Interceptor.RegisterEvent(); Interceptor.RegisterBeforeSendEvent(); // User Preferences - UserPrefs = await Profiles.GetPreferences(); + UserProfile = await Profiles.GetPreferences(); // User Info SalesRep = await Storage.GetItemAsync("_xu"); // Fetch Customer from http @@ -143,12 +144,12 @@ public partial class AdvisorActivityCreatePage : IDisposable Activity.DlvZipCode = Company.ZipCode; Activity.DlvCity = Company.City; // Initialize date variable - SelectedDate = string.IsNullOrWhiteSpace(UserPrefs.WorkDate) ? DateTime.Now : DateTime.Parse(UserPrefs.WorkDate); + SelectedDate = string.IsNullOrWhiteSpace(UserProfile.WorkDate) ? DateTime.Now : DateTime.Parse(UserProfile.WorkDate); // raise flag if report is closed ReportClosed = await ReportRepo.ReportExist($"{SelectedDate:yyyy-MM-dd}"); // Ask for confirmation of date - Logger.LogDebug("Preferences.DateConfirmed => {}", UserPrefs.DateConfirmed); - if (!UserPrefs.DateConfirmed) + Logger.LogDebug("Preferences.DateConfirmed => {}", UserProfile.DateConfirmed); + if (!UserProfile.DateConfirmed) { PromptDateConfirm = $"Aktiviteter oprettes med dato {SelectedDate.ToShortDateString()}. Er dette OK?"; WorkDateOverlay.Show(); @@ -362,7 +363,7 @@ public partial class AdvisorActivityCreatePage : IDisposable private void ShowPriceHistoryOverlay() { if(ShowItem) - PriceOverlay.Show(); + PriceModalOverlay.Show(); } /// diff --git a/Wonky.Client/Pages/AdvisorActivityTodayListPage.razor.cs b/Wonky.Client/Pages/AdvisorActivityTodayListPage.razor.cs index 729fc543..3f819c30 100644 --- a/Wonky.Client/Pages/AdvisorActivityTodayListPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorActivityTodayListPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -16,10 +17,8 @@ using System.Text.Json; using Blazored.Toast.Services; using Microsoft.AspNetCore.Components; -using Wonky.Client.Components; using Wonky.Client.HttpInterceptors; using Wonky.Client.HttpInterfaces; -using Wonky.Client.HttpRepository; using Wonky.Client.Services; using Wonky.Entity.Views; @@ -35,7 +34,7 @@ public partial class AdvisorActivityTodayListPage : IDisposable [Inject] private IAdvisorReportRepository AdvisorReportRepo { get; set; } [Inject] private IToastService Toaster { get; set; } private ReportStatusView? ReportStatusView { get; set; } = new(); - private UserPref UserPref { get; set; } = new(); + private UserProfile UserProfile { get; set; } = new(); private DateTime SelectedDate { get; set; } private bool ReportExist { get; set; } private bool Working { get; set; } = true; @@ -44,8 +43,8 @@ public partial class AdvisorActivityTodayListPage : IDisposable { Interceptor.RegisterEvent(); Interceptor.RegisterBeforeSendEvent(); - UserPref = await UserProfileService.GetPreferences(); - SelectedDate = string.IsNullOrWhiteSpace(UserPref.WorkDate) ? DateTime.Now : DateTime.Parse(UserPref.WorkDate); + UserProfile = await UserProfileService.GetPreferences(); + SelectedDate = string.IsNullOrWhiteSpace(UserProfile.WorkDate) ? DateTime.Now : DateTime.Parse(UserProfile.WorkDate); ReportExist = await AdvisorReportRepo.ReportExist($"{SelectedDate:yyyy-MM-dd}"); await GetActivities($"{SelectedDate:yyyy-MM-dd}"); Working = false; diff --git a/Wonky.Client/Pages/AdvisorActivityViewPage.razor.cs b/Wonky.Client/Pages/AdvisorActivityViewPage.razor.cs index 63fa537b..10f5c405 100644 --- a/Wonky.Client/Pages/AdvisorActivityViewPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorActivityViewPage.razor.cs @@ -14,16 +14,12 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - -using System.Globalization; using System.Text.Json; -using System.Text.Json.Serialization; using Blazored.Toast.Services; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Forms; using Wonky.Client.HttpInterceptors; using Wonky.Client.HttpInterfaces; -using Wonky.Client.HttpRepository; using Wonky.Entity.DTO; using Wonky.Entity.Views; diff --git a/Wonky.Client/Pages/AdvisorCustomerActivityListPage.razor.cs b/Wonky.Client/Pages/AdvisorCustomerActivityListPage.razor.cs index 7e9279d2..406a2a42 100644 --- a/Wonky.Client/Pages/AdvisorCustomerActivityListPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorCustomerActivityListPage.razor.cs @@ -15,11 +15,9 @@ // -using System.Text.Json; using Microsoft.AspNetCore.Components; using Wonky.Client.HttpInterceptors; using Wonky.Client.HttpInterfaces; -using Wonky.Client.HttpRepository; using Wonky.Entity.DTO; using Wonky.Entity.Views; diff --git a/Wonky.Client/Pages/AdvisorCustomerCreatePage.razor b/Wonky.Client/Pages/AdvisorCustomerCreatePage.razor index baf37c9f..18076366 100644 --- a/Wonky.Client/Pages/AdvisorCustomerCreatePage.razor +++ b/Wonky.Client/Pages/AdvisorCustomerCreatePage.razor @@ -18,7 +18,6 @@ @page "/advisor/customers/new" @using Microsoft.AspNetCore.Authorization @using Wonky.Client.Components -@using System.Xml @attribute [Authorize(Roles = "Advisor")] Rådgiver Opret Kunde diff --git a/Wonky.Client/Pages/AdvisorCustomerCreatePage.razor.cs b/Wonky.Client/Pages/AdvisorCustomerCreatePage.razor.cs index 2de4916b..b29af036 100644 --- a/Wonky.Client/Pages/AdvisorCustomerCreatePage.razor.cs +++ b/Wonky.Client/Pages/AdvisorCustomerCreatePage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,20 +14,13 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System; -using System.ComponentModel.DataAnnotations; -using System.Linq; using System.Text.Json; -using System.Threading.Tasks; using Blazored.LocalStorage; using Blazored.Toast.Services; using Wonky.Client.HttpInterceptors; -using Wonky.Client.HttpRepository; using Wonky.Client.Services; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Forms; -using Microsoft.Extensions.Logging; -using Wonky.Client.Helpers; using Wonky.Client.HttpInterfaces; using Wonky.Client.Models; using Wonky.Client.Shared; diff --git a/Wonky.Client/Pages/AdvisorCustomerInventoryListPage.razor.cs b/Wonky.Client/Pages/AdvisorCustomerInventoryListPage.razor.cs index 5c969cc4..95fa9224 100644 --- a/Wonky.Client/Pages/AdvisorCustomerInventoryListPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorCustomerInventoryListPage.razor.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/Pages/AdvisorCustomerInvoiceListPage.razor.cs b/Wonky.Client/Pages/AdvisorCustomerInvoiceListPage.razor.cs index 0ecc83b7..b80f053b 100644 --- a/Wonky.Client/Pages/AdvisorCustomerInvoiceListPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorCustomerInvoiceListPage.razor.cs @@ -1,5 +1,19 @@ -using System.Globalization; -using System.Net.NetworkInformation; + +// 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 System.Text.Json; using Blazored.LocalStorage; using Blazored.Toast.Services; diff --git a/Wonky.Client/Pages/AdvisorCustomerListPage.razor.cs b/Wonky.Client/Pages/AdvisorCustomerListPage.razor.cs index 8b1cf069..6a6f09a9 100644 --- a/Wonky.Client/Pages/AdvisorCustomerListPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorCustomerListPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,12 +14,8 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System; -using System.Collections.Generic; -using System.Threading.Tasks; using Blazored.LocalStorage; using Wonky.Client.HttpInterceptors; -using Wonky.Client.HttpRepository; using Microsoft.AspNetCore.Components; using Wonky.Client.HttpInterfaces; using Wonky.Client.Services; @@ -36,7 +33,7 @@ namespace Wonky.Client.Pages [Inject] private HttpInterceptorService Interceptor { get; set; } [Inject] private NavigationManager Navigator { get; set; } private List Companies { get; set; } = new(); - private UserPref Prefs { get; set; } = new(); + private UserProfile Profiles { get; set; } = new(); private UserInfoView UserInfo { get; set; } = new(); private string SavedSearch { get; set; } = ""; private bool IncludeFolded { get; set; } @@ -55,15 +52,15 @@ namespace Wonky.Client.Pages protected override async Task OnInitializedAsync() { // set preferences - Prefs = await ProfileService.GetPreferences(); + Profiles = await ProfileService.GetPreferences(); UserInfo = await Storage.GetItemAsync("_xu"); - Paging.OrderBy = Prefs.CompanySort; - Paging.SearchColumn = Prefs.CompanySearch; - Paging.PageSize = Convert.ToInt32(Prefs.PageSize); + Paging.OrderBy = Profiles.CompanySort; + Paging.SearchColumn = Profiles.CompanySearch; + Paging.PageSize = Convert.ToInt32(Profiles.PageSize); Paging.HasFolded = IncludeFolded ? 1 : 0; // load saved search - SavedSearch = string.IsNullOrWhiteSpace(Prefs.CompanyFilterPhrase) ? "" : Prefs.CompanyFilterPhrase; + SavedSearch = string.IsNullOrWhiteSpace(Profiles.CompanyFilterPhrase) ? "" : Profiles.CompanyFilterPhrase; Paging.SearchTerm = SavedSearch; // get companies diff --git a/Wonky.Client/Pages/AdvisorCustomerViewPage.razor.cs b/Wonky.Client/Pages/AdvisorCustomerViewPage.razor.cs index 6a8cdefe..6cf2f27b 100644 --- a/Wonky.Client/Pages/AdvisorCustomerViewPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorCustomerViewPage.razor.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/Pages/AdvisorQuoteListPage.razor.cs b/Wonky.Client/Pages/AdvisorQuoteListPage.razor.cs index 7bb21584..1aa8d308 100644 --- a/Wonky.Client/Pages/AdvisorQuoteListPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorQuoteListPage.razor.cs @@ -1,7 +1,19 @@ -using System.Diagnostics.CodeAnalysis; -using System.IO.Enumeration; -using System.Security.Policy; -using System.Text.Json; + +// 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 Blazored.LocalStorage; using Blazored.Toast.Services; using Microsoft.AspNetCore.Components; @@ -9,7 +21,6 @@ using Wonky.Client.Helpers; using Wonky.Client.HttpInterceptors; using Wonky.Client.HttpInterfaces; using Wonky.Client.Models; -using Wonky.Entity.DTO; using Wonky.Entity.Views; namespace Wonky.Client.Pages; diff --git a/Wonky.Client/Pages/AdvisorReportCreatePage.razor b/Wonky.Client/Pages/AdvisorReportCreatePage.razor index 071563a7..febb528d 100644 --- a/Wonky.Client/Pages/AdvisorReportCreatePage.razor +++ b/Wonky.Client/Pages/AdvisorReportCreatePage.razor @@ -17,7 +17,6 @@ @using Microsoft.AspNetCore.Authorization @using Wonky.Client.Components -@using Wonky.Entity.Views @attribute [Authorize(Roles = "Advisor")] @page "/advisor/reports/new" @@ -74,7 +73,7 @@ } else { - Report.Figures.KmMorning = Prefs.KmMorning; + Report.Figures.KmMorning = Profiles.KmMorning; - @foreach (var entry in History) + @if (History.Any()) { - - - - - - - + @foreach (var entry in History) + { + + + + + + + + } }
diff --git a/Wonky.Client/Pages/AdvisorReportCreatePage.razor.cs b/Wonky.Client/Pages/AdvisorReportCreatePage.razor.cs index 5e520614..3399d100 100644 --- a/Wonky.Client/Pages/AdvisorReportCreatePage.razor.cs +++ b/Wonky.Client/Pages/AdvisorReportCreatePage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -40,7 +41,7 @@ public partial class AdvisorReportCreatePage : IDisposable private ReportDto Report { get; set; } = new(); private List Activities { get; set; } = new(); private ReportFiguresDto InitialValues { get; set; } - private UserPref Prefs { get; set; } = new(); + private UserProfile Profiles { get; set; } = new(); private bool FormInvalid { get; set; } = true; private bool NoFigures { get; set; } = true; private bool Working { get; set; } @@ -68,10 +69,10 @@ public partial class AdvisorReportCreatePage : IDisposable ReportContext.OnValidationStateChanged += ValidationChanged; ProfileService.OnChange += ProfileServiceOnOnChange; - Prefs = await ProfileService.GetPreferences(); - Logger.LogDebug("{}", JsonSerializer.Serialize(Prefs)); + Profiles = await ProfileService.GetPreferences(); + Logger.LogDebug("{}", JsonSerializer.Serialize(Profiles)); - WorkDate = Prefs.WorkDate; + WorkDate = Profiles.WorkDate; if (string.IsNullOrWhiteSpace(WorkDate)) { _workDate = DateTime.Now; @@ -102,10 +103,10 @@ public partial class AdvisorReportCreatePage : IDisposable Logger.LogDebug("OnInitializedAsync => GetKeyFigures <= {}", JsonSerializer.Serialize(Report)); } - private void ProfileServiceOnOnChange(UserPref userPref) + private void ProfileServiceOnOnChange(UserProfile userProfile) { - Prefs = userPref; - WorkDate = Prefs.WorkDate; + Profiles = userProfile; + WorkDate = Profiles.WorkDate; StateHasChanged(); } @@ -137,7 +138,7 @@ public partial class AdvisorReportCreatePage : IDisposable } else { - Report.Figures.KmMorning = Prefs.KmMorning; + Report.Figures.KmMorning = Profiles.KmMorning; } NoFigures = false; diff --git a/Wonky.Client/Pages/AdvisorReportListPage.razor.cs b/Wonky.Client/Pages/AdvisorReportListPage.razor.cs index ce407b70..301dc1d6 100644 --- a/Wonky.Client/Pages/AdvisorReportListPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorReportListPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -14,10 +15,8 @@ // using Microsoft.AspNetCore.Components; -using Toolbelt.Blazor; using Wonky.Client.HttpInterceptors; using Wonky.Client.HttpInterfaces; -using Wonky.Client.HttpRepository; using Wonky.Entity.Views; namespace Wonky.Client.Pages; diff --git a/Wonky.Client/Pages/AdvisorReportViewPage.razor.cs b/Wonky.Client/Pages/AdvisorReportViewPage.razor.cs index 34a1c68f..fff95b72 100644 --- a/Wonky.Client/Pages/AdvisorReportViewPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorReportViewPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -33,7 +34,7 @@ public partial class AdvisorReportViewPage : IDisposable [Inject] private ILogger Logger { get; set; } [Inject] private UserProfileService ProfileService { get; set; } - private UserPref Prefs { get; set; } = new(); + private UserProfile Profiles { get; set; } = new(); private ReportView Report { get; set; } = new(); private List Activities { get; set; } = new (); private bool Working { get; set; } @@ -116,10 +117,10 @@ public partial class AdvisorReportViewPage : IDisposable Working = false; } - private void ProfileServiceOnOnChange(UserPref userPref) + private void ProfileServiceOnOnChange(UserProfile userProfile) { - Prefs = userPref; - ReportDate = Prefs.WorkDate; + Profiles = userProfile; + ReportDate = Profiles.WorkDate; StateHasChanged(); } diff --git a/Wonky.Client/Pages/AdvisorTaskItemListCrmPage.razor.cs b/Wonky.Client/Pages/AdvisorTaskItemListCrmPage.razor.cs index d5829d4a..da0478a6 100644 --- a/Wonky.Client/Pages/AdvisorTaskItemListCrmPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorTaskItemListCrmPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -15,13 +16,10 @@ using Blazored.Toast.Services; using Microsoft.AspNetCore.Components; -using Wonky.Client.Components; using Wonky.Client.HttpInterceptors; using Wonky.Client.HttpInterfaces; -using Wonky.Client.HttpRepository; using Wonky.Client.Services; using Wonky.Entity.DTO; -using Wonky.Entity.Views; namespace Wonky.Client.Pages; @@ -33,7 +31,7 @@ public partial class AdvisorTaskItemListCrmPage : IDisposable [Inject] private NavigationManager Navigator { get; set; } [Inject] private IAdvisorTaskItemRepository AdvisorTaskRepo { get; set; } [Inject] private IToastService Toaster { get; set; } - private UserPref Prefs { get; set; } = new(); + private UserProfile Profiles { get; set; } = new(); private string WorkDate { get; set; } = $"{DateTime.Now:yyyy-MM-dd}"; private bool ReportExist = false; private List TaskItems { get; set; } = new(); @@ -41,9 +39,9 @@ public partial class AdvisorTaskItemListCrmPage : IDisposable protected override async Task OnInitializedAsync() { - Prefs = await UserProfileService.GetPreferences(); - if(!string.IsNullOrWhiteSpace(Prefs.WorkDate)) - WorkDate = Prefs.WorkDate; + Profiles = await UserProfileService.GetPreferences(); + if(!string.IsNullOrWhiteSpace(Profiles.WorkDate)) + WorkDate = Profiles.WorkDate; Interceptor.RegisterEvent(); Interceptor.RegisterBeforeSendEvent(); diff --git a/Wonky.Client/Pages/AdvisorTaskItemViewCrmPage.razor.cs b/Wonky.Client/Pages/AdvisorTaskItemViewCrmPage.razor.cs index 567f4b75..51ef9bad 100644 --- a/Wonky.Client/Pages/AdvisorTaskItemViewCrmPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorTaskItemViewCrmPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -14,12 +15,10 @@ // using System.Text.Json; -using System.Text.Json.Serialization; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Forms; using Wonky.Client.HttpInterceptors; using Wonky.Client.HttpInterfaces; -using Wonky.Client.HttpRepository; using Wonky.Entity.DTO; namespace Wonky.Client.Pages; diff --git a/Wonky.Client/Pages/AdvisorWorkplaceDocumentListPage.razor.cs b/Wonky.Client/Pages/AdvisorWorkplaceDocumentListPage.razor.cs index 6dacf017..162fc522 100644 --- a/Wonky.Client/Pages/AdvisorWorkplaceDocumentListPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorWorkplaceDocumentListPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,11 +14,9 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - using Microsoft.AspNetCore.Components; using Wonky.Client.HttpInterceptors; using Wonky.Client.HttpInterfaces; -using Wonky.Client.HttpRepository; namespace Wonky.Client.Pages; diff --git a/Wonky.Client/Pages/AdvisorWorkplaceListPage.razor.cs b/Wonky.Client/Pages/AdvisorWorkplaceListPage.razor.cs index 63a8afa9..a8f08021 100644 --- a/Wonky.Client/Pages/AdvisorWorkplaceListPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorWorkplaceListPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,12 +14,9 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - -using System.Text.Json; using Microsoft.AspNetCore.Components; using Wonky.Client.HttpInterceptors; using Wonky.Client.HttpInterfaces; -using Wonky.Client.HttpRepository; using Wonky.Entity.DTO; using Wonky.Entity.Views; diff --git a/Wonky.Client/Pages/AdvisorWorkplaceViewPage.razor b/Wonky.Client/Pages/AdvisorWorkplaceViewPage.razor index 307977ba..29a6b502 100644 --- a/Wonky.Client/Pages/AdvisorWorkplaceViewPage.razor +++ b/Wonky.Client/Pages/AdvisorWorkplaceViewPage.razor @@ -15,7 +15,6 @@ // *@ - @using Microsoft.AspNetCore.Authorization @using Wonky.Client.Components @attribute [Authorize(Roles = "Advisor")] diff --git a/Wonky.Client/Pages/AdvisorWorkplaceViewPage.razor.cs b/Wonky.Client/Pages/AdvisorWorkplaceViewPage.razor.cs index f40f8ce2..41712781 100644 --- a/Wonky.Client/Pages/AdvisorWorkplaceViewPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorWorkplaceViewPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,15 +14,11 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - -using System.Text.Json; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Forms; using Wonky.Client.HttpInterceptors; using Wonky.Client.HttpInterfaces; -using Wonky.Client.HttpRepository; using Wonky.Entity.DTO; -using Wonky.Entity.Views; namespace Wonky.Client.Pages; diff --git a/Wonky.Client/Pages/CatalogCountryPage.razor.cs b/Wonky.Client/Pages/CatalogCountryPage.razor.cs index b8d085dc..0b48f2b5 100644 --- a/Wonky.Client/Pages/CatalogCountryPage.razor.cs +++ b/Wonky.Client/Pages/CatalogCountryPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System.Text.Json; using Blazored.LocalStorage; using Wonky.Client.HttpInterceptors; using Microsoft.AspNetCore.Components; @@ -39,20 +39,20 @@ public partial class CatalogCountryPage : IDisposable private List Items { get; set; } = new(); private MetaData MetaInfo { get; set; } = new(); private CatalogPager Pager { get; set; } = new(); - private UserPref Prefs { get; set; } = new(); + private UserProfile Profiles { get; set; } = new(); private UserInfoView UserInfo { get; set; } = new(); private bool Working { get; set; } private string CountryName { get; set; } = ""; protected override async Task OnInitializedAsync() { - Prefs = await ProfileService.GetPreferences(); + Profiles = await ProfileService.GetPreferences(); UserInfo = await Storage.GetItemAsync("_xu"); - Pager.OrderBy = Prefs.ItemSort; + Pager.OrderBy = Profiles.ItemSort; - Pager.SearchColumn = Prefs.ItemSearch; - Pager.PageSize = Convert.ToInt32(Prefs.PageSize); + Pager.SearchColumn = Profiles.ItemSearch; + Pager.PageSize = Convert.ToInt32(Profiles.PageSize); Interceptor.RegisterEvent(); Interceptor.RegisterBeforeSendEvent(); diff --git a/Wonky.Client/Pages/CatalogCountryPrintPage.razor.cs b/Wonky.Client/Pages/CatalogCountryPrintPage.razor.cs index 82605594..33052da9 100644 --- a/Wonky.Client/Pages/CatalogCountryPrintPage.razor.cs +++ b/Wonky.Client/Pages/CatalogCountryPrintPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,19 +14,11 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System; -using System.Collections.Generic; -using System.Threading.Tasks; using Blazored.LocalStorage; using Wonky.Client.HttpInterceptors; -using Wonky.Client.HttpRepository; using Microsoft.AspNetCore.Components; -using Wonky.Client.Components; using Wonky.Client.Helpers; using Wonky.Client.HttpInterfaces; -using Wonky.Client.Services; -using Wonky.Entity.DTO; -using Wonky.Entity.Requests; using Wonky.Entity.Views; namespace Wonky.Client.Pages; diff --git a/Wonky.Client/Pages/ErrorPage404.razor.cs b/Wonky.Client/Pages/ErrorPage404.razor.cs index 33f18895..8907068f 100644 --- a/Wonky.Client/Pages/ErrorPage404.razor.cs +++ b/Wonky.Client/Pages/ErrorPage404.razor.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/Pages/ErrorReportPage.razor.cs b/Wonky.Client/Pages/ErrorReportPage.razor.cs index 3561c84d..c5520816 100644 --- a/Wonky.Client/Pages/ErrorReportPage.razor.cs +++ b/Wonky.Client/Pages/ErrorReportPage.razor.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/Pages/Login.razor.cs b/Wonky.Client/Pages/Login.razor.cs index 3cc13839..77117e54 100644 --- a/Wonky.Client/Pages/Login.razor.cs +++ b/Wonky.Client/Pages/Login.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System.Threading.Tasks; using Wonky.Client.Services; using Microsoft.AspNetCore.Components; using Wonky.Entity.DTO; diff --git a/Wonky.Client/Pages/Logout.razor.cs b/Wonky.Client/Pages/Logout.razor.cs index 5a9fed52..1edadb88 100644 --- a/Wonky.Client/Pages/Logout.razor.cs +++ b/Wonky.Client/Pages/Logout.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System.Threading.Tasks; using Blazored.LocalStorage; using Wonky.Client.Services; using Microsoft.AspNetCore.Components; diff --git a/Wonky.Client/Pages/OfficeCustomerCountryListPage.razor.cs b/Wonky.Client/Pages/OfficeCustomerCountryListPage.razor.cs index 1cc9acc2..df59b45f 100644 --- a/Wonky.Client/Pages/OfficeCustomerCountryListPage.razor.cs +++ b/Wonky.Client/Pages/OfficeCustomerCountryListPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,12 +14,8 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System; -using System.Collections.Generic; -using System.Threading.Tasks; using Blazored.LocalStorage; using Wonky.Client.HttpInterceptors; -using Wonky.Client.HttpRepository; using Microsoft.AspNetCore.Components; using Wonky.Client.HttpInterfaces; using Wonky.Client.Services; @@ -37,7 +34,7 @@ namespace Wonky.Client.Pages [Inject] private HttpInterceptorService Interceptor { get; set; } [Inject] private NavigationManager Navigator { get; set; } private List Companies { get; set; } = new(); - private UserPref Prefs { get; set; } = new(); + private UserProfile Profiles { get; set; } = new(); private UserInfoView UserInfo { get; set; } = new(); private string SavedSearch { get; set; } = ""; private bool IncludeFolded { get; set; } @@ -54,15 +51,15 @@ namespace Wonky.Client.Pages Interceptor.RegisterBeforeSendEvent(); // set preferences - Prefs = await ProfileService.GetPreferences(); + Profiles = await ProfileService.GetPreferences(); UserInfo = await Storage.GetItemAsync("_xu"); - Paging.OrderBy = Prefs.CompanySort; - Paging.SearchColumn = Prefs.CompanySearch; - Paging.PageSize = Convert.ToInt32(Prefs.PageSize); + Paging.OrderBy = Profiles.CompanySort; + Paging.SearchColumn = Profiles.CompanySearch; + Paging.PageSize = Convert.ToInt32(Profiles.PageSize); Paging.HasFolded = IncludeFolded ? 1 : 0; // load saved search - SavedSearch = string.IsNullOrWhiteSpace(Prefs.CompanyFilterPhrase) ? "" : Prefs.CompanyFilterPhrase; + SavedSearch = string.IsNullOrWhiteSpace(Profiles.CompanyFilterPhrase) ? "" : Profiles.CompanyFilterPhrase; Paging.SearchTerm = SavedSearch; // get companies diff --git a/Wonky.Client/Pages/OfficeCustomerCreatePhoneOrderPage.razor.cs b/Wonky.Client/Pages/OfficeCustomerCreatePhoneOrderPage.razor.cs index d729f0ef..44db35ba 100644 --- a/Wonky.Client/Pages/OfficeCustomerCreatePhoneOrderPage.razor.cs +++ b/Wonky.Client/Pages/OfficeCustomerCreatePhoneOrderPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -19,7 +20,6 @@ using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Forms; using Wonky.Client.HttpInterfaces; using Wonky.Client.Models; -using Wonky.Client.Services; using Wonky.Client.Shared; using Wonky.Entity.DTO; using Wonky.Entity.Views; diff --git a/Wonky.Client/Pages/OfficeCustomerOrderViewPage.razor.cs b/Wonky.Client/Pages/OfficeCustomerOrderViewPage.razor.cs index 07d9324b..4c96d3d0 100644 --- a/Wonky.Client/Pages/OfficeCustomerOrderViewPage.razor.cs +++ b/Wonky.Client/Pages/OfficeCustomerOrderViewPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,20 +14,15 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - using System.Text; using System.Text.Json; using Blazored.Toast.Services; using Microsoft.AspNetCore.Components; -using Microsoft.AspNetCore.Components.Forms; using Wonky.Client.HttpInterceptors; using Wonky.Client.HttpInterfaces; -using Wonky.Client.HttpRepository; using Wonky.Entity.DTO; using Wonky.Entity.Views; -using System.Security.Claims; using Blazored.LocalStorage; -using Wonky.Client.Services; namespace Wonky.Client.Pages; diff --git a/Wonky.Client/Pages/OfficeLandingPage.razor.cs b/Wonky.Client/Pages/OfficeLandingPage.razor.cs index 4e2ca41c..08e5fa01 100644 --- a/Wonky.Client/Pages/OfficeLandingPage.razor.cs +++ b/Wonky.Client/Pages/OfficeLandingPage.razor.cs @@ -1,6 +1,20 @@ -using Blazored.LocalStorage; + +// 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.Components; -using Wonky.Entity.Views; namespace Wonky.Client.Pages; diff --git a/Wonky.Client/Pages/OfficeUserAdvisorCustomerListPage.razor.cs b/Wonky.Client/Pages/OfficeUserAdvisorCustomerListPage.razor.cs index bca81efe..c8f95fea 100644 --- a/Wonky.Client/Pages/OfficeUserAdvisorCustomerListPage.razor.cs +++ b/Wonky.Client/Pages/OfficeUserAdvisorCustomerListPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -34,7 +35,7 @@ public partial class OfficeUserAdvisorCustomerListPage : IDisposable private List CompanyList { get; set; } = new(); private MetaData ResponseMeta { get; set; } = new(); private CustomerPaging Paging = new(); - private UserPref UserPref { get; set; } = new(); + private UserProfile UserProfile { get; set; } = new(); private string SavedSearch { get; set; } = ""; private bool IncludeFolded { get; set; } private bool Working { get; set; } = true; @@ -48,14 +49,14 @@ public partial class OfficeUserAdvisorCustomerListPage : IDisposable SalesRep = await UserRepo.GetAdvisorInfo(UserId); // set preferences - UserPref = await UserProfileService.GetPreferences(); - Paging.OrderBy = UserPref.CompanySort; - Paging.SearchColumn = UserPref.CompanySearch; - Paging.PageSize = Convert.ToInt32(UserPref.PageSize); + UserProfile = await UserProfileService.GetPreferences(); + Paging.OrderBy = UserProfile.CompanySort; + Paging.SearchColumn = UserProfile.CompanySearch; + Paging.PageSize = Convert.ToInt32(UserProfile.PageSize); Paging.HasFolded = IncludeFolded ? 1 : 0; // load saved search - SavedSearch = UserPref.CompanyFilterPhrase; + SavedSearch = UserProfile.CompanyFilterPhrase; Paging.SearchTerm = SavedSearch; await FetchCompanies(); diff --git a/Wonky.Client/Pages/OfficeUserAdvisorListPage.razor.cs b/Wonky.Client/Pages/OfficeUserAdvisorListPage.razor.cs index 53bb4e7e..6b80f454 100644 --- a/Wonky.Client/Pages/OfficeUserAdvisorListPage.razor.cs +++ b/Wonky.Client/Pages/OfficeUserAdvisorListPage.razor.cs @@ -1,8 +1,24 @@ + +// 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.Components; using Wonky.Client.Helpers; using Wonky.Client.HttpInterceptors; using Wonky.Client.HttpInterfaces; -using Wonky.Entity.Views; +using Wonky.Entity.DTO; namespace Wonky.Client.Pages; @@ -11,7 +27,7 @@ public partial class OfficeUserAdvisorListPage :IDisposable [Inject] private HttpInterceptorService Interceptor { get; set; } [Inject] private ISystemUserRepository SystemUserRepo { get; set; } [Parameter] public string CountryCode { get; set; } = ""; - private List SalesReps { get; set; } = new(); + private List SalesReps { get; set; } = new(); private bool Working { get; set; } = true; private string CountryName { get; set; } = ""; @@ -22,7 +38,7 @@ public partial class OfficeUserAdvisorListPage :IDisposable CountryName = Utils.CountryName(CountryCode); var AdvisorList = await SystemUserRepo.GetAdvisors(); SalesReps = AdvisorList - .Where(x => x.CountryCode.ToLower() == CountryCode && Convert.ToInt32(x.SalesRep) < 100) + .Where(x => x.CountryCode.ToLower() == CountryCode && int.TryParse(x.SalesRep, out _)) .ToList(); Working = false; } diff --git a/Wonky.Client/Pages/OfficeUserAdvisorReportListPage.razor.cs b/Wonky.Client/Pages/OfficeUserAdvisorReportListPage.razor.cs index 5e41ba3c..336cd704 100644 --- a/Wonky.Client/Pages/OfficeUserAdvisorReportListPage.razor.cs +++ b/Wonky.Client/Pages/OfficeUserAdvisorReportListPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,12 +14,9 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System.Runtime.CompilerServices; using Microsoft.AspNetCore.Components; -using Toolbelt.Blazor; using Wonky.Client.HttpInterceptors; using Wonky.Client.HttpInterfaces; -using Wonky.Client.HttpRepository; using Wonky.Entity.Views; namespace Wonky.Client.Pages; diff --git a/Wonky.Client/Pages/OfficeUserAdvisorReportViewPage.razor.cs b/Wonky.Client/Pages/OfficeUserAdvisorReportViewPage.razor.cs index 77c815ec..26b98795 100644 --- a/Wonky.Client/Pages/OfficeUserAdvisorReportViewPage.razor.cs +++ b/Wonky.Client/Pages/OfficeUserAdvisorReportViewPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -22,7 +23,6 @@ using Wonky.Client.HttpInterceptors; using Wonky.Client.HttpInterfaces; using Wonky.Client.Models; using Wonky.Client.Services; -using Wonky.Client.Shared; using Wonky.Entity.DTO; using Wonky.Entity.Views; @@ -46,7 +46,7 @@ public partial class OfficeUserAdvisorReportViewPage : IDisposable private ReportView Report { get; set; } = new(); private List Activities { get; set; } = new(); private bool Working { get; set; } = true; - private UserPref Prefs = new(); + private UserProfile _profiles = new(); private string ReturnUrl = ""; private string PrintUrl = ""; @@ -154,12 +154,12 @@ public partial class OfficeUserAdvisorReportViewPage : IDisposable Working = false; } - private void ProfileServiceOnOnChange(UserPref userPref) + private void ProfileServiceOnOnChange(UserProfile userProfile) { Logger.LogDebug("OfficeReportViewPage => ProfileServiceOnOnChange"); - Prefs = userPref; - Logger.LogDebug("OfficeReportViewPage => ProfileServiceOnOnChange => Prefs.WorkDate <= {}", Prefs.WorkDate); - ReportDate = Prefs.WorkDate; + _profiles = userProfile; + Logger.LogDebug("OfficeReportViewPage => ProfileServiceOnOnChange => Prefs.WorkDate <= {}", _profiles.WorkDate); + ReportDate = _profiles.WorkDate; StateHasChanged(); } diff --git a/Wonky.Client/Pages/OfficeUserAdvisorViewEditPage.razor.cs b/Wonky.Client/Pages/OfficeUserAdvisorViewEditPage.razor.cs index f178d85c..ee64e042 100644 --- a/Wonky.Client/Pages/OfficeUserAdvisorViewEditPage.razor.cs +++ b/Wonky.Client/Pages/OfficeUserAdvisorViewEditPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,14 +14,12 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System.Security.Policy; using System.Text.Json; using Blazored.Toast.Services; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Forms; using Wonky.Client.HttpInterceptors; using Wonky.Client.HttpInterfaces; -using Wonky.Client.HttpRepository; using Wonky.Entity.DTO; using Wonky.Entity.Views; diff --git a/Wonky.Client/Pages/ReportPrintOrderPage.razor.cs b/Wonky.Client/Pages/ReportPrintOrderPage.razor.cs index aadd874d..a16b35f1 100644 --- a/Wonky.Client/Pages/ReportPrintOrderPage.razor.cs +++ b/Wonky.Client/Pages/ReportPrintOrderPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -20,7 +21,6 @@ using Microsoft.JSInterop; using Wonky.Client.Helpers; using Wonky.Client.HttpInterfaces; using Wonky.Client.Models; -using Wonky.Client.Shared; using Wonky.Entity.DTO; using Wonky.Entity.Views; diff --git a/Wonky.Client/Pages/ReportPrintSummaryPage.razor.cs b/Wonky.Client/Pages/ReportPrintSummaryPage.razor.cs index f1646300..7bf992e9 100644 --- a/Wonky.Client/Pages/ReportPrintSummaryPage.razor.cs +++ b/Wonky.Client/Pages/ReportPrintSummaryPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System.Runtime.CompilerServices; using Blazored.LocalStorage; using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; diff --git a/Wonky.Client/Pages/WarehouseOrderListPage.razor.cs b/Wonky.Client/Pages/WarehouseOrderListPage.razor.cs index 5fe729c9..3210b95d 100644 --- a/Wonky.Client/Pages/WarehouseOrderListPage.razor.cs +++ b/Wonky.Client/Pages/WarehouseOrderListPage.razor.cs @@ -1,3 +1,19 @@ + +// 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.Components; using Wonky.Client.Helpers; using Wonky.Client.HttpInterceptors; diff --git a/Wonky.Client/Pages/WarehouseOrderViewPage.razor.cs b/Wonky.Client/Pages/WarehouseOrderViewPage.razor.cs index d562feb2..76640bee 100644 --- a/Wonky.Client/Pages/WarehouseOrderViewPage.razor.cs +++ b/Wonky.Client/Pages/WarehouseOrderViewPage.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,14 +14,11 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - -using System.Text; 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.Entity.DTO; using Wonky.Entity.Views; diff --git a/Wonky.Client/Program.cs b/Wonky.Client/Program.cs index 453bc5dc..fea2f0da 100644 --- a/Wonky.Client/Program.cs +++ b/Wonky.Client/Program.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/Services/AuthenticationService.cs b/Wonky.Client/Services/AuthenticationService.cs index 3c85b4ad..e1d3e189 100644 --- a/Wonky.Client/Services/AuthenticationService.cs +++ b/Wonky.Client/Services/AuthenticationService.cs @@ -1,3 +1,4 @@ + // 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 @@ -14,7 +15,6 @@ // using System.Net.Http.Headers; -using System.Net.Http.Json; using System.Text.Json; using Blazored.LocalStorage; using Microsoft.AspNetCore.Components.Authorization; @@ -120,7 +120,7 @@ namespace Wonky.Client.Services { ((AuthStateProvider)_authStateProvider).NotifyUserLogout(); _client.DefaultRequestHeaders.Authorization = null; - var backupPreferences = _localStorage.GetItemAsync("preferences"); + var backupPreferences = _localStorage.GetItemAsync("preferences"); await _localStorage.ClearAsync(); await _localStorage.SetItemAsync("preferences", backupPreferences); } diff --git a/Wonky.Client/Services/IAuthenticationService.cs b/Wonky.Client/Services/IAuthenticationService.cs index 8fa8ca2e..34f62971 100644 --- a/Wonky.Client/Services/IAuthenticationService.cs +++ b/Wonky.Client/Services/IAuthenticationService.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System.Threading.Tasks; using Wonky.Entity.DTO; using Wonky.Entity.Views; diff --git a/Wonky.Client/Services/OrderDraftService.cs b/Wonky.Client/Services/OrderDraftService.cs index 54507785..3f308471 100644 --- a/Wonky.Client/Services/OrderDraftService.cs +++ b/Wonky.Client/Services/OrderDraftService.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/Services/RefreshTokenService.cs b/Wonky.Client/Services/RefreshTokenService.cs index aa5e797e..4589b2c0 100644 --- a/Wonky.Client/Services/RefreshTokenService.cs +++ b/Wonky.Client/Services/RefreshTokenService.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,10 +14,7 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System; -using System.Threading.Tasks; using Microsoft.AspNetCore.Components.Authorization; -using Microsoft.Extensions.Logging; namespace Wonky.Client.Services; diff --git a/Wonky.Client/Services/UserProfileService.cs b/Wonky.Client/Services/UserProfileService.cs index 74618eb5..982a8fe4 100644 --- a/Wonky.Client/Services/UserProfileService.cs +++ b/Wonky.Client/Services/UserProfileService.cs @@ -1,3 +1,4 @@ + // 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 @@ -16,7 +17,7 @@ using Blazored.LocalStorage; namespace Wonky.Client.Services; -public record UserPref +public record UserProfile { public string CompanyFilterPhrase { get; set; } = ""; public string CompanySearch { get; set; } = "name"; @@ -33,7 +34,7 @@ public class UserProfileService { private readonly ILocalStorageService _localStorageService; private const string KeyName = "preferences"; - public event Action? OnChange; + public event Action? OnChange; public UserProfileService(ILocalStorageService localStorageService) { _localStorageService = localStorageService; @@ -132,8 +133,8 @@ public class UserProfileService OnChange?.Invoke(newPreferences); } - public async Task GetPreferences() + public async Task GetPreferences() { - return await _localStorageService.GetItemAsync(KeyName) ?? new UserPref(); + return await _localStorageService.GetItemAsync(KeyName) ?? new UserProfile(); } } \ No newline at end of file diff --git a/Wonky.Client/Services/VatInfoLookupService.cs b/Wonky.Client/Services/VatInfoLookupService.cs index 0e6785a1..957ca2e8 100644 --- a/Wonky.Client/Services/VatInfoLookupService.cs +++ b/Wonky.Client/Services/VatInfoLookupService.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System.Text.Encodings.Web; using System.Text.Json; using Microsoft.AspNetCore.WebUtilities; using Microsoft.Extensions.Options; diff --git a/Wonky.Client/Shared/AuthStateProvider.cs b/Wonky.Client/Shared/AuthStateProvider.cs index a4de896c..41aea649 100644 --- a/Wonky.Client/Shared/AuthStateProvider.cs +++ b/Wonky.Client/Shared/AuthStateProvider.cs @@ -1,3 +1,4 @@ + // 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 @@ -17,7 +18,6 @@ using System.Net.Http.Headers; using System.Security.Claims; using Blazored.LocalStorage; using Microsoft.AspNetCore.Components.Authorization; -using Wonky.Entity.DTO; using Wonky.Entity.Views; namespace Wonky.Client.Shared diff --git a/Wonky.Client/Shared/ConfirmProductCheckModalOverlay.razor.cs b/Wonky.Client/Shared/ConfirmProductCheckModalOverlay.razor.cs index bd270a99..5d59587a 100644 --- a/Wonky.Client/Shared/ConfirmProductCheckModalOverlay.razor.cs +++ b/Wonky.Client/Shared/ConfirmProductCheckModalOverlay.razor.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/Shared/ConfirmWorkDateModalOverlay.razor.cs b/Wonky.Client/Shared/ConfirmWorkDateModalOverlay.razor.cs index 1ef8619f..743bf81f 100644 --- a/Wonky.Client/Shared/ConfirmWorkDateModalOverlay.razor.cs +++ b/Wonky.Client/Shared/ConfirmWorkDateModalOverlay.razor.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/Shared/ConfirmationModal.razor.cs b/Wonky.Client/Shared/ConfirmationModal.razor.cs index a3d287b2..d49eb3f2 100644 --- a/Wonky.Client/Shared/ConfirmationModal.razor.cs +++ b/Wonky.Client/Shared/ConfirmationModal.razor.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/Shared/ContactModal.razor.cs b/Wonky.Client/Shared/ContactModal.razor.cs index e4bbc884..dbe6cc3e 100644 --- a/Wonky.Client/Shared/ContactModal.razor.cs +++ b/Wonky.Client/Shared/ContactModal.razor.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/Shared/CustomerActivityListModalOverlay.razor b/Wonky.Client/Shared/CustomerActivityListModalOverlay.razor index b6c2cbed..0afd582e 100644 --- a/Wonky.Client/Shared/CustomerActivityListModalOverlay.razor +++ b/Wonky.Client/Shared/CustomerActivityListModalOverlay.razor @@ -1,3 +1,19 @@ +@* +// 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 Wonky.Client.Components
@entry.DeliveryDate@entry.Quantity@entry.Discount@entry.Price - -
@entry.DeliveryDate@entry.Quantity@entry.Discount@entry.Price + +
diff --git a/Wonky.Client/Shared/ProductPriceHistoryModal.razor.cs b/Wonky.Client/Shared/ProductPriceHistoryModalOverlay.razor.cs similarity index 90% rename from Wonky.Client/Shared/ProductPriceHistoryModal.razor.cs rename to Wonky.Client/Shared/ProductPriceHistoryModalOverlay.razor.cs index 0e0ab3c9..c0565b70 100644 --- a/Wonky.Client/Shared/ProductPriceHistoryModal.razor.cs +++ b/Wonky.Client/Shared/ProductPriceHistoryModalOverlay.razor.cs @@ -1,3 +1,4 @@ + // 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 @@ -14,17 +15,12 @@ // using Microsoft.AspNetCore.Components; -using Wonky.Client.HttpInterceptors; using Wonky.Client.HttpInterfaces; -using Wonky.Client.HttpRepository; -using Wonky.Client.Models; -using Wonky.Client.Services; -using Wonky.Entity.Requests; using Wonky.Entity.Views; namespace Wonky.Client.Shared; -public partial class ProductPriceHistoryModal +public partial class ProductPriceHistoryModalOverlay { [Parameter] public EventCallback OnSelected { get; set; } [Parameter] public string CompanyId { get; set; } = ""; diff --git a/Wonky.Client/Shared/VatLookupDkModal.razor.cs b/Wonky.Client/Shared/VatLookupDkModal.razor.cs index 165c916b..453706d5 100644 --- a/Wonky.Client/Shared/VatLookupDkModal.razor.cs +++ b/Wonky.Client/Shared/VatLookupDkModal.razor.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Client/wwwroot/appsettings.json b/Wonky.Client/wwwroot/appsettings.json index 1e4e3506..52b58527 100644 --- a/Wonky.Client/wwwroot/appsettings.json +++ b/Wonky.Client/wwwroot/appsettings.json @@ -1,7 +1,7 @@ { "appInfo": { "name": "Wonky Online", - "version": "0.112.1", + "version": "0.113.1", "rc": true, "sandBox": false, "image": "grumpy-coder.png" diff --git a/Wonky.Entity/Configuration/ApiConfig.cs b/Wonky.Entity/Configuration/ApiConfig.cs index a6c20ae9..29e7caee 100644 --- a/Wonky.Entity/Configuration/ApiConfig.cs +++ b/Wonky.Entity/Configuration/ApiConfig.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Configuration/AppInfo.cs b/Wonky.Entity/Configuration/AppInfo.cs index 82f527fc..53b72d73 100644 --- a/Wonky.Entity/Configuration/AppInfo.cs +++ b/Wonky.Entity/Configuration/AppInfo.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/DTO/ActivityDto.cs b/Wonky.Entity/DTO/ActivityDto.cs index 1e962cae..c61e5c3c 100644 --- a/Wonky.Entity/DTO/ActivityDto.cs +++ b/Wonky.Entity/DTO/ActivityDto.cs @@ -1,4 +1,5 @@ -// Copyright (C) 2022 FCS Frede's Computer Services. + +// 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 diff --git a/Wonky.Entity/DTO/ActivityLineDto.cs b/Wonky.Entity/DTO/ActivityLineDto.cs index 1923190c..d04d6358 100644 --- a/Wonky.Entity/DTO/ActivityLineDto.cs +++ b/Wonky.Entity/DTO/ActivityLineDto.cs @@ -1,4 +1,5 @@ -// Copyright (C) 2022 FCS Frede's Computer Services. + +// 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 diff --git a/Wonky.Entity/DTO/ActivityOfficeNote.cs b/Wonky.Entity/DTO/ActivityOfficeNote.cs index a081622b..4b073424 100644 --- a/Wonky.Entity/DTO/ActivityOfficeNote.cs +++ b/Wonky.Entity/DTO/ActivityOfficeNote.cs @@ -1,3 +1,19 @@ + +// 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] +// + namespace Wonky.Entity.DTO; public class ActivityOfficeNote diff --git a/Wonky.Entity/DTO/CompanyDto.cs b/Wonky.Entity/DTO/CompanyDto.cs index 2ad40c78..4f4374a1 100644 --- a/Wonky.Entity/DTO/CompanyDto.cs +++ b/Wonky.Entity/DTO/CompanyDto.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,9 +14,7 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System; using System.ComponentModel.DataAnnotations; -using System.Text.Json.Serialization; namespace Wonky.Entity.DTO; diff --git a/Wonky.Entity/DTO/ContactDto.cs b/Wonky.Entity/DTO/ContactDto.cs index f150b8f2..721833fc 100644 --- a/Wonky.Entity/DTO/ContactDto.cs +++ b/Wonky.Entity/DTO/ContactDto.cs @@ -1,3 +1,19 @@ + +// 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 System.ComponentModel.DataAnnotations; namespace Wonky.Entity.DTO; diff --git a/Wonky.Entity/DTO/CredentialDto.cs b/Wonky.Entity/DTO/CredentialDto.cs index 39ea6b60..d9f008eb 100644 --- a/Wonky.Entity/DTO/CredentialDto.cs +++ b/Wonky.Entity/DTO/CredentialDto.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/DTO/EmailContact.cs b/Wonky.Entity/DTO/EmailContact.cs new file mode 100644 index 00000000..11f55033 --- /dev/null +++ b/Wonky.Entity/DTO/EmailContact.cs @@ -0,0 +1,23 @@ + +// 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] +// + +namespace Wonky.Entity.DTO; + +public class EmailContact +{ + public string Name { get; set; } = ""; + public string Email { get; set; } = ""; +} \ No newline at end of file diff --git a/Wonky.Entity/DTO/EmailMessage.cs b/Wonky.Entity/DTO/EmailMessage.cs index 30965ca8..78476a5b 100644 --- a/Wonky.Entity/DTO/EmailMessage.cs +++ b/Wonky.Entity/DTO/EmailMessage.cs @@ -1,3 +1,19 @@ + +// 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] +// + namespace Wonky.Entity.DTO; public class EmailMessage @@ -6,10 +22,4 @@ public class EmailMessage public string Subject { get; set; } = ""; public string Body { get; set; } = ""; public bool IsBodyHtml { get; set; } -} - -public class EmailContact -{ - public string Name { get; set; } = ""; - public string Email { get; set; } = ""; } \ No newline at end of file diff --git a/Wonky.Entity/DTO/KrvProductDto.cs b/Wonky.Entity/DTO/KrvProductDto.cs index 58e8a6d5..94109105 100644 --- a/Wonky.Entity/DTO/KrvProductDto.cs +++ b/Wonky.Entity/DTO/KrvProductDto.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/DTO/KrvVariantDto.cs b/Wonky.Entity/DTO/KrvVariantDto.cs index e0caa8c9..ba863492 100644 --- a/Wonky.Entity/DTO/KrvVariantDto.cs +++ b/Wonky.Entity/DTO/KrvVariantDto.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/DTO/OrderProcessState.cs b/Wonky.Entity/DTO/OrderProcessState.cs index 6b7cfb43..e952ff8a 100644 --- a/Wonky.Entity/DTO/OrderProcessState.cs +++ b/Wonky.Entity/DTO/OrderProcessState.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - namespace Wonky.Entity.DTO; public class OrderProcessState diff --git a/Wonky.Entity/DTO/ReportDto.cs b/Wonky.Entity/DTO/ReportDto.cs index 946267c0..cac7b3d9 100644 --- a/Wonky.Entity/DTO/ReportDto.cs +++ b/Wonky.Entity/DTO/ReportDto.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/DTO/ReportFiguresDto.cs b/Wonky.Entity/DTO/ReportFiguresDto.cs index 46abccef..0f028765 100644 --- a/Wonky.Entity/DTO/ReportFiguresDto.cs +++ b/Wonky.Entity/DTO/ReportFiguresDto.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/DTO/ReportInitDto.cs b/Wonky.Entity/DTO/ReportInitDto.cs index fdffac4f..c530fe91 100644 --- a/Wonky.Entity/DTO/ReportInitDto.cs +++ b/Wonky.Entity/DTO/ReportInitDto.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using Wonky.Entity.Models; using Wonky.Entity.Views; namespace Wonky.Entity.DTO; diff --git a/Wonky.Entity/DTO/ResetPasswordDto.cs b/Wonky.Entity/DTO/ResetPasswordDto.cs index f794af68..5091ab63 100644 --- a/Wonky.Entity/DTO/ResetPasswordDto.cs +++ b/Wonky.Entity/DTO/ResetPasswordDto.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/DTO/TaskItemDto.cs b/Wonky.Entity/DTO/TaskItemDto.cs index 4ad36c11..8f25870a 100644 --- a/Wonky.Entity/DTO/TaskItemDto.cs +++ b/Wonky.Entity/DTO/TaskItemDto.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/DTO/UpdateCrmDto.cs b/Wonky.Entity/DTO/UpdateCrmDto.cs index 6ebd7c00..7da39bb1 100644 --- a/Wonky.Entity/DTO/UpdateCrmDto.cs +++ b/Wonky.Entity/DTO/UpdateCrmDto.cs @@ -1,3 +1,19 @@ + +// 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 System.ComponentModel.DataAnnotations; namespace Wonky.Entity.DTO; diff --git a/Wonky.Entity/DTO/UpdateErpDto.cs b/Wonky.Entity/DTO/UpdateErpDto.cs index 7778f644..88f6d7a0 100644 --- a/Wonky.Entity/DTO/UpdateErpDto.cs +++ b/Wonky.Entity/DTO/UpdateErpDto.cs @@ -1,3 +1,19 @@ + +// 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 System.ComponentModel.DataAnnotations; namespace Wonky.Entity.DTO; diff --git a/Wonky.Entity/DTO/UserInfoDto.cs b/Wonky.Entity/DTO/UserInfoDto.cs index 5801c0ff..587a5aed 100644 --- a/Wonky.Entity/DTO/UserInfoDto.cs +++ b/Wonky.Entity/DTO/UserInfoDto.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System.Collections.Concurrent; using System.ComponentModel.DataAnnotations; namespace Wonky.Entity.DTO; diff --git a/Wonky.Entity/DTO/UserManagerEditView.cs b/Wonky.Entity/DTO/UserManagerEditView.cs new file mode 100644 index 00000000..58a62e78 --- /dev/null +++ b/Wonky.Entity/DTO/UserManagerEditView.cs @@ -0,0 +1,38 @@ + +// 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 System.ComponentModel.DataAnnotations; + +namespace Wonky.Entity.DTO; + +public class UserManagerEditView +{ + [MaxLength(128)] public string CompanyId { get; set; } = ""; + [MaxLength(128)] public string ContactId { get; set; } = ""; + [Required][MaxLength(3)] public string CountryCode { get; set; } = ""; + [MaxLength(128)] public string Description { get; set; } = ""; + [Required][MaxLength(255)] public string Email { get; set; } = ""; + public bool EmailConfirmed { get; set; } + public bool EShop { get; set; } + [Required][MaxLength(50)] public string FirstName { get; set; } = ""; + [Required][MaxLength(50)] public string LastName { get; set; } = ""; + public bool LockoutEnabled { get; set; } + public string Passwd { get; set; } = ""; + [Required][MaxLength(20)] public string PhoneNumber { get; set; } = ""; + [Required][MaxLength(20)] public string SalesRep { get; set; } = ""; + public string UserId { get; set; } = ""; + public List AssignedRoles { get; set; } = new(); +} \ No newline at end of file diff --git a/Wonky.Entity/Views/UserListAdminView.cs b/Wonky.Entity/DTO/UserManagerListView.cs similarity index 94% rename from Wonky.Entity/Views/UserListAdminView.cs rename to Wonky.Entity/DTO/UserManagerListView.cs index 0a07311f..537874df 100644 --- a/Wonky.Entity/Views/UserListAdminView.cs +++ b/Wonky.Entity/DTO/UserManagerListView.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,14 +14,14 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -namespace Wonky.Entity.Views; +namespace Wonky.Entity.DTO; -public class UserListAdminView +public class UserManagerListView { - public string UserId { get; set; } = ""; - public string SalesRep { get; set; } = ""; - public string FullName { get; set; } = ""; - public string Email { get; set; } = ""; public string CountryCode { get; set; } = ""; + public string Email { get; set; } = ""; + public string FullName { get; set; } = ""; public string PhoneNumber { get; set; } = ""; + public string SalesRep { get; set; } = ""; + public string UserId { get; set; } = ""; } \ No newline at end of file diff --git a/Wonky.Entity/DTO/UserRoleAssignment.cs b/Wonky.Entity/DTO/UserRoleAssignment.cs new file mode 100644 index 00000000..4582fc4a --- /dev/null +++ b/Wonky.Entity/DTO/UserRoleAssignment.cs @@ -0,0 +1,23 @@ + +// 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] +// + +namespace Wonky.Entity.DTO; + +public class UserRoleAssignment +{ + public string Name { get; set; } + public bool Assigned { get; set; } +} \ No newline at end of file diff --git a/Wonky.Entity/DTO/UserUpdateDto.cs b/Wonky.Entity/DTO/UserUpdateDto.cs index 9c1a00ef..35454626 100644 --- a/Wonky.Entity/DTO/UserUpdateDto.cs +++ b/Wonky.Entity/DTO/UserUpdateDto.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/DTO/WorkplaceDto.cs b/Wonky.Entity/DTO/WorkplaceDto.cs index 9d316400..84e34e14 100644 --- a/Wonky.Entity/DTO/WorkplaceDto.cs +++ b/Wonky.Entity/DTO/WorkplaceDto.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - using System.ComponentModel.DataAnnotations; namespace Wonky.Entity.DTO; diff --git a/Wonky.Entity/Models/TimeFrame.cs b/Wonky.Entity/Models/TimeFrame.cs index 719bf48f..b60490a9 100644 --- a/Wonky.Entity/Models/TimeFrame.cs +++ b/Wonky.Entity/Models/TimeFrame.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Models/VatLifeCycle.cs b/Wonky.Entity/Models/VatLifeCycle.cs index a3096bfc..8662e548 100644 --- a/Wonky.Entity/Models/VatLifeCycle.cs +++ b/Wonky.Entity/Models/VatLifeCycle.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Models/VatRegState.cs b/Wonky.Entity/Models/VatRegState.cs index fa07d368..4d2f23b2 100644 --- a/Wonky.Entity/Models/VatRegState.cs +++ b/Wonky.Entity/Models/VatRegState.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Models/VirkRegInfo.cs b/Wonky.Entity/Models/VirkRegInfo.cs index ea973ebb..a2485cc3 100644 --- a/Wonky.Entity/Models/VirkRegInfo.cs +++ b/Wonky.Entity/Models/VirkRegInfo.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Requests/CatalogPager.cs b/Wonky.Entity/Requests/CatalogPager.cs index b2653dd8..43b1b7d1 100644 --- a/Wonky.Entity/Requests/CatalogPager.cs +++ b/Wonky.Entity/Requests/CatalogPager.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Requests/CustomerPaging.cs b/Wonky.Entity/Requests/CustomerPaging.cs index 7ca546dc..cee431d2 100644 --- a/Wonky.Entity/Requests/CustomerPaging.cs +++ b/Wonky.Entity/Requests/CustomerPaging.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Requests/MetaData.cs b/Wonky.Entity/Requests/MetaData.cs index 6c89363c..7389d33f 100644 --- a/Wonky.Entity/Requests/MetaData.cs +++ b/Wonky.Entity/Requests/MetaData.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Requests/VirkParams.cs b/Wonky.Entity/Requests/VirkParams.cs index 25cbd56c..3b3a60c9 100644 --- a/Wonky.Entity/Requests/VirkParams.cs +++ b/Wonky.Entity/Requests/VirkParams.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/ApiResponseView.cs b/Wonky.Entity/Views/ApiResponseView.cs index 76591b26..c2c823a8 100644 --- a/Wonky.Entity/Views/ApiResponseView.cs +++ b/Wonky.Entity/Views/ApiResponseView.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,8 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System.Net; - namespace Wonky.Entity.Views; public class ApiResponseView diff --git a/Wonky.Entity/Views/AuthResponseView.cs b/Wonky.Entity/Views/AuthResponseView.cs index f42e164a..bdad0b0d 100644 --- a/Wonky.Entity/Views/AuthResponseView.cs +++ b/Wonky.Entity/Views/AuthResponseView.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/InvoiceCompanyView.cs b/Wonky.Entity/Views/InvoiceCompanyView.cs index ca76cd3a..83315490 100644 --- a/Wonky.Entity/Views/InvoiceCompanyView.cs +++ b/Wonky.Entity/Views/InvoiceCompanyView.cs @@ -1,3 +1,19 @@ + +// 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] +// + namespace Wonky.Entity.Views; public class InvoiceCompanyView diff --git a/Wonky.Entity/Views/InvoiceLineView.cs b/Wonky.Entity/Views/InvoiceLineView.cs index 53d19e27..8c323aa6 100644 --- a/Wonky.Entity/Views/InvoiceLineView.cs +++ b/Wonky.Entity/Views/InvoiceLineView.cs @@ -1,3 +1,19 @@ + +// 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] +// + namespace Wonky.Entity.Views; public class InvoiceLineView diff --git a/Wonky.Entity/Views/InvoiceListItemView.cs b/Wonky.Entity/Views/InvoiceListItemView.cs index df1e487f..07dae515 100644 --- a/Wonky.Entity/Views/InvoiceListItemView.cs +++ b/Wonky.Entity/Views/InvoiceListItemView.cs @@ -1,3 +1,19 @@ + +// 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] +// + namespace Wonky.Entity.Views; public class InvoiceListItemView diff --git a/Wonky.Entity/Views/InvoiceListView.cs b/Wonky.Entity/Views/InvoiceListView.cs index 8e9bea7a..7ec4d39c 100644 --- a/Wonky.Entity/Views/InvoiceListView.cs +++ b/Wonky.Entity/Views/InvoiceListView.cs @@ -1,3 +1,19 @@ + +// 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] +// + namespace Wonky.Entity.Views; public class InvoiceListView diff --git a/Wonky.Entity/Views/InvoiceView.cs b/Wonky.Entity/Views/InvoiceView.cs index d9230a29..f6453788 100644 --- a/Wonky.Entity/Views/InvoiceView.cs +++ b/Wonky.Entity/Views/InvoiceView.cs @@ -1,3 +1,19 @@ + +// 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] +// + namespace Wonky.Entity.Views; public class InvoiceView diff --git a/Wonky.Entity/Views/ProductHistoryView.cs b/Wonky.Entity/Views/ProductHistoryView.cs index a97ab9cf..b4345e15 100644 --- a/Wonky.Entity/Views/ProductHistoryView.cs +++ b/Wonky.Entity/Views/ProductHistoryView.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/ProductInventoryView.cs b/Wonky.Entity/Views/ProductInventoryView.cs index 3677f25d..b343372a 100644 --- a/Wonky.Entity/Views/ProductInventoryView.cs +++ b/Wonky.Entity/Views/ProductInventoryView.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/RefreshTokenView.cs b/Wonky.Entity/Views/RefreshTokenView.cs index a4d8a308..29a7e08e 100644 --- a/Wonky.Entity/Views/RefreshTokenView.cs +++ b/Wonky.Entity/Views/RefreshTokenView.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/ReportActivityInfoView.cs b/Wonky.Entity/Views/ReportActivityInfoView.cs index 0d6049e4..c5f96ed9 100644 --- a/Wonky.Entity/Views/ReportActivityInfoView.cs +++ b/Wonky.Entity/Views/ReportActivityInfoView.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/ReportClosedView.cs b/Wonky.Entity/Views/ReportClosedView.cs index f9383257..6891b016 100644 --- a/Wonky.Entity/Views/ReportClosedView.cs +++ b/Wonky.Entity/Views/ReportClosedView.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/ReportData.cs b/Wonky.Entity/Views/ReportData.cs index aff3bba7..938c5649 100644 --- a/Wonky.Entity/Views/ReportData.cs +++ b/Wonky.Entity/Views/ReportData.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/ReportItemCustomer.cs b/Wonky.Entity/Views/ReportItemCustomer.cs index 2c9cb242..f59956ae 100644 --- a/Wonky.Entity/Views/ReportItemCustomer.cs +++ b/Wonky.Entity/Views/ReportItemCustomer.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/ReportItemLine.cs b/Wonky.Entity/Views/ReportItemLine.cs index 2f84be61..64bd0e3b 100644 --- a/Wonky.Entity/Views/ReportItemLine.cs +++ b/Wonky.Entity/Views/ReportItemLine.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/ReportItemView.cs b/Wonky.Entity/Views/ReportItemView.cs index 6d7853a9..90bf496b 100644 --- a/Wonky.Entity/Views/ReportItemView.cs +++ b/Wonky.Entity/Views/ReportItemView.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/ReportStatusView.cs b/Wonky.Entity/Views/ReportStatusView.cs index bd8792f0..4ae86388 100644 --- a/Wonky.Entity/Views/ReportStatusView.cs +++ b/Wonky.Entity/Views/ReportStatusView.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/ReportView.cs b/Wonky.Entity/Views/ReportView.cs index 8589eaaa..4f46b189 100644 --- a/Wonky.Entity/Views/ReportView.cs +++ b/Wonky.Entity/Views/ReportView.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/SalesItemView.cs b/Wonky.Entity/Views/SalesItemView.cs index 0d2c1451..b20586cb 100644 --- a/Wonky.Entity/Views/SalesItemView.cs +++ b/Wonky.Entity/Views/SalesItemView.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,8 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // -using System.ComponentModel; - namespace Wonky.Entity.Views; public class SalesItemView diff --git a/Wonky.Entity/Views/SalesRateView.cs b/Wonky.Entity/Views/SalesRateView.cs index b959f0a3..30ba747b 100644 --- a/Wonky.Entity/Views/SalesRateView.cs +++ b/Wonky.Entity/Views/SalesRateView.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/SalesReportListView.cs b/Wonky.Entity/Views/SalesReportListView.cs index f7c360c9..183864f1 100644 --- a/Wonky.Entity/Views/SalesReportListView.cs +++ b/Wonky.Entity/Views/SalesReportListView.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/UploadResponseView.cs b/Wonky.Entity/Views/UploadResponseView.cs index 11252e0c..8db4ab26 100644 --- a/Wonky.Entity/Views/UploadResponseView.cs +++ b/Wonky.Entity/Views/UploadResponseView.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/UserInfoView.cs b/Wonky.Entity/Views/UserInfoView.cs index e519a7b6..f87cfee6 100644 --- a/Wonky.Entity/Views/UserInfoView.cs +++ b/Wonky.Entity/Views/UserInfoView.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/WarehouseOrderView.cs b/Wonky.Entity/Views/WarehouseOrderView.cs index 0ed14d11..29fd3487 100644 --- a/Wonky.Entity/Views/WarehouseOrderView.cs +++ b/Wonky.Entity/Views/WarehouseOrderView.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - namespace Wonky.Entity.Views; public class WarehouseOrderView diff --git a/Wonky.Entity/Views/WebUserInfoView.cs b/Wonky.Entity/Views/WebUserInfoView.cs index c079857a..a9743bb9 100644 --- a/Wonky.Entity/Views/WebUserInfoView.cs +++ b/Wonky.Entity/Views/WebUserInfoView.cs @@ -1,3 +1,4 @@ + // 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 diff --git a/Wonky.Entity/Views/WorkplaceListView.cs b/Wonky.Entity/Views/WorkplaceListView.cs index 87a81753..536586e6 100644 --- a/Wonky.Entity/Views/WorkplaceListView.cs +++ b/Wonky.Entity/Views/WorkplaceListView.cs @@ -1,3 +1,4 @@ + // 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 @@ -13,7 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // - namespace Wonky.Entity.Views; public class WorkplaceListView