release - v0.8.116-beta
This commit is contained in:
parent
dfcb9ddbb8
commit
d9a538ae90
58 changed files with 406 additions and 332 deletions
|
@ -1,105 +1,98 @@
|
|||
@using Wonky.Entity.Views
|
||||
|
||||
<div class="report-page row d-print-block">
|
||||
<div class="col">
|
||||
<div class="alert bg-dark text-white">
|
||||
<h2 class="text-center fw-bold">BESTILLING</h2>
|
||||
</div>
|
||||
<table class="table table-striped table-bordered d-print-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Dato</th>
|
||||
<td>@ReportItem.OrderDate</td>
|
||||
<th scope="row">Konto</th>
|
||||
<td>@ReportItem.Company.Account</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">Telefon</th>
|
||||
<td>@ReportItem.Company.Phone</td>
|
||||
<th scope="col">Køber</th>
|
||||
<td>@ReportItem.YourRef</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">CVR/VAT</th>
|
||||
<td>@ReportItem.Company.VatNumber</td>
|
||||
<th scope="col">Rekvisition</th>
|
||||
<td>@ReportItem.ReferenceNumber</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">Navn</th>
|
||||
<td>@ReportItem.Company.Name</td>
|
||||
<th scope="col">Lev.Navn</th>
|
||||
<td>@ReportItem.DlvName</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">Adresse</th>
|
||||
<td>@ReportItem.Company.Address1</td>
|
||||
<th scope="col">Lev.Adresse</th>
|
||||
<td>@ReportItem.DlvAddress1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">Adresse</th>
|
||||
<td>@ReportItem.Company.Address2</td>
|
||||
<th scope="col">Lev.Adresse</th>
|
||||
<td>@ReportItem.DlvAddress2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">Postnr By</th>
|
||||
<td>@ReportItem.Company.ZipCode @ReportItem.Company.City</td>
|
||||
<th scope="col">Lev.Postnr By</th>
|
||||
<td>@ReportItem.DlvZipCity</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col">
|
||||
<div class="alert alert-light">
|
||||
<h3 class="text-center fw-bold">Ordre linjer</h3>
|
||||
</div>
|
||||
<table class="table table-striped table-bordered d-print-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Antal</th>
|
||||
<th scope="col">Varnr</th>
|
||||
<th scope="col">Beskrivelse</th>
|
||||
<th class="text-end" scope="col">Pris</th>
|
||||
<th class="text-end" scope="col">R%</th>
|
||||
<th class="text-end" scope="col">Beløb</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var line in ReportItem.Lines)
|
||||
{
|
||||
<tr>
|
||||
<td>@line.Quantity</td>
|
||||
<td>@line.Sku</td>
|
||||
<td>@line.Description</td>
|
||||
<td class="text-end">@($"{line.Price:N2}")</td>
|
||||
<td class="text-end">@($"{line.Discount:N2}")</td>
|
||||
<td class="text-end">@($"{line.LineSum:N2}")</td>
|
||||
</tr>
|
||||
}
|
||||
<tr>
|
||||
<td colspan="4"></td>
|
||||
<td>Ordresum</td>
|
||||
<td class="text-end">@ReportItem.OrderAmount</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="alert alert-dark">
|
||||
<h4 class="text-center">
|
||||
@ReportItem.OfficeNote
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-light">
|
||||
<h2 class="text-center">Ordre @ReportItem.OrderDate</h2>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-bordered d-print-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">EOrdre nr.</th>
|
||||
<td>@ReportItem.ESalesNumber</td>
|
||||
<th scope="row">Konto</th>
|
||||
<td>@ReportItem.Company.Account</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">Telefon</th>
|
||||
<td>@ReportItem.Company.Phone</td>
|
||||
<th scope="col">Køber</th>
|
||||
<td>@ReportItem.YourRef</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">CVR/VAT</th>
|
||||
<td>@ReportItem.Company.VatNumber</td>
|
||||
<th scope="col">Rekvisition</th>
|
||||
<td>@ReportItem.ReferenceNumber</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">Navn</th>
|
||||
<td>@ReportItem.Company.Name</td>
|
||||
<th scope="col">Lev.Navn</th>
|
||||
<td>@ReportItem.DlvName</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">Adresse</th>
|
||||
<td>@ReportItem.Company.Address1</td>
|
||||
<th scope="col">Lev.Adresse</th>
|
||||
<td>@ReportItem.DlvAddress1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">Adresse</th>
|
||||
<td>@ReportItem.Company.Address2</td>
|
||||
<th scope="col">Lev.Adresse</th>
|
||||
<td>@ReportItem.DlvAddress2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">Postnr By</th>
|
||||
<td>@ReportItem.Company.ZipCode @ReportItem.Company.City</td>
|
||||
<th scope="col">Lev.Postnr By</th>
|
||||
<td>@ReportItem.DlvZipCity</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="alert alert-light">
|
||||
<h3 class="text-center">Varer</h3>
|
||||
</div>
|
||||
<table class="table table-striped table-bordered d-print-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Antal</th>
|
||||
<th scope="col">Varnr</th>
|
||||
<th scope="col">Beskrivelse</th>
|
||||
<th class="text-end" scope="col">Pris</th>
|
||||
<th class="text-end" scope="col">R%</th>
|
||||
<th class="text-end" scope="col">Beløb</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var line in ReportItem.Lines)
|
||||
{
|
||||
<tr>
|
||||
<td>@line.Quantity</td>
|
||||
<td>@line.Sku</td>
|
||||
<td>@line.Description</td>
|
||||
<td class="text-end">@($"{line.Price:N2}")</td>
|
||||
<td class="text-end">@($"{line.Discount:N2}")</td>
|
||||
<td class="text-end">@($"{line.LineSum:N2}")</td>
|
||||
</tr>
|
||||
}
|
||||
<tr>
|
||||
<td colspan="4"></td>
|
||||
<td>Ordresum</td>
|
||||
<td class="text-end">@ReportItem.OrderAmount</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@if (!string.IsNullOrWhiteSpace(@ReportItem.OfficeNote))
|
||||
{
|
||||
<div class="alert alert-dark d-print-block">
|
||||
<h4 class="text-center">
|
||||
@ReportItem.OfficeNote
|
||||
</h4>
|
||||
</div>
|
||||
}
|
||||
|
||||
@code{
|
||||
|
||||
[Parameter]
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Wonky.Client.HttpRepository;
|
|||
|
||||
public interface ITaskItemHttpRepository
|
||||
{
|
||||
Task<List<TaskItemView>?> GetTaskList();
|
||||
Task CreateTaskItem(TaskItemView taskItem);
|
||||
Task<TaskItemView?> GetTaskItem(string taskItemId);
|
||||
Task<List<TaskItemViewPage>?> GetTaskList();
|
||||
Task CreateTaskItem(TaskItemViewPage taskItem);
|
||||
Task<TaskItemViewPage?> GetTaskItem(string taskItemId);
|
||||
}
|
|
@ -30,18 +30,18 @@ public class TaskItemHttpRepository : ITaskItemHttpRepository
|
|||
_apiConfig = configuration.Value;
|
||||
}
|
||||
|
||||
public async Task<List<TaskItemView>?> GetTaskList()
|
||||
public async Task<List<TaskItemViewPage>?> GetTaskList()
|
||||
{
|
||||
return await _client.GetFromJsonAsync<List<TaskItemView>>($"{_apiConfig.TaskUri}");
|
||||
return await _client.GetFromJsonAsync<List<TaskItemViewPage>>($"{_apiConfig.TaskUri}");
|
||||
}
|
||||
|
||||
public async Task CreateTaskItem(TaskItemView taskItem)
|
||||
public async Task CreateTaskItem(TaskItemViewPage taskItem)
|
||||
{
|
||||
await _client.PostAsJsonAsync($"{_apiConfig.TaskUri}", taskItem);
|
||||
}
|
||||
|
||||
public async Task<TaskItemView?> GetTaskItem(string taskItemId)
|
||||
public async Task<TaskItemViewPage?> GetTaskItem(string taskItemId)
|
||||
{
|
||||
return await _client.GetFromJsonAsync<TaskItemView>($"{_apiConfig.TaskUri}/{taskItemId}");
|
||||
return await _client.GetFromJsonAsync<TaskItemViewPage>($"{_apiConfig.TaskUri}/{taskItemId}");
|
||||
}
|
||||
}
|
|
@ -31,13 +31,13 @@ using Wonky.Entity.Views;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class ActivityVisitNew : IDisposable
|
||||
public partial class ActivityNewVisitPage : IDisposable
|
||||
{
|
||||
// Parameters
|
||||
[CascadingParameter] DraftStateProvider DraftStateProvider { get; set; }
|
||||
[Parameter] public string CompanyId { get; set; }
|
||||
// Services
|
||||
[Inject] private ILogger<ActivityVisitNew> _logger { get; set; }
|
||||
[Inject] private ILogger<ActivityNewVisitPage> _logger { get; set; }
|
||||
[Inject] private HttpInterceptorService _interceptor { get; set; }
|
||||
[Inject] private UserPreferenceService _userPrefs { get; set; }
|
||||
[Inject] private IToastService _toast { get; set; }
|
|
@ -8,7 +8,7 @@ using Wonky.Entity.Views;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class ActivityToday
|
||||
public partial class ActivityTodayListPage
|
||||
{
|
||||
[Inject] private UserPreferenceService _preferenceService { get; set; }
|
||||
[Inject] private ILogger<Home> _logger { get; set; }
|
|
@ -7,12 +7,12 @@ using Wonky.Entity.Requests;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class AdminAdviserCompanyList : IDisposable
|
||||
public partial class AdminAdviserCompanyListPage : IDisposable
|
||||
{
|
||||
[Parameter] public string UserId { get; set; } = "";
|
||||
[Parameter] public string CountryCode { get; set; } = "";
|
||||
|
||||
[Inject] private ILogger<ActivityVisitNew> _logger { get; set; }
|
||||
[Inject] private ILogger<ActivityNewVisitPage> _logger { get; set; }
|
||||
[Inject] private HttpInterceptorService _interceptor { get; set; }
|
||||
[Inject] private UserPreferenceService _preferenceService { get; set; }
|
||||
[Inject] private ICompanyHttpRepository _companyRepo { get; set; }
|
|
@ -6,7 +6,7 @@ using Wonky.Entity.Views;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class AdminAdviserUserList : IDisposable
|
||||
public partial class AdminAdviserUserListPage : IDisposable
|
||||
{
|
||||
[Parameter] public string CountryCode { get; set; } = "";
|
||||
[Inject] private HttpInterceptorService _interceptor { get; set; }
|
|
@ -9,13 +9,13 @@ using Wonky.Entity.DTO;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class AdminAdviserView : IDisposable
|
||||
public partial class AdminAdviserViewPage : IDisposable
|
||||
{
|
||||
[Parameter] public string UserId { get; set; } = "";
|
||||
[Parameter] public string CountryCode { get; set; } = "";
|
||||
[Inject] private HttpInterceptorService _interceptor { get; set; }
|
||||
[Inject] private IUserHttpRepository _userRepo { get; set; }
|
||||
[Inject] private ILogger<AdminAdviserView> _logger { get; set; }
|
||||
[Inject] private ILogger<AdminAdviserViewPage> _logger { get; set; }
|
||||
[Inject] private NavigationManager _navigator { get; set; }
|
||||
[Inject] private IToastService _toast { get; set; }
|
||||
private AdminUserInfoDto AdminUserInfo { get; set; } = new();
|
|
@ -5,12 +5,12 @@ using Wonky.Entity.DTO;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class AdminCompanyList
|
||||
public partial class AdminCompanyListPage
|
||||
{
|
||||
[Parameter] public string UserId { get; set; } = "";
|
||||
[Parameter] public string CountryCode { get; set; } = "";
|
||||
|
||||
[Inject] private ILogger<ActivityVisitNew> _logger { get; set; }
|
||||
[Inject] private ILogger<ActivityNewVisitPage> _logger { get; set; }
|
||||
[Inject] private HttpInterceptorService _interceptor { get; set; }
|
||||
[Inject] private UserPreferenceService _userPrefs { get; set; }
|
||||
|
|
@ -6,7 +6,7 @@ using Wonky.Entity.Views;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class AdminOfficeList : IDisposable
|
||||
public partial class AdminOfficeUserListPage : IDisposable
|
||||
{
|
||||
[Parameter] public string CountryCode { get; set; } = "";
|
||||
[Inject] private HttpInterceptorService _interceptor { get; set; }
|
|
@ -9,13 +9,13 @@ using Wonky.Entity.DTO;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class AdminOfficeView : IDisposable
|
||||
public partial class AdminOfficeUserViewPage : IDisposable
|
||||
{
|
||||
[Parameter] public string UserId { get; set; } = "";
|
||||
[Parameter] public string CountryCode { get; set; } = "";
|
||||
[Inject] private HttpInterceptorService _interceptor { get; set; }
|
||||
[Inject] private IUserHttpRepository _userRepo { get; set; }
|
||||
[Inject] private ILogger<AdminAdviserView> _logger { get; set; }
|
||||
[Inject] private ILogger<AdminAdviserViewPage> _logger { get; set; }
|
||||
[Inject] private NavigationManager _navigator { get; set; }
|
||||
[Inject] private IToastService _toast { get; set; }
|
||||
private AdminUserInfoDto AdminUserInfo { get; set; } = new();
|
|
@ -6,7 +6,7 @@ using Wonky.Entity.Views;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class AdminSalesReportList : IDisposable
|
||||
public partial class AdminSalesReportListPage : IDisposable
|
||||
{
|
||||
[Parameter] public string UserId { get; set; } = "";
|
||||
[Parameter] public string CountryCode { get; set; } = "";
|
|
@ -1,79 +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
|
||||
@page "/admin/users/advisers/{CountryCode}/{UserId}/reports/{ReportDate}"
|
||||
@attribute [Authorize(Roles = "Admin")]
|
||||
|
||||
@if (Report != null)
|
||||
{
|
||||
<PageTitle>@Report.ReportData.Name</PageTitle>
|
||||
<div class="alert alert-dark">
|
||||
<div class="row">
|
||||
<div class="col-md-6 d-print-none align-content-center">
|
||||
@if (!string.IsNullOrWhiteSpace(ReportDate))
|
||||
{
|
||||
<h2 class="workDate">@DateTime.Parse(ReportDate).ToLongDateString()</h2>
|
||||
}
|
||||
</div>
|
||||
<div class="col col-md-4 d-print-none align-content-center">
|
||||
<WorkDateComponent SelectedDate="@ReportDate" OnChanged="GetReport"></WorkDateComponent>
|
||||
</div>
|
||||
<div class="col col-md-1 d-print-none align-content-center">
|
||||
<button class="btn btn-warning" type="button" onclick="window.print();">Print</button>
|
||||
</div>
|
||||
<div class="col d-none d-print-block text-end align-content-center">
|
||||
<h2>@Report.ReportData.Name</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="w-75">
|
||||
<ReportSummaryComponent ReportData="Report.ReportData"></ReportSummaryComponent>
|
||||
</div>
|
||||
<div class="w-25">
|
||||
<ReportDistanceLedgerComponent ReportData="Report.ReportData"></ReportDistanceLedgerComponent>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<ActivityTableComponent Activities="Report.ReportItems"></ActivityTableComponent>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<ReportActivityLedgerComponent ReportData="Report.ReportData"></ReportActivityLedgerComponent>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-break d-print-block"></div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<AppSpinner></AppSpinner>
|
||||
}
|
||||
@if (_items.Any())
|
||||
{
|
||||
@foreach (var item in _items)
|
||||
{
|
||||
<div class="report-page d-print-block">
|
||||
<ReportItemComponent ReportItem="@item"></ReportItemComponent>
|
||||
</div>
|
||||
|
||||
}
|
||||
}
|
76
Wonky.Client/Pages/AdminSalesReportViewPage.razor
Normal file
76
Wonky.Client/Pages/AdminSalesReportViewPage.razor
Normal file
|
@ -0,0 +1,76 @@
|
|||
@*
|
||||
// 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
|
||||
@page "/admin/users/advisers/{CountryCode}/{UserId}/reports/{ReportDate}"
|
||||
@attribute [Authorize(Roles = "Admin")]
|
||||
|
||||
@if (Report != null)
|
||||
{
|
||||
<div class="report-page d-print-block">
|
||||
<PageTitle>@Report.ReportData.Name</PageTitle>
|
||||
<div class="alert alert-dark">
|
||||
<div class="row">
|
||||
<div class="col-md-6 d-print-none align-content-center">
|
||||
@if (!string.IsNullOrWhiteSpace(ReportDate))
|
||||
{
|
||||
<h2 class="workDate">@DateTime.Parse(ReportDate).ToLongDateString()</h2>
|
||||
}
|
||||
</div>
|
||||
<div class="col col-md-4 d-print-none align-content-center">
|
||||
<WorkDateComponent SelectedDate="@ReportDate" OnChanged="GetReport"></WorkDateComponent>
|
||||
</div>
|
||||
<div class="col col-md-1 d-print-none align-content-center">
|
||||
<button class="btn btn-warning" type="button" onclick="window.print();">Print</button>
|
||||
</div>
|
||||
<div class="col d-none d-print-block text-end align-content-center">
|
||||
<h2>@Report.ReportData.Name</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="w-75">
|
||||
<ReportSummaryComponent ReportData="Report.ReportData"></ReportSummaryComponent>
|
||||
</div>
|
||||
<div class="w-25">
|
||||
<ReportDistanceLedgerComponent ReportData="Report.ReportData"></ReportDistanceLedgerComponent>
|
||||
</div>
|
||||
</div>
|
||||
<ActivityTableComponent Activities="Report.ReportItems"></ActivityTableComponent>
|
||||
<ReportActivityLedgerComponent ReportData="Report.ReportData"></ReportActivityLedgerComponent>
|
||||
</div>
|
||||
|
||||
<div class="page-break d-block d-print-block"></div>
|
||||
|
||||
@if (_items.Any())
|
||||
{
|
||||
|
||||
@foreach (var item in _items)
|
||||
{
|
||||
<div class="report-page">
|
||||
<div class="d-print-block">
|
||||
<ReportItemComponent ReportItem="@item"></ReportItemComponent>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<AppSpinner></AppSpinner>
|
||||
}
|
|
@ -6,7 +6,7 @@ using Wonky.Entity.Views;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class AdminSalesReportView : IDisposable
|
||||
public partial class AdminSalesReportViewPage : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Country code from url parameter
|
|
@ -26,7 +26,7 @@ using Wonky.Entity.Requests;
|
|||
|
||||
namespace Wonky.Client.Pages
|
||||
{
|
||||
public partial class CompanyList : IDisposable
|
||||
public partial class CompanyListPage : IDisposable
|
||||
{
|
||||
[Inject] private ILocalStorageService _storage { get; set; }
|
||||
[Inject] private UserPreferenceService _preferenceService { get; set; }
|
|
@ -35,10 +35,10 @@ using Wonky.Entity.Views;
|
|||
|
||||
namespace Wonky.Client.Pages
|
||||
{
|
||||
public partial class CompanyNew : IDisposable
|
||||
public partial class CompanyNewPage : IDisposable
|
||||
{
|
||||
[Inject] private IToastService _toast { get; set; }
|
||||
[Inject] private ILogger<CompanyNew> _logger { get; set; }
|
||||
[Inject] private ILogger<CompanyNewPage> _logger { get; set; }
|
||||
[Inject] private ILocalStorageService _storage { get; set; }
|
||||
[Inject] private NavigationManager _navigator { get; set; }
|
||||
[Inject] private ICompanyHttpRepository _companyRepo { get; set; }
|
|
@ -33,11 +33,11 @@ using Wonky.Entity.Views;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class CompanyView : IDisposable
|
||||
public partial class CompanyViewPage : IDisposable
|
||||
{
|
||||
[Parameter] public string CompanyId { get; set; } = "";
|
||||
[Inject] private IToastService _toast { get; set; }
|
||||
[Inject] private ILogger<CompanyView> _logger { get; set; }
|
||||
[Inject] private ILogger<CompanyViewPage> _logger { get; set; }
|
||||
[Inject] private NavigationManager _navigator { get; set; }
|
||||
[Inject] private ICompanyHttpRepository _companyRepo { get; set; }
|
||||
[Inject] private IHistoryHttpRepository _historyRepo { get; set; }
|
|
@ -28,7 +28,7 @@ using Wonky.Entity.Views;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class ItemCatalog : IDisposable
|
||||
public partial class ItemCatalogPage : IDisposable
|
||||
{
|
||||
[Inject] private ILocalStorageService _storage { get; set; }
|
||||
[Inject] private ISalesItemHttpRepository _itemRepo { get; set; }
|
|
@ -23,7 +23,7 @@ using Wonky.Entity.Views;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class ItemView : IDisposable
|
||||
public partial class KrvItemViewPage : IDisposable
|
||||
{
|
||||
[Parameter] public string SalesItemId { get; set; } = "";
|
||||
private SalesItemView _item { get; set; } = new ();
|
|
@ -6,7 +6,7 @@ using Wonky.Entity.Views;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class ProductHistoryItem : IDisposable
|
||||
public partial class ProductHistoryItemPage : IDisposable
|
||||
{
|
||||
[Parameter] public string Sku { get; set; } = "";
|
||||
[Parameter] public string CompanyId { get; set; } = "";
|
|
@ -6,7 +6,7 @@ using Wonky.Entity.Views;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class ProductHistoryList : IDisposable
|
||||
public partial class ProductHistoryListPage : IDisposable
|
||||
{
|
||||
[Parameter] public string CompanyId { get; set; } = "";
|
||||
[Inject] private HttpInterceptorService _interceptor { get; set; }
|
|
@ -6,7 +6,7 @@ using Wonky.Entity.Views;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class ProductInventory : IDisposable
|
||||
public partial class ProductInventoryPage : IDisposable
|
||||
{
|
||||
[Parameter] public string CompanyId { get; set; } = "";
|
||||
|
|
@ -6,7 +6,7 @@ using Wonky.Entity.Views;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class SalesReportList : IDisposable
|
||||
public partial class SalesReportListPage : IDisposable
|
||||
{
|
||||
[Inject] private IReportHttpRepository _reportRepo { get; set; }
|
||||
[Inject] private HttpInterceptorService _interceptor { get; set; }
|
|
@ -29,14 +29,14 @@ using Wonky.Entity.Views;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class SalesReportNew : IDisposable
|
||||
public partial class SalesReportNewPage : IDisposable
|
||||
{
|
||||
[Inject] private HttpInterceptorService _interceptor { get; set; }
|
||||
[Inject] private UserPreferenceService _userPrefs { get; set; }
|
||||
[Inject] private IActivityHttpRepository _activityRepo { get; set; }
|
||||
[Inject] private IReportHttpRepository _reportRepo { get; set; }
|
||||
[Inject] private NavigationManager _navigator { get; set; }
|
||||
[Inject] private ILogger<SalesReportNew> _logger { get; set; }
|
||||
[Inject] private ILogger<SalesReportNewPage> _logger { get; set; }
|
||||
[Inject] private IToastService _toast { get; set; }
|
||||
private EditContext _editContext { get; set; }
|
||||
private ReportDto _report { get; set; } = new();
|
|
@ -1,78 +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
|
||||
@page "/sales-reports/view/{ReportDate}"
|
||||
@attribute [Authorize(Roles = "Adviser,Admin,Supervisor")]
|
||||
|
||||
@if (_report != null)
|
||||
{
|
||||
<PageTitle>@_report.ReportData.Name</PageTitle>
|
||||
<div class="alert alert-dark">
|
||||
<div class="row">
|
||||
<div class="col-md-6 d-print-none align-content-center">
|
||||
@if (!string.IsNullOrWhiteSpace(ReportDate))
|
||||
{
|
||||
<h2 class="workDate">@DateTime.Parse(ReportDate).ToLongDateString()</h2>
|
||||
}
|
||||
</div>
|
||||
<div class="col col-md-4 d-print-none align-content-center">
|
||||
<WorkDateComponent SelectedDate="@ReportDate" OnChanged="GetReport"></WorkDateComponent>
|
||||
</div>
|
||||
<div class="col col-md-1 d-print-none align-content-center">
|
||||
<button class="btn btn-warning" type="button" onclick="window.print();">Print</button>
|
||||
</div>
|
||||
<div class="col d-none d-print-block text-end align-content-center">
|
||||
<h2>@_report.ReportData.Name</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="w-75">
|
||||
<ReportSummaryComponent ReportData="_report.ReportData"></ReportSummaryComponent>
|
||||
</div>
|
||||
<div class="w-25">
|
||||
<ReportDistanceLedgerComponent ReportData="_report.ReportData"></ReportDistanceLedgerComponent>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<ActivityTableComponent Activities="_report.ReportItems"></ActivityTableComponent>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<ReportActivityLedgerComponent ReportData="_report.ReportData"></ReportActivityLedgerComponent>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-break d-print-block"></div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<AppSpinner></AppSpinner>
|
||||
}
|
||||
@if (_items.Any())
|
||||
{
|
||||
@foreach (var item in _items)
|
||||
{
|
||||
<div class="report-page d-print-block">
|
||||
<ReportItemComponent ReportItem="@item"></ReportItemComponent>
|
||||
</div>
|
||||
|
||||
}
|
||||
}
|
79
Wonky.Client/Pages/SalesReportViewPage.razor
Normal file
79
Wonky.Client/Pages/SalesReportViewPage.razor
Normal file
|
@ -0,0 +1,79 @@
|
|||
@*
|
||||
// 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
|
||||
@page "/sales-reports/view/{ReportDate}"
|
||||
@attribute [Authorize(Roles = "Adviser,Admin,Supervisor")]
|
||||
|
||||
@if (_report != null)
|
||||
{
|
||||
<div class="report-page d-block d-print-block">
|
||||
<PageTitle>@_report.ReportData.Name</PageTitle>
|
||||
<div class="alert alert-dark">
|
||||
<div class="row">
|
||||
<div class="col-md-6 d-print-none align-content-center">
|
||||
@if (!string.IsNullOrWhiteSpace(ReportDate))
|
||||
{
|
||||
<h2 class="workDate">@DateTime.Parse(ReportDate).ToLongDateString()</h2>
|
||||
}
|
||||
</div>
|
||||
<div class="col col-md-4 d-print-none align-content-center">
|
||||
<WorkDateComponent SelectedDate="@ReportDate" OnChanged="GetReport"></WorkDateComponent>
|
||||
</div>
|
||||
<div class="col col-md-1 d-print-none align-content-center">
|
||||
<button class="btn btn-warning" type="button" onclick="window.print();">Print</button>
|
||||
</div>
|
||||
<div class="col d-none d-print-block text-end align-content-center">
|
||||
<h2>@_report.ReportData.Name</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="w-75">
|
||||
<ReportSummaryComponent ReportData="_report.ReportData"></ReportSummaryComponent>
|
||||
</div>
|
||||
<div class="w-25">
|
||||
<ReportDistanceLedgerComponent ReportData="_report.ReportData"></ReportDistanceLedgerComponent>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<ActivityTableComponent Activities="_report.ReportItems"></ActivityTableComponent>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<ReportActivityLedgerComponent ReportData="_report.ReportData"></ReportActivityLedgerComponent>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-break d-block d-print-block"></div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<AppSpinner></AppSpinner>
|
||||
}
|
||||
@if (_items.Any())
|
||||
{
|
||||
@foreach (var item in _items)
|
||||
{
|
||||
<div class="report-page d-block d-print-block">
|
||||
<ReportItemComponent ReportItem="@item"></ReportItemComponent>
|
||||
</div>
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@ using Wonky.Entity.Views;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class SalesReportView
|
||||
public partial class SalesReportViewPage
|
||||
{
|
||||
[Parameter] public string ReportDate { get; set; }
|
||||
[Inject] private IReportHttpRepository _reportRepo { get; set; }
|
|
@ -8,7 +8,7 @@ using Wonky.Entity.Views;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class TaskItemList : IDisposable
|
||||
public partial class TaskItemListPage : IDisposable
|
||||
{
|
||||
[Inject] public UserPreferenceService UserPrefs { get; set; }
|
||||
[Inject] public ILogger<Home> Logger { get; set; }
|
|
@ -3,7 +3,7 @@ using Wonky.Client.HttpInterceptors;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class TaskItemView : IDisposable
|
||||
public partial class TaskItemViewPage : IDisposable
|
||||
{
|
||||
[Inject] private HttpInterceptorService _interceptor { get; set; }
|
||||
[Parameter] public string TaskItemId { get; set; }
|
|
@ -34,7 +34,12 @@
|
|||
<AuthorizeView>
|
||||
<NotAuthorized>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link ps-2" href="/login" Match="NavLinkMatch.All">
|
||||
<NavLink class="nav-link ps-2" href="/" Match="NavLinkMatch.All">
|
||||
<span class="oi oi-dashboard"></span> Start
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link ps-2" href="/login">
|
||||
<span class="oi oi-account-login"></span> Log ind
|
||||
</NavLink>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"appInfo": {
|
||||
"name": "Wonky Client",
|
||||
"version": "0.8.102",
|
||||
"version": "0.8.115",
|
||||
"isBeta": true,
|
||||
"image": "grumpy-coder.png"
|
||||
},
|
||||
|
|
103
Wonky.Client/wwwroot/css/report-print-10.css
Normal file
103
Wonky.Client/wwwroot/css/report-print-10.css
Normal file
|
@ -0,0 +1,103 @@
|
|||
/* printer classes */
|
||||
@media print {
|
||||
@page {
|
||||
size: a4;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Montserrat';
|
||||
src: url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');
|
||||
}
|
||||
html, body {
|
||||
/*height: 290mm;*/
|
||||
/*width: 210mm;*/
|
||||
-webkit-print-color-adjust: exact;
|
||||
color-adjust: exact;
|
||||
}
|
||||
.page-break {
|
||||
page-break-before: always;
|
||||
}
|
||||
.report-page {
|
||||
page-break-after: always;
|
||||
height: initial;
|
||||
font-size: 0.8em;
|
||||
border: initial;
|
||||
border-radius: initial;
|
||||
box-shadow: initial;
|
||||
margin: 0;
|
||||
width: initial;
|
||||
-webkit-print-color-adjust: exact;
|
||||
color-adjust: exact;
|
||||
}
|
||||
}
|
||||
/*
|
||||
@media print {
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
text-shadow: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
a:not(.btn) {
|
||||
text-decoration: underline;
|
||||
}
|
||||
abbr[title]::after {
|
||||
content: " (" attr(title) ")";
|
||||
}
|
||||
pre {
|
||||
white-space: pre-wrap !important;
|
||||
}
|
||||
pre,
|
||||
blockquote {
|
||||
border: 1px solid #adb5bd;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
tr,
|
||||
img {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
p,
|
||||
h2,
|
||||
h3 {
|
||||
orphans: 3;
|
||||
widows: 3;
|
||||
}
|
||||
h2 {
|
||||
page-break-before: always;
|
||||
page-break-after: avoid;
|
||||
}
|
||||
h3 {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
@page {
|
||||
size: a4;
|
||||
}
|
||||
body {
|
||||
min-width: 992px !important;
|
||||
}
|
||||
.container {
|
||||
min-width: 992px !important;
|
||||
}
|
||||
.badge {
|
||||
border: 1px solid #000;
|
||||
}
|
||||
.table {
|
||||
border-collapse: collapse !important;
|
||||
}
|
||||
.table td,
|
||||
.table th {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
.table-bordered th,
|
||||
.table-bordered td {
|
||||
border: 1px solid #dee2e6 !important;
|
||||
}
|
||||
.table-dark {
|
||||
color: inherit;
|
||||
}
|
||||
.table-dark th,
|
||||
.table-dark td,
|
||||
.table-dark thead th,
|
||||
.table-dark tbody + tbody {
|
||||
border-color: #dee2e6;
|
||||
}
|
||||
}*/
|
|
@ -1,32 +0,0 @@
|
|||
@font-face {
|
||||
font-family: 'Montserrat';
|
||||
src: url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');
|
||||
}
|
||||
|
||||
/* printer classes */
|
||||
@media print {
|
||||
html, body {
|
||||
height: 290mm;
|
||||
width: 210mm;
|
||||
-webkit-print-color-adjust: exact;
|
||||
color-adjust: exact;
|
||||
}
|
||||
.content {
|
||||
padding: 0;
|
||||
}
|
||||
.page-break {
|
||||
page-break-before: always;
|
||||
}
|
||||
.report-page {
|
||||
font-size: 10px;
|
||||
border: initial;
|
||||
border-radius: initial;
|
||||
box-shadow: initial;
|
||||
margin: 0;
|
||||
min-height: initial;
|
||||
page-break-after: always;
|
||||
width: initial;
|
||||
-webkit-print-color-adjust: exact;
|
||||
color-adjust: exact;
|
||||
}
|
||||
}
|
|
@ -5,9 +5,11 @@
|
|||
<title>Inno Web CRM</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<!-- <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />-->
|
||||
<!-- <meta http-equiv="Pragma" content="no-cache" />-->
|
||||
<!-- <meta http-equiv="Expires" content="3600" />-->
|
||||
<!--
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="3600" />
|
||||
-->
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
|
||||
|
@ -19,7 +21,7 @@
|
|||
<link href="css/app.css" rel="stylesheet" />
|
||||
<link href="Wonky.Client.styles.css" rel="stylesheet" />
|
||||
<link href="_content/Blazored.Toast/blazored-toast.min.css" rel="stylesheet" />
|
||||
<link href="css/report-print.css" rel="stylesheet" />
|
||||
<link href="css/report-print-10.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
|
|
|
@ -14,6 +14,11 @@ public class ReportItemView
|
|||
/// Closed sale
|
||||
/// </summary>
|
||||
public bool Closed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ESales number
|
||||
/// </summary>
|
||||
public string ESalesNumber { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Order amount
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in a new issue