diff --git a/Wonky.Client/Components/CountrySalesRepListComponent.razor b/Wonky.Client/Components/CountrySalesRepListComponent.razor
new file mode 100644
index 00000000..45fae0fa
--- /dev/null
+++ b/Wonky.Client/Components/CountrySalesRepListComponent.razor
@@ -0,0 +1,44 @@
+@*
+// 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]
+//
+*@
+
+
+ @if (UserList.Any())
+ {
+ foreach (var user in UserList)
+ {
+
\ No newline at end of file
diff --git a/Wonky.Client/Components/OfficeAdvisorTableComponent.razor.cs b/Wonky.Client/Components/CountrySalesRepListComponent.razor.cs
similarity index 95%
rename from Wonky.Client/Components/OfficeAdvisorTableComponent.razor.cs
rename to Wonky.Client/Components/CountrySalesRepListComponent.razor.cs
index 5d15be7d..c9048872 100644
--- a/Wonky.Client/Components/OfficeAdvisorTableComponent.razor.cs
+++ b/Wonky.Client/Components/CountrySalesRepListComponent.razor.cs
@@ -19,7 +19,7 @@ using Wonky.Entity.Views;
namespace Wonky.Client.Components;
-public partial class OfficeAdvisorTableComponent
+public partial class CountrySalesRepListComponent
{
[Parameter] public List UserList { get; set; } = new();
}
\ No newline at end of file
diff --git a/Wonky.Client/Components/LandingComponentAdmin.razor b/Wonky.Client/Components/LandingComponentAdmin.razor
index 62f24364..698e787f 100644
--- a/Wonky.Client/Components/LandingComponentAdmin.razor
+++ b/Wonky.Client/Components/LandingComponentAdmin.razor
@@ -20,41 +20,10 @@
Innotec Admin
-@*
-
-
-
-
-
-
- Danmark
-
-
-
-
-
-
-
-
-
-
-
-
- Norge
-
-
-
-
-
-
-
-
-
-
-
-
- Sverige
-
-
-
-
*@
\ No newline at end of file
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Wonky.Client/Components/OfficeAdvisorTableComponent.razor b/Wonky.Client/Components/OfficeAdvisorTableComponent.razor
deleted file mode 100644
index b645e485..00000000
--- a/Wonky.Client/Components/OfficeAdvisorTableComponent.razor
+++ /dev/null
@@ -1,58 +0,0 @@
-@*
-// Copyright (C) 2022 FCS Frede's Computer Services.
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as
-// published by the Free Software Foundation, either version 3 of the
-// License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
-//
-*@
-
-@if (UserList.Any())
-{
-
-}
\ No newline at end of file
diff --git a/Wonky.Client/Components/WarehouseListComponent.razor b/Wonky.Client/Components/WarehouseListComponent.razor
index 283e34ee..ecfebb74 100644
--- a/Wonky.Client/Components/WarehouseListComponent.razor
+++ b/Wonky.Client/Components/WarehouseListComponent.razor
@@ -16,29 +16,26 @@
*@
-
+
-
+
-
+
-
-
-
-
+
-
+
-
+
@if (ReadyToShip && OrderList.Any())
{
diff --git a/Wonky.Client/Models/VatAddress.cs b/Wonky.Client/Models/VatAddress.cs
index 5f8bf783..f5bf5049 100644
--- a/Wonky.Client/Models/VatAddress.cs
+++ b/Wonky.Client/Models/VatAddress.cs
@@ -25,11 +25,13 @@ public class VatAddress
///
[Required(ErrorMessage = "Vejnavn skal angives")]
public string StreetName { get; set; } = "";
+
///
/// House Number
///
[Required(ErrorMessage = "Husnummer skal angives")]
public string HouseNumber { get; set; } = "";
+
///
/// Postal Code
///
diff --git a/Wonky.Client/Pages/CatalogCrmPage.razor b/Wonky.Client/Pages/CatalogPage.razor
similarity index 100%
rename from Wonky.Client/Pages/CatalogCrmPage.razor
rename to Wonky.Client/Pages/CatalogPage.razor
diff --git a/Wonky.Client/Pages/CatalogCrmPage.razor.cs b/Wonky.Client/Pages/CatalogPage.razor.cs
similarity index 98%
rename from Wonky.Client/Pages/CatalogCrmPage.razor.cs
rename to Wonky.Client/Pages/CatalogPage.razor.cs
index d681e3b2..6694e238 100644
--- a/Wonky.Client/Pages/CatalogCrmPage.razor.cs
+++ b/Wonky.Client/Pages/CatalogPage.razor.cs
@@ -29,7 +29,7 @@ using Wonky.Entity.Views;
namespace Wonky.Client.Pages;
-public partial class CatalogCrmPage : IDisposable
+public partial class CatalogPage : IDisposable
{
[Inject] public ILocalStorageService Storage { get; set; }
[Inject] public ICatalogCrmHttpRepository ItemRepo { get; set; }
diff --git a/Wonky.Client/Pages/CatalogCountryPage.razor b/Wonky.Client/Pages/CountryCatalogPage.razor
similarity index 100%
rename from Wonky.Client/Pages/CatalogCountryPage.razor
rename to Wonky.Client/Pages/CountryCatalogPage.razor
diff --git a/Wonky.Client/Pages/CatalogCountryPage.razor.cs b/Wonky.Client/Pages/CountryCatalogPage.razor.cs
similarity index 98%
rename from Wonky.Client/Pages/CatalogCountryPage.razor.cs
rename to Wonky.Client/Pages/CountryCatalogPage.razor.cs
index 3d84f092..91c96104 100644
--- a/Wonky.Client/Pages/CatalogCountryPage.razor.cs
+++ b/Wonky.Client/Pages/CountryCatalogPage.razor.cs
@@ -29,7 +29,7 @@ using Wonky.Entity.Views;
namespace Wonky.Client.Pages;
-public partial class CatalogCountryPage : IDisposable
+public partial class CountryCatalogPage : IDisposable
{
[Parameter] public string CountryCode { get; set; } = "";
[Inject] public ILocalStorageService Storage { get; set; }
diff --git a/Wonky.Client/Pages/CustomerListCountryPage.razor b/Wonky.Client/Pages/CountryCustomerListPage.razor
similarity index 100%
rename from Wonky.Client/Pages/CustomerListCountryPage.razor
rename to Wonky.Client/Pages/CountryCustomerListPage.razor
diff --git a/Wonky.Client/Pages/CustomerListCountryPage.razor.cs b/Wonky.Client/Pages/CountryCustomerListPage.razor.cs
similarity index 98%
rename from Wonky.Client/Pages/CustomerListCountryPage.razor.cs
rename to Wonky.Client/Pages/CountryCustomerListPage.razor.cs
index 0ce0fddb..39c269e5 100644
--- a/Wonky.Client/Pages/CustomerListCountryPage.razor.cs
+++ b/Wonky.Client/Pages/CountryCustomerListPage.razor.cs
@@ -28,7 +28,7 @@ using Wonky.Entity.Views;
namespace Wonky.Client.Pages
{
- public partial class CustomerListCountryPage : IDisposable
+ public partial class CountryCustomerListPage : IDisposable
{
[Parameter] public string CountryCode { get; set; } = "";
[Inject] public ILocalStorageService Storage { get; set; }
diff --git a/Wonky.Client/Pages/CountryLandingPage.razor b/Wonky.Client/Pages/CountryLandingPage.razor
new file mode 100644
index 00000000..235d2108
--- /dev/null
+++ b/Wonky.Client/Pages/CountryLandingPage.razor
@@ -0,0 +1,64 @@
+@*
+// Copyright (C) 2022 FCS Frede's Computer Services.
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as
+// published by the Free Software Foundation, either version 3 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
+//
+*@
+
+@using Microsoft.AspNetCore.Authorization
+@attribute [Authorize(Roles = "Admin,Office,Warehouse")]
+@page "/office/{CountryCode}"
+
+
\ No newline at end of file
diff --git a/Wonky.Client/Pages/CountryLandingPage.razor.cs b/Wonky.Client/Pages/CountryLandingPage.razor.cs
new file mode 100644
index 00000000..34d4e000
--- /dev/null
+++ b/Wonky.Client/Pages/CountryLandingPage.razor.cs
@@ -0,0 +1,11 @@
+using Blazored.LocalStorage;
+using Microsoft.AspNetCore.Components;
+using Wonky.Entity.Views;
+
+namespace Wonky.Client.Pages;
+
+public partial class CountryLandingPage
+{
+ [Parameter] public string CountryCode { get; set; } = "";
+ [Inject] private ILocalStorageService Storage { get; set; }
+}
\ No newline at end of file
diff --git a/Wonky.Client/Pages/UserListSalesRepPage.razor b/Wonky.Client/Pages/CountrySalesRepCustomerListPage.razor
similarity index 97%
rename from Wonky.Client/Pages/UserListSalesRepPage.razor
rename to Wonky.Client/Pages/CountrySalesRepCustomerListPage.razor
index ef18369c..62076ef7 100644
--- a/Wonky.Client/Pages/UserListSalesRepPage.razor
+++ b/Wonky.Client/Pages/CountrySalesRepCustomerListPage.razor
@@ -18,7 +18,7 @@
@using Wonky.Client.Components
@using Microsoft.AspNetCore.Authorization
@attribute [Authorize(Roles = "Admin,Office,Warehouse")]
-@page "/office/users/advisors/{CountryCode}/{UserId}/companies"
+@page "/office/users/advisors/{CountryCode}/{UserId}/customers"
diff --git a/Wonky.Client/Pages/UserListSalesRepPage.razor.cs b/Wonky.Client/Pages/CountrySalesRepCustomerListPage.razor.cs
similarity index 96%
rename from Wonky.Client/Pages/UserListSalesRepPage.razor.cs
rename to Wonky.Client/Pages/CountrySalesRepCustomerListPage.razor.cs
index a7118198..4d095a49 100644
--- a/Wonky.Client/Pages/UserListSalesRepPage.razor.cs
+++ b/Wonky.Client/Pages/CountrySalesRepCustomerListPage.razor.cs
@@ -22,12 +22,12 @@ using Wonky.Entity.Requests;
namespace Wonky.Client.Pages;
-public partial class UserListSalesRepPage : IDisposable
+public partial class CountrySalesRepCustomerListPage : IDisposable
{
[Parameter] public string UserId { get; set; } = "";
[Parameter] public string CountryCode { get; set; } = "dk";
- [Inject] public ILogger Logger { get; set; }
+ [Inject] public ILogger Logger { get; set; }
[Inject] public HttpInterceptorService Interceptor { get; set; }
[Inject] public ICustomerOfficeHttpRepository CustomerRepo { get; set; }
[Inject] public UserProfileService UserProfileService { get; set; }
diff --git a/Wonky.Client/Pages/UserListOfficePage.razor b/Wonky.Client/Pages/CountrySalesRepListPage.razor
similarity index 94%
rename from Wonky.Client/Pages/UserListOfficePage.razor
rename to Wonky.Client/Pages/CountrySalesRepListPage.razor
index 2c97f745..da79c783 100644
--- a/Wonky.Client/Pages/UserListOfficePage.razor
+++ b/Wonky.Client/Pages/CountrySalesRepListPage.razor
@@ -25,7 +25,7 @@
Sælgere
-
+
diff --git a/Wonky.Client/Pages/CountrySalesRepListPage.razor.cs b/Wonky.Client/Pages/CountrySalesRepListPage.razor.cs
new file mode 100644
index 00000000..adb1d571
--- /dev/null
+++ b/Wonky.Client/Pages/CountrySalesRepListPage.razor.cs
@@ -0,0 +1,31 @@
+using Microsoft.AspNetCore.Components;
+using Wonky.Client.HttpInterceptors;
+using Wonky.Client.HttpInterfaces;
+using Wonky.Entity.Views;
+
+namespace Wonky.Client.Pages;
+
+public partial class CountrySalesRepListPage
+{
+ [Inject] public HttpInterceptorService Interceptor { get; set; }
+ [Inject] public IUserHttpRepository UserRepo { get; set; }
+ [Parameter] public string CountryCode { get; set; } = "";
+ private List SalesReps { get; set; } = new();
+ private bool Working { get; set; } = true;
+
+ protected override async Task OnInitializedAsync()
+ {
+ Interceptor.RegisterEvent();
+ Interceptor.RegisterBeforeSendEvent();
+ var AdvisorList = await UserRepo.GetAdvisors();
+ SalesReps = AdvisorList
+ .Where(x => x.CountryCode.ToLower() == CountryCode && Convert.ToInt32(x.SalesRep) < 100)
+ .ToList();
+ Working = false;
+ }
+
+ public void Dispose()
+ {
+ Interceptor.DisposeEvent();
+ }
+}
\ No newline at end of file
diff --git a/Wonky.Client/Pages/WorkplaceDocumentListPage.razor b/Wonky.Client/Pages/CustomerWorkplaceDocumentListPage.razor
similarity index 100%
rename from Wonky.Client/Pages/WorkplaceDocumentListPage.razor
rename to Wonky.Client/Pages/CustomerWorkplaceDocumentListPage.razor
diff --git a/Wonky.Client/Pages/WorkplaceDocumentListPage.razor.cs b/Wonky.Client/Pages/CustomerWorkplaceDocumentListPage.razor.cs
similarity index 95%
rename from Wonky.Client/Pages/WorkplaceDocumentListPage.razor.cs
rename to Wonky.Client/Pages/CustomerWorkplaceDocumentListPage.razor.cs
index e9eb19a4..b1a93b14 100644
--- a/Wonky.Client/Pages/WorkplaceDocumentListPage.razor.cs
+++ b/Wonky.Client/Pages/CustomerWorkplaceDocumentListPage.razor.cs
@@ -21,7 +21,7 @@ using Wonky.Client.HttpRepository;
namespace Wonky.Client.Pages;
-public partial class WorkplaceDocumentListPage
+public partial class CustomerWorkplaceDocumentListPage
{
[Parameter] public string CompanyId { get; set; } = "";
[Parameter] public string WorkplaceId { get; set; } = "";
diff --git a/Wonky.Client/Pages/WorkplaceListPage.razor b/Wonky.Client/Pages/CustomerWorkplaceListPage.razor
similarity index 100%
rename from Wonky.Client/Pages/WorkplaceListPage.razor
rename to Wonky.Client/Pages/CustomerWorkplaceListPage.razor
diff --git a/Wonky.Client/Pages/WorkplaceListPage.razor.cs b/Wonky.Client/Pages/CustomerWorkplaceListPage.razor.cs
similarity index 97%
rename from Wonky.Client/Pages/WorkplaceListPage.razor.cs
rename to Wonky.Client/Pages/CustomerWorkplaceListPage.razor.cs
index d1367d51..b66ac3b9 100644
--- a/Wonky.Client/Pages/WorkplaceListPage.razor.cs
+++ b/Wonky.Client/Pages/CustomerWorkplaceListPage.razor.cs
@@ -24,7 +24,7 @@ using Wonky.Entity.Views;
namespace Wonky.Client.Pages;
-public partial class WorkplaceListPage : IDisposable
+public partial class CustomerWorkplaceListPage : IDisposable
{
[Parameter] public string CompanyId { get; set; } = "";
[Inject] public IWorkplaceCrmHttpRepository WorkplaceCrmRepo { get; set; }
diff --git a/Wonky.Client/Pages/WorkplaceViewPage.razor b/Wonky.Client/Pages/CustomerWorkplaceViewPage.razor
similarity index 100%
rename from Wonky.Client/Pages/WorkplaceViewPage.razor
rename to Wonky.Client/Pages/CustomerWorkplaceViewPage.razor
diff --git a/Wonky.Client/Pages/WorkplaceViewPage.razor.cs b/Wonky.Client/Pages/CustomerWorkplaceViewPage.razor.cs
similarity index 97%
rename from Wonky.Client/Pages/WorkplaceViewPage.razor.cs
rename to Wonky.Client/Pages/CustomerWorkplaceViewPage.razor.cs
index c20547c0..c6724959 100644
--- a/Wonky.Client/Pages/WorkplaceViewPage.razor.cs
+++ b/Wonky.Client/Pages/CustomerWorkplaceViewPage.razor.cs
@@ -25,7 +25,7 @@ using Wonky.Entity.Views;
namespace Wonky.Client.Pages;
-public partial class WorkplaceViewPage : IDisposable
+public partial class CustomerWorkplaceViewPage : IDisposable
{
[Parameter] public string CompanyId { get; set; } = "";
[Parameter] public string WorkplaceId { get; set; } = "";
diff --git a/Wonky.Client/Pages/Index.razor b/Wonky.Client/Pages/Index.razor
index 743e4de5..2f522616 100644
--- a/Wonky.Client/Pages/Index.razor
+++ b/Wonky.Client/Pages/Index.razor
@@ -15,26 +15,24 @@
//
*@
+@using Wonky.Client.Components;
+@using Microsoft.AspNetCore.Authorization
+@attribute [Authorize(Roles = "Advisor,Admin,Office,Supervisor,Warehouse")]
@page "/"
@page "/index"
@page "/home"
-@using Wonky.Client.Components;
-@using Microsoft.AspNetCore.Authorization
-
-
-@attribute [Authorize(Roles = "Advisor,Admin,Supervisor,Office,Warehouse")]
-
-
-
-
-
+
+
+
+
+
@code{
}
diff --git a/Wonky.Client/Pages/LandingPageAdminAdvisers.razor b/Wonky.Client/Pages/LandingPageAdminAdvisers.razor
deleted file mode 100644
index 3c76a205..00000000
--- a/Wonky.Client/Pages/LandingPageAdminAdvisers.razor
+++ /dev/null
@@ -1,39 +0,0 @@
-@*
-// Copyright (C) 2022 FCS Frede's Computer Services.
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as
-// published by the Free Software Foundation, either version 3 of the
-// License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
-//
-*@
-
-@using Microsoft.AspNetCore.Authorization
-@attribute [Authorize(Roles = "Admin")]
-@page "/office/users/advisors"
-
-
-
-@code {
-
-}
\ No newline at end of file
diff --git a/Wonky.Client/Pages/LandingPageAdminCountry.razor b/Wonky.Client/Pages/LandingPageAdminCountry.razor
deleted file mode 100644
index 81b37bf6..00000000
--- a/Wonky.Client/Pages/LandingPageAdminCountry.razor
+++ /dev/null
@@ -1,30 +0,0 @@
-@*
-// Copyright (C) 2022 FCS Frede's Computer Services.
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as
-// published by the Free Software Foundation, either version 3 of the
-// License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
-//
-*@
-
-@using Microsoft.AspNetCore.Authorization
-@attribute [Authorize(Roles = "Admin")]
-@page "/office/{CountryCode}"
-
-
-
-
-@code {
-
- [Parameter]
- public string CountryCode { get; set; } = "";
-
-}
\ No newline at end of file
diff --git a/Wonky.Client/Pages/LandingPageAdminUsers.razor b/Wonky.Client/Pages/LandingPageAdminUsers.razor
deleted file mode 100644
index e8863c3e..00000000
--- a/Wonky.Client/Pages/LandingPageAdminUsers.razor
+++ /dev/null
@@ -1,30 +0,0 @@
-@*
-// Copyright (C) 2022 FCS Frede's Computer Services.
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as
-// published by the Free Software Foundation, either version 3 of the
-// License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
-//
-*@
-
-@using Microsoft.AspNetCore.Authorization
-@attribute [Authorize(Roles = "Admin")]
-@page "/office/{countryCode}/salesreps"
-
-
-
-
-
-
-
-@code {
-
-}
\ No newline at end of file
diff --git a/Wonky.Client/Pages/OrderViewOfficePage.razor b/Wonky.Client/Pages/OfficeOrderViewPage.razor
similarity index 98%
rename from Wonky.Client/Pages/OrderViewOfficePage.razor
rename to Wonky.Client/Pages/OfficeOrderViewPage.razor
index ee590b0b..c19d9f44 100644
--- a/Wonky.Client/Pages/OrderViewOfficePage.razor
+++ b/Wonky.Client/Pages/OfficeOrderViewPage.razor
@@ -17,7 +17,7 @@
@using Microsoft.AspNetCore.Authorization
@using Wonky.Client.Components
-@attribute [Authorize(Roles = "Admin,Office,Warehouse,Advisor")]
+@attribute [Authorize(Roles = "Admin,Advisor,Office,Warehouse")]
@page "/office/customers/{CompanyId}/orders/{OrderId}"
diff --git a/Wonky.Client/Pages/OrderViewOfficePage.razor.cs b/Wonky.Client/Pages/OfficeOrderViewPage.razor.cs
similarity index 97%
rename from Wonky.Client/Pages/OrderViewOfficePage.razor.cs
rename to Wonky.Client/Pages/OfficeOrderViewPage.razor.cs
index ed7d10f8..8dd6173a 100644
--- a/Wonky.Client/Pages/OrderViewOfficePage.razor.cs
+++ b/Wonky.Client/Pages/OfficeOrderViewPage.razor.cs
@@ -30,7 +30,7 @@ using Wonky.Client.Services;
namespace Wonky.Client.Pages;
-public partial class OrderViewOfficePage : IDisposable
+public partial class OfficeOrderViewPage : IDisposable
{
[Parameter] public string CompanyId { get; set; } = "";
[Parameter] public string OrderId { get; set; } = "";
@@ -39,7 +39,7 @@ public partial class OrderViewOfficePage : IDisposable
[Inject] public ISendMailService MailService { get; set; }
[Inject] public ILocalStorageService Storage { get; set; }
[Inject] public IUserHttpRepository UserRepo { get; set; }
- [Inject] public ILogger Logger { get; set; }
+ [Inject] public ILogger Logger { get; set; }
[Inject] public IToastService Toast { get; set; }
private ReportItemView _reportItem { get; set; } = new();
private bool _isNotified { get; set; }
diff --git a/Wonky.Client/Pages/OrderViewOfficePage.razor.css b/Wonky.Client/Pages/OfficeOrderViewPage.razor.css
similarity index 100%
rename from Wonky.Client/Pages/OrderViewOfficePage.razor.css
rename to Wonky.Client/Pages/OfficeOrderViewPage.razor.css
diff --git a/Wonky.Client/Pages/UserViewOfficePage.razor b/Wonky.Client/Pages/OfficeSalesRepViewPage.razor
similarity index 100%
rename from Wonky.Client/Pages/UserViewOfficePage.razor
rename to Wonky.Client/Pages/OfficeSalesRepViewPage.razor
index 39432332..012451f3 100644
--- a/Wonky.Client/Pages/UserViewOfficePage.razor
+++ b/Wonky.Client/Pages/OfficeSalesRepViewPage.razor
@@ -15,10 +15,10 @@
//
*@
-@page "/office/users/advisors/{CountryCode}/{UserId}/view"
@using Microsoft.AspNetCore.Authorization
@using Wonky.Client.Components
@attribute [Authorize(Roles = "Admin")]
+@page "/office/users/advisors/{CountryCode}/{UserId}/view"
diff --git a/Wonky.Client/Pages/QuoteListCrmPage.razor b/Wonky.Client/Pages/QuoteListCrmPage.razor
index f13e717d..3a053261 100644
--- a/Wonky.Client/Pages/QuoteListCrmPage.razor
+++ b/Wonky.Client/Pages/QuoteListCrmPage.razor
@@ -1,6 +1,24 @@
-@page "/open-quotes"
+@*
+// 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
@using Wonky.Client.Models
+@using Microsoft.AspNetCore.Authorization
+@attribute [Authorize(Roles = "Advisor")]
+@page "/open-quotes"
diff --git a/Wonky.Client/Pages/UserListOfficePage.razor.cs b/Wonky.Client/Pages/UserListOfficePage.razor.cs
deleted file mode 100644
index bb3a0880..00000000
--- a/Wonky.Client/Pages/UserListOfficePage.razor.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (C) 2022 FCS Frede's Computer Services.
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as
-// published by the Free Software Foundation, either version 3 of the
-// License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
-//
-
-using Microsoft.AspNetCore.Components;
-using Wonky.Client.HttpInterceptors;
-using Wonky.Client.HttpInterfaces;
-using Wonky.Client.HttpRepository;
-using Wonky.Entity.DTO;
-using Wonky.Entity.Views;
-
-namespace Wonky.Client.Pages;
-
-public partial class UserListOfficePage : IDisposable
-{
- [Parameter] public string CountryCode { get; set; } = "";
- [Inject] public HttpInterceptorService _interceptor { get; set; }
- [Inject] public IUserHttpRepository UserRepo { get; set; }
- private List _salesReps { get; set; } = new();
- private bool Working { get; set; } = true;
-
-
- protected override async Task OnInitializedAsync()
- {
- _interceptor.RegisterEvent();
- _interceptor.RegisterBeforeSendEvent();
- var AdvisorList = await UserRepo.GetAdvisors();
- _salesReps = AdvisorList
- .Where(x => x.CountryCode.ToLower() == CountryCode && Convert.ToInt32(x.SalesRep) < 100)
- .ToList();
- Working = false;
- }
-
- public void Dispose()
- {
- _interceptor.DisposeEvent();
- }
-}
\ No newline at end of file
diff --git a/Wonky.Client/Pages/OrderListWarehousePage.razor b/Wonky.Client/Pages/WarehouseOrderListPage.razor
similarity index 93%
rename from Wonky.Client/Pages/OrderListWarehousePage.razor
rename to Wonky.Client/Pages/WarehouseOrderListPage.razor
index 6a8b8961..67c52ae1 100644
--- a/Wonky.Client/Pages/OrderListWarehousePage.razor
+++ b/Wonky.Client/Pages/WarehouseOrderListPage.razor
@@ -21,9 +21,3 @@
@page "/warehouse/orders/{Status}"
-
-@code{
-
- [Parameter] public string Status { get; set; } = "none";
-
-}
diff --git a/Wonky.Client/Pages/WarehouseOrderListPage.razor.cs b/Wonky.Client/Pages/WarehouseOrderListPage.razor.cs
new file mode 100644
index 00000000..932c265c
--- /dev/null
+++ b/Wonky.Client/Pages/WarehouseOrderListPage.razor.cs
@@ -0,0 +1,8 @@
+using Microsoft.AspNetCore.Components;
+
+namespace Wonky.Client.Pages;
+
+public partial class WarehouseOrderListPage
+{
+ [Parameter] public string Status { get; set; } = "none";
+}
\ No newline at end of file
diff --git a/Wonky.Client/Pages/OrderViewWarehousePage.razor b/Wonky.Client/Pages/WarehouseOrderViewPage.razor
similarity index 100%
rename from Wonky.Client/Pages/OrderViewWarehousePage.razor
rename to Wonky.Client/Pages/WarehouseOrderViewPage.razor
diff --git a/Wonky.Client/Pages/OrderViewWarehousePage.razor.cs b/Wonky.Client/Pages/WarehouseOrderViewPage.razor.cs
similarity index 96%
rename from Wonky.Client/Pages/OrderViewWarehousePage.razor.cs
rename to Wonky.Client/Pages/WarehouseOrderViewPage.razor.cs
index d30fa144..c91753e9 100644
--- a/Wonky.Client/Pages/OrderViewWarehousePage.razor.cs
+++ b/Wonky.Client/Pages/WarehouseOrderViewPage.razor.cs
@@ -25,14 +25,14 @@ using Wonky.Entity.Views;
namespace Wonky.Client.Pages;
-public partial class OrderViewWarehousePage : IDisposable
+public partial class WarehouseOrderViewPage : IDisposable
{
[Parameter] public string OrderId { get; set; } = "";
[Inject] public HttpInterceptorService _interceptor { get; set; }
[Inject] public IWarehouseHttpRepository _warehouseRepo { get; set; }
[Inject] public NavigationManager _navigator { get; set; }
[Inject] public IToastService _toast { get; set; }
- [Inject] public ILogger _logger { get; set; }
+ [Inject] public ILogger _logger { get; set; }
private WarehouseOrderView _order { get; set; } = new();
private bool Working { get; set; }
diff --git a/Wonky.Client/Program.cs b/Wonky.Client/Program.cs
index 7ab56879..c0f9c1b5 100644
--- a/Wonky.Client/Program.cs
+++ b/Wonky.Client/Program.cs
@@ -36,9 +36,9 @@ builder.RootComponents.Add("head::after");
builder.Logging.AddConfiguration(builder.Configuration.GetSection("Logging"));
builder.Services.AddScoped(sp =>
- sp.GetService().CreateClient("backend"));
+ sp.GetService().CreateClient("inno-api"));
-builder.Services.AddHttpClient("backend", (sp, cl) =>
+builder.Services.AddHttpClient("inno-api", (sp, cl) =>
{
var apiConfig = sp.GetRequiredService>();
cl.BaseAddress = new Uri(apiConfig.Value.BaseUrl);
@@ -58,12 +58,11 @@ builder.Services.AddScoped();
builder.Services.AddScoped();
builder.Services.AddScoped();
-builder.Services.AddScoped();
builder.Services.AddScoped();
builder.Services.AddScoped();
// administrative repositories
+builder.Services.AddScoped();
builder.Services.AddScoped();
-builder.Services.AddScoped();
builder.Services.AddScoped();
// warehouse repository
builder.Services.AddScoped();
diff --git a/Wonky.Client/Shared/NavMenu.razor b/Wonky.Client/Shared/NavMenu.razor
index 5df0f9d9..eebb17e4 100644
--- a/Wonky.Client/Shared/NavMenu.razor
+++ b/Wonky.Client/Shared/NavMenu.razor
@@ -52,12 +52,12 @@