Merge branch 'feature/ReviewLayoutHeader' into develop
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
@using MP.Stats.Components
|
||||
@using System.Security.Claims
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using MP.Stats.Data
|
||||
|
||||
@inject MessageService AppMessages
|
||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||
|
||||
<div class="row pt-3">
|
||||
<div class="col-4">
|
||||
<div class="col-3">
|
||||
<i class="fas fa-user-alt"></i> <b>@userName</b>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="col-6 text-center h4">
|
||||
<span class="@PageIcon" aria-hidden="true"></span> @PageName
|
||||
</div>
|
||||
<div class="col-4 text-right">
|
||||
<div class="col-3 text-right">
|
||||
@if (ShowSearch)
|
||||
{
|
||||
<SearchMod></SearchMod>
|
||||
@@ -25,11 +28,33 @@
|
||||
|
||||
private string userName = "";
|
||||
|
||||
private string PageName { get; set; }
|
||||
private string PageIcon { get; set; }
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await forceReload();
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
AppMessages.EA_PageUpdated += OnPageUpdate;
|
||||
}
|
||||
public void OnPageUpdate()
|
||||
{
|
||||
PageName = AppMessages.PageName;
|
||||
PageIcon = AppMessages.PageIcon;
|
||||
InvokeAsync(() =>
|
||||
{
|
||||
StateHasChanged();
|
||||
});
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
AppMessages.EA_PageUpdated -= OnPageUpdate;
|
||||
}
|
||||
|
||||
private async Task forceReload()
|
||||
{
|
||||
|
||||
|
||||
@@ -6,20 +6,11 @@
|
||||
<div class="col-3">
|
||||
GRAFICO
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<div class="col-3">
|
||||
<i class="fas fa-angle-double-right fa-4x"></i>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-block btn-primary" @onclick="() => ShowDDB()" title="Vai al Diario Produzione"><span class="oi oi-clipboard"></span> Diario Produzione</button>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-block btn-info" @onclick="() => ShowUAL()" title="Vai all'User ActionLog"><span class="oi oi-document"></span> User ActionLog</button>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-block btn-success" @onclick="() => ShowCont()" title="Vai al Registro Controlli"><span class="oi oi-beaker"></span> Registro Controlli</button>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-block btn-warning" @onclick="() => ShowScar()" title="Vai al Registro Scarti"><span class="oi oi-warning"></span> Registro Scarti</button>
|
||||
<div class="col-6">
|
||||
<JumpDetail DetailFilterSel="@CurrFilter"></JumpDetail>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -40,38 +31,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public SelectData CurrFilter { get; set; }
|
||||
|
||||
protected void ShowCont()
|
||||
{
|
||||
SetFilter();
|
||||
// rimando...
|
||||
NavManager.NavigateTo($"controlli");
|
||||
}
|
||||
|
||||
protected void ShowDDB()
|
||||
{
|
||||
SetFilter();
|
||||
// rimando...
|
||||
NavManager.NavigateTo($"diario");
|
||||
}
|
||||
|
||||
protected void ShowScar()
|
||||
{
|
||||
SetFilter();
|
||||
// rimando...
|
||||
NavManager.NavigateTo($"scarti");
|
||||
}
|
||||
|
||||
protected void ShowUAL()
|
||||
{
|
||||
SetFilter();
|
||||
// rimando...
|
||||
NavManager.NavigateTo($"userlog");
|
||||
}
|
||||
|
||||
protected void SetFilter()
|
||||
protected override Task OnInitializedAsync()
|
||||
{
|
||||
int oraStart = 0;
|
||||
switch (currRecord.Turno)
|
||||
@@ -95,6 +57,8 @@
|
||||
DateStart = currRecord.DataRif.AddHours(oraStart),
|
||||
DateEnd = currRecord.DataRif.AddHours(oraStart + 8)
|
||||
};
|
||||
MessageService.DetailFilter = CurrFilter;
|
||||
|
||||
return base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
@using MP.Stats.Data
|
||||
@inject NavigationManager NavManager
|
||||
@inject MessageService MessageService
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<button class="btn btn-block btn-primary" @onclick="() => ShowDDB()" title="Vai al Diario Produzione"><span class="oi oi-clipboard"></span> Diario Produzione</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-block btn-info" @onclick="() => ShowUAL()" title="Vai all'User ActionLog"><span class="oi oi-document"></span> User ActionLog</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<button class="btn btn-block btn-success" @onclick="() => ShowCont()" title="Vai al Registro Controlli"><span class="oi oi-beaker"></span> Registro Controlli</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-block btn-warning" @onclick="() => ShowScar()" title="Vai al Registro Scarti"><span class="oi oi-warning"></span> Registro Scarti</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code{
|
||||
[Parameter]
|
||||
public SelectData DetailFilterSel { get; set; }
|
||||
|
||||
protected void ShowCont()
|
||||
{
|
||||
SetFilter();
|
||||
// rimando...
|
||||
NavManager.NavigateTo($"controlli");
|
||||
}
|
||||
|
||||
protected void ShowDDB()
|
||||
{
|
||||
SetFilter();
|
||||
// rimando...
|
||||
NavManager.NavigateTo($"diario");
|
||||
}
|
||||
|
||||
protected void ShowScar()
|
||||
{
|
||||
SetFilter();
|
||||
// rimando...
|
||||
NavManager.NavigateTo($"scarti");
|
||||
}
|
||||
|
||||
protected void ShowUAL()
|
||||
{
|
||||
SetFilter();
|
||||
// rimando...
|
||||
NavManager.NavigateTo($"userlog");
|
||||
}
|
||||
|
||||
protected void SetFilter()
|
||||
{
|
||||
MessageService.DetailFilter = DetailFilterSel;
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,8 @@ namespace MP.Stats.Data
|
||||
|
||||
private SelectData _detailFilter = new SelectData();
|
||||
private SelectData _masterFilter = new SelectData();
|
||||
private string _pageIcon;
|
||||
private string _pageName;
|
||||
private string _searchVal;
|
||||
private bool showSearch;
|
||||
|
||||
@@ -22,6 +24,8 @@ namespace MP.Stats.Data
|
||||
|
||||
public event Action EA_HideSearch;
|
||||
|
||||
public event Action EA_PageUpdated;
|
||||
|
||||
public event Action EA_SearchUpdated;
|
||||
|
||||
public event Action EA_ShowSearch;
|
||||
@@ -53,6 +57,32 @@ namespace MP.Stats.Data
|
||||
public SelectData ODL_Filter { get; set; } = SelectData.Init(5, 7);
|
||||
public SelectData OEE_Filter { get; set; } = SelectData.Init(5, 7);
|
||||
|
||||
public string PageIcon
|
||||
{
|
||||
get => _pageIcon;
|
||||
set
|
||||
{
|
||||
if (_pageIcon != value)
|
||||
{
|
||||
_pageIcon = value;
|
||||
ReportPageUpd();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string PageName
|
||||
{
|
||||
get => _pageName;
|
||||
set
|
||||
{
|
||||
if (_pageName != value)
|
||||
{
|
||||
_pageName = value;
|
||||
ReportPageUpd();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string SearchVal
|
||||
{
|
||||
get => _searchVal;
|
||||
@@ -98,9 +128,17 @@ namespace MP.Stats.Data
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Methods
|
||||
#region Private Methods
|
||||
|
||||
protected void ReportSearch()
|
||||
private void ReportPageUpd()
|
||||
{
|
||||
if (EA_PageUpdated != null)
|
||||
{
|
||||
EA_PageUpdated?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
private void ReportSearch()
|
||||
{
|
||||
if (EA_SearchUpdated != null)
|
||||
{
|
||||
@@ -108,6 +146,6 @@ namespace MP.Stats.Data
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -116,6 +116,8 @@ namespace MP.Stats.Pages
|
||||
{
|
||||
numRecord = 10;
|
||||
MessageService.ShowSearch = false;
|
||||
MessageService.PageName = "Registro Controlli";
|
||||
MessageService.PageIcon = "oi oi-beaker";
|
||||
MessageService.EA_SearchUpdated += OnSeachUpdated;
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
@@ -107,6 +107,8 @@ namespace MP.Stats.Pages
|
||||
{
|
||||
numRecord = 10;
|
||||
MessageService.ShowSearch = false;
|
||||
MessageService.PageName = "Diario Produzione";
|
||||
MessageService.PageIcon = "oi oi-clipboard";
|
||||
MessageService.EA_SearchUpdated += OnSeachUpdated;
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
protected override Task OnInitializedAsync()
|
||||
{
|
||||
MessageService.ShowSearch = false;
|
||||
MessageService.PageName = "Home";
|
||||
MessageService.PageIcon = "oi oi-home";
|
||||
return base.OnInitializedAsync();
|
||||
}
|
||||
}
|
||||
@@ -108,6 +108,8 @@ namespace MP.Stats.Pages
|
||||
{
|
||||
numRecord = 10;
|
||||
MessageService.ShowSearch = false;
|
||||
MessageService.PageName = "TRS/OEE %";
|
||||
MessageService.PageIcon = "oi oi-monitor";
|
||||
MessageService.EA_SearchUpdated += OnSeachUpdated;
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
@@ -103,6 +103,8 @@ namespace MP.Stats.Pages
|
||||
{
|
||||
numRecord = 10;
|
||||
MessageService.ShowSearch = false;
|
||||
MessageService.PageName = "Report ODL/Comm.";
|
||||
MessageService.PageIcon = "oi oi-book";
|
||||
MessageService.EA_SearchUpdated += OnSeachUpdated;
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
@@ -106,6 +106,8 @@ namespace MP.Stats.Pages
|
||||
{
|
||||
numRecord = 10;
|
||||
MessageService.ShowSearch = false;
|
||||
MessageService.PageName = "Registro Scarti";
|
||||
MessageService.PageIcon = "oi oi-warning";
|
||||
MessageService.EA_SearchUpdated += OnSeachUpdated;
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
@@ -108,6 +108,8 @@ namespace MP.Stats.Pages
|
||||
{
|
||||
numRecord = 10;
|
||||
MessageService.ShowSearch = false;
|
||||
MessageService.PageName = "User ActionLog";
|
||||
MessageService.PageIcon = "oi oi-document";
|
||||
MessageService.EA_SearchUpdated += OnSeachUpdated;
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user