WIP - navigation and cosmetic fixes to supervisor

This commit is contained in:
Frede Hundewadt 2023-05-21 14:34:51 +02:00
parent ebfa60e705
commit 5367699cc4
13 changed files with 151 additions and 109 deletions

View file

@ -1,48 +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 Wonky.Client.Components
@using Microsoft.AspNetCore.Authorization
@attribute [Authorize(Roles = "Management,Supervisor")]
@page "/supervisor/advisors/{AdvisorId}/activities/{ReportDate}"
<div class="report-main d-print-print">
@if (!string.IsNullOrWhiteSpace(Report.ReportData.DayTypeEnum))
{
<PageTitle>@Report.ReportData.Name</PageTitle>
<div class="row">
<div class="alert border border-1 border-dark text-center align-content-center">
<h3>@Report.ReportData.Name</h3>
</div>
</div>
<div class="row">
<div class="w-75">
<ReportViewSummaryComponent ReportData="Report.ReportData"/>
</div>
<div class="w-25">
<ReportViewDistanceLedgerComponent ReportData="Report.ReportData"/>
</div>
</div>
<ReportViewActivityListComponent ActivityList="Report.ReportItems" OnShowDocument="ShowDocument"/>
<ReportViewActivityLedgerComponent ReportData="Report.ReportData"/>
}
else
{
<div class="row">
<div class="col">Ingen data</div>
</div>
}
</div>

View file

@ -17,14 +17,15 @@
@attribute [Authorize(Roles = "Supervisor")]
@page "/supervisor"
@page "/supervisor/advisors"
<PageTitle>Supervisor</PageTitle>
<div class="row">
<div class="col">
<h3>Supervisor Sælger Oversigt</h3>
<div class="col-sm-10">
<h2>Supervisor Sælger Oversigt</h2>
</div>
<div class="col">
<div class="col-sm-2">
<div class="text-end">
<div class="busy-signal" style="display:@(Working ? "block" : "none")">
<div class="spinner-grow text-info" role="status">

View file

