added xml comments to objects
This commit is contained in:
parent
647e37e539
commit
9d161671a0
94 changed files with 1241 additions and 486 deletions
|
@ -20,7 +20,8 @@
|
||||||
<table class="table table-bordered d-print-table table-striped">
|
<table class="table table-bordered d-print-table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="bg-black opacity-75 text-white border-bottom">
|
<tr class="bg-black opacity-75 text-white border-bottom">
|
||||||
<th scope="col">Besøg</th>
|
<th scope="col">Kunde</th>
|
||||||
|
<th scope0="col">Bynavn</th>
|
||||||
<th scope="col">Demo</th>
|
<th scope="col">Demo</th>
|
||||||
<th scope="col">Salg</th>
|
<th scope="col">Salg</th>
|
||||||
<th scope="col">Notat</th>
|
<th scope="col">Notat</th>
|
||||||
|
@ -32,11 +33,11 @@
|
||||||
@foreach (var activity in Activities)
|
@foreach (var activity in Activities)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>@activity.Company.Name, @activity.Company.ZipCity</td>
|
<td>@activity.ViewCompany.Name, @activity.ViewCompany.ZipCity</td>
|
||||||
<td>@activity.Demo</td>
|
<td>@activity.Demo</td>
|
||||||
<td>@activity.SalesResume</td>
|
<td>@activity.SalesResume</td>
|
||||||
<td>@activity.OfficeNote</td>
|
<td>@activity.OfficeNote</td>
|
||||||
<td>@(activity.StatusTypeEnum == "Quote" ? "Tilbud" : "Salg")</td>
|
<td class="text-end">@activity.</td>
|
||||||
<td class="text-end">@(activity.Closed ? @activity.OrderAmount : 0)</td>
|
<td class="text-end">@(activity.Closed ? @activity.OrderAmount : 0)</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,5 +5,5 @@ namespace Wonky.Client.Components;
|
||||||
|
|
||||||
public partial class ActivityTableComponent
|
public partial class ActivityTableComponent
|
||||||
{
|
{
|
||||||
[Parameter] public List<NgActivityReportView> Activities { get; set; }
|
[Parameter] public List<ActivityReportView> Activities { get; set; }
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
@if (ReportList.Any())
|
@if (ReportList != null)
|
||||||
{
|
{
|
||||||
<div class="list-group list-group-flush">
|
<div class="list-group list-group-flush">
|
||||||
<div class="list-group-item px-3 bg-black text-white opacity-75">
|
<div class="list-group-item px-3 bg-black text-white opacity-75">
|
||||||
|
@ -65,9 +65,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<div class="row">
|
<div>
|
||||||
<div class="col">
|
|
||||||
Ingen data
|
Ingen data
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
}
|
}
|
|
@ -5,7 +5,12 @@ namespace Wonky.Client.Components;
|
||||||
|
|
||||||
public partial class AdminReportTableComponent
|
public partial class AdminReportTableComponent
|
||||||
{
|
{
|
||||||
[Parameter] public List<NgSalesReportListView> ReportList { get; set; } = new();
|
[Parameter] public List<NgSalesReportListView> ReportList { get; set; }
|
||||||
[Parameter] public string UserId { get; set; } = "";
|
[Parameter] public string UserId { get; set; } = "";
|
||||||
[Parameter] public string CountryCode { get; set; } = "";
|
[Parameter] public string CountryCode { get; set; } = "";
|
||||||
|
|
||||||
|
protected override void OnParametersSet()
|
||||||
|
{
|
||||||
|
base.OnParametersSet();
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -27,7 +27,9 @@ public partial class ItemGroupComponent
|
||||||
[Parameter] public EventCallback<string> OnChanged { get; set; }
|
[Parameter] public EventCallback<string> OnChanged { get; set; }
|
||||||
private Dictionary<string, string> Items { get; set; } = new();
|
private Dictionary<string, string> Items { get; set; } = new();
|
||||||
private Preferences _preferences = new();
|
private Preferences _preferences = new();
|
||||||
|
|
||||||
private string? Selection { get; set; }
|
private string? Selection { get; set; }
|
||||||
|
|
||||||
private async Task OnSelectionChanged(ChangeEventArgs e)
|
private async Task OnSelectionChanged(ChangeEventArgs e)
|
||||||
{
|
{
|
||||||
var val = e.Value.ToString();
|
var val = e.Value.ToString();
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
//
|
//
|
||||||
*@
|
*@
|
||||||
|
|
||||||
<select class="form-select" @bind-value="@Selection" @bind-value:event="oninput" @onchange="OnSelectChanged">
|
<select class="form-select" @bind-value="@_selectedItem" @bind-value:event="oninput" @onchange="OnSelectChanged">
|
||||||
<option value="-1" selected disabled>SØGNING</option>
|
<option value="-1" selected disabled>SØGNING</option>
|
||||||
<option value="name">Navn</option>
|
<option value="name">Navn</option>
|
||||||
<option value="sku">Nummer</option>
|
<option value="sku">Nummer</option>
|
||||||
|
|
|
@ -21,32 +21,63 @@ namespace Wonky.Client.Components;
|
||||||
|
|
||||||
public partial class ItemSearchComponent : IDisposable
|
public partial class ItemSearchComponent : IDisposable
|
||||||
{
|
{
|
||||||
[Inject] private ILocalStorageService LocalStorage { get; set; }
|
/// <summary>
|
||||||
[Inject] private UserPreferenceService UserPreferenceService { get; set; }
|
/// User preference service
|
||||||
|
/// </summary>
|
||||||
|
[Inject] private UserPreferenceService _preferenceService { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OnChanged event callback
|
||||||
|
/// </summary>
|
||||||
[Parameter] public EventCallback<string> OnChanged { get; set; }
|
[Parameter] public EventCallback<string> OnChanged { get; set; }
|
||||||
private Dictionary<string, string> Items { get; set; } = new();
|
|
||||||
|
/// <summary>
|
||||||
|
/// User preferences
|
||||||
|
/// </summary>
|
||||||
private Preferences _preferences = new();
|
private Preferences _preferences = new();
|
||||||
private string? Selection { get; set; }
|
|
||||||
|
/// <summary>
|
||||||
|
/// Selected item
|
||||||
|
/// </summary>
|
||||||
|
private string _selectedItem { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Component initialization
|
||||||
|
/// </summary>
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
UserPreferenceService.OnChange += ProfileServiceOnOnChange;
|
_preferenceService.OnChange += ProfileServiceOnOnChange;
|
||||||
_preferences = await UserPreferenceService.GetPreferences();
|
_preferences = await _preferenceService.GetPreferences();
|
||||||
Selection = _preferences.ItemSearch;
|
_selectedItem = _preferences.ItemSearch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OnSelectChanged event handler
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e"></param>
|
||||||
private async Task OnSelectChanged(ChangeEventArgs e)
|
private async Task OnSelectChanged(ChangeEventArgs e)
|
||||||
{
|
{
|
||||||
var val = e.Value.ToString();
|
var val = e.Value.ToString();
|
||||||
if (val == "-1") return;
|
if (val == "-1") return;
|
||||||
await OnChanged.InvokeAsync(val);
|
await OnChanged.InvokeAsync(val);
|
||||||
await UserPreferenceService.SetItemSearch(val);
|
await _preferenceService.SetItemSearch(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Preference update from profile service
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="newPreferences"></param>
|
||||||
private void ProfileServiceOnOnChange(Preferences newPreferences)
|
private void ProfileServiceOnOnChange(Preferences newPreferences)
|
||||||
{
|
{
|
||||||
_preferences = newPreferences;
|
_preferences = newPreferences;
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Component dispose
|
||||||
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
UserPreferenceService.OnChange -= ProfileServiceOnOnChange;
|
_preferenceService.OnChange -= ProfileServiceOnOnChange;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,7 +15,7 @@
|
||||||
//
|
//
|
||||||
*@
|
*@
|
||||||
|
|
||||||
<select class="form-select" @bind-value="@Selection" @bind-value:event="oninput" @onchange="OnSelectChanged">
|
<select class="form-select" @bind-value="@_selectedItem" @bind-value:event="oninput" @onchange="OnSelectChanged">
|
||||||
<option value="-1" selected disabled>SORTERING</option>
|
<option value="-1" selected disabled>SORTERING</option>
|
||||||
<option value="name">Navn</option>
|
<option value="name">Navn</option>
|
||||||
<option value="sku">Nummer</option>
|
<option value="sku">Nummer</option>
|
||||||
|
|
|
@ -21,32 +21,63 @@ namespace Wonky.Client.Components;
|
||||||
|
|
||||||
public partial class ItemSortComponent : IDisposable
|
public partial class ItemSortComponent : IDisposable
|
||||||
{
|
{
|
||||||
[Inject] private ILocalStorageService LocalStorage { get; set; }
|
/// <summary>
|
||||||
[Inject] private UserPreferenceService UserPreferenceService { get; set; }
|
/// User preference service
|
||||||
|
/// </summary>
|
||||||
|
[Inject] private UserPreferenceService _preferenceService { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OnChanged callback function
|
||||||
|
/// </summary>
|
||||||
[Parameter] public EventCallback<string> OnChanged { get; set; }
|
[Parameter] public EventCallback<string> OnChanged { get; set; }
|
||||||
private Dictionary<string, string> Items { get; set; } = new();
|
|
||||||
|
/// <summary>
|
||||||
|
/// User's preferences
|
||||||
|
/// </summary>
|
||||||
private Preferences _preferences = new();
|
private Preferences _preferences = new();
|
||||||
private string? Selection { get; set; }
|
|
||||||
|
/// <summary>
|
||||||
|
/// Item selected by user
|
||||||
|
/// </summary>
|
||||||
|
private string? _selectedItem { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Component initialization
|
||||||
|
/// </summary>
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
UserPreferenceService.OnChange += ProfileServiceOnOnChange;
|
_preferenceService.OnChange += ProfileServiceOnOnChange;
|
||||||
_preferences = await UserPreferenceService.GetPreferences();
|
_preferences = await _preferenceService.GetPreferences();
|
||||||
Selection = _preferences.ItemSort;
|
_selectedItem = _preferences.ItemSort;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OnSelectChanged trigger
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e"></param>
|
||||||
private async Task OnSelectChanged(ChangeEventArgs e)
|
private async Task OnSelectChanged(ChangeEventArgs e)
|
||||||
{
|
{
|
||||||
var val = e.Value.ToString();
|
var val = e.Value.ToString();
|
||||||
if (val == "-1") return;
|
if (val == "-1") return;
|
||||||
await OnChanged.InvokeAsync(val);
|
await OnChanged.InvokeAsync(val);
|
||||||
await UserPreferenceService.SetItemSort(val);
|
await _preferenceService.SetItemSort(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get updated settings from preference service
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="newPreferences"></param>
|
||||||
private void ProfileServiceOnOnChange(Preferences newPreferences)
|
private void ProfileServiceOnOnChange(Preferences newPreferences)
|
||||||
{
|
{
|
||||||
_preferences = newPreferences;
|
_preferences = newPreferences;
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Component dispose
|
||||||
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
UserPreferenceService.OnChange -= ProfileServiceOnOnChange;
|
_preferenceService.OnChange -= ProfileServiceOnOnChange;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -23,7 +23,7 @@ namespace Wonky.Client.Components;
|
||||||
|
|
||||||
public partial class ItemTableComponent
|
public partial class ItemTableComponent
|
||||||
{
|
{
|
||||||
[Parameter] public List<NgSalesItemView> SalesItems { get; set; } = new();
|
[Parameter] public List<SalesItemView> SalesItems { get; set; } = new();
|
||||||
[Inject] private IToastService ToastService { get; set; }
|
[Inject] private IToastService ToastService { get; set; }
|
||||||
private void AddToDraft()
|
private void AddToDraft()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.Components;
|
namespace Wonky.Client.Components;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.Components;
|
namespace Wonky.Client.Components;
|
||||||
|
|
||||||
|
|
84
Wonky.Client/Components/ReportActivityLedgerComponent.razor
Normal file
84
Wonky.Client/Components/ReportActivityLedgerComponent.razor
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
@*
|
||||||
|
// 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]
|
||||||
|
//
|
||||||
|
*@
|
||||||
|
|
||||||
|
<table class="table table-bordered table-striped d-print-table">
|
||||||
|
<thead>
|
||||||
|
<tr class="bg-dark text-white opacity-75 border-bottom">
|
||||||
|
<th></th>
|
||||||
|
<th class="text-center" colspan="2" scope="col">Dagens Demo @(Report.NewDemoCount + Report.RecallDemoCount)</th>
|
||||||
|
<th class="text-center border-end" colspan="2" scope="col">Dagens Resultat</th>
|
||||||
|
<th class="text-center" colspan="4" scope="col">Måneds Resultat</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr class="bg-dark bg-opacity-50 border-bottom">
|
||||||
|
<td></td>
|
||||||
|
<th class="text-end text-white" scope="col">Besøg</th>
|
||||||
|
<th class="text-end text-white" scope="col">Demo</th>
|
||||||
|
<th class="text-end text-white" scope="col">Salg</th>
|
||||||
|
<th class="text-end text-white border-end" scope="col">Beløb</th>
|
||||||
|
<th class="text-end text-white" scope="col">Besøg</th>
|
||||||
|
<th class="text-end text-white" scope="col">Demo</th>
|
||||||
|
<th class="text-end text-white" scope="col">Salg</th>
|
||||||
|
<th class="text-end text-white" scope="col">Beløb</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">N</th>
|
||||||
|
<td class="text-end">@Report.NewVisitCount</td>
|
||||||
|
<td class="text-end">@Report.NewDemoCount</td>
|
||||||
|
<td class="text-end">@Report.NewSaleCount</td>
|
||||||
|
<td class="text-end border-end">@Report.NewTurnover</td>
|
||||||
|
<td class="text-end">@Report.NewVisitCountMonth</td>
|
||||||
|
<td class="text-end">@Report.NewDemoCountMonth</td>
|
||||||
|
<td class="text-end">@Report.NewSaleCountMonth</td>
|
||||||
|
<td class="text-end">@Report.NewTurnoverMonth</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">R</th>
|
||||||
|
<td class="text-end">@Report.RecallVisitCount</td>
|
||||||
|
<td class="text-end">@Report.RecallDemoCount</td>
|
||||||
|
<td class="text-end">@Report.RecallSaleCount</td>
|
||||||
|
<td class="text-end border-end">@Report.RecallTurnover</td>
|
||||||
|
<td class="text-end">@Report.RecallVisitCountMonth</td>
|
||||||
|
<td class="text-end">@Report.RecallDemoCountMonth</td>
|
||||||
|
<td class="text-end">@Report.RecallSaleCountMonth</td>
|
||||||
|
<td class="text-end">@Report.RecallTurnoverMonth</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">SAS</th>
|
||||||
|
<td class="bg-light"></td>
|
||||||
|
<td class="bg-light"></td>
|
||||||
|
<td class="text-end">@Report.SasCount</td>
|
||||||
|
<td class="text-end border-end">@Report.SasTurnover</td>
|
||||||
|
<td class="bg-light"></td>
|
||||||
|
<td class="bg-light"></td>
|
||||||
|
<td class="text-end">@Report.SasCountMonth</td>
|
||||||
|
<td class="text-end">@Report.SasTurnoverMonth</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">TOTAL</th>
|
||||||
|
<td class="text-end">@Report.TotalVisitCount</td>
|
||||||
|
<td class="text-end">@Report.TotalDemoCount</td>
|
||||||
|
<td class="text-end">@Report.TotalSaleCount</td>
|
||||||
|
<td class="text-end border-end">@Report.TotalTurnover</td>
|
||||||
|
<td class="text-end">@Report.TotalVisitCountMonth</td>
|
||||||
|
<td class="text-end">@Report.TotalDemoCountMonth</td>
|
||||||
|
<td class="text-end">@Report.TotalSaleCountMonth</td>
|
||||||
|
<td class="text-end">@Report.TotalTurnoverMonth</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
|
@ -0,0 +1,10 @@
|
||||||
|
using Wonky.Entity.Views;
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
||||||
|
namespace Wonky.Client.Components;
|
||||||
|
|
||||||
|
public partial class ReportActivityLedgerComponent
|
||||||
|
{
|
||||||
|
[Parameter]
|
||||||
|
public NgSalesReport Report { get; set; }
|
||||||
|
}
|
51
Wonky.Client/Components/ReportDistanceLedgerComponent.razor
Normal file
51
Wonky.Client/Components/ReportDistanceLedgerComponent.razor
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
@*
|
||||||
|
// 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]
|
||||||
|
//
|
||||||
|
*@
|
||||||
|
|
||||||
|
<table class="table table-bordered table-striped d-print-table">
|
||||||
|
<thead>
|
||||||
|
<tr class="bg-dark text-white opacity-75 border-bottom-0">
|
||||||
|
<th scope="col">
|
||||||
|
Km Aften
|
||||||
|
</th>
|
||||||
|
<th scope="col">
|
||||||
|
Km Morgen
|
||||||
|
</th>
|
||||||
|
<th scope="col">
|
||||||
|
Km Kørt Dag
|
||||||
|
</th>
|
||||||
|
<th scope="col">
|
||||||
|
Km Kørt Md.
|
||||||
|
</th>
|
||||||
|
<th scope="col">
|
||||||
|
Km Privat
|
||||||
|
</th>
|
||||||
|
<th scope="col">
|
||||||
|
Km Privat Md.
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>@Report.KmEvening</td>
|
||||||
|
<td>@Report.KmMorning</td>
|
||||||
|
<td>@Report.Distance</td>
|
||||||
|
<td>@Report.DistanceMonth</td>
|
||||||
|
<td>@Report.DistancePrivate</td>
|
||||||
|
<td>@Report.DistancePrivateMonth</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
|
@ -0,0 +1,11 @@
|
||||||
|
using Wonky.Entity.Views;
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
||||||
|
namespace Wonky.Client.Components;
|
||||||
|
|
||||||
|
public partial class ReportDistanceLedgerComponent
|
||||||
|
{
|
||||||
|
[Parameter]
|
||||||
|
public NgSalesReport Report { get; set; }
|
||||||
|
|
||||||
|
}
|
|
@ -15,108 +15,6 @@
|
||||||
//
|
//
|
||||||
*@
|
*@
|
||||||
|
|
||||||
<table class="table table-bordered table-striped d-print-table">
|
|
||||||
<thead>
|
|
||||||
<tr class="bg-dark text-white opacity-75 border-bottom">
|
|
||||||
<th></th>
|
|
||||||
<th class="text-center" colspan="2" scope="col">Dagens Demo @(Report.NewDemoCount + Report.RecallDemoCount)</th>
|
|
||||||
<th class="text-center border-end" colspan="2" scope="col">Dagens Resultat</th>
|
|
||||||
<th class="text-center" colspan="4" scope="col">Måneds Resultat</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr class="bg-dark bg-opacity-50 border-bottom">
|
|
||||||
<td></td>
|
|
||||||
<th class="text-end text-white" scope="col">Besøg</th>
|
|
||||||
<th class="text-end text-white" scope="col">Demo</th>
|
|
||||||
<th class="text-end text-white" scope="col">Salg</th>
|
|
||||||
<th class="text-end text-white border-end" scope="col">Beløb</th>
|
|
||||||
<th class="text-end text-white" scope="col">Besøg</th>
|
|
||||||
<th class="text-end text-white" scope="col">Demo</th>
|
|
||||||
<th class="text-end text-white" scope="col">Salg</th>
|
|
||||||
<th class="text-end text-white" scope="col">Beløb</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">N</th>
|
|
||||||
<td class="text-end">@Report.NewVisitCount</td>
|
|
||||||
<td class="text-end">@Report.NewDemoCount</td>
|
|
||||||
<td class="text-end">@Report.NewSaleCount</td>
|
|
||||||
<td class="text-end border-end">@Report.NewTurnover</td>
|
|
||||||
<td class="text-end">@Report.NewVisitCountMonth</td>
|
|
||||||
<td class="text-end">@Report.NewDemoCountMonth</td>
|
|
||||||
<td class="text-end">@Report.NewSaleCountMonth</td>
|
|
||||||
<td class="text-end">@Report.NewTurnoverMonth</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">R</th>
|
|
||||||
<td class="text-end">@Report.RecallVisitCount</td>
|
|
||||||
<td class="text-end">@Report.RecallDemoCount</td>
|
|
||||||
<td class="text-end">@Report.RecallSaleCount</td>
|
|
||||||
<td class="text-end border-end">@Report.RecallTurnover</td>
|
|
||||||
<td class="text-end">@Report.RecallVisitCountMonth</td>
|
|
||||||
<td class="text-end">@Report.RecallDemoCountMonth</td>
|
|
||||||
<td class="text-end">@Report.RecallSaleCountMonth</td>
|
|
||||||
<td class="text-end">@Report.RecallTurnoverMonth</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">SAS</th>
|
|
||||||
<td class="bg-light"></td>
|
|
||||||
<td class="bg-light"></td>
|
|
||||||
<td class="text-end">@Report.SasCount</td>
|
|
||||||
<td class="text-end border-end">@Report.SasTurnover</td>
|
|
||||||
<td class="bg-light"></td>
|
|
||||||
<td class="bg-light"></td>
|
|
||||||
<td class="text-end">@Report.SasCountMonth</td>
|
|
||||||
<td class="text-end">@Report.SasTurnoverMonth</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">TOTAL</th>
|
|
||||||
<td class="text-end">@Report.TotalVisitCount</td>
|
|
||||||
<td class="text-end">@Report.TotalDemoCount</td>
|
|
||||||
<td class="text-end">@Report.TotalSaleCount</td>
|
|
||||||
<td class="text-end border-end">@Report.TotalTurnover</td>
|
|
||||||
<td class="text-end">@Report.TotalVisitCountMonth</td>
|
|
||||||
<td class="text-end">@Report.TotalDemoCountMonth</td>
|
|
||||||
<td class="text-end">@Report.TotalSaleCountMonth</td>
|
|
||||||
<td class="text-end">@Report.TotalTurnoverMonth</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<table class="table table-bordered table-striped d-print-table">
|
|
||||||
<thead>
|
|
||||||
<tr class="bg-dark text-white opacity-75 border-bottom-0">
|
|
||||||
<th scope="col">
|
|
||||||
Km Aften
|
|
||||||
</th>
|
|
||||||
<th scope="col">
|
|
||||||
Km Morgen
|
|
||||||
</th>
|
|
||||||
<th scope="col">
|
|
||||||
Km Kørt Dag
|
|
||||||
</th>
|
|
||||||
<th scope="col">
|
|
||||||
Km Kørt Md.
|
|
||||||
</th>
|
|
||||||
<th scope="col">
|
|
||||||
Km Privat
|
|
||||||
</th>
|
|
||||||
<th scope="col">
|
|
||||||
Km Privat Md.
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>@Report.KmEvening</td>
|
|
||||||
<td>@Report.KmMorning</td>
|
|
||||||
<td>@Report.Distance</td>
|
|
||||||
<td>@Report.DistanceMonth</td>
|
|
||||||
<td>@Report.DistancePrivate</td>
|
|
||||||
<td>@Report.DistancePrivateMonth</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<table class="table table-bordered table-striped d-print-table">
|
<table class="table table-bordered table-striped d-print-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="bg-black text-white opacity-75 border-bottom">
|
<tr class="bg-black text-white opacity-75 border-bottom">
|
||||||
|
@ -131,3 +29,4 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
|
using Microsoft.VisualBasic;
|
||||||
using Timer = System.Timers.Timer;
|
using Timer = System.Timers.Timer;
|
||||||
|
|
||||||
namespace Wonky.Client.Components
|
namespace Wonky.Client.Components
|
||||||
|
@ -24,7 +25,7 @@ namespace Wonky.Client.Components
|
||||||
private Timer _timer = new();
|
private Timer _timer = new();
|
||||||
private string SearchTerm { get; set; } = "";
|
private string SearchTerm { get; set; } = "";
|
||||||
[Parameter] public EventCallback<string> OnChanged { get; set; }
|
[Parameter] public EventCallback<string> OnChanged { get; set; }
|
||||||
[Parameter] public string SavedSearch { get; set; } = "";
|
[Parameter] public string SavedSearch { get; set; } = string.Empty;
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
protected override void OnParametersSet()
|
||||||
{
|
{
|
||||||
|
@ -40,8 +41,8 @@ namespace Wonky.Client.Components
|
||||||
|
|
||||||
private void ClearSearch()
|
private void ClearSearch()
|
||||||
{
|
{
|
||||||
SavedSearch = "";
|
SavedSearch = string.Empty;
|
||||||
SearchTerm = "";
|
SearchTerm = string.Empty;
|
||||||
OnChanged.InvokeAsync(SearchTerm);
|
OnChanged.InvokeAsync(SearchTerm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
@using Wonky.Client.Services
|
@using Wonky.Client.Services
|
||||||
|
|
||||||
<input type="date" class="form-control"
|
<input type="date" class="form-control"
|
||||||
@bind-Value="_selectedDate" @bind-Value:event="oninput" @onchange="OnDateChanged" />
|
@bind-Value="SelectedDate" @bind-Value:event="oninput" @onchange="OnDateChanged" />
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
using System.Globalization;
|
||||||
using Blazored.LocalStorage;
|
using Blazored.LocalStorage;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Client.Services;
|
using Wonky.Client.Services;
|
||||||
|
@ -6,23 +7,42 @@ namespace Wonky.Client.Components;
|
||||||
|
|
||||||
public partial class WorkDateComponent : IDisposable
|
public partial class WorkDateComponent : IDisposable
|
||||||
{
|
{
|
||||||
[Inject] private ILocalStorageService LocalStorage { get; set; }
|
/// <summary>
|
||||||
|
/// User preference service
|
||||||
|
/// </summary>
|
||||||
[Inject] private UserPreferenceService UserPrefs { get; set; }
|
[Inject] private UserPreferenceService UserPrefs { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OnChanged callback function
|
||||||
|
/// </summary>
|
||||||
[Parameter] public EventCallback<string> OnChanged { get; set; }
|
[Parameter] public EventCallback<string> OnChanged { get; set; }
|
||||||
|
|
||||||
private Preferences _prefs = new();
|
/// <summary>
|
||||||
private string _selectedDate = $"{DateOnly.FromDateTime(DateTime.Now):yyyy-MM-dd}";
|
/// Selected data
|
||||||
|
/// </summary>
|
||||||
|
[Parameter] public string SelectedDate { get; set; } = $"{DateOnly.FromDateTime(DateTime.Now):yyyy-MM-dd}";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// user preferences
|
||||||
|
/// </summary>
|
||||||
|
private Preferences _prefs = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Component Initialization
|
||||||
|
/// </summary>
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
UserPrefs.OnChange += ProfileServiceOnOnChange;
|
UserPrefs.OnChange += ProfileServiceOnOnChange;
|
||||||
_prefs = await UserPrefs.GetPreferences();
|
_prefs = await UserPrefs.GetPreferences();
|
||||||
|
|
||||||
_selectedDate = string.IsNullOrWhiteSpace(_prefs.WorkDate)
|
if (!string.IsNullOrWhiteSpace(_prefs.WorkDate))
|
||||||
? $"{DateOnly.FromDateTime(DateTime.Now):yyyy-MM-dd}"
|
SelectedDate = _prefs.WorkDate;
|
||||||
: _prefs.WorkDate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OnDateChanged function call to invoke the event callback
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e"></param>
|
||||||
private async Task OnDateChanged(ChangeEventArgs e)
|
private async Task OnDateChanged(ChangeEventArgs e)
|
||||||
{
|
{
|
||||||
var val = $"{DateOnly.Parse(e.Value?.ToString()!):yyyy-MM-dd}";
|
var val = $"{DateOnly.Parse(e.Value?.ToString()!):yyyy-MM-dd}";
|
||||||
|
@ -30,12 +50,19 @@ public partial class WorkDateComponent : IDisposable
|
||||||
await OnChanged.InvokeAsync(val);
|
await OnChanged.InvokeAsync(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="newPreferences"></param>
|
||||||
private void ProfileServiceOnOnChange(Preferences newPreferences)
|
private void ProfileServiceOnOnChange(Preferences newPreferences)
|
||||||
{
|
{
|
||||||
_prefs = newPreferences;
|
_prefs = newPreferences;
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Component dispose
|
||||||
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
UserPrefs.OnChange -= ProfileServiceOnOnChange;
|
UserPrefs.OnChange -= ProfileServiceOnOnChange;
|
||||||
|
|
|
@ -54,46 +54,22 @@ public class ActivityHttpRepository : IActivityHttpRepository
|
||||||
_apiConfig = configuration.Value;
|
_apiConfig = configuration.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<NgActivityListReportView> GetActivities(string activityDate)
|
public async Task<ActivityListReportView> GetActivities(string activityDate)
|
||||||
{
|
{
|
||||||
var response = await _client
|
var response = await _client
|
||||||
.GetAsync($"{_apiConfig.ActivityUri}/date/{activityDate}");
|
.GetAsync($"{_apiConfig.ActivityUri}/date/{activityDate}");
|
||||||
var content = await response.Content.ReadAsStringAsync();
|
var content = await response.Content.ReadAsStringAsync();
|
||||||
return string.IsNullOrWhiteSpace(content)
|
return string.IsNullOrWhiteSpace(content)
|
||||||
? new NgActivityListReportView()
|
? new ActivityListReportView()
|
||||||
: JsonSerializer.Deserialize<NgActivityListReportView>(content, _options);
|
: JsonSerializer.Deserialize<ActivityListReportView>(content, _options);
|
||||||
}
|
|
||||||
public async Task<PagingResponse<ActivityDto>> GetActivityPaged(ActivityPagingParams pagingParameters)
|
|
||||||
{
|
|
||||||
var queryString = new Dictionary<string, string>
|
|
||||||
{
|
|
||||||
["pageNumber"] = pagingParameters.PageNumber.ToString(),
|
|
||||||
["pageSize"] = pagingParameters.PageSize.ToString(),
|
|
||||||
["orderBy"] = pagingParameters.OrderBy,
|
|
||||||
["searchColumn"] = pagingParameters.SearchColumn,
|
|
||||||
["searchTerm"] = pagingParameters.SearchTerm,
|
|
||||||
};
|
|
||||||
var response = await _client
|
|
||||||
.GetAsync(QueryHelpers.AddQueryString($"{_apiConfig.ActivityUri}/page", queryString));
|
|
||||||
var content = await response.Content.ReadAsStringAsync();
|
|
||||||
if (!response.IsSuccessStatusCode)
|
|
||||||
_logger.LogInformation("GetActivityPages => {content}", content);
|
|
||||||
|
|
||||||
var pagingResponse = new PagingResponse<ActivityDto>
|
|
||||||
{
|
|
||||||
Items = JsonSerializer.Deserialize<List<ActivityDto>>(content, _options),
|
|
||||||
MetaData = JsonSerializer.Deserialize<MetaData>(
|
|
||||||
response.Headers.GetValues("X-Pagination").First(), _options)
|
|
||||||
};
|
|
||||||
return pagingResponse;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<ApiResponse> CreateActivity(ActivityDto model)
|
public async Task<ApiResponseView> CreateActivity(ActivityDto model)
|
||||||
{
|
{
|
||||||
Console.WriteLine(JsonSerializer.Serialize(model, _options));
|
Console.WriteLine(JsonSerializer.Serialize(model, _options));
|
||||||
var response = await _client.PostAsJsonAsync($"{_apiConfig.ActivityUri}", model, _options);
|
var response = await _client.PostAsJsonAsync($"{_apiConfig.ActivityUri}", model, _options);
|
||||||
var content = await response.Content.ReadAsStringAsync();
|
var content = await response.Content.ReadAsStringAsync();
|
||||||
var result = JsonSerializer.Deserialize<ApiResponse>(content);
|
var result = JsonSerializer.Deserialize<ApiResponseView>(content);
|
||||||
return result!;
|
return result!;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,12 +80,12 @@ public class ActivityHttpRepository : IActivityHttpRepository
|
||||||
return salesItem ?? new ActivityDto();
|
return salesItem ?? new ActivityDto();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<ApiResponse> AcceptOffer(string id)
|
public async Task<ApiResponseView> AcceptOffer(string id)
|
||||||
{
|
{
|
||||||
var response = await _client.PostAsJsonAsync($"{_apiConfig.ActivityUri}/{id}/accept", id)
|
var response = await _client.PostAsJsonAsync($"{_apiConfig.ActivityUri}/{id}/accept", id)
|
||||||
;
|
;
|
||||||
var content = await response.Content.ReadAsStringAsync();
|
var content = await response.Content.ReadAsStringAsync();
|
||||||
var result = JsonSerializer.Deserialize<ApiResponse>(content);
|
var result = JsonSerializer.Deserialize<ApiResponseView>(content);
|
||||||
return result!;
|
return result!;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -24,9 +24,8 @@ namespace Wonky.Client.HttpRepository;
|
||||||
|
|
||||||
public interface IActivityHttpRepository
|
public interface IActivityHttpRepository
|
||||||
{
|
{
|
||||||
Task<PagingResponse<ActivityDto>> GetActivityPaged(ActivityPagingParams pagingParameters);
|
|
||||||
Task<ActivityDto> GetActivity(string id);
|
Task<ActivityDto> GetActivity(string id);
|
||||||
Task<ApiResponse> CreateActivity(ActivityDto model);
|
Task<ApiResponseView> CreateActivity(ActivityDto model);
|
||||||
Task<ApiResponse> AcceptOffer(string id);
|
Task<ApiResponseView> AcceptOffer(string id);
|
||||||
Task<NgActivityListReportView> GetActivities(string activityDate);
|
Task<ActivityListReportView> GetActivities(string activityDate);
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
using Wonky.Client.Pages;
|
using Wonky.Client.Pages;
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.HttpRepository;
|
namespace Wonky.Client.HttpRepository;
|
||||||
|
|
||||||
|
|
|
@ -10,5 +10,5 @@ public interface IReportHttpRepository
|
||||||
Task<List<NgSalesReportListView>> GetReports();
|
Task<List<NgSalesReportListView>> GetReports();
|
||||||
Task<NgSalesReportView> GetReport(string workDate);
|
Task<NgSalesReportView> GetReport(string workDate);
|
||||||
Task<ReportInitDto> InitializeReportData(string workDate);
|
Task<ReportInitDto> InitializeReportData(string workDate);
|
||||||
Task<ApiResponse> PostReport(string workDate, ReportDto reportDto);
|
Task<ApiResponseView> PostReport(string workDate, ReportDto reportDto);
|
||||||
}
|
}
|
|
@ -23,6 +23,6 @@ namespace Wonky.Client.HttpRepository;
|
||||||
|
|
||||||
public interface ISalesItemHttpRepository
|
public interface ISalesItemHttpRepository
|
||||||
{
|
{
|
||||||
Task<PagingResponse<NgSalesItemView>> GetSalesItemsPaged(CatalogPagingParams pagingParameters);
|
Task<PagingResponse<SalesItemView>> GetSalesItemsPaged(CatalogPagingParams pagingParameters);
|
||||||
Task<NgSalesItemView> GetSalesItem(string id);
|
Task<SalesItemView> GetSalesItem(string id);
|
||||||
}
|
}
|
|
@ -1,14 +1,15 @@
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.HttpRepository;
|
namespace Wonky.Client.HttpRepository;
|
||||||
|
|
||||||
public interface IUserHttpRepository
|
public interface IUserHttpRepository
|
||||||
{
|
{
|
||||||
Task<List<UserListAdminView>> GetAdvisers();
|
Task<List<UserListAdminView>> GetAdvisers();
|
||||||
Task<UserInfoAdminView> GetAdviserInfo(string userId);
|
Task<AdminUserInfoDto> GetAdviserInfo(string userId);
|
||||||
Task UpdateAdviser(string userId, UserUpdateDto model);
|
Task UpdateAdviser(string userId, UserUpdateDto model);
|
||||||
Task<List<UserListAdminView>> GetAdminUsers();
|
Task<List<UserListAdminView>> GetAdminUsers();
|
||||||
Task<UserInfoAdminView> GetAdminUserInfo(string userId);
|
Task<AdminUserInfoDto> GetAdminUserInfo(string userId);
|
||||||
Task UpdateAdminUser(string userId, UserUpdateDto model);
|
Task UpdateAdminUser(string userId, UserUpdateDto model);
|
||||||
Task ResetUserPassword(string userId, string newPasswd, string confirmPasswd);
|
Task ResetUserPassword(string userId, string newPasswd, string confirmPasswd);
|
||||||
}
|
}
|
|
@ -54,14 +54,14 @@ public class ReportHttpRepository :IReportHttpRepository
|
||||||
return initData ?? new ReportInitDto();
|
return initData ?? new ReportInitDto();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<ApiResponse> PostReport(string workDate, ReportDto reportDto)
|
public async Task<ApiResponseView> PostReport(string workDate, ReportDto reportDto)
|
||||||
{
|
{
|
||||||
var response = await _client
|
var response = await _client
|
||||||
.PostAsJsonAsync($"{_apiConfig.ReportUri}/{workDate}", reportDto, _options);
|
.PostAsJsonAsync($"{_apiConfig.ReportUri}/{workDate}", reportDto, _options);
|
||||||
|
|
||||||
var jsonDate = await response.Content.ReadAsStringAsync();
|
var jsonDate = await response.Content.ReadAsStringAsync();
|
||||||
var result = JsonSerializer.Deserialize<ApiResponse>(jsonDate);
|
var result = JsonSerializer.Deserialize<ApiResponseView>(jsonDate);
|
||||||
return new ApiResponse
|
return new ApiResponseView
|
||||||
{
|
{
|
||||||
Code = result.Code,
|
Code = result.Code,
|
||||||
Id = result.Id,
|
Id = result.Id,
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class SalesItemHttpRepository : ISalesItemHttpRepository
|
||||||
_apiConfig = configuration.Value;
|
_apiConfig = configuration.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<PagingResponse<NgSalesItemView>> GetSalesItemsPaged(CatalogPagingParams pagingParameters)
|
public async Task<PagingResponse<SalesItemView>> GetSalesItemsPaged(CatalogPagingParams pagingParameters)
|
||||||
{
|
{
|
||||||
var queryString = new Dictionary<string, string>
|
var queryString = new Dictionary<string, string>
|
||||||
{
|
{
|
||||||
|
@ -68,19 +68,19 @@ public class SalesItemHttpRepository : ISalesItemHttpRepository
|
||||||
|
|
||||||
var content = await response.Content.ReadAsStringAsync();
|
var content = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
var pagingResponse = new PagingResponse<NgSalesItemView>
|
var pagingResponse = new PagingResponse<SalesItemView>
|
||||||
{
|
{
|
||||||
Items = JsonSerializer.Deserialize<List<NgSalesItemView>>(content, _options),
|
Items = JsonSerializer.Deserialize<List<SalesItemView>>(content, _options),
|
||||||
MetaData = JsonSerializer.Deserialize<MetaData>(
|
MetaData = JsonSerializer.Deserialize<MetaData>(
|
||||||
response.Headers.GetValues("X-Pagination").First(), _options)
|
response.Headers.GetValues("X-Pagination").First(), _options)
|
||||||
};
|
};
|
||||||
return pagingResponse;
|
return pagingResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<NgSalesItemView> GetSalesItem(string id)
|
public async Task<SalesItemView> GetSalesItem(string id)
|
||||||
{
|
{
|
||||||
var salesItem = await _client
|
var salesItem = await _client
|
||||||
.GetFromJsonAsync<NgSalesItemView>($"{_apiConfig.CatalogUri}/{id}");
|
.GetFromJsonAsync<SalesItemView>($"{_apiConfig.CatalogUri}/{id}");
|
||||||
return salesItem ?? new NgSalesItemView();
|
return salesItem ?? new SalesItemView();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -36,9 +36,9 @@ public class UserHttpRepository : IUserHttpRepository
|
||||||
return await _client.GetFromJsonAsync<List<UserListAdminView>>(_api.AdminAdviserUri);
|
return await _client.GetFromJsonAsync<List<UserListAdminView>>(_api.AdminAdviserUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<UserInfoAdminView> GetAdviserInfo(string userId)
|
public async Task<AdminUserInfoDto> GetAdviserInfo(string userId)
|
||||||
{
|
{
|
||||||
return await _client.GetFromJsonAsync<UserInfoAdminView>($"{_api.AdminAdviserUri}/{userId}");
|
return await _client.GetFromJsonAsync<AdminUserInfoDto>($"{_api.AdminAdviserUri}/{userId}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task UpdateAdviser(string userId, UserUpdateDto model)
|
public async Task UpdateAdviser(string userId, UserUpdateDto model)
|
||||||
|
@ -51,9 +51,9 @@ public class UserHttpRepository : IUserHttpRepository
|
||||||
return await _client.GetFromJsonAsync<List<UserListAdminView>>(_api.AdminUserUri);
|
return await _client.GetFromJsonAsync<List<UserListAdminView>>(_api.AdminUserUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<UserInfoAdminView> GetAdminUserInfo(string userId)
|
public async Task<AdminUserInfoDto> GetAdminUserInfo(string userId)
|
||||||
{
|
{
|
||||||
return await _client.GetFromJsonAsync<UserInfoAdminView>($"{_api.AdminUserUri}/{userId}");
|
return await _client.GetFromJsonAsync<AdminUserInfoDto>($"{_api.AdminUserUri}/{userId}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task UpdateAdminUser(string userId, UserUpdateDto model)
|
public async Task UpdateAdminUser(string userId, UserUpdateDto model)
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Wonky.Client.Models;
|
||||||
public class DraftItem
|
public class DraftItem
|
||||||
{
|
{
|
||||||
public int Quantity { get; set; }
|
public int Quantity { get; set; }
|
||||||
public NgSalesItemView Item { get; set; }
|
public SalesItemView Item { get; set; }
|
||||||
public decimal Price { get; set; }
|
public decimal Price { get; set; }
|
||||||
public decimal Discount { get; set; }
|
public decimal Discount { get; set; }
|
||||||
public bool Sas { get; set; }
|
public bool Sas { get; set; }
|
||||||
|
|
|
@ -17,7 +17,7 @@ public partial class ActivityToday
|
||||||
[Inject] private IActivityHttpRepository _activityRepo { get; set; }
|
[Inject] private IActivityHttpRepository _activityRepo { get; set; }
|
||||||
[Inject] private IReportHttpRepository _reportRepo { get; set; }
|
[Inject] private IReportHttpRepository _reportRepo { get; set; }
|
||||||
[Inject] private IToastService _toast { get; set; }
|
[Inject] private IToastService _toast { get; set; }
|
||||||
private NgActivityListReportView ReportView { get; set; } = new();
|
private ActivityListReportView ReportView { get; set; } = new();
|
||||||
private Preferences _prefs { get; set; } = new();
|
private Preferences _prefs { get; set; } = new();
|
||||||
private string _workDate { get; set; } = $"{DateTime.Now:yyyy-MM-dd}";
|
private string _workDate { get; set; } = $"{DateTime.Now:yyyy-MM-dd}";
|
||||||
private bool _reportExist = false;
|
private bool _reportExist = false;
|
||||||
|
@ -38,7 +38,7 @@ public partial class ActivityToday
|
||||||
{
|
{
|
||||||
_toast.ShowInfo("Vent nogle sekunder for data");
|
_toast.ShowInfo("Vent nogle sekunder for data");
|
||||||
_workDate = workDate;
|
_workDate = workDate;
|
||||||
ReportView = new NgActivityListReportView();
|
ReportView = new ActivityListReportView();
|
||||||
ReportView = await _activityRepo.GetActivities(workDate);
|
ReportView = await _activityRepo.GetActivities(workDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,8 @@ public partial class ActivityVisitNew : IDisposable
|
||||||
[Inject] private IReportHttpRepository _reportRepo { get; set; }
|
[Inject] private IReportHttpRepository _reportRepo { get; set; }
|
||||||
// variables
|
// variables
|
||||||
private readonly JsonSerializerOptions? _options = new JsonSerializerOptions{PropertyNameCaseInsensitive = true};
|
private readonly JsonSerializerOptions? _options = new JsonSerializerOptions{PropertyNameCaseInsensitive = true};
|
||||||
private NgSalesItemView _selectedItem { get; set; } = new();
|
private SalesItemView _selectedItem { get; set; } = new();
|
||||||
private List<NgSalesItemView> _caltalog { get; set; } = new();
|
private List<SalesItemView> _caltalog { get; set; } = new();
|
||||||
private MetaData _metaData { get; set; } = new();
|
private MetaData _metaData { get; set; } = new();
|
||||||
private Preferences _prefs { get; set; } = new();
|
private Preferences _prefs { get; set; } = new();
|
||||||
private ActivityDto _draft { get; set; } = new();
|
private ActivityDto _draft { get; set; } = new();
|
||||||
|
@ -199,13 +199,13 @@ public partial class ActivityVisitNew : IDisposable
|
||||||
Quantity = quantity;
|
Quantity = quantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task AddItem(NgSalesItemView ngSalesItem)
|
private async Task AddItem(SalesItemView salesItem)
|
||||||
{
|
{
|
||||||
ShowItem = false;
|
ShowItem = false;
|
||||||
// create a new cart item
|
// create a new cart item
|
||||||
var item = new DraftItem
|
var item = new DraftItem
|
||||||
{
|
{
|
||||||
Item = ngSalesItem,
|
Item = salesItem,
|
||||||
Quantity = Convert.ToInt32(Quantity),
|
Quantity = Convert.ToInt32(Quantity),
|
||||||
Price = Convert.ToDecimal(Price, CultureInfo.InvariantCulture),
|
Price = Convert.ToDecimal(Price, CultureInfo.InvariantCulture),
|
||||||
Discount = Convert.ToDecimal(Discount, CultureInfo.InvariantCulture),
|
Discount = Convert.ToDecimal(Discount, CultureInfo.InvariantCulture),
|
||||||
|
@ -230,14 +230,14 @@ public partial class ActivityVisitNew : IDisposable
|
||||||
}
|
}
|
||||||
private async Task SetItemGroup(string groupFilter)
|
private async Task SetItemGroup(string groupFilter)
|
||||||
{
|
{
|
||||||
_caltalog = new List<NgSalesItemView>();
|
_caltalog = new List<SalesItemView>();
|
||||||
_paging.PageNumber = 1;
|
_paging.PageNumber = 1;
|
||||||
_paging.SelectGroup = groupFilter;
|
_paging.SelectGroup = groupFilter;
|
||||||
await GetSalesItems();
|
await GetSalesItems();
|
||||||
}
|
}
|
||||||
private async Task SetSearchCol(string columnName)
|
private async Task SetSearchCol(string columnName)
|
||||||
{
|
{
|
||||||
_caltalog = new List<NgSalesItemView>();
|
_caltalog = new List<SalesItemView>();
|
||||||
_paging.PageNumber = 1;
|
_paging.PageNumber = 1;
|
||||||
_paging.SearchTerm = "";
|
_paging.SearchTerm = "";
|
||||||
_paging.SearchColumn = columnName;
|
_paging.SearchColumn = columnName;
|
||||||
|
@ -245,27 +245,27 @@ public partial class ActivityVisitNew : IDisposable
|
||||||
}
|
}
|
||||||
private async Task SetSortCol(string orderBy)
|
private async Task SetSortCol(string orderBy)
|
||||||
{
|
{
|
||||||
_caltalog = new List<NgSalesItemView>();
|
_caltalog = new List<SalesItemView>();
|
||||||
_paging.OrderBy = orderBy;
|
_paging.OrderBy = orderBy;
|
||||||
await GetSalesItems();
|
await GetSalesItems();
|
||||||
}
|
}
|
||||||
private async Task SetSearchPhrase(string searchTerm)
|
private async Task SetSearchPhrase(string searchTerm)
|
||||||
{
|
{
|
||||||
_caltalog = new List<NgSalesItemView>();
|
_caltalog = new List<SalesItemView>();
|
||||||
_paging.PageNumber = 1;
|
_paging.PageNumber = 1;
|
||||||
_paging.SearchTerm = searchTerm;
|
_paging.SearchTerm = searchTerm;
|
||||||
await GetSalesItems();
|
await GetSalesItems();
|
||||||
}
|
}
|
||||||
private async Task SelectedPage(int page)
|
private async Task SelectedPage(int page)
|
||||||
{
|
{
|
||||||
_caltalog = new List<NgSalesItemView>();
|
_caltalog = new List<SalesItemView>();
|
||||||
_paging.PageNumber = page;
|
_paging.PageNumber = page;
|
||||||
await GetSalesItems();
|
await GetSalesItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task SetPageSize(string pageSize)
|
private async Task SetPageSize(string pageSize)
|
||||||
{
|
{
|
||||||
_caltalog = new List<NgSalesItemView>();
|
_caltalog = new List<SalesItemView>();
|
||||||
_paging.PageSize = Convert.ToInt32(pageSize);
|
_paging.PageSize = Convert.ToInt32(pageSize);
|
||||||
_paging.PageNumber = 1;
|
_paging.PageNumber = 1;
|
||||||
await GetSalesItems();
|
await GetSalesItems();
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-dark text-white">
|
<div class="card-header bg-dark text-white">
|
||||||
<div class="card-title">
|
<div class="card-title">
|
||||||
<h3>@_userInfo.FirstName @_userInfo.LastName Kunder</h3>
|
<h3>@AdminUserInfo.FirstName @AdminUserInfo.LastName Kunder</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
|
@ -21,7 +21,7 @@ public partial class AdminAdviserCompanyList : IDisposable
|
||||||
private CompanyPagingParams _paging = new();
|
private CompanyPagingParams _paging = new();
|
||||||
private Preferences _preferences { get; set; } = new();
|
private Preferences _preferences { get; set; } = new();
|
||||||
private string _savedSearch { get; set; } = "";
|
private string _savedSearch { get; set; } = "";
|
||||||
private UserInfoAdminView _userInfo { get; set; } = new();
|
private AdminUserInfoDto AdminUserInfo { get; set; } = new();
|
||||||
private List<CompanyDto> _companyList { get; set; } = new();
|
private List<CompanyDto> _companyList { get; set; } = new();
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
|
@ -39,7 +39,7 @@ public partial class AdminAdviserCompanyList : IDisposable
|
||||||
_interceptor.RegisterEvent();
|
_interceptor.RegisterEvent();
|
||||||
_interceptor.RegisterBeforeSendEvent();
|
_interceptor.RegisterBeforeSendEvent();
|
||||||
|
|
||||||
_userInfo = await _userRepo.GetAdviserInfo(UserId);
|
AdminUserInfo = await _userRepo.GetAdviserInfo(UserId);
|
||||||
// get companies
|
// get companies
|
||||||
await GetCompanies();
|
await GetCompanies();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Client.HttpInterceptors;
|
using Wonky.Client.HttpInterceptors;
|
||||||
using Wonky.Client.HttpRepository;
|
using Wonky.Client.HttpRepository;
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.Pages;
|
namespace Wonky.Client.Pages;
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-dark text-white">
|
<div class="card-header bg-dark text-white">
|
||||||
<h3>Sælger info</h3>
|
<h3>Bruger info</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@if (UserInfoAdmin != null)
|
@if (AdminUserInfo != null)
|
||||||
{
|
{
|
||||||
<EditForm EditContext="_editContext" OnValidSubmit="UpdateAdviser">
|
<EditForm EditContext="_editContext" OnValidSubmit="UpdateAdviser">
|
||||||
<DataAnnotationsValidator/>
|
<DataAnnotationsValidator/>
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
Sælgernr.
|
Sælgernr.
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
@UserInfoAdmin.Adviser
|
@AdminUserInfo.Adviser
|
||||||
</td>
|
</td>
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
Landekode
|
Landekode
|
||||||
|
|
|
@ -18,7 +18,7 @@ public partial class AdminAdviserView : IDisposable
|
||||||
[Inject] private ILogger<AdminAdviserView> _logger { get; set; }
|
[Inject] private ILogger<AdminAdviserView> _logger { get; set; }
|
||||||
[Inject] private NavigationManager _navigator { get; set; }
|
[Inject] private NavigationManager _navigator { get; set; }
|
||||||
[Inject] private IToastService _toast { get; set; }
|
[Inject] private IToastService _toast { get; set; }
|
||||||
private UserInfoAdminView UserInfoAdmin { get; set; } = new();
|
private AdminUserInfoDto AdminUserInfo { get; set; } = new();
|
||||||
private EditContext _editContext { get; set; }
|
private EditContext _editContext { get; set; }
|
||||||
private UserUpdateDto _updateInfo { get; set; } = new();
|
private UserUpdateDto _updateInfo { get; set; } = new();
|
||||||
private AdminResetPasswordDto _passwords { get; set; } = new();
|
private AdminResetPasswordDto _passwords { get; set; } = new();
|
||||||
|
@ -38,14 +38,14 @@ public partial class AdminAdviserView : IDisposable
|
||||||
_interceptor.RegisterEvent();
|
_interceptor.RegisterEvent();
|
||||||
_interceptor.RegisterBeforeSendEvent();
|
_interceptor.RegisterBeforeSendEvent();
|
||||||
|
|
||||||
UserInfoAdmin = await _userRepo.GetAdviserInfo(UserId);
|
AdminUserInfo = await _userRepo.GetAdviserInfo(UserId);
|
||||||
|
|
||||||
_updateInfo.Email = UserInfoAdmin.Email;
|
_updateInfo.Email = AdminUserInfo.Email;
|
||||||
_updateInfo.CountryCode = UserInfoAdmin.CountryCode;
|
_updateInfo.CountryCode = AdminUserInfo.CountryCode;
|
||||||
_updateInfo.FirstName = UserInfoAdmin.FirstName;
|
_updateInfo.FirstName = AdminUserInfo.FirstName;
|
||||||
_updateInfo.LastName = UserInfoAdmin.LastName;
|
_updateInfo.LastName = AdminUserInfo.LastName;
|
||||||
_updateInfo.PhoneNumber = UserInfoAdmin.PhoneNumber;
|
_updateInfo.PhoneNumber = AdminUserInfo.PhoneNumber;
|
||||||
_updateInfo.LockoutEnabled = UserInfoAdmin.LockoutEnabled;
|
_updateInfo.LockoutEnabled = AdminUserInfo.LockoutEnabled;
|
||||||
|
|
||||||
_passwdContext.OnFieldChanged += PwHandleFieldChanged;
|
_passwdContext.OnFieldChanged += PwHandleFieldChanged;
|
||||||
_passwdContext.OnValidationStateChanged += PwValidationChanged;
|
_passwdContext.OnValidationStateChanged += PwValidationChanged;
|
||||||
|
|
|
@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Client.HttpInterceptors;
|
using Wonky.Client.HttpInterceptors;
|
||||||
using Wonky.Client.HttpRepository;
|
using Wonky.Client.HttpRepository;
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.Pages;
|
namespace Wonky.Client.Pages;
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-dark text-white">
|
<div class="card-header bg-dark text-white">
|
||||||
<h3>Sælger info</h3>
|
<h3>Bruger info</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@if (UserInfoAdmin != null)
|
@if (AdminUserInfo != null)
|
||||||
{
|
{
|
||||||
<EditForm EditContext="_editContext" OnValidSubmit="UpdateUser">
|
<EditForm EditContext="_editContext" OnValidSubmit="UpdateUser">
|
||||||
<DataAnnotationsValidator/>
|
<DataAnnotationsValidator/>
|
||||||
|
@ -47,20 +47,6 @@
|
||||||
<ValidationMessage For="@(() => _updateInfo.PhoneNumber)"></ValidationMessage>
|
<ValidationMessage For="@(() => _updateInfo.PhoneNumber)"></ValidationMessage>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="align-middle">
|
|
||||||
<th scope="col">
|
|
||||||
Sælgernr.
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
@UserInfoAdmin.Adviser
|
|
||||||
</td>
|
|
||||||
<th scope="col">
|
|
||||||
Landekode
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
@_updateInfo.CountryCode
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="align-middle">
|
<tr class="align-middle">
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
Spærret
|
Spærret
|
||||||
|
|
|
@ -18,7 +18,7 @@ public partial class AdminOfficeView : IDisposable
|
||||||
[Inject] private ILogger<AdminAdviserView> _logger { get; set; }
|
[Inject] private ILogger<AdminAdviserView> _logger { get; set; }
|
||||||
[Inject] private NavigationManager _navigator { get; set; }
|
[Inject] private NavigationManager _navigator { get; set; }
|
||||||
[Inject] private IToastService _toast { get; set; }
|
[Inject] private IToastService _toast { get; set; }
|
||||||
private UserInfoAdminView UserInfoAdmin { get; set; } = new();
|
private AdminUserInfoDto AdminUserInfo { get; set; } = new();
|
||||||
private EditContext _editContext { get; set; }
|
private EditContext _editContext { get; set; }
|
||||||
private UserUpdateDto _updateInfo { get; set; } = new();
|
private UserUpdateDto _updateInfo { get; set; } = new();
|
||||||
private AdminResetPasswordDto _passwords { get; set; } = new();
|
private AdminResetPasswordDto _passwords { get; set; } = new();
|
||||||
|
@ -38,14 +38,14 @@ public partial class AdminOfficeView : IDisposable
|
||||||
_interceptor.RegisterEvent();
|
_interceptor.RegisterEvent();
|
||||||
_interceptor.RegisterBeforeSendEvent();
|
_interceptor.RegisterBeforeSendEvent();
|
||||||
|
|
||||||
UserInfoAdmin = await _userRepo.GetAdminUserInfo(UserId);
|
AdminUserInfo = await _userRepo.GetAdminUserInfo(UserId);
|
||||||
|
|
||||||
_updateInfo.Email = UserInfoAdmin.Email;
|
_updateInfo.Email = AdminUserInfo.Email;
|
||||||
_updateInfo.CountryCode = UserInfoAdmin.CountryCode;
|
_updateInfo.CountryCode = AdminUserInfo.CountryCode;
|
||||||
_updateInfo.FirstName = UserInfoAdmin.FirstName;
|
_updateInfo.FirstName = AdminUserInfo.FirstName;
|
||||||
_updateInfo.LastName = UserInfoAdmin.LastName;
|
_updateInfo.LastName = AdminUserInfo.LastName;
|
||||||
_updateInfo.PhoneNumber = UserInfoAdmin.PhoneNumber;
|
_updateInfo.PhoneNumber = AdminUserInfo.PhoneNumber;
|
||||||
_updateInfo.LockoutEnabled = UserInfoAdmin.LockoutEnabled;
|
_updateInfo.LockoutEnabled = AdminUserInfo.LockoutEnabled;
|
||||||
|
|
||||||
_passwdContext.OnFieldChanged += PwHandleFieldChanged;
|
_passwdContext.OnFieldChanged += PwHandleFieldChanged;
|
||||||
_passwdContext.OnValidationStateChanged += PwValidationChanged;
|
_passwdContext.OnValidationStateChanged += PwValidationChanged;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-dark text-white">
|
<div class="card-header bg-dark text-white">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col d-print-none justify-content-center">
|
<div class="col w-75 d-print-none justify-content-center">
|
||||||
@if (!string.IsNullOrWhiteSpace(ReportDate))
|
@if (!string.IsNullOrWhiteSpace(ReportDate))
|
||||||
{
|
{
|
||||||
<h2 class="workDate">@DateTime.Parse(ReportDate).ToLongDateString()</h2>
|
<h2 class="workDate">@DateTime.Parse(ReportDate).ToLongDateString()</h2>
|
||||||
|
@ -34,6 +34,9 @@
|
||||||
<div class="col d-print-none justify-content-center">
|
<div class="col d-print-none justify-content-center">
|
||||||
<WorkDateComponent OnChanged="GetReport"></WorkDateComponent>
|
<WorkDateComponent OnChanged="GetReport"></WorkDateComponent>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col col-sm-1 d-print-none">
|
||||||
|
<button class="btn btn-warning" type="button" onclick="window.print();">Print</button>
|
||||||
|
</div>
|
||||||
<div class="col d-none d-print-block text-end">
|
<div class="col d-none d-print-block text-end">
|
||||||
<h3>@_report.Report.Name</h3>
|
<h3>@_report.Report.Name</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -86,7 +86,8 @@ public partial class CompanyView : IDisposable
|
||||||
|
|
||||||
_enableActivity = _company.ValidVat;
|
_enableActivity = _company.ValidVat;
|
||||||
// override if canvas which has account property as empty string or "NY"
|
// override if canvas which has account property as empty string or "NY"
|
||||||
_enableActivity = _company.Account == "NY" || string.IsNullOrWhiteSpace(_company.Account) ? 1 : 0;
|
if (_company.Account == "NY" || string.IsNullOrWhiteSpace(_company.Account))
|
||||||
|
_enableActivity = 1;
|
||||||
|
|
||||||
vatAddress = PrepareVatAddress(_company);
|
vatAddress = PrepareVatAddress(_company);
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ public partial class ItemCatalog : IDisposable
|
||||||
[Inject] private ISalesItemHttpRepository _itemRepo { get; set; }
|
[Inject] private ISalesItemHttpRepository _itemRepo { get; set; }
|
||||||
[Inject] private HttpInterceptorService _interceptor { get; set; }
|
[Inject] private HttpInterceptorService _interceptor { get; set; }
|
||||||
[Inject] private UserPreferenceService _preferenceService { get; set; }
|
[Inject] private UserPreferenceService _preferenceService { get; set; }
|
||||||
private List<NgSalesItemView> _items { get; set; } = new();
|
private List<SalesItemView> _items { get; set; } = new();
|
||||||
private MetaData? _metaDate { get; set; } = new();
|
private MetaData? _metaDate { get; set; } = new();
|
||||||
private CatalogPagingParams _paging = new();
|
private CatalogPagingParams _paging = new();
|
||||||
private Preferences _preferences = new();
|
private Preferences _preferences = new();
|
||||||
|
@ -53,7 +53,7 @@ public partial class ItemCatalog : IDisposable
|
||||||
|
|
||||||
private async Task SelectedPage(int page)
|
private async Task SelectedPage(int page)
|
||||||
{
|
{
|
||||||
_items = new List<NgSalesItemView>();
|
_items = new List<SalesItemView>();
|
||||||
_paging.PageNumber = page;
|
_paging.PageNumber = page;
|
||||||
await GetSalesItems();
|
await GetSalesItems();
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ public partial class ItemCatalog : IDisposable
|
||||||
|
|
||||||
private async Task SetPageSize(string pageSize)
|
private async Task SetPageSize(string pageSize)
|
||||||
{
|
{
|
||||||
_items = new List<NgSalesItemView>();
|
_items = new List<SalesItemView>();
|
||||||
_paging.PageSize = Convert.ToInt32(pageSize);
|
_paging.PageSize = Convert.ToInt32(pageSize);
|
||||||
_paging.PageNumber = 1;
|
_paging.PageNumber = 1;
|
||||||
await GetSalesItems();
|
await GetSalesItems();
|
||||||
|
@ -75,21 +75,21 @@ public partial class ItemCatalog : IDisposable
|
||||||
|
|
||||||
private async Task SetItemGroup(string groupFilter)
|
private async Task SetItemGroup(string groupFilter)
|
||||||
{
|
{
|
||||||
_items = new List<NgSalesItemView>();
|
_items = new List<SalesItemView>();
|
||||||
_paging.PageNumber = 1;
|
_paging.PageNumber = 1;
|
||||||
_paging.SelectGroup = groupFilter;
|
_paging.SelectGroup = groupFilter;
|
||||||
await GetSalesItems();
|
await GetSalesItems();
|
||||||
}
|
}
|
||||||
private async Task SetSearchCol(string columnName)
|
private async Task SetSearchCol(string columnName)
|
||||||
{
|
{
|
||||||
_items = new List<NgSalesItemView>();
|
_items = new List<SalesItemView>();
|
||||||
_paging.PageNumber = 1;
|
_paging.PageNumber = 1;
|
||||||
_paging.SearchColumn = columnName;
|
_paging.SearchColumn = columnName;
|
||||||
await GetSalesItems();
|
await GetSalesItems();
|
||||||
}
|
}
|
||||||
private async Task SetSearchPhrase(string searchTerm)
|
private async Task SetSearchPhrase(string searchTerm)
|
||||||
{
|
{
|
||||||
_items = new List<NgSalesItemView>();
|
_items = new List<SalesItemView>();
|
||||||
_paging.PageNumber = 1;
|
_paging.PageNumber = 1;
|
||||||
_paging.SearchTerm = searchTerm;
|
_paging.SearchTerm = searchTerm;
|
||||||
await GetSalesItems();
|
await GetSalesItems();
|
||||||
|
@ -97,7 +97,7 @@ public partial class ItemCatalog : IDisposable
|
||||||
|
|
||||||
private async Task SetSortCol(string orderBy)
|
private async Task SetSortCol(string orderBy)
|
||||||
{
|
{
|
||||||
_items = new List<NgSalesItemView>();
|
_items = new List<SalesItemView>();
|
||||||
_paging.OrderBy = orderBy;
|
_paging.OrderBy = orderBy;
|
||||||
await GetSalesItems();
|
await GetSalesItems();
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Wonky.Client.Pages;
|
||||||
public partial class ItemView : IDisposable
|
public partial class ItemView : IDisposable
|
||||||
{
|
{
|
||||||
[Parameter] public string SalesItemId { get; set; } = "";
|
[Parameter] public string SalesItemId { get; set; } = "";
|
||||||
private NgSalesItemView _item { get; set; } = new ();
|
private SalesItemView _item { get; set; } = new ();
|
||||||
[Inject] private ISalesItemHttpRepository _itemRepo { get; set; }
|
[Inject] private ISalesItemHttpRepository _itemRepo { get; set; }
|
||||||
[Inject] private HttpInterceptorService _interceptor { get; set; }
|
[Inject] private HttpInterceptorService _interceptor { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Client.HttpInterceptors;
|
using Wonky.Client.HttpInterceptors;
|
||||||
using Wonky.Client.HttpRepository;
|
using Wonky.Client.HttpRepository;
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.Pages;
|
namespace Wonky.Client.Pages;
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Client.HttpInterceptors;
|
using Wonky.Client.HttpInterceptors;
|
||||||
using Wonky.Client.HttpRepository;
|
using Wonky.Client.HttpRepository;
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.Pages;
|
namespace Wonky.Client.Pages;
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Client.HttpInterceptors;
|
using Wonky.Client.HttpInterceptors;
|
||||||
using Wonky.Client.HttpRepository;
|
using Wonky.Client.HttpRepository;
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.Pages;
|
namespace Wonky.Client.Pages;
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,7 @@
|
||||||
@foreach (var activity in _activities)
|
@foreach (var activity in _activities)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>@activity.Company.Name - @activity.Company.ZipCity</td>
|
<td>@activity.ViewCompany.Name - @activity.ViewCompany.ZipCity</td>
|
||||||
<td>@activity.Demo</td>
|
<td>@activity.Demo</td>
|
||||||
<td>@activity.SalesResume</td>
|
<td>@activity.SalesResume</td>
|
||||||
<td class="align-content-end">@activity.OrderAmount</td>
|
<td class="align-content-end">@activity.OrderAmount</td>
|
||||||
|
|
|
@ -40,7 +40,7 @@ public partial class SalesReportNew : IDisposable
|
||||||
[Inject] private IToastService _toast { get; set; }
|
[Inject] private IToastService _toast { get; set; }
|
||||||
private EditContext _editContext { get; set; }
|
private EditContext _editContext { get; set; }
|
||||||
private ReportDto _report { get; set; } = new();
|
private ReportDto _report { get; set; } = new();
|
||||||
private List<ReportActivityDto> _activities { get; set; } = new();
|
private List<ActivityViewReport> _activities { get; set; } = new();
|
||||||
private ReportFiguresDto _init { get; set; }
|
private ReportFiguresDto _init { get; set; }
|
||||||
private Preferences _prefs { get; set; } = new();
|
private Preferences _prefs { get; set; } = new();
|
||||||
private bool _formInvalid = true;
|
private bool _formInvalid = true;
|
||||||
|
@ -151,7 +151,7 @@ public partial class SalesReportNew : IDisposable
|
||||||
_noFigures = true;
|
_noFigures = true;
|
||||||
_report.Figures = new ReportFiguresDto();
|
_report.Figures = new ReportFiguresDto();
|
||||||
_init = new ReportFiguresDto();
|
_init = new ReportFiguresDto();
|
||||||
_activities = new List<ReportActivityDto>();
|
_activities = new List<ActivityViewReport>();
|
||||||
_report.Figures.KmEvening = 0;
|
_report.Figures.KmEvening = 0;
|
||||||
_report.Figures.KmMorning = 0;
|
_report.Figures.KmMorning = 0;
|
||||||
_report.Figures.Distance = 0;
|
_report.Figures.Distance = 0;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-dark text-white">
|
<div class="card-header bg-dark text-white">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col d-print-none justify-content-center">
|
<div class="col w-75 d-print-none justify-content-center">
|
||||||
@if (!string.IsNullOrWhiteSpace(ReportDate))
|
@if (!string.IsNullOrWhiteSpace(ReportDate))
|
||||||
{
|
{
|
||||||
<h2 class="workDate">@DateTime.Parse(ReportDate).ToLongDateString()</h2>
|
<h2 class="workDate">@DateTime.Parse(ReportDate).ToLongDateString()</h2>
|
||||||
|
@ -34,6 +34,9 @@
|
||||||
<div class="col d-print-none justify-content-center">
|
<div class="col d-print-none justify-content-center">
|
||||||
<WorkDateComponent OnChanged="GetReport"></WorkDateComponent>
|
<WorkDateComponent OnChanged="GetReport"></WorkDateComponent>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col col-sm-1 d-print-none">
|
||||||
|
<button class="btn btn-warning" type="button" onclick="window.print();">Print</button>
|
||||||
|
</div>
|
||||||
<div class="col d-none d-print-block text-end">
|
<div class="col d-none d-print-block text-end">
|
||||||
<h3>@_report.Report.Name</h3>
|
<h3>@_report.Report.Name</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -18,6 +18,7 @@ using System.Security.Claims;
|
||||||
using Blazored.LocalStorage;
|
using Blazored.LocalStorage;
|
||||||
using Microsoft.AspNetCore.Components.Authorization;
|
using Microsoft.AspNetCore.Components.Authorization;
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.Shared
|
namespace Wonky.Client.Shared
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"appInfo": {
|
"appInfo": {
|
||||||
"name": "Wonky Client",
|
"name": "Wonky Client",
|
||||||
"version": "0.8.66",
|
"version": "0.8.80",
|
||||||
"isBeta": true,
|
"isBeta": true,
|
||||||
"image": "grumpy-coder.png"
|
"image": "grumpy-coder.png"
|
||||||
},
|
},
|
||||||
|
|
|
@ -16,28 +16,100 @@ namespace Wonky.Entity.Configuration;
|
||||||
|
|
||||||
public class ApiConfig
|
public class ApiConfig
|
||||||
{
|
{
|
||||||
// external service
|
/// <summary>
|
||||||
|
/// GLS tracking url
|
||||||
|
/// </summary>
|
||||||
public string GlsTrackUrl { get; set; } = "";
|
public string GlsTrackUrl { get; set; } = "";
|
||||||
public string GlsId { get; set; } = "";
|
|
||||||
public string VirkUrl { get; set; } = "";
|
|
||||||
public string BrRegUrl { get; set; } = "";
|
|
||||||
public string ViesUrl { get; set; } = "";
|
|
||||||
// api service
|
|
||||||
public string InnoBaseUrl { get; set; } = "";
|
|
||||||
public string CompanyUri { get; set; } = "";
|
|
||||||
public string CatalogUri { get; set; } = "";
|
|
||||||
public string UserInfoUri { get; set; } = "";
|
|
||||||
public string TokenUri { get; set; } = "";
|
|
||||||
public string ActivityUri { get; set; } = "";
|
|
||||||
public string ReportUri { get; set; } = "";
|
|
||||||
public string TaskUri { get; set; } = "";
|
|
||||||
public string InventoryUri { get; set; } = "";
|
|
||||||
public string ProductUri { get; set; } = "";
|
|
||||||
public string SyncUri { get; set; } = "";
|
|
||||||
public string AdminAdviserUri { get; set; } = "";
|
|
||||||
public string AdminUserUri { get; set; } = "";
|
|
||||||
public string AdminPasswdUri { get; set; } = "";
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// GLS customer entity
|
||||||
|
/// </summary>
|
||||||
|
public string GlsId { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// VAT registrar url Denmark
|
||||||
|
/// </summary>
|
||||||
|
public string VirkUrl { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// VAT registrar url Norway
|
||||||
|
/// </summary>
|
||||||
|
public string BrRegUrl { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// VAT registrar url EU
|
||||||
|
/// </summary>
|
||||||
|
public string ViesUrl { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application base url
|
||||||
|
/// </summary>
|
||||||
|
public string InnoBaseUrl { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application uri for company information request
|
||||||
|
/// </summary>
|
||||||
|
public string CompanyUri { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application uri for product catalog request
|
||||||
|
/// </summary>
|
||||||
|
public string CatalogUri { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application uri for user information request
|
||||||
|
/// </summary>
|
||||||
|
public string UserInfoUri { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application uri for token request
|
||||||
|
/// </summary>
|
||||||
|
public string TokenUri { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application uri for activity request
|
||||||
|
/// </summary>
|
||||||
|
public string ActivityUri { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application uri for sales report request
|
||||||
|
/// </summary>
|
||||||
|
public string ReportUri { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application uri for task items request
|
||||||
|
/// </summary>
|
||||||
|
public string TaskUri { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application uri for customer product inventory request
|
||||||
|
/// </summary>
|
||||||
|
public string InventoryUri { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application uri for customer product sale request
|
||||||
|
/// </summary>
|
||||||
|
public string ProductUri { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application uri for updating customer product sale request
|
||||||
|
/// </summary>
|
||||||
|
public string SyncUri { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application uri for administration of sales representatives
|
||||||
|
/// </summary>
|
||||||
|
public string AdminAdviserUri { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application uri for administration of administrative users
|
||||||
|
/// </summary>
|
||||||
|
public string AdminUserUri { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application uri for administrative reset of user credentials
|
||||||
|
/// </summary>
|
||||||
|
public string AdminPasswdUri { get; set; } = "";
|
||||||
|
|
||||||
|
|
||||||
// public string KrvVariantsUri { get; set; } = "";
|
// public string KrvVariantsUri { get; set; } = "";
|
||||||
|
|
|
@ -2,8 +2,23 @@ namespace Wonky.Entity.Configuration;
|
||||||
|
|
||||||
public class AppInfo
|
public class AppInfo
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Application version
|
||||||
|
/// </summary>
|
||||||
public string Version { get; set; }
|
public string Version { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application name
|
||||||
|
/// </summary>
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application picture name
|
||||||
|
/// </summary>
|
||||||
public string Image { get; set; }
|
public string Image { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application beta version flag
|
||||||
|
/// </summary>
|
||||||
public bool IsBeta { get; set; }
|
public bool IsBeta { get; set; }
|
||||||
}
|
}
|
|
@ -20,149 +20,149 @@ namespace Wonky.Entity.DTO
|
||||||
public class ActivityDto
|
public class ActivityDto
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sælger nummer
|
/// Sales representative identification
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string SalesRep { get; set; } = "";
|
public string SalesRep { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sælger Id
|
/// Sales representative entity Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string SalesRepId { get; set; } = "";
|
public string SalesRepId { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Kunde Id - ej konto
|
/// Company entity Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string CompanyId { get; set; } = "";
|
public string CompanyId { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// business central Id
|
/// Business Central entity Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string BcId { get; set; } = "";
|
public string BcId { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// konto
|
/// Customer account
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Account { get; set; } = "";
|
public string Account { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// moms nummer
|
/// VAT number
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
||||||
public string VatNumber { get; set; } = "";
|
public string VatNumber { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// firma navn
|
/// Customer name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Navn skal udfyldes")]
|
[Required(ErrorMessage = "Navn skal udfyldes")]
|
||||||
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
||||||
public string Name { get; set; } = "";
|
public string Name { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// firma adresse bynavn
|
/// Customer address city name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Byanvn skal udfyldes")]
|
[Required(ErrorMessage = "Byanvn skal udfyldes")]
|
||||||
[MaxLength(30, ErrorMessage = "Du kan højst bruge 30 tegn")]
|
[MaxLength(30, ErrorMessage = "Du kan højst bruge 30 tegn")]
|
||||||
public string City { get; set; }= "";
|
public string City { get; set; }= "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// firma adresse postnummer
|
/// Customer address postal code
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Postnr. skal udfyldes")]
|
[Required(ErrorMessage = "Postnr. skal udfyldes")]
|
||||||
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
||||||
public string ZipCode { get; set; } = "";
|
public string ZipCode { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// firma adresse linje 1
|
/// Customer address line 1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
||||||
public string Address1 { get; set; } = "";
|
public string Address1 { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// firma adresse linje 2
|
/// Customer address line 2
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(50, ErrorMessage = "Du kan højst bruge 50 tegn")]
|
[MaxLength(50, ErrorMessage = "Du kan højst bruge 50 tegn")]
|
||||||
public string Address2 { get; set; } = "";
|
public string Address2 { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// firma telefon
|
/// Customer office phone
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
||||||
public string Phone { get; set; } = "";
|
public string Phone { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// firma mobil telefon
|
/// Customer mobile phone
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
||||||
public string Mobile { get; set; } = "";
|
public string Mobile { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// firma email
|
/// Customer office email
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(80, ErrorMessage = "Du kan højst bruge 80 tegn")]
|
[MaxLength(80, ErrorMessage = "Du kan højst bruge 80 tegn")]
|
||||||
public string Email { get; set; } = "";
|
public string Email { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// firma attention
|
/// Customer attention description
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
||||||
public string Attention { get; set; } = "";
|
public string Attention { get; set; } = "";
|
||||||
|
|
||||||
// Form entries
|
// Form entries
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// aktivitetstype
|
/// Activity type enum as string
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Vælg aktivitetstype")]
|
[Required(ErrorMessage = "Vælg aktivitetstype")]
|
||||||
public string ActivityTypeEnum { get; set; } = "";
|
public string ActivityTypeEnum { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// acktivitet status
|
/// Activity status enum as string
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Vælg status for besøg ")]
|
[Required(ErrorMessage = "Vælg status for besøg ")]
|
||||||
public string ActivityStatusEnum { get; set; } = "";
|
public string ActivityStatusEnum { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// besøg type
|
/// Visit type enum as string
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string VisitTypeEnum { get; set; } = "recall";
|
public string VisitTypeEnum { get; set; } = "recall";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// aktivitet dato
|
/// Activity date
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Dato skal angives")]
|
[Required(ErrorMessage = "Dato skal angives")]
|
||||||
public string ActivityDate { get; set; } = "";
|
public string ActivityDate { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// produkt demo
|
/// Product demonstration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(50, ErrorMessage = "Du kan højst bruge 50 tegn")]
|
[MaxLength(50, ErrorMessage = "Du kan højst bruge 50 tegn")]
|
||||||
public string Demo { get; set; } = "";
|
public string Demo { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// vores ref sættes til B:Fornavn
|
/// Our reference - system generated
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
||||||
public string OurRef { get; set; } = "";
|
public string OurRef { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Rekvisitions nummer
|
/// Customer reference number
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
||||||
public string ReferenceNumber { get; set; } = "";
|
public string ReferenceNumber { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// kunde person reference
|
/// Customer reference description
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(35, ErrorMessage = "Du kan højst bruge 35 tegn")]
|
[MaxLength(35, ErrorMessage = "Du kan højst bruge 35 tegn")]
|
||||||
public string YourRef { get; set; } = "";
|
public string YourRef { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// note til kontoret
|
/// Processing note to office
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(255, ErrorMessage = "Du kan højst bruge 255 tegn")]
|
[MaxLength(255, ErrorMessage = "Du kan højst bruge 255 tegn")]
|
||||||
public string OrderMessage { get; set; } = "";
|
public string OrderMessage { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// crm note
|
/// CRM note for future reference
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(255, ErrorMessage = "Du kan højst bruge 255 tegn")]
|
[MaxLength(255, ErrorMessage = "Du kan højst bruge 255 tegn")]
|
||||||
public string CrmNote { get; set; } = "";
|
public string CrmNote { get; set; } = "";
|
||||||
|
@ -170,38 +170,38 @@ namespace Wonky.Entity.DTO
|
||||||
|
|
||||||
// Delivery address form entries
|
// Delivery address form entries
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// leveringsnavn
|
/// Customer delivery name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
||||||
public string DlvName { get; set; } = "";
|
public string DlvName { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// levering adresse 1
|
/// Customer delivery address line 1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
||||||
public string DlvAddress1 { get; set; } = "";
|
public string DlvAddress1 { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// levering adresse 2
|
/// Customer delivery address line 2
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(50, ErrorMessage = "Du kan højst bruge 50 tegn")]
|
[MaxLength(50, ErrorMessage = "Du kan højst bruge 50 tegn")]
|
||||||
public string DlvAddress2 { get; set; } = "";
|
public string DlvAddress2 { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// levering postnummer
|
/// Customer delivery postal code
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
||||||
public string DlvZipCode { get; set; } = "";
|
public string DlvZipCode { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// levering bynavn
|
/// Customer delivery city name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MaxLength(30, ErrorMessage = "Du kan højst bruge 30 tegn")]
|
[MaxLength(30, ErrorMessage = "Du kan højst bruge 30 tegn")]
|
||||||
public string DlvCity { get; set; } = "";
|
public string DlvCity { get; set; } = "";
|
||||||
|
|
||||||
// Lines
|
// Lines
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// varelinjer
|
/// Order lines
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<ActivityLineDto> Lines { get; set; } = new();
|
public List<ActivityLineDto> Lines { get; set; } = new();
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,13 +16,48 @@ namespace Wonky.Entity.DTO;
|
||||||
|
|
||||||
public class ActivityLineDto
|
public class ActivityLineDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Item Sku
|
||||||
|
/// </summary>
|
||||||
public string Sku { get; set; } = "";
|
public string Sku { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Description
|
||||||
|
/// </summary>
|
||||||
public string Text { get; set; } = "";
|
public string Text { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ShortName
|
||||||
|
/// </summary>
|
||||||
public string ShortName { get; set; } = "";
|
public string ShortName { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Quantity
|
||||||
|
/// </summary>
|
||||||
public int Qty { get; set; }
|
public int Qty { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Line price
|
||||||
|
/// </summary>
|
||||||
public decimal Price { get; set; }
|
public decimal Price { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Line discount
|
||||||
|
/// </summary>
|
||||||
public decimal Discount { get; set; }
|
public decimal Discount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Line amount
|
||||||
|
/// </summary>
|
||||||
public decimal LineAmount { get; set; }
|
public decimal LineAmount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Line number
|
||||||
|
/// </summary>
|
||||||
public int LineNumber { get; set; }
|
public int LineNumber { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sas indicator
|
||||||
|
/// </summary>
|
||||||
public bool Sas { get; set; }
|
public bool Sas { get; set; }
|
||||||
}
|
}
|
62
Wonky.Entity/DTO/ActivityViewReport.cs
Normal file
62
Wonky.Entity/DTO/ActivityViewReport.cs
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
|
namespace Wonky.Entity.DTO;
|
||||||
|
|
||||||
|
public class ActivityViewReport
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Company Info in listing
|
||||||
|
/// </summary>
|
||||||
|
public ActivityViewCompany ViewCompany { get; set; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Total amount
|
||||||
|
/// </summary>
|
||||||
|
public decimal OrderAmount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sas amount
|
||||||
|
/// </summary>
|
||||||
|
public decimal SasAmount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sales head entity Id
|
||||||
|
/// </summary>
|
||||||
|
public string SalesHeadId { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Flag indicating if activity is a sale or a quote
|
||||||
|
/// </summary>
|
||||||
|
public bool Closed { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Document date
|
||||||
|
/// </summary>
|
||||||
|
public string OrderDate { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Client reference number
|
||||||
|
/// </summary>
|
||||||
|
public string ReferenceNumber { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Client reference name
|
||||||
|
/// </summary>
|
||||||
|
public string YourRef { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Visit type enum as string
|
||||||
|
/// </summary>
|
||||||
|
public string VisitTypeEnum { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Demonstration
|
||||||
|
/// </summary>
|
||||||
|
public string Demo { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sales resume
|
||||||
|
/// </summary>
|
||||||
|
public string SalesResume { get; set; } = "";
|
||||||
|
}
|
||||||
|
|
|
@ -4,9 +4,15 @@ namespace Wonky.Entity.DTO;
|
||||||
|
|
||||||
public class AdminResetPasswordDto
|
public class AdminResetPasswordDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// New password
|
||||||
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Kode skal udfyldes")]
|
[Required(ErrorMessage = "Kode skal udfyldes")]
|
||||||
public string NewPassword { get; set; } = "";
|
public string NewPassword { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Password confirmation
|
||||||
|
/// </summary>
|
||||||
[Compare(nameof(NewPassword), ErrorMessage = "Koderne er ikke ens.")]
|
[Compare(nameof(NewPassword), ErrorMessage = "Koderne er ikke ens.")]
|
||||||
public string ConfirmPassword { get; set; } = "";
|
public string ConfirmPassword { get; set; } = "";
|
||||||
}
|
}
|
|
@ -2,34 +2,76 @@ using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Wonky.Entity.DTO;
|
namespace Wonky.Entity.DTO;
|
||||||
|
|
||||||
public class UserInfoAdminView
|
public class AdminUserInfoDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// First name
|
||||||
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Fornavn skal angives.")]
|
[Required(ErrorMessage = "Fornavn skal angives.")]
|
||||||
[MaxLength(50,ErrorMessage = "Der kan højst bruges 50 tegn.")]
|
[MaxLength(50,ErrorMessage = "Der kan højst bruges 50 tegn.")]
|
||||||
public string FirstName { get; set; } = "";
|
public string FirstName { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Last name
|
||||||
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Efternavn skal angives.")]
|
[Required(ErrorMessage = "Efternavn skal angives.")]
|
||||||
[MaxLength(50,ErrorMessage = "Der kan højst bruges 50 tegn.")]
|
[MaxLength(50,ErrorMessage = "Der kan højst bruges 50 tegn.")]
|
||||||
public string LastName { get; set; } = "";
|
public string LastName { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Country code
|
||||||
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Landekode skal angives.")]
|
[Required(ErrorMessage = "Landekode skal angives.")]
|
||||||
[MaxLength(50,ErrorMessage = "Der kan højst bruges 3 tegn.")]
|
[MaxLength(50,ErrorMessage = "Der kan højst bruges 3 tegn.")]
|
||||||
public string CountryCode { get; set; } = "";
|
public string CountryCode { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Email
|
||||||
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Email skal angives.")]
|
[Required(ErrorMessage = "Email skal angives.")]
|
||||||
[MaxLength(50, ErrorMessage = "Der kan højst bruges 80 tegn.")]
|
[MaxLength(50, ErrorMessage = "Der kan højst bruges 80 tegn.")]
|
||||||
public string Email { get; set; } = "";
|
public string Email { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Phone number
|
||||||
|
/// </summary>
|
||||||
[MaxLength(20, ErrorMessage = "Der kan højst bruges 20 tegn.")]
|
[MaxLength(20, ErrorMessage = "Der kan højst bruges 20 tegn.")]
|
||||||
public string PhoneNumber { get; set; } = "";
|
public string PhoneNumber { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sales representative identification
|
||||||
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Sælger identifikation skal angives.")]
|
[Required(ErrorMessage = "Sælger identifikation skal angives.")]
|
||||||
[MaxLength(50,ErrorMessage = "Der kan højst bruges 20 tegn.")]
|
[MaxLength(50,ErrorMessage = "Der kan højst bruges 20 tegn.")]
|
||||||
public string Adviser { get; set; } = "";
|
public string Adviser { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Country name
|
||||||
|
/// </summary>
|
||||||
public string CountryName { get; set; } = "";
|
public string CountryName { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lockout flag
|
||||||
|
/// </summary>
|
||||||
public bool LockoutEnabled { get; set; }
|
public bool LockoutEnabled { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Email confirmed flag
|
||||||
|
/// </summary>
|
||||||
public bool EmailConfirmed { get; set; }
|
public bool EmailConfirmed { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adviser flag
|
||||||
|
/// </summary>
|
||||||
public bool IsAdviser { get; set; }
|
public bool IsAdviser { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Admin flag
|
||||||
|
/// </summary>
|
||||||
public bool IsAdmin { get; set; }
|
public bool IsAdmin { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// User Id
|
||||||
|
/// </summary>
|
||||||
public string UserId { get; set; } = "";
|
public string UserId { get; set; } = "";
|
||||||
}
|
}
|
|
@ -21,69 +21,147 @@ namespace Wonky.Entity.DTO;
|
||||||
|
|
||||||
public class CompanyDto
|
public class CompanyDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Name
|
||||||
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Navn skal udfyldes")]
|
[Required(ErrorMessage = "Navn skal udfyldes")]
|
||||||
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Postal code
|
||||||
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Postnummer skal udfyldes")]
|
[Required(ErrorMessage = "Postnummer skal udfyldes")]
|
||||||
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
||||||
public string ZipCode { get; set; }
|
public string ZipCode { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// City name
|
||||||
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Bynavn skal udfyldes")]
|
[Required(ErrorMessage = "Bynavn skal udfyldes")]
|
||||||
[MaxLength(30, ErrorMessage = "Du kan højst bruge 30 tegn")]
|
[MaxLength(30, ErrorMessage = "Du kan højst bruge 30 tegn")]
|
||||||
public string City { get; set; }
|
public string City { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// VAT number
|
||||||
|
/// </summary>
|
||||||
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
||||||
public string VatNumber { get; set; } = "";
|
public string VatNumber { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Company Id
|
||||||
|
/// </summary>
|
||||||
public string CompanyId { get; set; } = "";
|
public string CompanyId { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sales representative entity Id
|
||||||
|
/// </summary>
|
||||||
public string SalesRepId { get; set; } = "";
|
public string SalesRepId { get; set; } = "";
|
||||||
|
/// <summary>
|
||||||
|
/// Business Central entity Id
|
||||||
|
/// </summary>
|
||||||
public string BcId { get; set; } = "";
|
public string BcId { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Office address 1
|
||||||
|
/// </summary>
|
||||||
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
||||||
public string Address1 { get; set; } = "";
|
public string Address1 { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Office address 2
|
||||||
|
/// </summary>
|
||||||
[MaxLength(50, ErrorMessage = "Du kan højst bruge 50 tegn")]
|
[MaxLength(50, ErrorMessage = "Du kan højst bruge 50 tegn")]
|
||||||
public string Address2 { get; set; } = "";
|
public string Address2 { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Account number
|
||||||
|
/// </summary>
|
||||||
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
||||||
public string Account { get; set; } = "";
|
public string Account { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Phone number
|
||||||
|
/// </summary>
|
||||||
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
||||||
public string Phone { get; set; } = "";
|
public string Phone { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Mobile phone number
|
||||||
|
/// </summary>
|
||||||
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
[MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")]
|
||||||
public string Mobile { get; set; } = "";
|
public string Mobile { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Office email
|
||||||
|
/// </summary>
|
||||||
[MaxLength(80, ErrorMessage = "Du kan højst bruge 80 tegn")]
|
[MaxLength(80, ErrorMessage = "Du kan højst bruge 80 tegn")]
|
||||||
public string Email { get; set; } = "";
|
public string Email { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Attention
|
||||||
|
/// </summary>
|
||||||
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
||||||
public string Attention { get; set; } = "";
|
public string Attention { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Country code ISO
|
||||||
|
/// </summary>
|
||||||
public string CountryCode { get; set; } = "";
|
public string CountryCode { get; set; } = "";
|
||||||
|
|
||||||
public string LastVisit { get; set; } = "1970-01-01";
|
/// <summary>
|
||||||
|
/// Last visit
|
||||||
|
/// </summary>
|
||||||
|
public string LastVisit { get; set; } = "2010-01-01";
|
||||||
|
|
||||||
public string NextVisit { get; set; } = "1970-01-01";
|
/// <summary>
|
||||||
|
/// Next visit
|
||||||
|
/// </summary>
|
||||||
|
public string NextVisit { get; set; } = "2010-01-01";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Interval between visits
|
||||||
|
/// </summary>
|
||||||
|
/// <value>between 1 and 52 (inclusive) default value is 8</value>
|
||||||
[Range(1, 52, ErrorMessage = "Angiv interval mellem 1 og 52 uger")]
|
[Range(1, 52, ErrorMessage = "Angiv interval mellem 1 og 52 uger")]
|
||||||
public int Interval { get; set; } = 8;
|
public int Interval { get; set; } = 8;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Value indication if company has shutdown
|
||||||
|
/// </summary>
|
||||||
|
/// <value>0 or 1</value>
|
||||||
public int HasFolded { get; set; }
|
public int HasFolded { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// User value for hiding the company is out of business
|
||||||
|
/// </summary>
|
||||||
|
/// <value>0 or 1</value>
|
||||||
public int IsHidden { get; set; }
|
public int IsHidden { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Value indicating the VAT number is valid
|
||||||
|
/// </summary>
|
||||||
|
/// <value>0 or 1</value>
|
||||||
public int ValidVat { get; set; }
|
public int ValidVat { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Value indicating if VAT number has changed and should be written to ERP record
|
||||||
|
/// </summary>
|
||||||
|
/// <value>0 or 1</value>
|
||||||
public int UpdateErpVat { get; set; }
|
public int UpdateErpVat { get; set; }
|
||||||
public string HistorySync { get; set; }
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Date for last sync of product history
|
||||||
|
/// </summary>
|
||||||
|
public string HistorySync { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Virtual property indicating if timespan is within the defined interval
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>true/false</returns>
|
||||||
public virtual bool ValidDateSpan()
|
public virtual bool ValidDateSpan()
|
||||||
{
|
{
|
||||||
var notAllowed = new List<string> {"1970-01-01", "0001-01-01"};
|
var notAllowed = new List<string> {"2010-01-01", "1970-01-01", "0001-01-01"};
|
||||||
if (notAllowed.Contains(LastVisit) || notAllowed.Contains(NextVisit))
|
if (notAllowed.Contains(LastVisit) || notAllowed.Contains(NextVisit))
|
||||||
return false;
|
return false;
|
||||||
return DateTime.Parse(LastVisit) < DateTime.Parse(NextVisit);
|
return DateTime.Parse(LastVisit) < DateTime.Parse(NextVisit);
|
||||||
|
|
|
@ -19,8 +19,23 @@ namespace Wonky.Entity.DTO;
|
||||||
|
|
||||||
public class KrvProductDto
|
public class KrvProductDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Product entity Id
|
||||||
|
/// </summary>
|
||||||
[Required] public string ProductId { get; set; } = "";
|
[Required] public string ProductId { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Trading name
|
||||||
|
/// </summary>
|
||||||
[Required] public string TradingName { get; set; } = "";
|
[Required] public string TradingName { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Picture url
|
||||||
|
/// </summary>
|
||||||
[Required] public string PictureLink { get; set; } = "";
|
[Required] public string PictureLink { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Product category enum as string
|
||||||
|
/// </summary>
|
||||||
[Required] public string ProductCategoryEnum { get; set; } = "";
|
[Required] public string ProductCategoryEnum { get; set; } = "";
|
||||||
}
|
}
|
|
@ -19,12 +19,43 @@ namespace Wonky.Entity.DTO;
|
||||||
|
|
||||||
public class KrvVariantDto
|
public class KrvVariantDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Variant entity id
|
||||||
|
/// </summary>
|
||||||
[Required] public string VariantId { get; set; } = "";
|
[Required] public string VariantId { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Vendor variant name
|
||||||
|
/// </summary>
|
||||||
[Required] public string Name { get; set; } = "";
|
[Required] public string Name { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Vendor variant SKU
|
||||||
|
/// </summary>
|
||||||
[Required] public string Sku { get; set; } = "";
|
[Required] public string Sku { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ERP variant SKU
|
||||||
|
/// </summary>
|
||||||
[Required] public string ErpSku { get; set; } = "";
|
[Required] public string ErpSku { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ERP variant name
|
||||||
|
/// </summary>
|
||||||
[Required] public string ErpName { get; set; } = "";
|
[Required] public string ErpName { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Variant short name
|
||||||
|
/// </summary>
|
||||||
[Required] public string ShortName { get; set; } = "";
|
[Required] public string ShortName { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Link to variant safety data sheet
|
||||||
|
/// </summary>
|
||||||
[Required] public string SdsLink { get; set; } = "";
|
[Required] public string SdsLink { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Picture link
|
||||||
|
/// </summary>
|
||||||
public string PictureLink { get; set; } = "";
|
public string PictureLink { get; set; } = "";
|
||||||
}
|
}
|
|
@ -1,16 +0,0 @@
|
||||||
namespace Wonky.Entity.DTO;
|
|
||||||
|
|
||||||
public class ReportActivityDto
|
|
||||||
{
|
|
||||||
public VisitCompanyDto Company { get; set; } = new();
|
|
||||||
public string SalesHeadId { get; set; } = "";
|
|
||||||
public bool Closed { get; set; }
|
|
||||||
public string OrderDate { get; set; } = "";
|
|
||||||
public string ReferenceNumber { get; set; } = "";
|
|
||||||
public string YourRef { get; set; } = "";
|
|
||||||
public decimal OrderAmount { get; set; }
|
|
||||||
public string VisitTypeEnum { get; set; } = "";
|
|
||||||
public string Demo { get; set; } = "";
|
|
||||||
public string SalesResume { get; set; } = "";
|
|
||||||
}
|
|
||||||
|
|
|
@ -4,19 +4,42 @@ namespace Wonky.Entity.DTO;
|
||||||
|
|
||||||
public class ReportDto
|
public class ReportDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Report name
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>System generated</remarks>
|
||||||
public string Name { get; set; } = "";
|
public string Name { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Report description
|
||||||
|
/// </summary>
|
||||||
[MaxLength(1000, ErrorMessage = "Du kan højst bruge 1000 tegn")]
|
[MaxLength(1000, ErrorMessage = "Du kan højst bruge 1000 tegn")]
|
||||||
public string Description { get; set; } = "";
|
public string Description { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Supervisor
|
||||||
|
/// </summary>
|
||||||
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
[MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")]
|
||||||
public string SupervisedBy { get; set; } = "";
|
public string SupervisedBy { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Day type enum as string
|
||||||
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Dagtype skal angives")]
|
[Required(ErrorMessage = "Dagtype skal angives")]
|
||||||
public string DayTypeEnum { get; set; } = "";
|
public string DayTypeEnum { get; set; } = "";
|
||||||
|
|
||||||
// Date interval (used for leave, sickLeave and work hours
|
/// <summary>
|
||||||
|
/// Report timespan - start date time
|
||||||
|
/// </summary>
|
||||||
public string FromDateTime { get; set; } = "";
|
public string FromDateTime { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Report timespan - end date time
|
||||||
|
/// </summary>
|
||||||
public string ToDateTime { get; set; } = "";
|
public string ToDateTime { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Report figures
|
||||||
|
/// </summary>
|
||||||
public ReportFiguresDto Figures { get; set; } = new();
|
public ReportFiguresDto Figures { get; set; } = new();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,46 +2,178 @@ namespace Wonky.Entity.DTO;
|
||||||
|
|
||||||
public class ReportFiguresDto
|
public class ReportFiguresDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Sales day number
|
||||||
|
/// </summary>
|
||||||
public int SalesDayNumber { get; set; }
|
public int SalesDayNumber { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Distance today
|
||||||
|
/// </summary>
|
||||||
public int Distance { get; set; }
|
public int Distance { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Distance private (for company cars)
|
||||||
|
/// </summary>
|
||||||
public int DistancePrivate { get; set; }
|
public int DistancePrivate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Odometer value evening
|
||||||
|
/// </summary>
|
||||||
public int KmEvening { get; set; }
|
public int KmEvening { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Odometer value morning
|
||||||
|
/// </summary>
|
||||||
public int KmMorning { get; set; }
|
public int KmMorning { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for new visits
|
||||||
|
/// </summary>
|
||||||
public int NewVisitCount { get; set; }
|
public int NewVisitCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for product demonstration at new visit
|
||||||
|
/// </summary>
|
||||||
public int NewDemoCount { get; set; }
|
public int NewDemoCount { get; set; }
|
||||||
public int RecallVisitCount { get; set; }
|
|
||||||
public int RecallDemoCount { get; set; }
|
/// <summary>
|
||||||
|
/// Counter for product sale at new visit
|
||||||
|
/// </summary>
|
||||||
public int NewSaleCount { get; set; }
|
public int NewSaleCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for recall visits
|
||||||
|
/// </summary>
|
||||||
|
public int RecallVisitCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for product demonstration at recall visit
|
||||||
|
/// </summary>
|
||||||
|
public int RecallDemoCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for product sale at recall visit
|
||||||
|
/// </summary>
|
||||||
public int RecallSaleCount { get; set; }
|
public int RecallSaleCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for total number of visits for workday
|
||||||
|
/// </summary>
|
||||||
public int TotalVisitCount { get; set; }
|
public int TotalVisitCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for total number of product demonstration
|
||||||
|
/// </summary>
|
||||||
public int TotalDemoCount { get; set; }
|
public int TotalDemoCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Count for total number of product sale
|
||||||
|
/// </summary>
|
||||||
public int TotalSaleCount { get; set; }
|
public int TotalSaleCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for the number of safe seal sale
|
||||||
|
/// </summary>
|
||||||
public int SasCount { get; set; }
|
public int SasCount { get; set; }
|
||||||
// turnover day
|
|
||||||
|
/// <summary>
|
||||||
|
/// Turnover for new sale
|
||||||
|
/// </summary>
|
||||||
public decimal NewTurnover { get; set; }
|
public decimal NewTurnover { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Turnover for recall sale
|
||||||
|
/// </summary>
|
||||||
public decimal RecallTurnover { get; set; }
|
public decimal RecallTurnover { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Turnover for safe seal sale
|
||||||
|
/// </summary>
|
||||||
public decimal SasTurnover { get; set; }
|
public decimal SasTurnover { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Total turnover for work day
|
||||||
|
/// </summary>
|
||||||
public decimal TotalTurnover { get; set; }
|
public decimal TotalTurnover { get; set; }
|
||||||
// month distance
|
|
||||||
|
/// <summary>
|
||||||
|
/// Total distance for month
|
||||||
|
/// </summary>
|
||||||
public int DistanceMonth { get; set; }
|
public int DistanceMonth { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Total private distance for month (company cars)
|
||||||
|
/// </summary>
|
||||||
public int DistancePrivateMonth { get; set; }
|
public int DistancePrivateMonth { get; set; }
|
||||||
// mont counters
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for new visits month
|
||||||
|
/// </summary>
|
||||||
public int NewVisitCountMonth { get; set; }
|
public int NewVisitCountMonth { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for product demonstration at new visit month
|
||||||
|
/// </summary>
|
||||||
public int NewDemoCountMonth { get; set; }
|
public int NewDemoCountMonth { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for product sale at new visit month
|
||||||
|
/// </summary>
|
||||||
public int NewSaleCountMonth { get; set; }
|
public int NewSaleCountMonth { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for recall visit month
|
||||||
|
/// </summary>
|
||||||
public int RecallVisitCountMonth { get; set; }
|
public int RecallVisitCountMonth { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for product demonstration at recall visit month
|
||||||
|
/// </summary>
|
||||||
public int RecallDemoCountMonth { get; set; }
|
public int RecallDemoCountMonth { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for product sale at recall visit month
|
||||||
|
/// </summary>
|
||||||
public int RecallSaleCountMonth { get; set; }
|
public int RecallSaleCountMonth { get; set; }
|
||||||
// month total counter
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for total number of visit month
|
||||||
|
/// </summary>
|
||||||
public int TotalVisitCountMonth { get; set; }
|
public int TotalVisitCountMonth { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for total number of product demo month
|
||||||
|
/// </summary>
|
||||||
public int TotalDemoCountMonth { get; set; }
|
public int TotalDemoCountMonth { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for total number of product sale month
|
||||||
|
/// </summary>
|
||||||
public int TotalSaleCountMonth { get; set; }
|
public int TotalSaleCountMonth { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counter for total number safe seal sale month
|
||||||
|
/// </summary>
|
||||||
public int SasCountMonth { get; set; }
|
public int SasCountMonth { get; set; }
|
||||||
// month turnover
|
|
||||||
|
/// <summary>
|
||||||
|
/// Turnover total for new sale month
|
||||||
|
/// </summary>
|
||||||
public decimal NewTurnoverMonth { get; set; }
|
public decimal NewTurnoverMonth { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Turnover total for recall sale month
|
||||||
|
/// </summary>
|
||||||
public decimal RecallTurnoverMonth { get; set; }
|
public decimal RecallTurnoverMonth { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Turnover total for safe seal sale month
|
||||||
|
/// </summary>
|
||||||
public decimal SasTurnoverMonth { get; set; }
|
public decimal SasTurnoverMonth { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Turnover total for all sale month
|
||||||
|
/// </summary>
|
||||||
public decimal TotalTurnoverMonth { get; set; }
|
public decimal TotalTurnoverMonth { get; set; }
|
||||||
}
|
}
|
|
@ -4,8 +4,19 @@ namespace Wonky.Entity.DTO;
|
||||||
|
|
||||||
public class ReportInitDto
|
public class ReportInitDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Flag to prevent activity to be added to report
|
||||||
|
/// </summary>
|
||||||
public bool Closed { get; set; }
|
public bool Closed { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Report figures
|
||||||
|
/// </summary>
|
||||||
public ReportFiguresDto Figures { get; set; }
|
public ReportFiguresDto Figures { get; set; }
|
||||||
public List<ReportActivityDto> Activities { get; set; }
|
|
||||||
|
/// <summary>
|
||||||
|
/// List of activities for report
|
||||||
|
/// </summary>
|
||||||
|
public List<ActivityViewReport> Activities { get; set; }
|
||||||
|
|
||||||
}
|
}
|
|
@ -2,13 +2,49 @@ namespace Wonky.Entity.DTO;
|
||||||
|
|
||||||
public class TaskItemDto
|
public class TaskItemDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Task item entity Id
|
||||||
|
/// </summary>
|
||||||
public string TaskItemId { get; set; } = "";
|
public string TaskItemId { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// User entity Id
|
||||||
|
/// </summary>
|
||||||
public string ErpUserId { get; set; } = "";
|
public string ErpUserId { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Task name
|
||||||
|
/// </summary>
|
||||||
public string Name { get; set; } = "";
|
public string Name { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Task description
|
||||||
|
/// </summary>
|
||||||
public string Text { get; set; } = "";
|
public string Text { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Task due date
|
||||||
|
/// </summary>
|
||||||
public string DueTimestamp { get; set; } = "";
|
public string DueTimestamp { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Task interval
|
||||||
|
/// </summary>
|
||||||
public int Interval { get; set; }
|
public int Interval { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Flag completed
|
||||||
|
/// </summary>
|
||||||
public bool IsCompleted { get; set; }
|
public bool IsCompleted { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Flag overdue
|
||||||
|
/// </summary>
|
||||||
public bool OverDue { get; set; }
|
public bool OverDue { get; set; }
|
||||||
public bool Recurring { get; set; }
|
|
||||||
|
/// <summary>
|
||||||
|
/// Recurring flag
|
||||||
|
/// </summary>
|
||||||
|
/// <value>Interval != 0</value>
|
||||||
|
public virtual bool Recurring { get; set; }
|
||||||
}
|
}
|
|
@ -19,6 +19,12 @@ namespace Wonky.Entity.DTO;
|
||||||
|
|
||||||
public class UserAuthenticationDto
|
public class UserAuthenticationDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// User identification
|
||||||
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Email skal angives")] public string Email { get; set; } = "";
|
[Required(ErrorMessage = "Email skal angives")] public string Email { get; set; } = "";
|
||||||
|
/// <summary>
|
||||||
|
/// User passphrase
|
||||||
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Password skal angives")] public string Password { get; set; } = "";
|
[Required(ErrorMessage = "Password skal angives")] public string Password { get; set; } = "";
|
||||||
}
|
}
|
|
@ -4,24 +4,42 @@ namespace Wonky.Entity.DTO;
|
||||||
|
|
||||||
public class UserUpdateDto
|
public class UserUpdateDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// User firstname
|
||||||
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Fornavn skal angives.")]
|
[Required(ErrorMessage = "Fornavn skal angives.")]
|
||||||
[MaxLength(50,ErrorMessage = "Der kan højst bruges 50 tegn.")]
|
[MaxLength(50,ErrorMessage = "Der kan højst bruges 50 tegn.")]
|
||||||
public string FirstName { get; set; } = "";
|
public string FirstName { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// User lastname
|
||||||
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Efternavn skal angives.")]
|
[Required(ErrorMessage = "Efternavn skal angives.")]
|
||||||
[MaxLength(50,ErrorMessage = "Der kan højst bruges 50 tegn.")]
|
[MaxLength(50,ErrorMessage = "Der kan højst bruges 50 tegn.")]
|
||||||
public string LastName { get; set; } = "";
|
public string LastName { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// User Country Code
|
||||||
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Landekode skal angives.")]
|
[Required(ErrorMessage = "Landekode skal angives.")]
|
||||||
[MaxLength(50,ErrorMessage = "Der kan højst bruges 3 tegn.")]
|
[MaxLength(50,ErrorMessage = "Der kan højst bruges 3 tegn.")]
|
||||||
public string CountryCode { get; set; } = "";
|
public string CountryCode { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// User email - used for login
|
||||||
|
/// </summary>
|
||||||
[Required(ErrorMessage = "Email skal angives.")]
|
[Required(ErrorMessage = "Email skal angives.")]
|
||||||
[MaxLength(50, ErrorMessage = "Der kan højst bruges 80 tegn.")]
|
[MaxLength(50, ErrorMessage = "Der kan højst bruges 80 tegn.")]
|
||||||
public string Email { get; set; } = "";
|
public string Email { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// User phone number
|
||||||
|
/// </summary>
|
||||||
[MaxLength(20, ErrorMessage = "Der kan højst bruges 20 tegn.")]
|
[MaxLength(20, ErrorMessage = "Der kan højst bruges 20 tegn.")]
|
||||||
public string PhoneNumber { get; set; } = "";
|
public string PhoneNumber { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lock user
|
||||||
|
/// </summary>
|
||||||
[Required] public bool LockoutEnabled { get; set; }
|
[Required] public bool LockoutEnabled { get; set; }
|
||||||
}
|
}
|
|
@ -1,11 +0,0 @@
|
||||||
namespace Wonky.Entity.DTO;
|
|
||||||
|
|
||||||
public class VisitCompanyDto
|
|
||||||
{
|
|
||||||
public string CompanyId { get; set; } = "";
|
|
||||||
public string Account { get; set; } = "";
|
|
||||||
public string Name { get; set; } = "";
|
|
||||||
public string ZipCity { get; set; } = "";
|
|
||||||
public string Phone { get; set; } = "";
|
|
||||||
public string VatNumber { get; set; } = "";
|
|
||||||
}
|
|
|
@ -16,6 +16,13 @@ namespace Wonky.Entity.Models;
|
||||||
|
|
||||||
public class TimeFrame
|
public class TimeFrame
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Start date
|
||||||
|
/// </summary>
|
||||||
public string StartDate { get; set; } = "";
|
public string StartDate { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// End date
|
||||||
|
/// </summary>
|
||||||
public string EndDate { get; set; } = "";
|
public string EndDate { get; set; } = "";
|
||||||
}
|
}
|
|
@ -2,7 +2,14 @@ namespace Wonky.Entity.Models;
|
||||||
|
|
||||||
public class VatLifeCycle
|
public class VatLifeCycle
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Last update of the lifecycle
|
||||||
|
/// </summary>
|
||||||
public string LastUpdate { get; set; } = "";
|
public string LastUpdate { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Time frame of lifecycle
|
||||||
|
/// </summary>
|
||||||
public TimeFrame TimeFrame { get; set; } = new();
|
public TimeFrame TimeFrame { get; set; } = new();
|
||||||
|
|
||||||
}
|
}
|
|
@ -16,7 +16,18 @@ namespace Wonky.Entity.Models;
|
||||||
|
|
||||||
public class VatRegState
|
public class VatRegState
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// VAT number state
|
||||||
|
/// </summary>
|
||||||
public string State { get; set; } = "UKENDT";
|
public string State { get; set; } = "UKENDT";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Last update of VAT state
|
||||||
|
/// </summary>
|
||||||
public string LastUpdate { get; set; } = "";
|
public string LastUpdate { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Timeframe for VAT state
|
||||||
|
/// </summary>
|
||||||
public TimeFrame TimeFrame { get; set; } = new();
|
public TimeFrame TimeFrame { get; set; } = new();
|
||||||
}
|
}
|
|
@ -19,13 +19,47 @@ namespace Wonky.Entity.Models;
|
||||||
|
|
||||||
public class VirkRegInfo
|
public class VirkRegInfo
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// VAT number
|
||||||
|
/// </summary>
|
||||||
public string VatNumber { get; set; } = "";
|
public string VatNumber { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity registration name
|
||||||
|
/// </summary>
|
||||||
public string Name { get; set; } = "";
|
public string Name { get; set; } = "";
|
||||||
|
/// <summary>
|
||||||
|
/// Entity address C/O name
|
||||||
|
/// </summary>
|
||||||
public string CoName { get; set; } = "";
|
public string CoName { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity address line
|
||||||
|
/// </summary>
|
||||||
public string Address { get; set; } = "";
|
public string Address { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity address city name
|
||||||
|
/// </summary>
|
||||||
public string City { get; set; } = "";
|
public string City { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity address postal code
|
||||||
|
/// </summary>
|
||||||
public string ZipCode { get; set; } = "";
|
public string ZipCode { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// List of VAT entity states
|
||||||
|
/// </summary>
|
||||||
public List<VatRegState> States { get; set; } = new ();
|
public List<VatRegState> States { get; set; } = new ();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// List of VAT entity lifecycles
|
||||||
|
/// </summary>
|
||||||
public List<VatLifeCycle> LifeCycles { get; set; } = new ();
|
public List<VatLifeCycle> LifeCycles { get; set; } = new ();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Date for last request of entity VAT state
|
||||||
|
/// </summary>
|
||||||
public string RequestDate { get; set; } = "" ;
|
public string RequestDate { get; set; } = "" ;
|
||||||
}
|
}
|
|
@ -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]
|
|
||||||
//
|
|
||||||
namespace Wonky.Entity.Requests;
|
|
||||||
|
|
||||||
public class ActivityPagingParams
|
|
||||||
{
|
|
||||||
private int _pageSize = 5;
|
|
||||||
private const int MaxPageSize = 50;
|
|
||||||
public int PageNumber { get; set; } = 1;
|
|
||||||
public int PageSize
|
|
||||||
{
|
|
||||||
get => _pageSize;
|
|
||||||
set => _pageSize = (value > MaxPageSize) ? MaxPageSize : value;
|
|
||||||
}
|
|
||||||
public string SearchTerm { get; set; } = "";
|
|
||||||
public string SearchColumn { get; set; } = "name";
|
|
||||||
public string OrderBy { get; set; } = "name";
|
|
||||||
}
|
|
|
@ -16,16 +16,47 @@ namespace Wonky.Entity.Requests;
|
||||||
|
|
||||||
public class CatalogPagingParams
|
public class CatalogPagingParams
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// internal default page size
|
||||||
|
/// </summary>
|
||||||
private int _pageSize = 5;
|
private int _pageSize = 5;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// internal max page size
|
||||||
|
/// </summary>
|
||||||
private const int MaxPageSize = 50;
|
private const int MaxPageSize = 50;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set the page number to return
|
||||||
|
/// </summary>
|
||||||
public int PageNumber { get; set; } = 1;
|
public int PageNumber { get; set; } = 1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set the page size to return
|
||||||
|
/// </summary>
|
||||||
public int PageSize
|
public int PageSize
|
||||||
{
|
{
|
||||||
get => _pageSize;
|
get => _pageSize;
|
||||||
set => _pageSize = (value > MaxPageSize) ? MaxPageSize : value;
|
set => _pageSize = (value > MaxPageSize) ? MaxPageSize : value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set the search term to use
|
||||||
|
/// </summary>
|
||||||
public string SearchTerm { get; set; } = "";
|
public string SearchTerm { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set the column used for search
|
||||||
|
/// </summary>
|
||||||
public string SearchColumn { get; set; } = "name";
|
public string SearchColumn { get; set; } = "name";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set column used to order the result
|
||||||
|
/// </summary>
|
||||||
public string OrderBy { get; set; } = "name";
|
public string OrderBy { get; set; } = "name";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set product group filter
|
||||||
|
/// </summary>
|
||||||
public string SelectGroup { get; set; } = "";
|
public string SelectGroup { get; set; } = "";
|
||||||
}
|
}
|
|
@ -16,19 +16,58 @@ namespace Wonky.Entity.Requests;
|
||||||
|
|
||||||
public class CompanyPagingParams
|
public class CompanyPagingParams
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// internal default page size
|
||||||
|
/// </summary>
|
||||||
private int _pageSize = 5;
|
private int _pageSize = 5;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// internal max page size
|
||||||
|
/// </summary>
|
||||||
private const int MaxPageSize = 50;
|
private const int MaxPageSize = 50;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set the page number to return
|
||||||
|
/// </summary>
|
||||||
public int PageNumber { get; set; } = 1;
|
public int PageNumber { get; set; } = 1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set the page size to return
|
||||||
|
/// </summary>
|
||||||
public int PageSize
|
public int PageSize
|
||||||
{
|
{
|
||||||
get => _pageSize;
|
get => _pageSize;
|
||||||
set => _pageSize = (value > MaxPageSize) ? MaxPageSize : value;
|
set => _pageSize = (value > MaxPageSize) ? MaxPageSize : value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set the search term to use
|
||||||
|
/// </summary>
|
||||||
public string SearchTerm { get; set; } = "";
|
public string SearchTerm { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set the column to use for searching
|
||||||
|
/// </summary>
|
||||||
public string SearchColumn { get; set; } = "name";
|
public string SearchColumn { get; set; } = "name";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set the column for ordering the result
|
||||||
|
/// </summary>
|
||||||
public string OrderBy { get; set; } = "name";
|
public string OrderBy { get; set; } = "name";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Optional limit the result
|
||||||
|
/// </summary>
|
||||||
public string FromDate { get; set; } = "";
|
public string FromDate { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set a flag to include hidden entities
|
||||||
|
/// </summary>
|
||||||
public int IsHidden { get; set; }
|
public int IsHidden { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set a flag to include entities which has gone out of business
|
||||||
|
/// </summary>
|
||||||
public int HasFolded { get; set; }
|
public int HasFolded { get; set; }
|
||||||
|
|
||||||
}
|
}
|
|
@ -16,10 +16,33 @@ namespace Wonky.Entity.Requests;
|
||||||
|
|
||||||
public class MetaData
|
public class MetaData
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The current page number
|
||||||
|
/// </summary>
|
||||||
public int CurrentPage { get; set; }
|
public int CurrentPage { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The current total number of pages
|
||||||
|
/// </summary>
|
||||||
public int TotalPages { get; set; }
|
public int TotalPages { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The current page size
|
||||||
|
/// </summary>
|
||||||
public int PageSize { get; set; }
|
public int PageSize { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The total count of entities available
|
||||||
|
/// </summary>
|
||||||
public int TotalCount { get; set; }
|
public int TotalCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Navigation flag - move previous
|
||||||
|
/// </summary>
|
||||||
public bool HasPrevious => CurrentPage > 1;
|
public bool HasPrevious => CurrentPage > 1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Navigation flag - move next
|
||||||
|
/// </summary>
|
||||||
public bool HasNext => CurrentPage < TotalPages;
|
public bool HasNext => CurrentPage < TotalPages;
|
||||||
}
|
}
|
|
@ -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]
|
|
||||||
//
|
|
||||||
namespace Wonky.Entity.Requests;
|
|
||||||
|
|
||||||
public class ReportPagingParams
|
|
||||||
{
|
|
||||||
private int _pageSize = 5;
|
|
||||||
private const int MaxPageSize = 50;
|
|
||||||
public int PageNumber { get; set; } = 1;
|
|
||||||
public int PageSize
|
|
||||||
{
|
|
||||||
get => _pageSize;
|
|
||||||
set => _pageSize = (value > MaxPageSize) ? MaxPageSize : value;
|
|
||||||
}
|
|
||||||
public string SearchTerm { get; set; } = "";
|
|
||||||
public string SearchColumn { get; set; } = "name";
|
|
||||||
public string OrderBy { get; set; } = "name";
|
|
||||||
}
|
|
|
@ -16,8 +16,31 @@ namespace Wonky.Entity.Requests;
|
||||||
|
|
||||||
public class VirkParams
|
public class VirkParams
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Entity VAT number search
|
||||||
|
/// </summary>
|
||||||
public string VatNumber { get; set; } = "";
|
public string VatNumber { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Address search - street name
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>StreetName, HouseNumber, ZipCode are required for address search</remarks>
|
||||||
public string StreetName { get; set; } = "";
|
public string StreetName { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Address search house number
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>StreetName, HouseNumber, ZipCode are required for address search</remarks>
|
||||||
public string HouseNumber { get; set; } = "";
|
public string HouseNumber { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Address search postal code
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>StreetName, HouseNumber, ZipCode are required for address search</remarks>
|
||||||
public string ZipCode { get; set; } = "";
|
public string ZipCode { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity name search
|
||||||
|
/// </summary>
|
||||||
|
public string EntityName { get; set; } = "";
|
||||||
}
|
}
|
7
Wonky.Entity/Views/ActivityListReportView.cs
Normal file
7
Wonky.Entity/Views/ActivityListReportView.cs
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
namespace Wonky.Entity.Views;
|
||||||
|
|
||||||
|
public class ActivityListReportView
|
||||||
|
{
|
||||||
|
public bool ReportClosed { get; set; }
|
||||||
|
public List<ActivityReportView> Activities { get; set; } = new();
|
||||||
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
namespace Wonky.Entity.Views;
|
namespace Wonky.Entity.Views;
|
||||||
|
|
||||||
public class NgActivityReportView
|
public class ActivityReportView
|
||||||
{
|
{
|
||||||
public ActivityCompanyView Company { get; set; } = new();
|
public ActivityViewCompany ViewCompany { get; set; } = new();
|
||||||
public string SalesHeadId { get; set; } = "";
|
public string SalesHeadId { get; set; } = "";
|
||||||
public string OfficeNote { get; set; } = "";
|
public string OfficeNote { get; set; } = "";
|
||||||
public string StatusTypeEnum { get; set; } = "";
|
public string StatusTypeEnum { get; set; } = "";
|
||||||
|
@ -11,6 +11,7 @@ public class NgActivityReportView
|
||||||
public string ReferenceNumber { get; set; } = "";
|
public string ReferenceNumber { get; set; } = "";
|
||||||
public string YourRef { get; set; } = "";
|
public string YourRef { get; set; } = "";
|
||||||
public decimal OrderAmount { get; set; }
|
public decimal OrderAmount { get; set; }
|
||||||
|
public decimal SasAmount { get; set; }
|
||||||
public string VisitTypeEnum { get; set; } = "";
|
public string VisitTypeEnum { get; set; } = "";
|
||||||
public string Demo { get; set; } = "";
|
public string Demo { get; set; } = "";
|
||||||
public string SalesResume { get; set; } = "";
|
public string SalesResume { get; set; } = "";
|
|
@ -1,6 +1,6 @@
|
||||||
namespace Wonky.Entity.Views;
|
namespace Wonky.Entity.Views;
|
||||||
|
|
||||||
public class ActivityCompanyView
|
public class ActivityViewCompany
|
||||||
{
|
{
|
||||||
public string CompanyId { get; set; } = "";
|
public string CompanyId { get; set; } = "";
|
||||||
public string Account { get; set; } = "";
|
public string Account { get; set; } = "";
|
|
@ -1,26 +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 System.Net;
|
|
||||||
|
|
||||||
namespace Wonky.Entity.Views;
|
|
||||||
|
|
||||||
public class ApiResponse
|
|
||||||
{
|
|
||||||
public bool IsSuccess { get; set; }
|
|
||||||
public HttpStatusCode Code { get; set; }
|
|
||||||
public string Message { get; set; } = "";
|
|
||||||
public string Id { get; set; } = "";
|
|
||||||
}
|
|
|
@ -13,10 +13,14 @@
|
||||||
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||||
//
|
//
|
||||||
|
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
namespace Wonky.Entity.Views;
|
namespace Wonky.Entity.Views;
|
||||||
|
|
||||||
public class ApiResponseView
|
public class ApiResponseView
|
||||||
{
|
{
|
||||||
public bool IsSuccess { get; set; }
|
public bool IsSuccess { get; set; }
|
||||||
public IEnumerable<string>? Errors { get; set; }
|
public HttpStatusCode Code { get; set; }
|
||||||
|
public string Message { get; set; } = "";
|
||||||
|
public string Id { get; set; } = "";
|
||||||
}
|
}
|
|
@ -1,21 +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]
|
|
||||||
//
|
|
||||||
|
|
||||||
namespace Wonky.Entity.Views;
|
|
||||||
|
|
||||||
public class CreateCompanyResponseView
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
namespace Wonky.Entity.Views;
|
|
||||||
|
|
||||||
public class NgActivityListReportView
|
|
||||||
{
|
|
||||||
public bool ReportClosed { get; set; }
|
|
||||||
public List<NgActivityReportView> Activities { get; set; } = new();
|
|
||||||
}
|
|
|
@ -3,5 +3,5 @@ namespace Wonky.Entity.Views;
|
||||||
public class NgSalesReportView
|
public class NgSalesReportView
|
||||||
{
|
{
|
||||||
public NgSalesReport Report { get; set; } = new();
|
public NgSalesReport Report { get; set; } = new();
|
||||||
public List<NgActivityReportView> Activities { get; set; } = new ();
|
public List<ActivityReportView> Activities { get; set; } = new ();
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Wonky.Entity.DTO;
|
namespace Wonky.Entity.Views;
|
||||||
|
|
||||||
public class ProductHistoryView
|
public class ProductHistoryView
|
||||||
{
|
{
|
|
@ -1,6 +1,4 @@
|
||||||
using System.Text.Json.Serialization;
|
namespace Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Entity.DTO;
|
|
||||||
|
|
||||||
public class ProductInventoryView
|
public class ProductInventoryView
|
||||||
{
|
{
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
namespace Wonky.Entity.Views;
|
namespace Wonky.Entity.Views;
|
||||||
|
|
||||||
public class NgSalesItemView
|
public class SalesItemView
|
||||||
{
|
{
|
||||||
public string ItemId { get; set; } = "";
|
public string ItemId { get; set; } = "";
|
||||||
public string Name { get; set; } = "";
|
public string Name { get; set; } = "";
|
||||||
|
@ -23,5 +23,5 @@ public class NgSalesItemView
|
||||||
public string ShortName { get; set; } = "";
|
public string ShortName { get; set; } = "";
|
||||||
public string ProductGroup { get; set; } = "";
|
public string ProductGroup { get; set; } = "";
|
||||||
public string PictureLink { get; set; } = "";
|
public string PictureLink { get; set; } = "";
|
||||||
public List<NgSalesRateView> Rates { get; set; } = new();
|
public List<SalesRateView> Rates { get; set; } = new();
|
||||||
}
|
}
|
|
@ -14,7 +14,7 @@
|
||||||
//
|
//
|
||||||
namespace Wonky.Entity.Views;
|
namespace Wonky.Entity.Views;
|
||||||
|
|
||||||
public class NgSalesRateView
|
public class SalesRateView
|
||||||
{
|
{
|
||||||
public string Quantity { get; set; } = "";
|
public string Quantity { get; set; } = "";
|
||||||
public string Rate { get; set; } = "";
|
public string Rate { get; set; } = "";
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Wonky.Entity.DTO;
|
namespace Wonky.Entity.Views;
|
||||||
|
|
||||||
public class UserInfoView
|
public class UserInfoView
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Wonky.Entity.DTO;
|
namespace Wonky.Entity.Views;
|
||||||
|
|
||||||
public class UserListAdminView
|
public class UserListAdminView
|
||||||
{
|
{
|
Loading…
Reference in a new issue