Update in display dettaglio macchina
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
|
||||
@attribute [RenderModeAuto]
|
||||
|
||||
@using MP.Data.Services;
|
||||
@inject MessageService MsgServ
|
||||
|
||||
<h1>Machine Detail</h1>
|
||||
<h2><b>@IdxMacc</b></h2>
|
||||
@if (MachineMSE == null)
|
||||
@if (CurrMSE == null)
|
||||
{
|
||||
<MP_TAB.Client.Components.MachineBlock FullMode="false"></MP_TAB.Client.Components.MachineBlock>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MP_TAB.Client.Components.MachineBlock RecMSE="MachineMSE" FullMode="false"></MP_TAB.Client.Components.MachineBlock>
|
||||
<MP_TAB.Client.Components.MachineBlock RecMSE="CurrMSE" FullMode="false"></MP_TAB.Client.Components.MachineBlock>
|
||||
}
|
||||
|
||||
@code {
|
||||
@@ -16,6 +20,15 @@ else
|
||||
[SupplyParameterFromQuery]
|
||||
public string? IdxMacc { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public MappaStatoExpl? MachineMSE { get; set; } = null;
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
// return base.OnAfterRenderAsync(firstRender);
|
||||
}
|
||||
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
{
|
||||
// salvo in LocalStorage...
|
||||
await MsgServ.SaveMse(ListMSE);
|
||||
//return base.OnAfterRenderAsync(firstRender);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<!-- Temporary workaround until MapRazorComponents supports AddAdditionalAssemblies -->
|
||||
<!-- Once that is implemented, the main project won't need to include this file -->
|
||||
<MP_TAB.Client.Pages.MachineDetail MachineMSE="CurrMSE"></MP_TAB.Client.Pages.MachineDetail>
|
||||
<MP_TAB.Client.Pages.MachineDetail ></MP_TAB.Client.Pages.MachineDetail>
|
||||
|
||||
@code {
|
||||
|
||||
@@ -11,12 +11,6 @@
|
||||
[SupplyParameterFromQuery]
|
||||
public string? IdxMacc { get; set; }
|
||||
|
||||
protected override Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
// recupero MSE macchina....
|
||||
|
||||
|
||||
return base.OnAfterRenderAsync(firstRender);
|
||||
}
|
||||
|
||||
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user