diff --git a/Wonky.Client/Components/ReportActivityListComponent.razor b/Wonky.Client/Components/ReportActivityListComponent.razor
new file mode 100644
index 00000000..35abbaed
--- /dev/null
+++ b/Wonky.Client/Components/ReportActivityListComponent.razor
@@ -0,0 +1,74 @@
+@* 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.Helpers
+
+@if (ActivityList.Any())
+{
+
+}
\ No newline at end of file
diff --git a/Wonky.Client/Components/ReportActivityListComponent.razor.cs b/Wonky.Client/Components/ReportActivityListComponent.razor.cs
new file mode 100644
index 00000000..2aadc4a2
--- /dev/null
+++ b/Wonky.Client/Components/ReportActivityListComponent.razor.cs
@@ -0,0 +1,31 @@
+// 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;
+#pragma warning disable CS8618
+
+namespace Wonky.Client.Components;
+
+public partial class OfficeReportActivityListComponent
+{
+ [Parameter] public List ActivityList { get; set; } = new();
+ [Inject] public NavigationManager Navigator { get; set; }
+
+ private void ShowOrder(string companyId, string orderId)
+ {
+ Navigator.NavigateTo($"/office/customers/{companyId}/orders/{orderId}");
+ }
+}
\ No newline at end of file
diff --git a/Wonky.Client/Pages/OfficeUserAdvisorListPage.razor b/Wonky.Client/Pages/OfficeAdvisorListPage.razor
similarity index 100%
rename from Wonky.Client/Pages/OfficeUserAdvisorListPage.razor
rename to Wonky.Client/Pages/OfficeAdvisorListPage.razor
diff --git a/Wonky.Client/Pages/OfficeUserAdvisorListPage.razor.cs b/Wonky.Client/Pages/OfficeAdvisorListPage.razor.cs
similarity index 97%
rename from Wonky.Client/Pages/OfficeUserAdvisorListPage.razor.cs
rename to Wonky.Client/Pages/OfficeAdvisorListPage.razor.cs
index 01874e90..1cecfd56 100644
--- a/Wonky.Client/Pages/OfficeUserAdvisorListPage.razor.cs
+++ b/Wonky.Client/Pages/OfficeAdvisorListPage.razor.cs
@@ -24,7 +24,7 @@ using Wonky.Entity.Views;
namespace Wonky.Client.Pages;
-public partial class OfficeUserAdvisorListPage :IDisposable
+public partial class OfficeAdvisorListPage :IDisposable
{
// #############################################################
[Inject] public HttpInterceptorService Interceptor { get; set; }
diff --git a/Wonky.Client/Pages/OfficeUserAdvisorReportListPage.razor b/Wonky.Client/Pages/OfficeAdvisorReportListPage.razor
similarity index 100%
rename from Wonky.Client/Pages/OfficeUserAdvisorReportListPage.razor
rename to Wonky.Client/Pages/OfficeAdvisorReportListPage.razor
diff --git a/Wonky.Client/Pages/OfficeUserAdvisorReportListPage.razor.cs b/Wonky.Client/Pages/OfficeAdvisorReportListPage.razor.cs
similarity index 97%
rename from Wonky.Client/Pages/OfficeUserAdvisorReportListPage.razor.cs
rename to Wonky.Client/Pages/OfficeAdvisorReportListPage.razor.cs
index a0c6d8f5..627fae57 100644
--- a/Wonky.Client/Pages/OfficeUserAdvisorReportListPage.razor.cs
+++ b/Wonky.Client/Pages/OfficeAdvisorReportListPage.razor.cs
@@ -23,7 +23,7 @@ using Wonky.Entity.Views;
namespace Wonky.Client.Pages;
-public partial class OfficeUserAdvisorReportListPage : IDisposable
+public partial class OfficeAdvisorReportListPage : IDisposable
{
// #############################################################
[Inject] public ICountryReportRepository ReportRepo { get; set; }
diff --git a/Wonky.Client/Pages/SupervisorAdvisorReportViewPage.razor b/Wonky.Client/Pages/SupervisorAdvisorReportViewPage.razor
new file mode 100644
index 00000000..2c800c51
--- /dev/null
+++ b/Wonky.Client/Pages/SupervisorAdvisorReportViewPage.razor
@@ -0,0 +1,71 @@
+@* 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 Microsoft.AspNetCore.Authorization
+@using Wonky.Client.Models
+@attribute [Authorize(Roles = "Admin,Office,Supervisor")]
+@page "/office/users/advisors/{CountryCode}/{UserId}/reports/{ReportDate}"
+
+
+
+@if (Activities.Any())
+{
+ foreach (var item in Activities.Where(item => item.StatusTypeEnum.ToLower() == "order" && item.ProcessStatusEnum.ToLower() == "none"))
+ {
+
+ }
+}
diff --git a/Wonky.Client/Pages/SupervisorAdvisorReportViewPage.razor.cs b/Wonky.Client/Pages/SupervisorAdvisorReportViewPage.razor.cs
new file mode 100644
index 00000000..9cdb7904
--- /dev/null
+++ b/Wonky.Client/Pages/SupervisorAdvisorReportViewPage.razor.cs
@@ -0,0 +1,181 @@
+// 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;
+using Microsoft.AspNetCore.Components;
+using Microsoft.JSInterop;
+using Wonky.Client.Helpers;
+using Wonky.Client.HttpInterceptors;
+using Wonky.Client.HttpRepository;
+using Wonky.Client.Local.Services;
+using Wonky.Client.Models;
+using Wonky.Entity.DTO;
+using Wonky.Entity.Views;
+#pragma warning disable CS8618
+
+namespace Wonky.Client.Pages;
+
+public partial class OfficeAdvisorReportViewPage : IDisposable
+{
+ // #############################################################
+ [Inject] public HttpInterceptorService Interceptor { get; set; }
+ [Inject] public ICountryReportRepository ReportRepo { get; set; }
+ [Inject] public NavigationManager Navigator { get; set; }
+ [Inject] public ILogger Logger { get; set; }
+ [Inject] public ILocalStorageService Storage { get; set; }
+ [Inject] public UserPreferenceService PreferenceService { get; set; }
+ [Inject] public IJSRuntime JsRuntime { get; set; }
+ [Inject] public IToastService Toaster { get; set; }
+ [Inject] public IOrderProcessRepository ProcessRepo { get; set; }
+
+ // #############################################################
+ [Parameter] public string CountryCode { get; set; } = "";
+ [Parameter] public string UserId { get; set; } = "";
+ [Parameter] public string ReportDate { get; set; } = "";
+
+ // #############################################################
+ private IJSObjectReference JsModule { get; set; }
+ private ReportView Report { get; set; } = new();
+ private List Activities { get; set; } = new();
+ private bool Working { get; set; } = true;
+ private UserPreference Profile { get; set; } = new();
+ private string _returnUrl = "";
+
+ protected override async Task OnParametersSetAsync()
+ {
+ Interceptor.RegisterEvent();
+ Interceptor.RegisterBeforeSendEvent();
+
+ PreferenceService.OnChange += ProfileServiceOnOnChange;
+
+ await PreferenceService.SetWorkDate(DateTime.Parse(ReportDate));
+
+ await FetchUserReport(ReportDate);
+ }
+
+ protected override async Task OnAfterRenderAsync(bool firstRender)
+ {
+ if (firstRender)
+ {
+ JsModule = await JsRuntime
+ .InvokeAsync("import", "/scripts/print-invoke.js");
+ }
+ }
+ private void Print(PrintTarget target)
+ {
+ _returnUrl = new Uri(Navigator.Uri).AbsolutePath;
+ switch (target)
+ {
+ case PrintTarget.OrderPage:
+ Navigator.NavigateTo($"/report/print/orders/{CountryCode}/{UserId}/{ReportDate}?returnUrl={_returnUrl}");
+ break;
+ case PrintTarget.FrontPage:
+ Navigator.NavigateTo($"/report/print/summary/{CountryCode}/{UserId}/{ReportDate}?returnUrl={_returnUrl}");
+ break;
+ case PrintTarget.None:
+ break;
+ case PrintTarget.All:
+ break;
+ default:
+ throw new ArgumentOutOfRangeException(nameof(target), target, null);
+ }
+ }
+
+ private async Task Print()
+ {
+ var current = 0;
+ var orders = Report.ReportItems
+ .Where(x => x is { StatusTypeEnum: "Order", ProcessStatusEnum: "None" } );
+ var count = orders.Count();
+ foreach (var item in orders)
+ {
+ Toaster.ShowInfo($"Behandler {current++} af {count} ordrer. Vent venligst");
+ await ProcessRepo.UpdateWarehouseOrderStatus(new OrderProcessState
+ {
+ OrderId = item.ActivityId,
+ ProcessStatusEnum = Utils.EnumToString(ProcessStatus.Printed)
+ });
+ }
+ Toaster.ClearAll();
+ await JsModule.InvokeVoidAsync("printInvoke");
+ }
+
+ ///
+ /// Work date component event handler
+ ///
+ ///
+ private async Task FetchUserReport(string workDate)
+ {
+ // remove busy signal if report is empty
+ if (string.IsNullOrWhiteSpace(Report.ReportData.ReportDate))
+ {
+ Working = false;
+ }
+
+ ReportDate = workDate;
+
+ // ensure the browser address bar contains the correct link
+ Navigator.NavigateTo($"/office/users/advisors/{CountryCode}/{UserId}/reports/{workDate}", false, true);
+
+ // return if we are already at it
+ if (Working)
+ {
+ return;
+ }
+
+ // reset variables
+ Report = new ReportView();
+ Activities = new List();
+
+ // set busy signal
+ Working = true;
+
+ Logger.LogDebug("UserId => {}", UserId);
+ // fetch report
+ Report = await ReportRepo.GetCountryReport(UserId, workDate);
+ Logger.LogDebug("Report => {}", JsonSerializer.Serialize(Report, new JsonSerializerOptions(JsonSerializerDefaults.Web)));
+
+ // extract activities
+ Activities = Report.ReportItems.Where(x => x.Lines.Any()).ToList();
+
+ // store locally
+ if (!string.IsNullOrWhiteSpace(Report.ReportData.ReportDate))
+ {
+ await Storage.SetItemAsync($"{UserId}-{workDate}", Report);
+ }
+
+ // remove busy signal
+ Working = false;
+ }
+
+ private void ProfileServiceOnOnChange(UserPreference userPreference)
+ {
+ Logger.LogDebug("OfficeReportViewPage => ProfileServiceOnOnChange");
+ Profile = userPreference;
+ Logger.LogDebug("OfficeReportViewPage => ProfileServiceOnOnChange => Prefs.WorkDate <= {}", Profile.WorkDate);
+ ReportDate = Profile.WorkDate;
+
+ StateHasChanged();
+ }
+
+ public void Dispose()
+ {
+ Interceptor.DisposeEvent();
+ PreferenceService.OnChange -= ProfileServiceOnOnChange;
+ }
+}
\ No newline at end of file
diff --git a/Wonky.Client/Pages/SupervisorAdvisorViewPage.razor b/Wonky.Client/Pages/SupervisorAdvisorViewPage.razor
new file mode 100644
index 00000000..608b31b0
--- /dev/null
+++ b/Wonky.Client/Pages/SupervisorAdvisorViewPage.razor
@@ -0,0 +1,5 @@
+
SupervisorAdvisorVewPage
+
+@code {
+
+}
\ No newline at end of file
diff --git a/Wonky.Client/Pages/SupervisorAdvisorViewPage.razor.cs b/Wonky.Client/Pages/SupervisorAdvisorViewPage.razor.cs
new file mode 100644
index 00000000..03de56b0
--- /dev/null
+++ b/Wonky.Client/Pages/SupervisorAdvisorViewPage.razor.cs
@@ -0,0 +1,6 @@
+namespace Wonky.Client.Pages;
+
+public class SupervisorAdvisorViewPage_razor
+{
+
+}
\ No newline at end of file
diff --git a/Wonky.Client/Pages/SupervisorHomePage.razor b/Wonky.Client/Pages/SupervisorHomePage.razor
new file mode 100644
index 00000000..74e18076
--- /dev/null
+++ b/Wonky.Client/Pages/SupervisorHomePage.razor
@@ -0,0 +1,5 @@
+
SupervisorHomePage
+
+@code {
+
+}
\ No newline at end of file
diff --git a/Wonky.Client/Pages/SupervisorHomePage.razor.cs b/Wonky.Client/Pages/SupervisorHomePage.razor.cs
new file mode 100644
index 00000000..f9891d6a
--- /dev/null
+++ b/Wonky.Client/Pages/SupervisorHomePage.razor.cs
@@ -0,0 +1,6 @@
+namespace Wonky.Client.Pages;
+
+public class SupervisorHomePage_razor
+{
+
+}
\ No newline at end of file
diff --git a/Wonky.Client/Pages/SupervisorAdvisorListPage.razor b/Wonky.Client/Pages/SupervisorUserListPage.razor
similarity index 97%
rename from Wonky.Client/Pages/SupervisorAdvisorListPage.razor
rename to Wonky.Client/Pages/SupervisorUserListPage.razor
index 7115a6c2..9d90fe46 100644
--- a/Wonky.Client/Pages/SupervisorAdvisorListPage.razor
+++ b/Wonky.Client/Pages/SupervisorUserListPage.razor
@@ -15,7 +15,7 @@
@using Microsoft.AspNetCore.Authorization
@attribute [Authorize(Roles = "Supervisor")]
-@page "/supervisor/salesReps"
+@page "/supervisor/advisors"
Supervisor Sælger Oversigt
@@ -58,7 +58,7 @@
{
foreach (var user in Users)
{
-
+
+
+@code {
+
+ private bool collapseNavMenu = true;
+
+ private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
+
+ private void ToggleNavMenu()
+ {
+ collapseNavMenu = !collapseNavMenu;
+ }
+
+
+}
\ No newline at end of file
diff --git a/Wonky.Client/Shared/NavMenu-backup.razor.css b/Wonky.Client/Shared/NavMenu-backup.razor.css
new file mode 100644
index 00000000..dfecd000
--- /dev/null
+++ b/Wonky.Client/Shared/NavMenu-backup.razor.css
@@ -0,0 +1,81 @@
+/* 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]
+*/
+.navbar-toggler {
+ background-color: rgba(255, 255, 255, 0.1);
+}
+
+.top-row {
+ height: 3.5rem;
+ background-color: rgba(0,0,0,0.4);
+}
+
+.navbar-brand {
+ font-size: 1.1rem;
+}
+
+.oi {
+ width: 2rem;
+ font-size: 1.1rem;
+ vertical-align: text-top;
+ top: -2px;
+}
+
+.nav-item {
+ font-size: 0.9rem;
+ padding-bottom: 0.5rem;
+}
+
+ .nav-item:first-of-type {
+ padding-top: 1rem;
+ }
+
+ .nav-item:last-of-type {
+ padding-bottom: 1rem;
+ }
+
+ .nav-item ::deep a {
+ color: #d7d7d7;
+ border-radius: 4px;
+ height: 3rem;
+ display: flex;
+ align-items: center;
+ line-height: 3rem;
+ }
+
+.nav-item ::deep a.active {
+ background-color: rgba(255,255,255,0.25);
+ color: white;
+}
+
+.nav-item ::deep a:hover {
+ background-color: rgba(255,255,255,0.1);
+ color: white;
+}
+
+.list-group.panel > .list-group-item {
+ border-bottom-right-radius: 4px;
+ border-bottom-left-radius: 4px;
+}
+
+@media (min-width: 1025px) {
+ .navbar-toggler {
+ display: none;
+ }
+
+ .collapse {
+ /* Never collapse the sidebar for wide screens */
+ display: block;
+ }
+}