fix gestione navManager
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
|
||||
<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
|
||||
@if (userName != "0")
|
||||
@if (!NavigationManager.Uri.Contains("OperatoreLogin"))
|
||||
{
|
||||
|
||||
<nav class="flex-column">
|
||||
|
||||
@@ -29,35 +29,12 @@ namespace MP.INVE.Shared
|
||||
{
|
||||
collapseNavMenu = !collapseNavMenu;
|
||||
}
|
||||
protected string userName { get; set; } = "0";
|
||||
#if false
|
||||
protected async Task getId()
|
||||
{
|
||||
OperatoreDTO answ = new OperatoreDTO();
|
||||
answ = await localStorage.GetItemAsync<OperatoreDTO>("MatrOpr");
|
||||
if (answ != null)
|
||||
{
|
||||
userName = $"{answ.Cognome} {answ.Nome} ({answ.MatrOpr})";
|
||||
if (NavigationManager.Uri.Contains("OperatoreLogin"))
|
||||
{
|
||||
NavigationManager.NavigateTo("Elencomagazzini", true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
userName = "0";
|
||||
if (!NavigationManager.Uri.Contains("OperatoreLogin"))
|
||||
{
|
||||
NavigationManager.NavigateTo("OperatoreLogin", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
// recupero elenco JQM
|
||||
//ElencoLink = await MDService.ElencoLink();
|
||||
//await getId();
|
||||
}
|
||||
|
||||
protected bool showText { get; set; } = true;
|
||||
|
||||
Reference in New Issue
Block a user