@ -21,12 +21,24 @@
@page "/supervisor/advisors/{AdvisorId}/activities/{ReportDate}/visits/{DocumentId}"
<PageTitle>@ReportItem.ESalesNumber - @ReportItem.Company.Name</PageTitle>
<table class="table table-sm table-striped d-print-table">
<div class="row">
<div class="col-sm-8">
<h2>@ReportItem.Company.Name</h2>
</div>
<div class="col-sm-2 text-end">
<a class="btn btn-primary" href="/supervisor"><i class="bi-chevron-left"></i> Supervisor</a>
</div>
<div class="col-sm-2 text-end">
<a class="btn btn-primary" href="/supervisor/advisors/@AdvisorId/activities/@ReportDate"><i class="bi-chevron-left"></i> Tilbage</a>
</div>
</div>
<table class="table table-sm table-striped">
<thead>
<tr>
<th class="p-0" colspan="4">
<div class="bg-light text-dark border border-1 rounded-3 pt-3 mb-2">
<h2 class="fw-bold text-center">@ReportItem.Company.Name</h2>
@if (ReportItem.Express)
{
<h2 class="fw-bold text-center"><i class="bi-lightning-charge text-dark" style="font-size: 2rem;"></i> HASTER</h2>

View file

@ -28,7 +28,7 @@ using Wonky.Entity.Views;
namespace Wonky.Client.Pages;
public partial class SupervisorAdvisorActivityViewPage : IDisposable
public partial class SupervisorAdvisorReportItemViewPage : IDisposable
{
// #############################################################
[Inject] public HttpInterceptorService Interceptor { get; set; }

View file

@ -20,10 +20,21 @@
@page "/supervisor/advisors/{AdvisorId}"
<PageTitle>Rapport Arkiv @InfoAdvisor.FirstName @InfoAdvisor.LastName</PageTitle>
<div class="row d-print-none">
<div class="col-sm-8">
<h2>Support Dokumentation</h2>
</div>
<div class="col-sm-2">
@* placeholder *@
</div>
<div class="col-sm-2 text-end">
<a class="btn btn-primary" href="/supervisor/advisors"><i class="bi-chevron-left"></i> Tilbage</a>
</div>
</div>
<div class="card">
<div class="card-header">
<div class="mt-3 h3 card-title">
Rapport Arkiv - @InfoAdvisor.FirstName @InfoAdvisor.LastName
Rapport Arkiv @InfoAdvisor.FirstName @InfoAdvisor.LastName
</div>
</div>
<ReportListComponent OnShowReport="ShowReport" ReportList="@ActivityReports" />

View file

@ -7,14 +7,14 @@ using Wonky.Entity.Views;
namespace Wonky.Client.Pages;
public partial class SupervisorAdvisorViewPage : IDisposable
public partial class SupervisorAdvisorReportListPage : IDisposable
{
// #############################################################
[Inject] public HttpInterceptorService Interceptor { get; set; }
[Inject] public ICountryUserInfoRepository UserRepo { get; set; }
[Inject] public ICountryReportRepository ReportRepo { get; set; }
[Inject] public NavigationManager Navigator { get; set; }
[Inject] public ILogger<SupervisorAdvisorViewPage> Logger { get; set; }
[Inject] public ILogger<SupervisorAdvisorReportListPage> Logger { get; set; }
// #############################################################

View file

@ -0,0 +1,59 @@
@* 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
@attribute [Authorize(Roles = "Management,Supervisor")]
@page "/supervisor/advisors/{AdvisorId}/activities/{ReportDate}"
<PageTitle>@Report.ReportData.Name</PageTitle>
<div class="row">
<div class="col-sm-8">
<h2>Support Dokumentation</h2>
</div>
<div class="col-sm-2 text-end">
<a class="btn btn-primary" href="/supervisor"><i class="bi-chevron-left"></i> Supervisor</a>
</div>
<div class="col-sm-2 text-end">
<a class="btn btn-primary" href="/supervisor/advisors/@AdvisorId/activities"><i class="bi-chevron-left"></i> Tilbage</a>
</div>
</div>
@if (!string.IsNullOrWhiteSpace(Report.ReportData.DayTypeEnum))
{
<div class="row">
<div class="col-sm-12 alert border border-1 border-dark text-center align-content-center">
<h3 class="pt-2">@Report.ReportData.Name</h3>
</div>
</div>
<div class="row">
<div class="w-75">
<ReportViewSummaryComponent ReportData="Report.ReportData"/>
</div>
<div class="w-25">
<ReportViewDistanceLedgerComponent ReportData="Report.ReportData"/>
</div>
</div>
<ReportViewActivityListComponent ActivityList="Report.ReportItems" OnShowDocument="ShowDocument"/>
<ReportViewActivityLedgerComponent ReportData="Report.ReportData"/>
}
else
{
<div class="row">
<div class="col">Ingen data</div>
</div>
}

View file

@ -30,13 +30,13 @@ using Wonky.Entity.Views;
namespace Wonky.Client.Pages;
public partial class SupervisorAdvisorActivityListViewPage : IDisposable
public partial class SupervisorAdvisorReportViewPage : IDisposable
{
// #############################################################
[Inject] public HttpInterceptorService Interceptor { get; set; }
[Inject] public ICountryReportRepository ReportRepo { get; set; }
[Inject] public NavigationManager Navigator { get; set; }
[Inject] public ILogger<SupervisorAdvisorActivityListViewPage> Logger { get; set; }
[Inject] public ILogger<SupervisorAdvisorReportViewPage> Logger { get; set; }
[Inject] public ILocalStorageService Storage { get; set; }
[Inject] public UserPreferenceService PreferenceService { get; set; }

View file

@ -21,27 +21,28 @@
<PageTitle>Support Dokumentation</PageTitle>
<div class="row">
<div class="col-sm-6">
<h2>@Advisor.FullName</h2>
<div class="col-sm-8">
<h2>Support Dokumentation</h2>
</div>
<div class="col-sm-2 text-end">
<a class="btn btn-primary" href="/supervisor" ><i class="bi-chevron-left"></i> Supervisor</a>
</div>
<div class="col-sm-2 text-end">
<a class="btn btn-primary" href="/supervisor/advisors/@AdvisorId/documents/new" ><i class="bi-plus-lg"></i> Ny dokument</a>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<h3>Support Dokumentation</h3>
<div class="col-sm-8">
<h3>@Advisor.FullName</h3>
</div>
<div class="col-sm-3">
<a class="btn btn-primary" href="/supervisor/advisors" ><i class="bi-chevron-left"></i> Liste</a>
<div class="col-sm-2">
@* placeholder *@
</div>
<div class="col-sm-3 text-end">
<a class="btn btn-primary" href="/supervisor/advisors/@AdvisorId/documents" ><i class="bi-chevron-left"></i> Tilbage</a>
</div>
<div class="col-sm-1">
<div class="text-end">
<div class="busy-signal @(Working ? "inno-visible" : "inno-hidden")" >
<div class="spinner-grow text-info" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="col-sm-2 text-end">
<div class="busy-signal @(Working ? "inno-visible" : "inno-hidden")" >
<div class="spinner-grow text-info" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
</div>

View file

@ -22,33 +22,38 @@
<PageTitle>Support Dokumentation</PageTitle>
<div class="row">
<div class="col-sm-12">
<h2>@Document.AdvisorName</h2>
<div class="col-sm-8">
<h2>Support Dokumentation</h2>
</div>
<div class="col-sm-2 text-end">
<a class="btn btn-primary" href="/supervisor" ><i class="bi-chevron-left"></i> Supervisor</a>
</div>
<div class="col-sm-2 text-end">
<a class="btn btn-primary" href="/supervisor/advisors/@AdvisorId/documents" ><i class="bi-chevron-left"></i> Tilbage</a>
</div>
</div>
<div class="row">
<div class="col-sm-5">Support Dokumentation</div>
<div class="col-sm-3">
<a class="btn btn-primary" href="/supervisor/advisors" ><i class="bi-chevron-left"></i> Liste</a>
<div class="col-sm-8">
<h3>@Document.AdvisorName</h3>
</div>
<div class="col-sm-3 text-end">
<a class="btn btn-primary" href="/supervisor/advisors/@AdvisorId/documents" ><i class="bi-chevron-left"></i> Tilbage</a>
<div class="col-sm-2">
@* placeholder *@
</div>
<div class="col-sm-1">
<div class="text-end">
<div class="busy-signal @(Working ? "inno-visible" : "inno-hidden")" >
<div class="spinner-grow text-info" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="col-sm-2 text-end">
<div class="busy-signal @(Working ? "inno-visible" : "inno-hidden")" >
<div class="spinner-grow text-info" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
</div>
</div>
</div>
<EditForm EditContext="FormContext" OnValidSubmit="SubmitDocument">
<DataAnnotationsValidator/>
<div class="card">
<div class="card-title">
<h3>Opret Dokumentation</h3>
<div class="card-header">
<div class="card-title">
<h3>Opret Dokumentation</h3>
</div>
</div>
<div class="card-body">
<div class="row d-flex g-3">
@ -60,9 +65,9 @@
<div class="col-sm-4">
<InputText id="advisor" class="form-control" @bind-Value="Document.AdvisorName" readonly></InputText>
</div>
<label for="countryCode" class="col-sm-1 col-form-label-sm" readonly>Land</label>
<label for="countryCode" class="col-sm-1 col-form-label-sm">Land</label>
<div class="col-1">
<InputText id="countryCode" class="form-control" @bind-Value="Document.CountryCode" ></InputText>
<InputText id="countryCode" class="form-control" @bind-Value="Document.CountryCode" readonly></InputText>
</div>
<label for="documentDate" class="col-sm-1 col-form-label-sm">Dato</label>
<div class="col-sm-5">
@ -86,7 +91,7 @@
</div>
<div class="card-footer">
<div class="text-end">
<button type="submit" class="btn btn-primary" disabled="@FormInvalid" ><i class="bi-cloud-upload"></i> Gem</button>
<button type="submit" class="btn btn-primary" disabled="@FormInvalid"><i class="bi-cloud-upload"></i> Gem</button>
</div>
</div>
</div>

View file

@ -20,26 +20,27 @@
@page "/supervisor/advisors/{AdvisorId}/documents/{DocumentId}"
<div class="row">
<div class="col-sm-6">
<h2>@Document.AdvisorName</h2>
<div class="col-sm-8">
<h2>Support Dokumentation</h2>
</div>
<div class="col-sm-2 text-end">
<a class="btn btn-primary" href="/supervisor" ><i class="bi-chevron-left"></i> Supervisor</a>
</div>
<div class="col-sm-2 text-end">
<a class="btn btn-primary" href="/supervisor/advisors/@AdvisorId/documents"><i class="bi-chevron-left"></i> Tilbage</a>
</div>
</div>
<div class="row">
<div class="col-sm-5">
<h3>Support Dokumentation</h3>
<div class="col-sm-8">
<h3>@Document.AdvisorName</h3>
</div>
<div class="col-sm-3">
<a class="btn btn-primary" href="/supervisor/advisors" ><i class="bi-chevron-left"></i> Liste</a>
<div class="col-sm-2">
@* placeholder *@
</div>
<div class="col-sm-3 text-end">
<a class="btn btn-primary" href="/supervisor/advisors/@AdvisorId/documents" ><i class="bi-chevron-left"></i> Tilbage</a>
</div>
<div class="col-sm-1">
<div class="text-end">
<div class="busy-signal @(Working ? "inno-visible" : "inno-hidden")" >
<div class="spinner-grow text-info" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="col-sm-2 text-end">
<div class="busy-signal @(Working ? "inno-visible" : "inno-hidden")" >
<div class="spinner-grow text-info" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
</div>

View file

@ -1,7 +1,7 @@
{
"appInfo": {
"name": "Wonky Online",
"version": "145.4",
"version": "146.2",
"rc": true,
"sandBox": true,
"image": "grumpy-coder.png"