-
+ @*
+ @currItem.LevelAct.ToString("N0")
+
*@
+
+ Livello: @currItem.LevelRatio % (@currItem.LevelAct.ToString("N0")/@currItem.LevelMax.ToString("N0"))
-
- @currItem.LevelAct.ToString("N0")
-
-
- @currItem.LevelMax.ToString("N0")
-
-
+ @*
+ @currItem.LevelMax.ToString("N0")
+
*@
+
+
+
+
-
- Livello @currItem.LevelRatio %
-
+ @*
+ Livello @currItem.LevelRatio %
+ *@
Pressione @currItem.PressAct["Main"].ToString("N1") bar
diff --git a/GWMS.UI/Components/PlantDetail.razor.cs b/GWMS.UI/Components/PlantDetail.razor.cs
index f20e5dd..94a558b 100644
--- a/GWMS.UI/Components/PlantDetail.razor.cs
+++ b/GWMS.UI/Components/PlantDetail.razor.cs
@@ -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
+ }
};
///
@@ -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;
}
diff --git a/GWMS.UI/GWMS.UI.csproj b/GWMS.UI/GWMS.UI.csproj
index 94f2327..4087884 100644
--- a/GWMS.UI/GWMS.UI.csproj
+++ b/GWMS.UI/GWMS.UI.csproj
@@ -2,7 +2,7 @@
net5.0
- 1.0.2108.2613
+ 1.0.2108.2618
95c9f021-52d1-4390-a670-5810b7b777b0
diff --git a/GWMS.UI/Pages/Transporters.razor b/GWMS.UI/Pages/Transporters.razor
index aa19632..936c9af 100644
--- a/GWMS.UI/Pages/Transporters.razor
+++ b/GWMS.UI/Pages/Transporters.razor
@@ -16,9 +16,6 @@
- @*
-
-
*@
@@ -107,6 +104,7 @@
{
+ @*
*@
@@ -119,7 +117,20 @@
@foreach (var record in ListRecords)
{
- |
+
+ @if (currRecord == null)
+ {
+
+ }
+ else
+ {
+
+ }
+ |
@record.Plant.PlantCode | @record.Plant.PlantDesc
@record.OrderDesc
diff --git a/GWMS.UI/Pages/UserAdmin.razor b/GWMS.UI/Pages/UserAdmin.razor
index aa623f7..46336ce 100644
--- a/GWMS.UI/Pages/UserAdmin.razor
+++ b/GWMS.UI/Pages/UserAdmin.razor
@@ -1,6 +1,7 @@
@page "/UserAdmin"
@using GWMS.UI.Pages
+@using GWMS.UI.Components
@if (ShowPopup)
{
@@ -168,6 +169,7 @@
|
-
\ No newline at end of file
diff --git a/GWMS.UI/Pages/UserAdmin.razor.cs b/GWMS.UI/Pages/UserAdmin.razor.cs
index aa09a45..1335743 100644
--- a/GWMS.UI/Pages/UserAdmin.razor.cs
+++ b/GWMS.UI/Pages/UserAdmin.razor.cs
@@ -27,6 +27,11 @@ namespace GWMS.UI.Pages
///
private IdentityUser objUser = new IdentityUser();
+ ///
+ /// Collezione utenti
+ ///
+ private List
RawList = new List();
+
///
/// Elenco ROLES da mostrare in dropdown durante editing (1 solo? usare DB?!?)
///
@@ -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 authenticationStateTask { get; set; }
@@ -78,6 +87,39 @@ namespace GWMS.UI.Pages
///
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;
}
///
@@ -386,7 +472,16 @@ namespace GWMS.UI.Pages
// Collection to hold users
UsersList = new List();
// 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 ClaimList)
{
string answ = string.Join(",", ClaimList);
diff --git a/GWMS.UI/Pages/_Host.cshtml b/GWMS.UI/Pages/_Host.cshtml
index f125b0a..8373e49 100644
--- a/GWMS.UI/Pages/_Host.cshtml
+++ b/GWMS.UI/Pages/_Host.cshtml
@@ -55,5 +55,27 @@
+
+
+