Inizio bozza pagine e controlli pagina dettagli
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
<h3>PrintMag</h3>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<h3>ProdConfirm</h3>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<h3>ProdStat</h3>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<h3>TechSheetDetail</h3>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
||||
@@ -41,4 +41,10 @@
|
||||
<ProjectReference Include="..\MP.Data\MP.Data.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="logs\.placeholder">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
|
||||
<logger name="*" minlevel="Debug" writeTo="f" />
|
||||
-->
|
||||
<logger name="*" minlevel="Debug" writeTo="consoleTarget" />
|
||||
<logger name="*" minlevel="Trace" writeTo="consoleTarget" />
|
||||
<!--<logger name="Microsoft.*" maxlevel="Info" final="true" />-->
|
||||
<logger name="*" minlevel="Info" writeTo="fileTarget" />
|
||||
</rules>
|
||||
|
||||
@@ -1,14 +1,25 @@
|
||||
@page "/machine-detail"
|
||||
|
||||
@using MP.Data.Services;
|
||||
@inject MessageService MsgServ
|
||||
|
||||
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
|
||||
{
|
||||
<b>loading...</b>
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div>
|
||||
<MachineBlock RecMSE="CurrMSE" FullMode="false"></MachineBlock>
|
||||
</div>
|
||||
<ProdStat></ProdStat>
|
||||
<PrintMag></PrintMag>
|
||||
<ProdConfirm></ProdConfirm>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<a class="btn btn-info btn-lg w-100" href="scrap"><i class="fa fa-bug"></i> Reg. SCARTI</a>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<a class="btn btn-primary btn-lg w-100" href="controls"><i class="fa fa-wrench"></i> Reg. CONTROLLI</a>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
|
||||
namespace MP_TAB_SERV.Pages
|
||||
{
|
||||
@@ -9,6 +11,9 @@ namespace MP_TAB_SERV.Pages
|
||||
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
protected string IdxMacc { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
@page "/odl"
|
||||
|
||||
<h3>ODL</h3>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
@page "/tech-sheet"
|
||||
|
||||
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
|
||||
{
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div>
|
||||
<MachineBlock RecMSE="CurrMSE" FullMode="false"></MachineBlock>
|
||||
</div>
|
||||
<TechSheetDetail></TechSheetDetail>
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
using global::Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
|
||||
namespace MP_TAB_SERV.Pages
|
||||
{
|
||||
public partial class TechSheet
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
protected string IdxMacc { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
if (string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
IdxMacc = await MsgServ.IdxMaccGet();
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
@inherits LayoutComponentBase
|
||||
@using System.Diagnostics;
|
||||
@inherits LayoutComponentBase
|
||||
|
||||
@implements IDisposable
|
||||
@inject NavigationManager NavMan
|
||||
@@ -99,6 +100,8 @@
|
||||
|
||||
protected async Task ForceReload()
|
||||
{
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
Log.Info("Start ForceReload");
|
||||
ResetClass = "btn-warning";
|
||||
await InvokeAsync(StateHasChanged);
|
||||
@@ -108,12 +111,17 @@
|
||||
await MDataService.FlushCache();
|
||||
var allData = await MDataService.ListLinkAll();
|
||||
MStor.SetupMenu(allData);
|
||||
await Task.Delay(300);
|
||||
sw.Stop();
|
||||
int delta = 400 - (int)sw.ElapsedMilliseconds;
|
||||
if (delta > 0)
|
||||
{
|
||||
await Task.Delay(delta);
|
||||
}
|
||||
ResetClass = "btn-primary";
|
||||
// await InvokeAsync(StateHasChanged);
|
||||
Log.Info($"ForceReload completed in {sw.ElapsedMilliseconds}ms");
|
||||
// ricarica pagina!
|
||||
NavMan.NavigateTo("/", true);
|
||||
Log.Info("END ForceReload");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user