header check
This commit is contained in:
parent
35cf79beba
commit
5427c78dbe
211 changed files with 1195 additions and 382 deletions
|
@ -1,3 +1,20 @@
|
||||||
|
@*
|
||||||
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||||
|
//
|
||||||
|
*@
|
||||||
|
|
||||||
@using Wonky.Client.Services
|
@using Wonky.Client.Services
|
||||||
|
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
|
@ -10,12 +27,12 @@
|
||||||
|
|
||||||
[Inject] private UserProfileService ProfileService { get; set; }
|
[Inject] private UserProfileService ProfileService { get; set; }
|
||||||
private int KmMorning { get; set; }
|
private int KmMorning { get; set; }
|
||||||
private UserPref Prefs { get; set; } = new();
|
private UserProfile Profiles { get; set; } = new();
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
Prefs = await ProfileService.GetPreferences();
|
Profiles = await ProfileService.GetPreferences();
|
||||||
KmMorning = Prefs.KmMorning;
|
KmMorning = Profiles.KmMorning;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task OnKmChanged()
|
private async Task OnKmChanged()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@using Wonky.Client.Helpers
|
|
||||||
@*
|
@*
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -16,6 +16,7 @@
|
||||||
//
|
//
|
||||||
*@
|
*@
|
||||||
|
|
||||||
|
@using Wonky.Client.Helpers
|
||||||
@if (ActivityList.Any())
|
@if (ActivityList.Any())
|
||||||
{
|
{
|
||||||
<table class="table table-sm table-bordered d-print-table table-striped">
|
<table class="table table-sm table-bordered d-print-table table-striped">
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
@using Wonky.Entity.Views
|
|
||||||
@using Wonky.Entity.DTO
|
|
||||||
@*
|
@*
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -17,6 +16,9 @@
|
||||||
//
|
//
|
||||||
*@
|
*@
|
||||||
|
|
||||||
|
@using Wonky.Entity.Views
|
||||||
|
@using Wonky.Entity.DTO
|
||||||
|
|
||||||
<table class="table table-sm table-bordered table-striped">
|
<table class="table table-sm table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="bg-dark text-white opacity-75 border-bottom">
|
<tr class="bg-dark text-white opacity-75 border-bottom">
|
||||||
|
|
|
@ -26,7 +26,7 @@ public partial class CatalogGroupComponent
|
||||||
[Inject] private UserProfileService ProfileService { get; set; }
|
[Inject] private UserProfileService ProfileService { get; set; }
|
||||||
[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 UserPref Prefs = new();
|
private UserProfile _profiles = new();
|
||||||
|
|
||||||
private string? GroupCol { get; set; }
|
private string? GroupCol { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ public partial class CatalogSearchComponent : IDisposable
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// User preferences
|
/// User preferences
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private UserPref Prefs { get; set; } = new();
|
private UserProfile Profiles { get; set; } = new();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Selected item
|
/// Selected item
|
||||||
|
@ -47,8 +47,8 @@ public partial class CatalogSearchComponent : IDisposable
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
ProfileService.OnChange += ProfileServiceOnOnChange;
|
ProfileService.OnChange += ProfileServiceOnOnChange;
|
||||||
Prefs = await ProfileService.GetPreferences();
|
Profiles = await ProfileService.GetPreferences();
|
||||||
SearchCol = Prefs.ItemSearch;
|
SearchCol = Profiles.ItemSearch;
|
||||||
await OnChanged.InvokeAsync(SearchCol);
|
await OnChanged.InvokeAsync(SearchCol);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,10 +67,10 @@ public partial class CatalogSearchComponent : IDisposable
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Preference update from profile service
|
/// Preference update from profile service
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="newUserPref"></param>
|
/// <param name="newUserProfile"></param>
|
||||||
private void ProfileServiceOnOnChange(UserPref newUserPref)
|
private void ProfileServiceOnOnChange(UserProfile newUserProfile)
|
||||||
{
|
{
|
||||||
Prefs = newUserPref;
|
Profiles = newUserProfile;
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ public partial class CatalogSortComponent : IDisposable
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// User's preferences
|
/// User's preferences
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private UserPref Prefs = new();
|
private UserProfile _profiles = new();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Item selected by user
|
/// Item selected by user
|
||||||
|
@ -47,8 +47,8 @@ public partial class CatalogSortComponent : IDisposable
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
ProfileService.OnChange += ProfileServiceOnOnChange;
|
ProfileService.OnChange += ProfileServiceOnOnChange;
|
||||||
Prefs = await ProfileService.GetPreferences();
|
_profiles = await ProfileService.GetPreferences();
|
||||||
SortCol = Prefs.ItemSort;
|
SortCol = _profiles.ItemSort;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -66,10 +66,10 @@ public partial class CatalogSortComponent : IDisposable
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get updated settings from preference service
|
/// Get updated settings from preference service
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="newUserPref"></param>
|
/// <param name="newUserProfile"></param>
|
||||||
private void ProfileServiceOnOnChange(UserPref newUserPref)
|
private void ProfileServiceOnOnChange(UserProfile newUserProfile)
|
||||||
{
|
{
|
||||||
Prefs = newUserPref;
|
_profiles = newUserProfile;
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
@using Wonky.Client.Models
|
|
||||||
@using System.ComponentModel.Design
|
|
||||||
@*
|
@*
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -17,6 +16,8 @@
|
||||||
//
|
//
|
||||||
*@
|
*@
|
||||||
|
|
||||||
|
@using Wonky.Client.Models
|
||||||
|
@using System.ComponentModel.Design
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
@if (Inventory.Any())
|
@if (Inventory.Any())
|
||||||
|
|
|
@ -1,3 +1,20 @@
|
||||||
|
|
||||||
|
@*
|
||||||
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||||
|
//
|
||||||
|
*@
|
||||||
@using Wonky.Entity.Views
|
@using Wonky.Entity.Views
|
||||||
@using System.Linq.Expressions
|
@using System.Linq.Expressions
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
|
||||||
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||||
|
//
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Client.Shared;
|
using Wonky.Client.Shared;
|
||||||
using Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
@using Wonky.Client.Models
|
|
||||||
@using System.ComponentModel.Design
|
|
||||||
@*
|
@*
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -16,7 +15,8 @@
|
||||||
// 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 Wonky.Client.Models
|
||||||
|
@using System.ComponentModel.Design
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
@if (ProductList.Any())
|
@if (ProductList.Any())
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Entity.DTO;
|
|
||||||
using Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.Components;
|
namespace Wonky.Client.Components;
|
||||||
|
|
|
@ -28,13 +28,13 @@ public partial class CustomerSearchColumnComponent : IDisposable
|
||||||
[Inject] private UserProfileService ProfileService { get; set; }
|
[Inject] private UserProfileService ProfileService { get; set; }
|
||||||
[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 UserPref Prefs { get; set; } = new();
|
private UserProfile Profiles { get; set; } = new();
|
||||||
private string SearchCol { get; set; } = "name";
|
private string SearchCol { get; set; } = "name";
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
ProfileService.OnChange += ProfileServiceOnOnChange;
|
ProfileService.OnChange += ProfileServiceOnOnChange;
|
||||||
Prefs = await ProfileService.GetPreferences();
|
Profiles = await ProfileService.GetPreferences();
|
||||||
SearchCol = Prefs.CompanySearch;
|
SearchCol = Profiles.CompanySearch;
|
||||||
}
|
}
|
||||||
private async Task OnSelectionChanged(ChangeEventArgs e)
|
private async Task OnSelectionChanged(ChangeEventArgs e)
|
||||||
{
|
{
|
||||||
|
@ -43,9 +43,9 @@ public partial class CustomerSearchColumnComponent : IDisposable
|
||||||
await OnChanged.InvokeAsync(val);
|
await OnChanged.InvokeAsync(val);
|
||||||
await ProfileService.SetCompanySearch(val);
|
await ProfileService.SetCompanySearch(val);
|
||||||
}
|
}
|
||||||
private void ProfileServiceOnOnChange(UserPref newUserPref)
|
private void ProfileServiceOnOnChange(UserProfile newUserProfile)
|
||||||
{
|
{
|
||||||
Prefs = newUserPref;
|
Profiles = newUserProfile;
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
|
|
|
@ -24,14 +24,14 @@ namespace Wonky.Client.Components
|
||||||
{
|
{
|
||||||
private Timer InputTimer { get; set; } = new();
|
private Timer InputTimer { get; set; } = new();
|
||||||
private string SearchTerm { get; set; } = "";
|
private string SearchTerm { get; set; } = "";
|
||||||
private UserPref Prefs { get; set; } = new ();
|
private UserProfile Profiles { get; set; } = new ();
|
||||||
[Inject] private UserProfileService ProfileService { get; set; }
|
[Inject] private UserProfileService ProfileService { get; set; }
|
||||||
[Parameter] public EventCallback<string> OnChanged { get; set; }
|
[Parameter] public EventCallback<string> OnChanged { get; set; }
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
Prefs = await ProfileService.GetPreferences();
|
Profiles = await ProfileService.GetPreferences();
|
||||||
SearchTerm = string.IsNullOrWhiteSpace(Prefs.CompanyFilterPhrase) ? "" : Prefs.CompanyFilterPhrase.Trim();
|
SearchTerm = string.IsNullOrWhiteSpace(Profiles.CompanyFilterPhrase) ? "" : Profiles.CompanyFilterPhrase.Trim();
|
||||||
|
|
||||||
if(!string.IsNullOrWhiteSpace(SearchTerm))
|
if(!string.IsNullOrWhiteSpace(SearchTerm))
|
||||||
await OnChanged.InvokeAsync(SearchTerm);
|
await OnChanged.InvokeAsync(SearchTerm);
|
||||||
|
|
|
@ -27,13 +27,13 @@ namespace Wonky.Client.Components
|
||||||
[Inject] private UserProfileService ProfileService { get; set; }
|
[Inject] private UserProfileService ProfileService { get; set; }
|
||||||
[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 UserPref Prefs = new();
|
private UserProfile _profiles = new();
|
||||||
private string SortCol { get; set; } = "name";
|
private string SortCol { get; set; } = "name";
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
ProfileService.OnChange += ProfileServiceOnOnChange;
|
ProfileService.OnChange += ProfileServiceOnOnChange;
|
||||||
Prefs = await ProfileService.GetPreferences();
|
_profiles = await ProfileService.GetPreferences();
|
||||||
SortCol = Prefs.CompanySort;
|
SortCol = _profiles.CompanySort;
|
||||||
}
|
}
|
||||||
private async Task OnSelectionChanged(ChangeEventArgs e)
|
private async Task OnSelectionChanged(ChangeEventArgs e)
|
||||||
{
|
{
|
||||||
|
@ -42,9 +42,9 @@ namespace Wonky.Client.Components
|
||||||
await OnChanged.InvokeAsync(val);
|
await OnChanged.InvokeAsync(val);
|
||||||
await ProfileService.SetCompanySort(val);
|
await ProfileService.SetCompanySort(val);
|
||||||
}
|
}
|
||||||
private void ProfileServiceOnOnChange(UserPref newUserPref)
|
private void ProfileServiceOnOnChange(UserProfile newUserProfile)
|
||||||
{
|
{
|
||||||
Prefs = newUserPref;
|
_profiles = newUserProfile;
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
@*
|
||||||
|
// 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]
|
||||||
|
//
|
||||||
|
*@
|
||||||
<h3>Sælger</h3>
|
<h3>Sælger</h3>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
@*
|
||||||
|
// 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]
|
||||||
|
//
|
||||||
|
*@
|
||||||
<h3>Testede browsere</h3>
|
<h3>Testede browsere</h3>
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item">Safari (macOS, iOS)</li>
|
<li class="list-group-item">Safari (macOS, iOS)</li>
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
@*
|
||||||
|
// 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]
|
||||||
|
//
|
||||||
|
*@
|
||||||
<h3>Fælles</h3>
|
<h3>Fælles</h3>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
@*
|
||||||
|
// 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]
|
||||||
|
//
|
||||||
|
*@
|
||||||
<h3>Kontor</h3>
|
<h3>Kontor</h3>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
@*
|
||||||
|
// 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]
|
||||||
|
//
|
||||||
|
*@
|
||||||
<h3>Open Source</h3>
|
<h3>Open Source</h3>
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<a class="list-group-item list-group-item-action" href="https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor/" target="_blank">Blazor WebAssembly</a>
|
<a class="list-group-item list-group-item-action" href="https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor/" target="_blank">Blazor WebAssembly</a>
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
|
@*
|
||||||
|
// 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]
|
||||||
|
//
|
||||||
|
*@
|
||||||
<h3>Bestilling Status</h3>
|
<h3>Bestilling Status</h3>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
@*
|
||||||
|
// 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]
|
||||||
|
//
|
||||||
|
*@
|
||||||
<h3>Aftaler / Tilbud</h3>
|
<h3>Aftaler / Tilbud</h3>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
@*
|
||||||
|
// 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]
|
||||||
|
//
|
||||||
|
*@
|
||||||
<h3>Lager</h3>
|
<h3>Lager</h3>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
|
@ -40,13 +40,13 @@ public partial class LandingComponentAdvisor
|
||||||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
|
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
|
||||||
};
|
};
|
||||||
|
|
||||||
private UserPref Prefs { get; set; } = new();
|
private UserProfile Profiles { get; set; } = new();
|
||||||
private DateTime SelectedDate { get; set; }
|
private DateTime SelectedDate { get; set; }
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
Prefs = await ProfileService.GetPreferences();
|
Profiles = await ProfileService.GetPreferences();
|
||||||
SelectedDate = string.IsNullOrWhiteSpace(Prefs.WorkDate) ? DateTime.Now : DateTime.Parse(Prefs.WorkDate);
|
SelectedDate = string.IsNullOrWhiteSpace(Profiles.WorkDate) ? DateTime.Now : DateTime.Parse(Profiles.WorkDate);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,24 +40,24 @@ public partial class LandingComponentOffice
|
||||||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
|
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
|
||||||
};
|
};
|
||||||
|
|
||||||
private UserPref Prefs { get; set; } = new();
|
private UserProfile Profiles { get; set; } = new();
|
||||||
private string WorkDate { get; set; } = $"{DateTime.Now:yyyy-MM-dd}";
|
private string WorkDate { get; set; } = $"{DateTime.Now:yyyy-MM-dd}";
|
||||||
private string Today { get; set; } = $"{DateTime.Now:yyyy-MM-dd}";
|
private string Today { get; set; } = $"{DateTime.Now:yyyy-MM-dd}";
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
ProfileService.OnChange += ProfileChanged;
|
ProfileService.OnChange += ProfileChanged;
|
||||||
Prefs = await ProfileService.GetPreferences();
|
Profiles = await ProfileService.GetPreferences();
|
||||||
if (string.IsNullOrWhiteSpace(Prefs.WorkDate))
|
if (string.IsNullOrWhiteSpace(Profiles.WorkDate))
|
||||||
{
|
{
|
||||||
await ProfileService.SetWorkDate(DateTime.Now);
|
await ProfileService.SetWorkDate(DateTime.Now);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProfileChanged(UserPref newPrefs)
|
private void ProfileChanged(UserProfile newProfiles)
|
||||||
{
|
{
|
||||||
Prefs = newPrefs;
|
Profiles = newProfiles;
|
||||||
WorkDate = Prefs.WorkDate;
|
WorkDate = Profiles.WorkDate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<a class="btn btn-success d-block" href="/office/users/advisors/@user.CountryCode.ToLower()/@user.UserId/customers">Kunder</a>
|
<a class="btn btn-success d-block" href="/office/users/advisors/@user.CountryCode.ToLower()/@user.UserId/customers">Kunder</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<AuthorizeView Roles="Admin">
|
<AuthorizeView Roles="Admin,Office">
|
||||||
<Authorized>
|
<Authorized>
|
||||||
<a class="btn btn-info d-block" href="/office/users/advisors/@user.CountryCode.ToLower()/@user.UserId/view">Rediger</a>
|
<a class="btn btn-info d-block" href="/office/users/advisors/@user.CountryCode.ToLower()/@user.UserId/view">Rediger</a>
|
||||||
</Authorized>
|
</Authorized>
|
||||||
|
|
|
@ -21,5 +21,5 @@ namespace Wonky.Client.Components;
|
||||||
|
|
||||||
public partial class OfficeCountryAdvisorListComponent
|
public partial class OfficeCountryAdvisorListComponent
|
||||||
{
|
{
|
||||||
[Parameter] public List<UserListAdminView> UserList { get; set; } = new();
|
[Parameter] public List<UserManagerListView> UserList { get; set; } = new();
|
||||||
}
|
}
|
|
@ -20,28 +20,6 @@
|
||||||
|
|
||||||
@if (CompanyList.Any())
|
@if (CompanyList.Any())
|
||||||
{
|
{
|
||||||
@*
|
|
||||||
<div class="list-group list-group-flush">
|
|
||||||
<div class="list-group-item px-3 bg-black text-white opacity-75">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-1">
|
|
||||||
Sælger
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-1">
|
|
||||||
Konto
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-1">
|
|
||||||
Telefon
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-3">
|
|
||||||
Navn
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
Bynavn
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
*@
|
|
||||||
<div class="row d-flex g-3">
|
<div class="row d-flex g-3">
|
||||||
@foreach (var company in CompanyList)
|
@foreach (var company in CompanyList)
|
||||||
{
|
{
|
||||||
|
@ -71,29 +49,24 @@
|
||||||
<div class="col-sm-9 col-md-9">@company.CountryCode.ToUpper()-@company.ZipCode @company.City</div>
|
<div class="col-sm-9 col-md-9">@company.CountryCode.ToUpper()-@company.ZipCode @company.City</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="card-footer">
|
||||||
</div>
|
<div class="row">
|
||||||
@*
|
<div class="col">
|
||||||
<a class=" list-group-item list-group-item-action" href="/office/customers/@CountryCode/@company.CompanyId/order">
|
<button class="btn btn-danger" disabled>Faktura</button>
|
||||||
<div class="row align-items-center">
|
|
||||||
<div class="col-sm-1">
|
|
||||||
@company.SalesRep
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-1">
|
|
||||||
@company.Account
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-1">
|
|
||||||
@company.Phone
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-3">
|
|
||||||
@company.Name
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
@company.CountryCode.ToUpper()-@company.ZipCode @company.City
|
<button class="btn btn-warning" disabled>Aktivitet</button>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<button class="btn btn-success" disabled>Produkt</button>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<button class="btn btn-primary" disabled>Bestilling</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
|
||||||
*@
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
@ -101,3 +74,12 @@ else
|
||||||
{
|
{
|
||||||
<div>Ingen data</div>
|
<div>Ingen data</div>
|
||||||
}
|
}
|
||||||
|
@*
|
||||||
|
<CustomerInvoiceListModalOverlay CustomerInvoices="Invoices" @ref="InvoiceListOverlay" />
|
||||||
|
|
||||||
|
<CustomerActivityListModalOverlay Activities="Activities" CompanyName="@CompanyName" @ref="ActivityListOverlay" />
|
||||||
|
|
||||||
|
<CustomerInventoryListModalOverlay CompanyName="@CompanyName" CompanyId="@CompanyId" CountryCode="@CountryCode"
|
||||||
|
OnInventorySelected="OnInventoryCallback" Inventory="Inventory" @ref="InventoryListOverlay" />
|
||||||
|
*@
|
||||||
|
|
||||||
|
|
|
@ -29,5 +29,19 @@ namespace Wonky.Client.Components
|
||||||
[Parameter] public List<CompanyDto> CompanyList { get; set; } = new();
|
[Parameter] public List<CompanyDto> CompanyList { get; set; } = new();
|
||||||
[Parameter] public string CountryCode { get; set; } = "";
|
[Parameter] public string CountryCode { get; set; } = "";
|
||||||
|
|
||||||
|
private CustomerInvoiceListModalOverlay InvoiceListOverlay { get; set; } = new();
|
||||||
|
private CustomerInventoryListModalOverlay InventoryListOverlay { get; set; } = new();
|
||||||
|
private CustomerActivityListModalOverlay ActivityListOverlay { get; set; } = new();
|
||||||
|
|
||||||
|
private string CompanyName { get; set; } = "";
|
||||||
|
private string CompanyId { get; set; } = "";
|
||||||
|
private InvoiceListView Invoices { get; set; } = new();
|
||||||
|
private List<ReportItemView> Activities { get; set; } = new();
|
||||||
|
private List<ProductHistoryView> Inventory { get; set; } = new();
|
||||||
|
|
||||||
|
private void OnInventoryCallback()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,11 +14,11 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Entity.Views;
|
using Wonky.Entity.DTO;
|
||||||
|
|
||||||
namespace Wonky.Client.Components;
|
namespace Wonky.Client.Components;
|
||||||
|
|
||||||
public partial class OfficeCountryUserListComponent
|
public partial class OfficeCountryUserListComponent
|
||||||
{
|
{
|
||||||
[Parameter] public List<UserListAdminView> UserList { get; set; } = new();
|
[Parameter] public List<UserManagerListView> UserList { get; set; } = new();
|
||||||
}
|
}
|
|
@ -27,14 +27,14 @@ namespace Wonky.Client.Components
|
||||||
[Inject] private UserProfileService ProfileService { get; set; }
|
[Inject] private UserProfileService ProfileService { get; set; }
|
||||||
[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 UserPref Prefs = new();
|
private UserProfile _profiles = new();
|
||||||
private string PageSize { get; set; } = "";
|
private string PageSize { get; set; } = "";
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
ProfileService.OnChange += ProfileServiceOnOnChange;
|
ProfileService.OnChange += ProfileServiceOnOnChange;
|
||||||
Prefs = await ProfileService.GetPreferences();
|
_profiles = await ProfileService.GetPreferences();
|
||||||
PageSize = Prefs.PageSize;
|
PageSize = _profiles.PageSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task OnSelectChanged(ChangeEventArgs e)
|
private async Task OnSelectChanged(ChangeEventArgs e)
|
||||||
|
@ -45,9 +45,9 @@ namespace Wonky.Client.Components
|
||||||
await ProfileService.SetPageSize(val);
|
await ProfileService.SetPageSize(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProfileServiceOnOnChange(UserPref newUserPref)
|
private void ProfileServiceOnOnChange(UserProfile newUserProfile)
|
||||||
{
|
{
|
||||||
Prefs = newUserPref;
|
_profiles = newUserProfile;
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
@*
|
||||||
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||||
|
//
|
||||||
|
*@
|
||||||
@using Wonky.Entity.Views
|
@using Wonky.Entity.Views
|
||||||
@using Wonky.Client.Models
|
@using Wonky.Client.Models
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||||
|
//
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Client.Models;
|
using Wonky.Client.Models;
|
||||||
using Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||||
|
//
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ public partial class WorkDateComponent : IDisposable
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// user preferences
|
/// user preferences
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private UserPref Prefs = new();
|
private UserProfile _profiles = new();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Component Initialization
|
/// Component Initialization
|
||||||
|
@ -58,10 +58,10 @@ public partial class WorkDateComponent : IDisposable
|
||||||
{
|
{
|
||||||
WorkDateContext = new EditContext(SelectedDate);
|
WorkDateContext = new EditContext(SelectedDate);
|
||||||
Profiles.OnChange += ProfileServiceOnOnChange;
|
Profiles.OnChange += ProfileServiceOnOnChange;
|
||||||
Prefs = await Profiles.GetPreferences();
|
_profiles = await Profiles.GetPreferences();
|
||||||
SelectedDate = string.IsNullOrWhiteSpace(Prefs.WorkDate)
|
SelectedDate = string.IsNullOrWhiteSpace(_profiles.WorkDate)
|
||||||
? DateTime.Now
|
? DateTime.Now
|
||||||
: DateTime.Parse(Prefs.WorkDate);
|
: DateTime.Parse(_profiles.WorkDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -81,10 +81,10 @@ public partial class WorkDateComponent : IDisposable
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ProfileService
|
/// ProfileService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="newUserPref"></param>
|
/// <param name="newUserProfile"></param>
|
||||||
private void ProfileServiceOnOnChange(UserPref newUserPref)
|
private void ProfileServiceOnOnChange(UserProfile newUserProfile)
|
||||||
{
|
{
|
||||||
Prefs = newUserPref;
|
_profiles = newUserProfile;
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,17 @@
|
||||||
|
// 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 Blazored.Toast.Services;
|
using Blazored.Toast.Services;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
@*
|
||||||
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||||
|
//
|
||||||
|
*@
|
||||||
@using Wonky.Entity.DTO
|
@using Wonky.Entity.DTO
|
||||||
@using Wonky.Entity.Views
|
@using Wonky.Entity.Views
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||||
|
//
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
// 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.Collections.Generic;
|
|
||||||
using Wonky.Entity.Requests;
|
using Wonky.Entity.Requests;
|
||||||
|
|
||||||
namespace Wonky.Client.Features;
|
namespace Wonky.Client.Features;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,7 +14,6 @@
|
||||||
// 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.Globalization;
|
using System.Globalization;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.AspNetCore.Components.Forms;
|
using Microsoft.AspNetCore.Components.Forms;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
|
||||||
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
// published by the Free Software Foundation, either version 3 of the
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
@ -13,11 +14,10 @@
|
||||||
// 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;
|
|
||||||
using System.Net.Mail;
|
using System.Net.Mail;
|
||||||
using Wonky.Entity.DTO;
|
|
||||||
|
|
||||||
namespace Wonky.Client.Helpers;
|
namespace Wonky.Client.Helpers;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Utilities
|
/// Utilities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -70,7 +70,7 @@ public static class Utils
|
||||||
|
|
||||||
if (trimmedEmail.EndsWith("."))
|
if (trimmedEmail.EndsWith("."))
|
||||||
{
|
{
|
||||||
return false; // suggested by @TK-421
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -93,6 +93,7 @@ public static class Utils
|
||||||
{
|
{
|
||||||
return value.ToString();
|
return value.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parse string to enum of T
|
/// Parse string to enum of T
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -103,6 +104,7 @@ public static class Utils
|
||||||
{
|
{
|
||||||
return (T)Enum.Parse(typeof(T), value, true);
|
return (T)Enum.Parse(typeof(T), value, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Generate unique hashcode from time
|
/// Generate unique hashcode from time
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,9 +14,6 @@
|
||||||
// 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.Globalization;
|
|
||||||
using System.Reflection.Metadata.Ecma335;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace Wonky.Client.Helpers;
|
namespace Wonky.Client.Helpers;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -16,12 +17,10 @@
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Blazored.LocalStorage;
|
using Blazored.LocalStorage;
|
||||||
using Blazored.Toast.Services;
|
using Blazored.Toast.Services;
|
||||||
using Wonky.Client.Services;
|
using Wonky.Client.Services;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using Toolbelt.Blazor;
|
using Toolbelt.Blazor;
|
||||||
|
|
||||||
namespace Wonky.Client.HttpInterceptors
|
namespace Wonky.Client.HttpInterceptors
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,7 +14,6 @@
|
||||||
// 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;
|
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
|
||||||
namespace Wonky.Client.HttpInterceptors
|
namespace Wonky.Client.HttpInterceptors
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
|
|
||||||
namespace Wonky.Client.HttpInterfaces;
|
namespace Wonky.Client.HttpInterfaces;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,7 +14,6 @@
|
||||||
// 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 Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.HttpInterfaces;
|
namespace Wonky.Client.HttpInterfaces;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,7 +14,6 @@
|
||||||
// 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 Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
|
|
||||||
namespace Wonky.Client.HttpInterfaces;
|
namespace Wonky.Client.HttpInterfaces;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,7 +14,6 @@
|
||||||
// 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 Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.HttpInterfaces;
|
namespace Wonky.Client.HttpInterfaces;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,7 +14,6 @@
|
||||||
// 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 Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.HttpInterfaces;
|
namespace Wonky.Client.HttpInterfaces;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
|
||||||
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||||
|
//
|
||||||
|
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
using Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -27,7 +28,7 @@ public interface ISystemUserRepository
|
||||||
/// Get Advisors (Office)
|
/// Get Advisors (Office)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<List<UserListAdminView>> GetAdvisors();
|
Task<List<UserManagerListView>> GetAdvisors();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Advisor Info for given userId
|
/// Get Advisor Info for given userId
|
||||||
|
@ -48,7 +49,7 @@ public interface ISystemUserRepository
|
||||||
/// Get Administrative Users
|
/// Get Administrative Users
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<List<UserListAdminView>> GetAdminUsers();
|
Task<List<UserManagerListView>> GetAdminUsers();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Admin Info for giver userId
|
/// Get Admin Info for giver userId
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,7 +14,6 @@
|
||||||
// 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;
|
|
||||||
using System.Net.Http.Json;
|
using System.Net.Http.Json;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
|
||||||
|
// 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.Http.Json;
|
using System.Net.Http.Json;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -18,9 +19,7 @@ using System.Text.Json;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Wonky.Client.HttpInterfaces;
|
using Wonky.Client.HttpInterfaces;
|
||||||
using Wonky.Client.Pages;
|
|
||||||
using Wonky.Entity.Configuration;
|
using Wonky.Entity.Configuration;
|
||||||
using Wonky.Entity.DTO;
|
|
||||||
using Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.HttpRepository;
|
namespace Wonky.Client.HttpRepository;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,22 +14,16 @@
|
||||||
// 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.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Net.Http.Json;
|
using System.Net.Http.Json;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Wonky.Client.Features;
|
using Wonky.Client.Features;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.AspNetCore.WebUtilities;
|
using Microsoft.AspNetCore.WebUtilities;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Wonky.Client.HttpInterfaces;
|
using Wonky.Client.HttpInterfaces;
|
||||||
using Wonky.Entity.Configuration;
|
using Wonky.Entity.Configuration;
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
using Wonky.Entity.Requests;
|
using Wonky.Entity.Requests;
|
||||||
using Wonky.Entity.Views;
|
|
||||||
|
|
||||||
#pragma warning disable CS8601
|
#pragma warning disable CS8601
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,7 +14,6 @@
|
||||||
// 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.Http.Json;
|
using System.Net.Http.Json;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,16 +14,13 @@
|
||||||
// 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.Http.Json;
|
using System.Net.Http.Json;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Wonky.Client.HttpInterfaces;
|
using Wonky.Client.HttpInterfaces;
|
||||||
using Wonky.Client.Pages;
|
|
||||||
using Wonky.Entity.Configuration;
|
using Wonky.Entity.Configuration;
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
using Wonky.Entity.Views;
|
|
||||||
|
|
||||||
namespace Wonky.Client.HttpRepository;
|
namespace Wonky.Client.HttpRepository;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,19 +14,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.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Net.Http.Json;
|
using System.Net.Http.Json;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Wonky.Client.Features;
|
using Wonky.Client.Features;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.AspNetCore.WebUtilities;
|
using Microsoft.AspNetCore.WebUtilities;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Wonky.Client.HttpInterfaces;
|
using Wonky.Client.HttpInterfaces;
|
||||||
using Wonky.Entity.Configuration;
|
using Wonky.Entity.Configuration;
|
||||||
using Wonky.Entity.DTO;
|
|
||||||
using Wonky.Entity.Requests;
|
using Wonky.Entity.Requests;
|
||||||
using Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -18,9 +19,7 @@ using System.Text.Json;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Wonky.Client.HttpInterfaces;
|
using Wonky.Client.HttpInterfaces;
|
||||||
using Wonky.Client.Pages;
|
|
||||||
using Wonky.Entity.Configuration;
|
using Wonky.Entity.Configuration;
|
||||||
using Wonky.Entity.DTO;
|
|
||||||
using Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.HttpRepository;
|
namespace Wonky.Client.HttpRepository;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,22 +14,16 @@
|
||||||
// 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.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Net.Http.Json;
|
using System.Net.Http.Json;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Wonky.Client.Features;
|
using Wonky.Client.Features;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.AspNetCore.WebUtilities;
|
using Microsoft.AspNetCore.WebUtilities;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Wonky.Client.HttpInterfaces;
|
using Wonky.Client.HttpInterfaces;
|
||||||
using Wonky.Entity.Configuration;
|
using Wonky.Entity.Configuration;
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
using Wonky.Entity.Requests;
|
using Wonky.Entity.Requests;
|
||||||
using Wonky.Entity.Views;
|
|
||||||
|
|
||||||
#pragma warning disable CS8601
|
#pragma warning disable CS8601
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,14 +14,12 @@
|
||||||
// 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.Http.Json;
|
using System.Net.Http.Json;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Wonky.Client.HttpInterfaces;
|
using Wonky.Client.HttpInterfaces;
|
||||||
using Wonky.Entity.Configuration;
|
using Wonky.Entity.Configuration;
|
||||||
using Wonky.Entity.DTO;
|
|
||||||
using Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.HttpRepository;
|
namespace Wonky.Client.HttpRepository;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
using System.Net;
|
|
||||||
|
// 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.Http.Json;
|
using System.Net.Http.Json;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,7 +14,6 @@
|
||||||
// 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.Http.Json;
|
using System.Net.Http.Json;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
|
@ -50,9 +50,9 @@ public class SystemUserRepository : ISystemUserRepository
|
||||||
/// Get Advisors (Office)
|
/// Get Advisors (Office)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<List<UserListAdminView>> GetAdvisors()
|
public async Task<List<UserManagerListView>> GetAdvisors()
|
||||||
{
|
{
|
||||||
return await _client.GetFromJsonAsync<List<UserListAdminView>>(_api.OfficeAdvisors);
|
return await _client.GetFromJsonAsync<List<UserManagerListView>>(_api.OfficeAdvisors);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -80,9 +80,9 @@ public class SystemUserRepository : ISystemUserRepository
|
||||||
/// Get Administrative Users
|
/// Get Administrative Users
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<List<UserListAdminView>> GetAdminUsers()
|
public async Task<List<UserManagerListView>> GetAdminUsers()
|
||||||
{
|
{
|
||||||
return await _client.GetFromJsonAsync<List<UserListAdminView>>(_api.OfficeUsers);
|
return await _client.GetFromJsonAsync<List<UserManagerListView>>(_api.OfficeUsers);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,22 +14,8 @@
|
||||||
// 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 Wonky.Entity.DTO;
|
|
||||||
using Wonky.Entity.Views;
|
|
||||||
|
|
||||||
namespace Wonky.Client.Models;
|
namespace Wonky.Client.Models;
|
||||||
/// <summary>
|
|
||||||
/// Draft Item model class
|
|
||||||
/// </summary>
|
|
||||||
public class DraftItem
|
|
||||||
{
|
|
||||||
public int Quantity { get; set; }
|
|
||||||
public SalesItemView Item { get; set; }
|
|
||||||
public decimal Price { get; set; }
|
|
||||||
public decimal Discount { get; set; }
|
|
||||||
public bool Sas { get; set; }
|
|
||||||
public decimal LineTotal => (Price - Price * Discount / 100) * Quantity;
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Draft model class
|
/// Draft model class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
32
Wonky.Client/Models/DraftItem.cs
Normal file
32
Wonky.Client/Models/DraftItem.cs
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
|
||||||
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||||
|
//
|
||||||
|
|
||||||
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
|
namespace Wonky.Client.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Draft Item model class
|
||||||
|
/// </summary>
|
||||||
|
public class DraftItem
|
||||||
|
{
|
||||||
|
public int Quantity { get; set; }
|
||||||
|
public SalesItemView Item { get; set; }
|
||||||
|
public decimal Price { get; set; }
|
||||||
|
public decimal Discount { get; set; }
|
||||||
|
public bool Sas { get; set; }
|
||||||
|
public decimal LineTotal => (Price - Price * Discount / 100) * Quantity;
|
||||||
|
}
|
|
@ -1,3 +1,19 @@
|
||||||
|
|
||||||
|
// 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.Client.Models;
|
namespace Wonky.Client.Models;
|
||||||
|
|
||||||
public enum PSort
|
public enum PSort
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
|
||||||
|
// 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.Client.Models;
|
namespace Wonky.Client.Models;
|
||||||
|
|
||||||
public enum PStatus
|
public enum PStatus
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
|
||||||
|
// 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.Client.Models;
|
namespace Wonky.Client.Models;
|
||||||
|
|
||||||
public enum PTarget
|
public enum PTarget
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
|
||||||
|
// 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.Client.Models;
|
namespace Wonky.Client.Models;
|
||||||
|
|
||||||
public class QCallbackArgs
|
public class QCallbackArgs
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
|
||||||
|
// 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.Client.Models;
|
namespace Wonky.Client.Models;
|
||||||
|
|
||||||
public enum QStatus
|
public enum QStatus
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,7 +14,6 @@
|
||||||
// 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.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Wonky.Client.Models;
|
namespace Wonky.Client.Models;
|
||||||
|
|
|
@ -345,7 +345,7 @@ else
|
||||||
<ProductHistoryModalOverlay CompanyId="@CompanyId" ItemSku="@SelectedItem.Sku" @ref="ProductOverlay"/>
|
<ProductHistoryModalOverlay CompanyId="@CompanyId" ItemSku="@SelectedItem.Sku" @ref="ProductOverlay"/>
|
||||||
|
|
||||||
<ProductPriceHistoryModal CompanyId="@CompanyId" Sku="@SelectedItem.Sku"
|
<ProductPriceHistoryModal CompanyId="@CompanyId" Sku="@SelectedItem.Sku"
|
||||||
OnSelected="PriceHistoryCallback" @ref="PriceOverlay"/>
|
OnSelected="PriceHistoryCallback" @ref="PriceModalOverlay"/>
|
||||||
|
|
||||||
<ConfirmProductCheckModalOverlay BodyMessage="" CompanyId="@CompanyId" Products="CheckList"
|
<ConfirmProductCheckModalOverlay BodyMessage="" CompanyId="@CompanyId" Products="CheckList"
|
||||||
OnOkClicked="ConfirmProductCheckCallback" @ref="ProductCheckOverlay" />
|
OnOkClicked="ConfirmProductCheckCallback" @ref="ProductCheckOverlay" />
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
|
||||||
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
// published by the Free Software Foundation, either version 3 of the
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
@ -51,7 +52,7 @@ public partial class AdvisorActivityCreatePage : IDisposable
|
||||||
// variables
|
// variables
|
||||||
private readonly JsonSerializerOptions _options = new() {PropertyNameCaseInsensitive = true};
|
private readonly JsonSerializerOptions _options = new() {PropertyNameCaseInsensitive = true};
|
||||||
private SalesItemView SelectedItem { get; set; } = new();
|
private SalesItemView SelectedItem { get; set; } = new();
|
||||||
private UserPref UserPrefs { get; set; } = new();
|
private UserProfile UserProfile { get; set; } = new();
|
||||||
private ActivityDto Activity { get; set; } = new();
|
private ActivityDto Activity { get; set; } = new();
|
||||||
private CompanyDto Company = new();
|
private CompanyDto Company = new();
|
||||||
private EditContext? ActivityContext { get; set; }
|
private EditContext? ActivityContext { get; set; }
|
||||||
|
@ -73,7 +74,7 @@ public partial class AdvisorActivityCreatePage : IDisposable
|
||||||
// OVERLAY PAGES
|
// OVERLAY PAGES
|
||||||
private PriceCatalogModalOverlay CatalogOverlay { get; set; } = new();
|
private PriceCatalogModalOverlay CatalogOverlay { get; set; } = new();
|
||||||
private ProductHistoryModalOverlay ProductOverlay { get; set; } = new();
|
private ProductHistoryModalOverlay ProductOverlay { get; set; } = new();
|
||||||
private ProductPriceHistoryModal PriceOverlay { get; set; } = new();
|
private ProductPriceHistoryModalOverlay PriceModalOverlay { get; set; } = new();
|
||||||
private ConfirmWorkDateModalOverlay WorkDateOverlay { get; set; } = new();
|
private ConfirmWorkDateModalOverlay WorkDateOverlay { get; set; } = new();
|
||||||
private ConfirmProductCheckModalOverlay ProductCheckOverlay { get; set; } = new();
|
private ConfirmProductCheckModalOverlay ProductCheckOverlay { get; set; } = new();
|
||||||
private CustomerInvoiceListModalOverlay InvoiceListOverlay { get; set; } = new();
|
private CustomerInvoiceListModalOverlay InvoiceListOverlay { get; set; } = new();
|
||||||
|
@ -101,7 +102,7 @@ public partial class AdvisorActivityCreatePage : IDisposable
|
||||||
Interceptor.RegisterEvent();
|
Interceptor.RegisterEvent();
|
||||||
Interceptor.RegisterBeforeSendEvent();
|
Interceptor.RegisterBeforeSendEvent();
|
||||||
// User Preferences
|
// User Preferences
|
||||||
UserPrefs = await Profiles.GetPreferences();
|
UserProfile = await Profiles.GetPreferences();
|
||||||
// User Info
|
// User Info
|
||||||
SalesRep = await Storage.GetItemAsync<UserInfoView>("_xu");
|
SalesRep = await Storage.GetItemAsync<UserInfoView>("_xu");
|
||||||
// Fetch Customer from http
|
// Fetch Customer from http
|
||||||
|
@ -143,12 +144,12 @@ public partial class AdvisorActivityCreatePage : IDisposable
|
||||||
Activity.DlvZipCode = Company.ZipCode;
|
Activity.DlvZipCode = Company.ZipCode;
|
||||||
Activity.DlvCity = Company.City;
|
Activity.DlvCity = Company.City;
|
||||||
// Initialize date variable
|
// Initialize date variable
|
||||||
SelectedDate = string.IsNullOrWhiteSpace(UserPrefs.WorkDate) ? DateTime.Now : DateTime.Parse(UserPrefs.WorkDate);
|
SelectedDate = string.IsNullOrWhiteSpace(UserProfile.WorkDate) ? DateTime.Now : DateTime.Parse(UserProfile.WorkDate);
|
||||||
// raise flag if report is closed
|
// raise flag if report is closed
|
||||||
ReportClosed = await ReportRepo.ReportExist($"{SelectedDate:yyyy-MM-dd}");
|
ReportClosed = await ReportRepo.ReportExist($"{SelectedDate:yyyy-MM-dd}");
|
||||||
// Ask for confirmation of date
|
// Ask for confirmation of date
|
||||||
Logger.LogDebug("Preferences.DateConfirmed => {}", UserPrefs.DateConfirmed);
|
Logger.LogDebug("Preferences.DateConfirmed => {}", UserProfile.DateConfirmed);
|
||||||
if (!UserPrefs.DateConfirmed)
|
if (!UserProfile.DateConfirmed)
|
||||||
{
|
{
|
||||||
PromptDateConfirm = $"Aktiviteter oprettes med dato {SelectedDate.ToShortDateString()}. Er dette OK?";
|
PromptDateConfirm = $"Aktiviteter oprettes med dato {SelectedDate.ToShortDateString()}. Er dette OK?";
|
||||||
WorkDateOverlay.Show();
|
WorkDateOverlay.Show();
|
||||||
|
@ -362,7 +363,7 @@ public partial class AdvisorActivityCreatePage : IDisposable
|
||||||
private void ShowPriceHistoryOverlay()
|
private void ShowPriceHistoryOverlay()
|
||||||
{
|
{
|
||||||
if(ShowItem)
|
if(ShowItem)
|
||||||
PriceOverlay.Show();
|
PriceModalOverlay.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -16,10 +17,8 @@
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Blazored.Toast.Services;
|
using Blazored.Toast.Services;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Client.Components;
|
|
||||||
using Wonky.Client.HttpInterceptors;
|
using Wonky.Client.HttpInterceptors;
|
||||||
using Wonky.Client.HttpInterfaces;
|
using Wonky.Client.HttpInterfaces;
|
||||||
using Wonky.Client.HttpRepository;
|
|
||||||
using Wonky.Client.Services;
|
using Wonky.Client.Services;
|
||||||
using Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
|
@ -35,7 +34,7 @@ public partial class AdvisorActivityTodayListPage : IDisposable
|
||||||
[Inject] private IAdvisorReportRepository AdvisorReportRepo { get; set; }
|
[Inject] private IAdvisorReportRepository AdvisorReportRepo { get; set; }
|
||||||
[Inject] private IToastService Toaster { get; set; }
|
[Inject] private IToastService Toaster { get; set; }
|
||||||
private ReportStatusView? ReportStatusView { get; set; } = new();
|
private ReportStatusView? ReportStatusView { get; set; } = new();
|
||||||
private UserPref UserPref { get; set; } = new();
|
private UserProfile UserProfile { get; set; } = new();
|
||||||
private DateTime SelectedDate { get; set; }
|
private DateTime SelectedDate { get; set; }
|
||||||
private bool ReportExist { get; set; }
|
private bool ReportExist { get; set; }
|
||||||
private bool Working { get; set; } = true;
|
private bool Working { get; set; } = true;
|
||||||
|
@ -44,8 +43,8 @@ public partial class AdvisorActivityTodayListPage : IDisposable
|
||||||
{
|
{
|
||||||
Interceptor.RegisterEvent();
|
Interceptor.RegisterEvent();
|
||||||
Interceptor.RegisterBeforeSendEvent();
|
Interceptor.RegisterBeforeSendEvent();
|
||||||
UserPref = await UserProfileService.GetPreferences();
|
UserProfile = await UserProfileService.GetPreferences();
|
||||||
SelectedDate = string.IsNullOrWhiteSpace(UserPref.WorkDate) ? DateTime.Now : DateTime.Parse(UserPref.WorkDate);
|
SelectedDate = string.IsNullOrWhiteSpace(UserProfile.WorkDate) ? DateTime.Now : DateTime.Parse(UserProfile.WorkDate);
|
||||||
ReportExist = await AdvisorReportRepo.ReportExist($"{SelectedDate:yyyy-MM-dd}");
|
ReportExist = await AdvisorReportRepo.ReportExist($"{SelectedDate:yyyy-MM-dd}");
|
||||||
await GetActivities($"{SelectedDate:yyyy-MM-dd}");
|
await GetActivities($"{SelectedDate:yyyy-MM-dd}");
|
||||||
Working = false;
|
Working = false;
|
||||||
|
|
|
@ -14,16 +14,12 @@
|
||||||
// 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.Globalization;
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
using Blazored.Toast.Services;
|
using Blazored.Toast.Services;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.AspNetCore.Components.Forms;
|
using Microsoft.AspNetCore.Components.Forms;
|
||||||
using Wonky.Client.HttpInterceptors;
|
using Wonky.Client.HttpInterceptors;
|
||||||
using Wonky.Client.HttpInterfaces;
|
using Wonky.Client.HttpInterfaces;
|
||||||
using Wonky.Client.HttpRepository;
|
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
using Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,9 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
using System.Text.Json;
|
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Client.HttpInterceptors;
|
using Wonky.Client.HttpInterceptors;
|
||||||
using Wonky.Client.HttpInterfaces;
|
using Wonky.Client.HttpInterfaces;
|
||||||
using Wonky.Client.HttpRepository;
|
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
using Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
@page "/advisor/customers/new"
|
@page "/advisor/customers/new"
|
||||||
@using Microsoft.AspNetCore.Authorization
|
@using Microsoft.AspNetCore.Authorization
|
||||||
@using Wonky.Client.Components
|
@using Wonky.Client.Components
|
||||||
@using System.Xml
|
|
||||||
@attribute [Authorize(Roles = "Advisor")]
|
@attribute [Authorize(Roles = "Advisor")]
|
||||||
|
|
||||||
<PageTitle>Rådgiver Opret Kunde</PageTitle>
|
<PageTitle>Rådgiver Opret Kunde</PageTitle>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,20 +14,13 @@
|
||||||
// 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;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Blazored.LocalStorage;
|
using Blazored.LocalStorage;
|
||||||
using Blazored.Toast.Services;
|
using Blazored.Toast.Services;
|
||||||
using Wonky.Client.HttpInterceptors;
|
using Wonky.Client.HttpInterceptors;
|
||||||
using Wonky.Client.HttpRepository;
|
|
||||||
using Wonky.Client.Services;
|
using Wonky.Client.Services;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.AspNetCore.Components.Forms;
|
using Microsoft.AspNetCore.Components.Forms;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using Wonky.Client.Helpers;
|
|
||||||
using Wonky.Client.HttpInterfaces;
|
using Wonky.Client.HttpInterfaces;
|
||||||
using Wonky.Client.Models;
|
using Wonky.Client.Models;
|
||||||
using Wonky.Client.Shared;
|
using Wonky.Client.Shared;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
|
|
@ -1,5 +1,19 @@
|
||||||
using System.Globalization;
|
|
||||||
using System.Net.NetworkInformation;
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||||
|
//
|
||||||
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Blazored.LocalStorage;
|
using Blazored.LocalStorage;
|
||||||
using Blazored.Toast.Services;
|
using Blazored.Toast.Services;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,12 +14,8 @@
|
||||||
// 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;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Blazored.LocalStorage;
|
using Blazored.LocalStorage;
|
||||||
using Wonky.Client.HttpInterceptors;
|
using Wonky.Client.HttpInterceptors;
|
||||||
using Wonky.Client.HttpRepository;
|
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Client.HttpInterfaces;
|
using Wonky.Client.HttpInterfaces;
|
||||||
using Wonky.Client.Services;
|
using Wonky.Client.Services;
|
||||||
|
@ -36,7 +33,7 @@ namespace Wonky.Client.Pages
|
||||||
[Inject] private HttpInterceptorService Interceptor { get; set; }
|
[Inject] private HttpInterceptorService Interceptor { get; set; }
|
||||||
[Inject] private NavigationManager Navigator { get; set; }
|
[Inject] private NavigationManager Navigator { get; set; }
|
||||||
private List<CompanyDto> Companies { get; set; } = new();
|
private List<CompanyDto> Companies { get; set; } = new();
|
||||||
private UserPref Prefs { get; set; } = new();
|
private UserProfile Profiles { get; set; } = new();
|
||||||
private UserInfoView UserInfo { get; set; } = new();
|
private UserInfoView UserInfo { get; set; } = new();
|
||||||
private string SavedSearch { get; set; } = "";
|
private string SavedSearch { get; set; } = "";
|
||||||
private bool IncludeFolded { get; set; }
|
private bool IncludeFolded { get; set; }
|
||||||
|
@ -55,15 +52,15 @@ namespace Wonky.Client.Pages
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
// set preferences
|
// set preferences
|
||||||
Prefs = await ProfileService.GetPreferences();
|
Profiles = await ProfileService.GetPreferences();
|
||||||
UserInfo = await Storage.GetItemAsync<UserInfoView>("_xu");
|
UserInfo = await Storage.GetItemAsync<UserInfoView>("_xu");
|
||||||
Paging.OrderBy = Prefs.CompanySort;
|
Paging.OrderBy = Profiles.CompanySort;
|
||||||
Paging.SearchColumn = Prefs.CompanySearch;
|
Paging.SearchColumn = Profiles.CompanySearch;
|
||||||
Paging.PageSize = Convert.ToInt32(Prefs.PageSize);
|
Paging.PageSize = Convert.ToInt32(Profiles.PageSize);
|
||||||
Paging.HasFolded = IncludeFolded ? 1 : 0;
|
Paging.HasFolded = IncludeFolded ? 1 : 0;
|
||||||
|
|
||||||
// load saved search
|
// load saved search
|
||||||
SavedSearch = string.IsNullOrWhiteSpace(Prefs.CompanyFilterPhrase) ? "" : Prefs.CompanyFilterPhrase;
|
SavedSearch = string.IsNullOrWhiteSpace(Profiles.CompanyFilterPhrase) ? "" : Profiles.CompanyFilterPhrase;
|
||||||
Paging.SearchTerm = SavedSearch;
|
Paging.SearchTerm = SavedSearch;
|
||||||
|
|
||||||
// get companies
|
// get companies
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
|
|
@ -1,7 +1,19 @@
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using System.IO.Enumeration;
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
using System.Security.Policy;
|
// This program is free software: you can redistribute it and/or modify
|
||||||
using System.Text.Json;
|
// 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 Blazored.LocalStorage;
|
using Blazored.LocalStorage;
|
||||||
using Blazored.Toast.Services;
|
using Blazored.Toast.Services;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
|
@ -9,7 +21,6 @@ using Wonky.Client.Helpers;
|
||||||
using Wonky.Client.HttpInterceptors;
|
using Wonky.Client.HttpInterceptors;
|
||||||
using Wonky.Client.HttpInterfaces;
|
using Wonky.Client.HttpInterfaces;
|
||||||
using Wonky.Client.Models;
|
using Wonky.Client.Models;
|
||||||
using Wonky.Entity.DTO;
|
|
||||||
using Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.Pages;
|
namespace Wonky.Client.Pages;
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
@using Microsoft.AspNetCore.Authorization
|
@using Microsoft.AspNetCore.Authorization
|
||||||
@using Wonky.Client.Components
|
@using Wonky.Client.Components
|
||||||
@using Wonky.Entity.Views
|
|
||||||
@attribute [Authorize(Roles = "Advisor")]
|
@attribute [Authorize(Roles = "Advisor")]
|
||||||
@page "/advisor/reports/new"
|
@page "/advisor/reports/new"
|
||||||
|
|
||||||
|
@ -74,7 +73,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Report.Figures.KmMorning = Prefs.KmMorning;
|
Report.Figures.KmMorning = Profiles.KmMorning;
|
||||||
<td>
|
<td>
|
||||||
<input type="time" id="checkIn" class="form-control"
|
<input type="time" id="checkIn" class="form-control"
|
||||||
@bind-Value="_checkIn" @bind-Value:event="oninput" @onchange="OnTimeChanged"/>
|
@bind-Value="_checkIn" @bind-Value:event="oninput" @onchange="OnTimeChanged"/>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -40,7 +41,7 @@ public partial class AdvisorReportCreatePage : IDisposable
|
||||||
private ReportDto Report { get; set; } = new();
|
private ReportDto Report { get; set; } = new();
|
||||||
private List<ReportItemView> Activities { get; set; } = new();
|
private List<ReportItemView> Activities { get; set; } = new();
|
||||||
private ReportFiguresDto InitialValues { get; set; }
|
private ReportFiguresDto InitialValues { get; set; }
|
||||||
private UserPref Prefs { get; set; } = new();
|
private UserProfile Profiles { get; set; } = new();
|
||||||
private bool FormInvalid { get; set; } = true;
|
private bool FormInvalid { get; set; } = true;
|
||||||
private bool NoFigures { get; set; } = true;
|
private bool NoFigures { get; set; } = true;
|
||||||
private bool Working { get; set; }
|
private bool Working { get; set; }
|
||||||
|
@ -68,10 +69,10 @@ public partial class AdvisorReportCreatePage : IDisposable
|
||||||
ReportContext.OnValidationStateChanged += ValidationChanged;
|
ReportContext.OnValidationStateChanged += ValidationChanged;
|
||||||
|
|
||||||
ProfileService.OnChange += ProfileServiceOnOnChange;
|
ProfileService.OnChange += ProfileServiceOnOnChange;
|
||||||
Prefs = await ProfileService.GetPreferences();
|
Profiles = await ProfileService.GetPreferences();
|
||||||
Logger.LogDebug("{}", JsonSerializer.Serialize(Prefs));
|
Logger.LogDebug("{}", JsonSerializer.Serialize(Profiles));
|
||||||
|
|
||||||
WorkDate = Prefs.WorkDate;
|
WorkDate = Profiles.WorkDate;
|
||||||
if (string.IsNullOrWhiteSpace(WorkDate))
|
if (string.IsNullOrWhiteSpace(WorkDate))
|
||||||
{
|
{
|
||||||
_workDate = DateTime.Now;
|
_workDate = DateTime.Now;
|
||||||
|
@ -102,10 +103,10 @@ public partial class AdvisorReportCreatePage : IDisposable
|
||||||
Logger.LogDebug("OnInitializedAsync => GetKeyFigures <= {}", JsonSerializer.Serialize(Report));
|
Logger.LogDebug("OnInitializedAsync => GetKeyFigures <= {}", JsonSerializer.Serialize(Report));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProfileServiceOnOnChange(UserPref userPref)
|
private void ProfileServiceOnOnChange(UserProfile userProfile)
|
||||||
{
|
{
|
||||||
Prefs = userPref;
|
Profiles = userProfile;
|
||||||
WorkDate = Prefs.WorkDate;
|
WorkDate = Profiles.WorkDate;
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,7 +138,7 @@ public partial class AdvisorReportCreatePage : IDisposable
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Report.Figures.KmMorning = Prefs.KmMorning;
|
Report.Figures.KmMorning = Profiles.KmMorning;
|
||||||
}
|
}
|
||||||
|
|
||||||
NoFigures = false;
|
NoFigures = false;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -14,10 +15,8 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Toolbelt.Blazor;
|
|
||||||
using Wonky.Client.HttpInterceptors;
|
using Wonky.Client.HttpInterceptors;
|
||||||
using Wonky.Client.HttpInterfaces;
|
using Wonky.Client.HttpInterfaces;
|
||||||
using Wonky.Client.HttpRepository;
|
|
||||||
using Wonky.Entity.Views;
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.Pages;
|
namespace Wonky.Client.Pages;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -33,7 +34,7 @@ public partial class AdvisorReportViewPage : IDisposable
|
||||||
[Inject] private ILogger<AdvisorReportViewPage> Logger { get; set; }
|
[Inject] private ILogger<AdvisorReportViewPage> Logger { get; set; }
|
||||||
[Inject] private UserProfileService ProfileService { get; set; }
|
[Inject] private UserProfileService ProfileService { get; set; }
|
||||||
|
|
||||||
private UserPref Prefs { get; set; } = new();
|
private UserProfile Profiles { get; set; } = new();
|
||||||
private ReportView Report { get; set; } = new();
|
private ReportView Report { get; set; } = new();
|
||||||
private List<ReportItemView> Activities { get; set; } = new ();
|
private List<ReportItemView> Activities { get; set; } = new ();
|
||||||
private bool Working { get; set; }
|
private bool Working { get; set; }
|
||||||
|
@ -116,10 +117,10 @@ public partial class AdvisorReportViewPage : IDisposable
|
||||||
Working = false;
|
Working = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProfileServiceOnOnChange(UserPref userPref)
|
private void ProfileServiceOnOnChange(UserProfile userProfile)
|
||||||
{
|
{
|
||||||
Prefs = userPref;
|
Profiles = userProfile;
|
||||||
ReportDate = Prefs.WorkDate;
|
ReportDate = Profiles.WorkDate;
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -15,13 +16,10 @@
|
||||||
|
|
||||||
using Blazored.Toast.Services;
|
using Blazored.Toast.Services;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Client.Components;
|
|
||||||
using Wonky.Client.HttpInterceptors;
|
using Wonky.Client.HttpInterceptors;
|
||||||
using Wonky.Client.HttpInterfaces;
|
using Wonky.Client.HttpInterfaces;
|
||||||
using Wonky.Client.HttpRepository;
|
|
||||||
using Wonky.Client.Services;
|
using Wonky.Client.Services;
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
using Wonky.Entity.Views;
|
|
||||||
|
|
||||||
namespace Wonky.Client.Pages;
|
namespace Wonky.Client.Pages;
|
||||||
|
|
||||||
|
@ -33,7 +31,7 @@ public partial class AdvisorTaskItemListCrmPage : IDisposable
|
||||||
[Inject] private NavigationManager Navigator { get; set; }
|
[Inject] private NavigationManager Navigator { get; set; }
|
||||||
[Inject] private IAdvisorTaskItemRepository AdvisorTaskRepo { get; set; }
|
[Inject] private IAdvisorTaskItemRepository AdvisorTaskRepo { get; set; }
|
||||||
[Inject] private IToastService Toaster { get; set; }
|
[Inject] private IToastService Toaster { get; set; }
|
||||||
private UserPref Prefs { get; set; } = new();
|
private UserProfile Profiles { 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;
|
||||||
private List<TaskItemDto> TaskItems { get; set; } = new();
|
private List<TaskItemDto> TaskItems { get; set; } = new();
|
||||||
|
@ -41,9 +39,9 @@ public partial class AdvisorTaskItemListCrmPage : IDisposable
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
Prefs = await UserProfileService.GetPreferences();
|
Profiles = await UserProfileService.GetPreferences();
|
||||||
if(!string.IsNullOrWhiteSpace(Prefs.WorkDate))
|
if(!string.IsNullOrWhiteSpace(Profiles.WorkDate))
|
||||||
WorkDate = Prefs.WorkDate;
|
WorkDate = Profiles.WorkDate;
|
||||||
|
|
||||||
Interceptor.RegisterEvent();
|
Interceptor.RegisterEvent();
|
||||||
Interceptor.RegisterBeforeSendEvent();
|
Interceptor.RegisterBeforeSendEvent();
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -14,12 +15,10 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.AspNetCore.Components.Forms;
|
using Microsoft.AspNetCore.Components.Forms;
|
||||||
using Wonky.Client.HttpInterceptors;
|
using Wonky.Client.HttpInterceptors;
|
||||||
using Wonky.Client.HttpInterfaces;
|
using Wonky.Client.HttpInterfaces;
|
||||||
using Wonky.Client.HttpRepository;
|
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
|
|
||||||
namespace Wonky.Client.Pages;
|
namespace Wonky.Client.Pages;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU Affero General Public License as
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -13,11 +14,9 @@
|
||||||
// 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 Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Wonky.Client.HttpInterceptors;
|
using Wonky.Client.HttpInterceptors;
|
||||||
using Wonky.Client.HttpInterfaces;
|
using Wonky.Client.HttpInterfaces;
|
||||||
using Wonky.Client.HttpRepository;
|
|
||||||
|
|
||||||
namespace Wonky.Client.Pages;
|
namespace Wonky.Client.Pages;
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue