Compare commits
11 Commits
PageAuthManRC
...
RC2
| Author | SHA1 | Date | |
|---|---|---|---|
| f1628818f3 | |||
| b57d20420b | |||
| cbf97a2eb6 | |||
| 284f7ff241 | |||
| 888c7398f7 | |||
| 4926cb4715 | |||
| e2c7615826 | |||
| dc8ce10b51 | |||
| ffb4c9872d | |||
| a415d175d9 | |||
| 60b069cd28 |
@@ -469,6 +469,7 @@ namespace GWMS.Data.Controllers
|
||||
.Where(x => x.FluxType == "Level" && x.PlantId == PlantId)
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
|
||||
var rawMainPressData = dbCtxMult
|
||||
@@ -476,6 +477,7 @@ namespace GWMS.Data.Controllers
|
||||
.Where(x => x.FluxType == "MainPress" && x.PlantId == PlantId)
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
|
||||
var rawBHPressData = dbCtxMult
|
||||
@@ -483,6 +485,7 @@ namespace GWMS.Data.Controllers
|
||||
.Where(x => x.FluxType == "PressBH" && x.PlantId == PlantId)
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
|
||||
var rawBLPressData = dbCtxMult
|
||||
@@ -490,6 +493,7 @@ namespace GWMS.Data.Controllers
|
||||
.Where(x => x.FluxType == "PressBL" && x.PlantId == PlantId)
|
||||
.OrderByDescending(x => x.DtEvent)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtEvent)
|
||||
.ToList();
|
||||
|
||||
var rawOrderData = dbCtxMult
|
||||
@@ -497,6 +501,7 @@ namespace GWMS.Data.Controllers
|
||||
.Where(x => x.PlantId == PlantId && x.ExecutionQty == 0)
|
||||
.OrderByDescending(x => x.DtOrder)
|
||||
.Take(maxRecords)
|
||||
.OrderBy(x => x.DtOrder)
|
||||
.ToList();
|
||||
|
||||
LevelTS = rawLevelData
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="row px-1 text-light">
|
||||
<div class="form-row text-light">
|
||||
<div class="col-5 pr-0 text-left">
|
||||
GWMS <span class="small">v.@version</span>
|
||||
</div>
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
@inject MessageService AppMessages
|
||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||
|
||||
<div class="row pt-3">
|
||||
<div class="col-6 col-sm-6 col-lg-4 col-xl-3">
|
||||
<div class="form-row pt-3">
|
||||
<div class="col-7 col-md-6 col-lg-4 col-xl-3">
|
||||
<LoginDisplay></LoginDisplay>
|
||||
</div>
|
||||
<div class="col-12 col-lg-4 col-xl-6 d-none d-lg-block text-center h4 text-truncate">
|
||||
<span class="@PageIcon" aria-hidden="true"></span> @PageName
|
||||
</div>
|
||||
<div class="col-6 col-sm-6 col-lg-4 col-xl-3 text-right">
|
||||
<div class="col-5 col-md-6 col-lg-4 col-xl-3 text-right">
|
||||
@if (ShowSearch)
|
||||
{
|
||||
<SearchMod></SearchMod>
|
||||
|
||||
@@ -8,8 +8,13 @@
|
||||
<div class="input-group-prepend">
|
||||
<a title="LogOut" href="Identity/Account/LogOut" class="btn btn-sm btn-danger"><i class="fas fa-sign-out-alt"></i></a>
|
||||
</div>
|
||||
<a title="Manage" href="Identity/Account/Manage" class="btn btn-sm btn-outline-dark mx-0 px-1">
|
||||
<i class="fas fa-user-alt"></i> @userName.Substring(0, 10) ...
|
||||
<a title="Gestione account @userName" href="Identity/Account/Manage" class="btn btn-sm btn-outline-dark mx-0 px-1">
|
||||
<div class="d-none d-sm-block">
|
||||
<i class="fas fa-user-alt"></i> @StringLim(userName, 30)
|
||||
</div>
|
||||
<div class="d-block d-sm-none">
|
||||
<i class="fas fa-user-alt"></i> @StringLim(userName, 15)
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</Authorized>
|
||||
@@ -48,4 +53,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
protected string StringLim(string original, int maxLen)
|
||||
{
|
||||
return original.Length <= maxLen ? original : $"{original.Substring(0, maxLen - 3)}...";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,63 +4,67 @@
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using GWMS.UI.Data
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@using Microsoft.JSInterop
|
||||
|
||||
@inject MessageService AppMService
|
||||
@inject GWMSDataService DataService
|
||||
@inject IConfiguration Configuration
|
||||
@inject IJSRuntime JSRuntime
|
||||
|
||||
<div class="card">
|
||||
@*<div class="card-header bg-info text-light">
|
||||
<b>Modifica</b>
|
||||
</div>*@
|
||||
<div class="card-body small p-1">
|
||||
<EditForm Model="@_currItem">
|
||||
<DataAnnotationsValidator />
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-2">
|
||||
<img src="@getImgUrl(_currItem.OrderCode)" class="img-fluid" />
|
||||
</div>
|
||||
<div class="col-12 col-lg-8 align-items-center">
|
||||
<div class="row small">
|
||||
<div class="col-12">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 3em;">
|
||||
<span class="fas fa-truck" aria-hidden="true"></span>
|
||||
</span>
|
||||
@if (_currItem != null)
|
||||
{
|
||||
<EditForm Model="@_currItem">
|
||||
<DataAnnotationsValidator />
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-2 text-center">
|
||||
<div id="qrCodeImg"></div>
|
||||
@_currItem.OrderCode
|
||||
@*<img src="@getImgUrl(_currItem.OrderCode)" class="img-fluid" />*@
|
||||
</div>
|
||||
@*<div class="col-12 col-lg-8 align-items-center">
|
||||
<div class="row small">
|
||||
<div class="col-12">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 3em;">
|
||||
<span class="fas fa-truck" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<DateEdit @bind-Date="_currItem.DtETA" InputMode="DateInputMode.DateTime" class="form-control" title="ETA (previsione consegna)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 3em;">
|
||||
<span class="fas fa-comment-alt" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<InputText id="OrderDesc" @bind-Value="_currItem.OrderDesc" class="form-control" title="Note Ordine (opzionali)" />
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
Note
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<DateEdit @bind-Date="_currItem.DtETA" InputMode="DateInputMode.DateTime" class="form-control" title="ETA (previsione consegna)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 3em;">
|
||||
<span class="fas fa-comment-alt" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<InputText id="OrderDesc" @bind-Value="_currItem.OrderDesc" class="form-control" title="Note Ordine (opzionali)" />
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
Note
|
||||
</span>
|
||||
</div>
|
||||
</div>*@
|
||||
<div class="col-12 col-lg-2">
|
||||
<div class="row">
|
||||
@*<div class="col">
|
||||
<button type="button" class="btn btn-sm btn-success btn-block" value="Save" @onclick="saveUpdate">Save <i class="far fa-save"></i></button>
|
||||
</div>*@
|
||||
<div class="col">
|
||||
<button type="button" class="btn btn-sm btn-warning btn-block" value="Cancel" @onclick="cancelUpdate">Cancel <i class="fas fa-ban"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-2">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<button type="button" class="btn btn-sm btn-success btn-block" value="Save" @onclick="saveUpdate">Save <i class="far fa-save"></i></button>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<button type="button" class="btn btn-sm btn-warning btn-block" value="Cancel" @onclick="cancelUpdate">Cancel <i class="fas fa-ban"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</EditForm>
|
||||
</EditForm>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -76,7 +80,7 @@
|
||||
{
|
||||
get
|
||||
{
|
||||
return _currItem = null;
|
||||
return _currItem;
|
||||
}
|
||||
set
|
||||
{
|
||||
@@ -84,6 +88,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
public async void refreshQr()
|
||||
{
|
||||
await JSRuntime.InvokeVoidAsync("refreshQr", rawCode);
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> DataReset { get; set; }
|
||||
[Parameter]
|
||||
@@ -122,9 +131,23 @@
|
||||
await DataReset.InvokeAsync(0);
|
||||
}
|
||||
|
||||
protected string rawCode
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (_currItem != null)
|
||||
{
|
||||
answ = _currItem.OrderCode;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await ReloadAllData();
|
||||
await JSRuntime.InvokeVoidAsync("displayQr", "qrCodeImg", rawCode);
|
||||
}
|
||||
|
||||
protected async Task ReloadAllData()
|
||||
|
||||
@@ -49,25 +49,28 @@
|
||||
<li class="list-group-item active d-flex justify-content-between align-items-center">SERBATOIO Principale</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div class="row">
|
||||
<div class="col-12 px-0">
|
||||
<LineChart @ref="LevelVal" TItem="double" OptionsObject="lineChartOptions" />
|
||||
@*<div class="col-4 small">
|
||||
@currItem.LevelAct.ToString("N0")
|
||||
</div>*@
|
||||
<div class="col-12 text-center small">
|
||||
<span><i class="fas fa-database"></i> Livello: </span> <span style="font-size:1.2em;"><b>@currItem.LevelRatio</b> <sub>%</sub></span> <span>(@currItem.LevelAct.ToString("N0")/@currItem.LevelMax.ToString("N0"))</span>
|
||||
</div>
|
||||
<div class="col-6 small">
|
||||
@currItem.LevelAct.ToString("N0")
|
||||
</div>
|
||||
<div class="col-6 text-right small">
|
||||
@currItem.LevelMax.ToString("N0")
|
||||
</div>
|
||||
<div class="col-12">
|
||||
@*<div class="col-4 text-right small">
|
||||
@currItem.LevelMax.ToString("N0")
|
||||
</div>*@
|
||||
<div class="col-12 small">
|
||||
<Progress>
|
||||
<ProgressBar Value="@currItem.LevelRatio" Striped="false" Animated="false" />
|
||||
</Progress>
|
||||
</div>
|
||||
<div class="col-12 px-0 mt-2">
|
||||
<LineChart @ref="LevelVal" TItem="double" OptionsObject="lineChartOptions" />
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<span><i class="fas fa-database"></i> Livello</span> <span style="font-size:1.2em;"><b>@currItem.LevelRatio</b> <sub>%</sub></span>
|
||||
</li>
|
||||
@*<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<span><i class="fas fa-database"></i> Livello</span> <span style="font-size:1.2em;"><b>@currItem.LevelRatio</b> <sub>%</sub></span>
|
||||
</li>*@
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<span><i class="fas fa-compress-arrows-alt"></i> Pressione</span> <span style="font-size:1.2em;"><b>@currItem.PressAct["Main"].ToString("N1")</b> <span class="small"> <sub>bar</sub></span></span>
|
||||
</li>
|
||||
|
||||
@@ -24,23 +24,25 @@ namespace GWMS.UI.Components
|
||||
{
|
||||
XAxes = new object[]
|
||||
{
|
||||
new {
|
||||
Display = true,
|
||||
//type = "timeseries",
|
||||
//type = "time",
|
||||
//Time = new {
|
||||
// unit="day"
|
||||
//}
|
||||
}
|
||||
},
|
||||
new {
|
||||
display = true,
|
||||
//type = "timeseries",
|
||||
//type = "time",
|
||||
//Time = new {
|
||||
// unit="day"
|
||||
//}
|
||||
}
|
||||
},
|
||||
YAxes = new object[]
|
||||
{
|
||||
new {
|
||||
Display = true,
|
||||
ticks= new {
|
||||
suggestedMin = 0,
|
||||
suggestedMax = 10000
|
||||
}
|
||||
display = true,
|
||||
position = "right",
|
||||
//text = "Kg",
|
||||
ticks = new {
|
||||
suggestedMin = 0,
|
||||
suggestedMax = 10000
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -54,8 +56,14 @@ namespace GWMS.UI.Components
|
||||
Mode = "nearest",
|
||||
Intersect = false
|
||||
},
|
||||
Animation = false,
|
||||
AspectRatio = 2
|
||||
Animation = true,
|
||||
Responsive = true,
|
||||
AspectRatio = 2,
|
||||
type = "line",
|
||||
Legend = new
|
||||
{
|
||||
display = false
|
||||
}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -119,7 +127,7 @@ namespace GWMS.UI.Components
|
||||
var dataReload = Task.Run(async () =>
|
||||
{
|
||||
// aggiunta delay o non riesce a disegnare
|
||||
Thread.Sleep(50);
|
||||
Thread.Sleep(150);
|
||||
await HandleRedraw();
|
||||
});
|
||||
}
|
||||
@@ -134,12 +142,15 @@ namespace GWMS.UI.Components
|
||||
{
|
||||
int answ = 1;
|
||||
int numCount = _currItem.LevelTS.Count;
|
||||
// passo a 2h se > 5 gg
|
||||
if (numCount > 120)
|
||||
// passo a 2h se > 3 gg
|
||||
if (numCount > 72)
|
||||
answ = 2;
|
||||
// passo a 3h se > 10 gg
|
||||
else if (numCount > 240)
|
||||
// passo a 3h se > 5 gg
|
||||
else if (numCount > 120)
|
||||
answ = 3;
|
||||
// passo a 4h se > 10 gg
|
||||
else if (numCount > 240)
|
||||
answ = 4;
|
||||
redFact = answ;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<Version>1.0.2108.2613</Version>
|
||||
<Version>1.0.2108.2619</Version>
|
||||
<UserSecretsId>95c9f021-52d1-4390-a670-5810b7b777b0</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -8,18 +8,15 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
<div class="col-6 pr-0 col-lg-8 h3">
|
||||
<div class="col-6 pr-0 col-lg-8 h3 mb-0">
|
||||
Consegne
|
||||
</div>
|
||||
<div class="col-6 col-lg-4">
|
||||
<div class="row">
|
||||
<div class="col-6 px-1">
|
||||
<div class="col-6">
|
||||
<button class="btn btn-sm btn-block btn-secondary" @onclick="() => ToggleFiltPeriod()"><i class="far fa-calendar-alt"></i> <i class="@icnFiltTime"></i></button>
|
||||
</div>
|
||||
@*<div class="col-4 px-1">
|
||||
<button class="btn btn-sm btn-block btn-secondary" @onclick="() => ToggleFiltTransp()"><i class="fas fa-truck-moving"></i> <i class="@icnFiltTran"></i></button>
|
||||
</div>*@
|
||||
<div class="col-6 px-1">
|
||||
<div class="col-6">
|
||||
<button class="btn btn-sm btn-block btn-secondary" @onclick="() => ToggleFiltDest()"><i class="fas fa-gas-pump"></i> <i class="@icnFiltDest"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -90,7 +87,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-1">
|
||||
<div class="card-body">
|
||||
@if (currRecord != null)
|
||||
{
|
||||
<OrderTranspEditor currItem="@currRecord" DataReset="ResetData" DataUpdated="UpdateData" SupplierId="@currRecord.SupplierId"></OrderTranspEditor>
|
||||
@@ -107,6 +104,7 @@
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@*<div id="qrCodeImg"></div>*@
|
||||
<table class="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -119,7 +117,20 @@
|
||||
@foreach (var record in ListRecords)
|
||||
{
|
||||
<tr class="@checkSelect(@record.OrderId)">
|
||||
<td class="text-nowrap"><button class="btn btn-sm btn-info" @onclick="() => Edit(record)"><span class="oi oi-magnifying-glass"></span></button></td>
|
||||
<td class="text-nowrap">
|
||||
@if (currRecord == null)
|
||||
{
|
||||
<button class="btn btn-sm btn-info" @onclick="() => Edit(record)">
|
||||
<i class="oi oi-magnifying-glass"></i>
|
||||
</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-sm btn-secondary disabled">
|
||||
<i class="oi oi-magnifying-glass"></i>
|
||||
</button>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<div><b>@record.Plant.PlantCode</b> | @record.Plant.PlantDesc</div>
|
||||
<div class="small"><span class="fas fa-comment-alt" aria-hidden="true"></span> @record.OrderDesc</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@page "/UserAdmin"
|
||||
|
||||
@using GWMS.UI.Pages
|
||||
@using GWMS.UI.Components
|
||||
|
||||
@if (ShowPopup)
|
||||
{
|
||||
@@ -168,6 +169,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="card-footer p-1">
|
||||
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="isLoading" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -27,6 +27,11 @@ namespace GWMS.UI.Pages
|
||||
/// </summary>
|
||||
private IdentityUser objUser = new IdentityUser();
|
||||
|
||||
/// <summary>
|
||||
/// Collezione utenti
|
||||
/// </summary>
|
||||
private List<IdentityUser> RawList = new List<IdentityUser>();
|
||||
|
||||
/// <summary>
|
||||
/// Elenco ROLES da mostrare in dropdown durante editing (1 solo? usare DB?!?)
|
||||
/// </summary>
|
||||
@@ -55,6 +60,10 @@ namespace GWMS.UI.Pages
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private int _currPage { get; set; } = 1;
|
||||
|
||||
private int _numRecord { get; set; } = 10;
|
||||
|
||||
[CascadingParameter]
|
||||
private Task<AuthenticationState> authenticationStateTask { get; set; }
|
||||
|
||||
@@ -78,6 +87,39 @@ namespace GWMS.UI.Pages
|
||||
/// </summary>
|
||||
private string CurrentUserRole { get; set; } = "User";
|
||||
|
||||
private int currPage
|
||||
{
|
||||
get => _currPage;
|
||||
set
|
||||
{
|
||||
if (_currPage != value)
|
||||
{
|
||||
_currPage = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool isLoading { get; set; } = false;
|
||||
|
||||
[Inject]
|
||||
private MessageService MessageService { get; set; }
|
||||
|
||||
private int numRecord
|
||||
{
|
||||
get => _numRecord;
|
||||
set
|
||||
{
|
||||
if (_numRecord != value)
|
||||
{
|
||||
_numRecord = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Protected Properties
|
||||
@@ -97,8 +139,33 @@ namespace GWMS.UI.Pages
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; }
|
||||
|
||||
protected int totalCount
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (RawList != null)
|
||||
{
|
||||
answ = RawList.Count;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public string searchVal
|
||||
{
|
||||
get
|
||||
{
|
||||
return MessageService.SearchVal;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void AddNewUser()
|
||||
@@ -220,6 +287,13 @@ namespace GWMS.UI.Pages
|
||||
ShowPopup = true;
|
||||
}
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
isLoading = true;
|
||||
await GetUsers();
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
private async Task SaveUser()
|
||||
{
|
||||
try
|
||||
@@ -353,11 +427,22 @@ namespace GWMS.UI.Pages
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void ForceReload(int newNum)
|
||||
{
|
||||
numRecord = newNum;
|
||||
}
|
||||
|
||||
protected void ForceReloadPage(int newNum)
|
||||
{
|
||||
currPage = newNum;
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
AppMService.ShowSearch = true;
|
||||
AppMService.PageName = "Gestione Utenti";
|
||||
AppMService.PageIcon = "fas fa-users pr-2";
|
||||
AppMService.EA_SearchUpdated += OnSeachUpdated;
|
||||
// lettura dati
|
||||
await GetUsers();
|
||||
await CheckSuperAdmin();
|
||||
@@ -374,6 +459,7 @@ namespace GWMS.UI.Pages
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
AppMService.EA_SearchUpdated -= OnSeachUpdated;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -386,7 +472,16 @@ namespace GWMS.UI.Pages
|
||||
// Collection to hold users
|
||||
UsersList = new List<UserData>();
|
||||
// get users from _UserManager
|
||||
var user = _UserManager.Users.Select(x => new IdentityUser
|
||||
var allData = _UserManager.Users.ToList();
|
||||
if (!string.IsNullOrEmpty(searchVal))
|
||||
{
|
||||
RawList = allData.Where(x => x.NormalizedEmail.Contains(searchVal.ToUpper()) || x.NormalizedUserName.Contains(searchVal.ToUpper())).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
RawList = allData;
|
||||
}
|
||||
var user = RawList.Skip(numRecord * (currPage - 1)).Take(numRecord).Select(x => new IdentityUser
|
||||
{
|
||||
Id = x.Id,
|
||||
UserName = x.UserName,
|
||||
@@ -411,6 +506,15 @@ namespace GWMS.UI.Pages
|
||||
}
|
||||
}
|
||||
|
||||
public async void OnSeachUpdated()
|
||||
{
|
||||
await GetUsers();
|
||||
await InvokeAsync(() =>
|
||||
{
|
||||
StateHasChanged();
|
||||
});
|
||||
}
|
||||
|
||||
public string ShowClaims(List<System.Security.Claims.Claim> ClaimList)
|
||||
{
|
||||
string answ = string.Join(",", ClaimList);
|
||||
|
||||
@@ -55,5 +55,27 @@
|
||||
|
||||
<script src="font-awesome/js/all.min.js"></script>
|
||||
<script src="_framework/blazor.server.js"></script>
|
||||
|
||||
<script type="text/javascript" src="~/lib/qrcode.js"></script>
|
||||
<script type="text/javascript">
|
||||
// gestione qrcode... da https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity-enable-qrcodes?view=aspnetcore-5.0
|
||||
//var qrcode = new QRCode("qrCodeImg");
|
||||
function displayQr(elementName, rawData) {
|
||||
try {
|
||||
if (elementName != "" && rawData != "") {
|
||||
//qrcode = new QRCode(document.getElementById(elementName));
|
||||
new QRCode(document.getElementById(elementName),
|
||||
{
|
||||
text: rawData,
|
||||
width: 400,
|
||||
height: 400
|
||||
});
|
||||
//qrcode.makeCode(rawData);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -11,11 +11,11 @@
|
||||
</div>
|
||||
|
||||
<CascadingValue Name="ShowSearch" Value=@ShowSearch>
|
||||
<div class="main">
|
||||
<div class="top-row px-0">
|
||||
<div class="main mr-1">
|
||||
<div class="top-row">
|
||||
<CmpTop></CmpTop>
|
||||
</div>
|
||||
<div class="content pt-1 pt-lg-2 px-2 mb-5">
|
||||
<div class="content pt-1 pt-lg-2 mb-5">
|
||||
@Body
|
||||
</div>
|
||||
<div class="fixed-bottom bottom-row">
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
background-color: #f7f7f7;
|
||||
border-bottom: 1px solid #d6d5d5;
|
||||
height: 3.5rem;
|
||||
align-items: center;
|
||||
/*justify-content: space-evenly;
|
||||
display: flex;*/
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.top-row ::deep a, .top-row .btn-link {
|
||||
@@ -34,37 +34,10 @@
|
||||
.bottom-row {
|
||||
color: #dedede;
|
||||
background-color: #000000;
|
||||
/*border-bottom: 1px solid #313131;*/
|
||||
/*justify-content: flex-end;*/
|
||||
height: 2rem;
|
||||
/*display: flex;*/
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.bottom-row ::deep a, .top-row .btn-link {
|
||||
white-space: nowrap;
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
|
||||
.bottom-row a:first-child {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
/*
|
||||
@media (max-width: 640.98px) {
|
||||
.top-row:not(.auth) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.top-row.auth {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.top-row a, .top-row .btn-link {
|
||||
margin-left: 0;
|
||||
}
|
||||
}*/
|
||||
|
||||
@media (min-width: 641px) {
|
||||
.page {
|
||||
flex-direction: row;
|
||||
|
||||
+635
-549
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>GWMS - Gas Warehouse Management System</i>
|
||||
<h4>Versione: 1.0.2108.2613</h4>
|
||||
<h4>Versione: 1.0.2108.2619</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.2108.2613
|
||||
1.0.2108.2619
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.0.2108.2613</version>
|
||||
<version>1.0.2108.2619</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user