Fix gestione verifica operatore
This commit is contained in:
@@ -63,6 +63,11 @@ namespace MP.INVE.Components
|
||||
await getId();
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
await getId();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.INVE</RootNamespace>
|
||||
<Version>6.16.2211.1616</Version>
|
||||
<Version>6.16.2211.1617</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOINVE </i>
|
||||
<h4>Versione: 6.16.2211.1616</h4>
|
||||
<h4>Versione: 6.16.2211.1617</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2211.1616
|
||||
6.16.2211.1617
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2211.1616</version>
|
||||
<version>6.16.2211.1617</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
@inherits LayoutComponentBase
|
||||
@using Blazored.LocalStorage;
|
||||
@using MP.Data.DTO;
|
||||
@inherits LayoutComponentBase
|
||||
|
||||
<PageTitle>MP.INVE</PageTitle>
|
||||
|
||||
@@ -12,7 +14,10 @@
|
||||
<CmpTop></CmpTop>
|
||||
</div>
|
||||
<article class="content pt-0 m-2">
|
||||
@Body
|
||||
@if (userName != "0" || NavManager.Uri.Contains("OperatoreLogin"))
|
||||
{
|
||||
@Body
|
||||
}
|
||||
</article>
|
||||
<div class="fixed-bottom bottom-row px-2">
|
||||
<CmpFooter></CmpFooter>
|
||||
@@ -20,14 +25,3 @@
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
protected bool navLarge { get; set; } = true;
|
||||
|
||||
protected string sideClass { get; set; } = "sidebar";
|
||||
|
||||
protected void UpdateNavDisplay()
|
||||
{
|
||||
navLarge = !navLarge;
|
||||
sideClass = navLarge ? "sidebar" : "sidebarSmall";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
using Blazored.LocalStorage;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DTO;
|
||||
|
||||
namespace MP.INVE.Shared
|
||||
{
|
||||
public partial class MainLayout
|
||||
{
|
||||
#region Protected Fields
|
||||
|
||||
protected string userName = "0";
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected bool navLarge { get; set; } = true;
|
||||
|
||||
protected string sideClass { get; set; } = "sidebar";
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
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 (NavManager.Uri.Contains("OperatoreLogin"))
|
||||
{
|
||||
NavManager.NavigateTo("Starter", true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
userName = "0";
|
||||
if (!NavManager.Uri.Contains("OperatoreLogin"))
|
||||
{
|
||||
NavManager.NavigateTo("OperatoreLogin", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await getId();
|
||||
}
|
||||
|
||||
protected void UpdateNavDisplay()
|
||||
{
|
||||
navLarge = !navLarge;
|
||||
sideClass = navLarge ? "sidebar" : "sidebarSmall";
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Properties
|
||||
|
||||
[Inject]
|
||||
private ILocalStorageService localStorage { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
private NavigationManager NavManager { get; set; } = null!;
|
||||
|
||||
#endregion Private Properties
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@
|
||||
<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
|
||||
<nav class="flex-column">
|
||||
<div class="nav-item px-2 col-12">
|
||||
<NavLink class="nav-link px-2" href="" Match="NavLinkMatch.All">
|
||||
<NavLink class="nav-link px-2" href="" Match="NavLinkMatch.All" @onclick='() => HandleClick("")'>
|
||||
<div class="col-2">
|
||||
<span class="fa-solid fa-house px-2" aria-hidden="true"></span>
|
||||
</div>
|
||||
@@ -29,9 +29,8 @@
|
||||
</div>
|
||||
</NavLink>
|
||||
</div>
|
||||
@*</div> *@
|
||||
<div class="nav-item px-2 col-12">
|
||||
<NavLink class="nav-link px-2" href="/Session">
|
||||
<NavLink class="nav-link px-2" href="Session" @onclick='() => HandleClick("Session")'>
|
||||
<div class="col-2">
|
||||
<span class="px-2" aria-hidden="true"><i class="fa-solid fa-spinner"></i></span>
|
||||
</div>
|
||||
@@ -41,7 +40,7 @@
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-2 col-12">
|
||||
<NavLink class="nav-link px-2" href="/Acquisizione">
|
||||
<NavLink class="nav-link px-2" href="Acquisizione" @onclick='() => HandleClick("Acquisizione")'>
|
||||
<div class="col-2">
|
||||
<span class="px-2" aria-hidden="true"><i class="fa-solid fa-barcode"></i></span>
|
||||
</div>
|
||||
@@ -51,7 +50,7 @@
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-2 col-12">
|
||||
<NavLink class="nav-link px-2" href="/Invio">
|
||||
<NavLink class="nav-link px-2" href="Invio" @onclick='() => HandleClick("Invio")'>
|
||||
<div class="col-2">
|
||||
<span class="px-2" aria-hidden="true"><i class="fa-solid fa-file-export"></i></span>
|
||||
</div>
|
||||
@@ -63,36 +62,4 @@
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
private bool collapseNavMenu = true;
|
||||
//public List<MP.Data.DatabaseModels.LinkMenu>? ElencoLink { get; set; }
|
||||
|
||||
private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
|
||||
|
||||
private void ToggleNavMenu()
|
||||
{
|
||||
collapseNavMenu = !collapseNavMenu;
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
// recupero elenco JQM
|
||||
//ElencoLink = await MDService.ElencoLink();
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected bool showText { get; set; } = true;
|
||||
protected void ToggleCompress()
|
||||
{
|
||||
showText = !showText;
|
||||
EC_compressUpdated.InvokeAsync(showText);
|
||||
}
|
||||
|
||||
protected string hideText
|
||||
{
|
||||
get => showText ? "" : "invisible";
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> EC_compressUpdated { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using System.Net.Http;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using Microsoft.AspNetCore.Components.Forms;
|
||||
using Microsoft.AspNetCore.Components.Routing;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using Microsoft.AspNetCore.Components.Web.Virtualization;
|
||||
using Microsoft.JSInterop;
|
||||
using MP.INVE;
|
||||
using MP.INVE.Shared;
|
||||
using MP.INVE.Components;
|
||||
using MP.INVE.Data;
|
||||
|
||||
namespace MP.INVE.Shared
|
||||
{
|
||||
public partial class NavMenu
|
||||
{
|
||||
private bool collapseNavMenu = true;
|
||||
//public List<MP.Data.DatabaseModels.LinkMenu>? ElencoLink { get; set; }
|
||||
private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
|
||||
private void ToggleNavMenu()
|
||||
{
|
||||
collapseNavMenu = !collapseNavMenu;
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
// recupero elenco JQM
|
||||
//ElencoLink = await MDService.ElencoLink();
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected bool showText { get; set; } = true;
|
||||
protected void ToggleCompress()
|
||||
{
|
||||
showText = !showText;
|
||||
EC_compressUpdated.InvokeAsync(showText);
|
||||
}
|
||||
|
||||
protected string hideText { get => showText ? "" : "invisible"; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> EC_compressUpdated { get; set; }
|
||||
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavigationManager { get; set; } = null!;
|
||||
|
||||
private void HandleClick(string target)
|
||||
{
|
||||
NavigationManager.NavigateTo(target, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user