bdaaefb076
- Rimozione proj comp - inserito nupkg
85 lines
1.8 KiB
C#
85 lines
1.8 KiB
C#
using GPW.CORE.Smart.Data;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace GPW.CORE.Smart.Components
|
|
{
|
|
public partial class NavBottom
|
|
{
|
|
#region Protected Fields
|
|
|
|
protected string hideButtonCSS = "visible";
|
|
protected string hideMenuCSS = "hidden";
|
|
protected bool isVisible = false;
|
|
protected Version? version = typeof(Program).Assembly.GetName().Version;
|
|
|
|
#endregion Protected Fields
|
|
|
|
#region Protected Properties
|
|
|
|
protected bool isActive { get; set; } = false;
|
|
|
|
[Inject]
|
|
protected MessageService MService { get; set; } = null!;
|
|
|
|
[Inject]
|
|
protected NavigationManager NavManager { get; set; } = null!;
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected void goTo(string target)
|
|
{
|
|
NavManager.NavigateTo(target, true);
|
|
}
|
|
|
|
protected void goToAbout()
|
|
{
|
|
goTo("About");
|
|
}
|
|
|
|
protected void goToAdmin()
|
|
{
|
|
goTo("Admin");
|
|
}
|
|
|
|
protected void goToIndex()
|
|
{
|
|
goTo("Index");
|
|
}
|
|
|
|
protected void goToMPF()
|
|
{
|
|
goTo("DayOff");
|
|
}
|
|
|
|
protected void hideMenu()
|
|
{
|
|
isVisible = false;
|
|
hideMenuCSS = "hidden; height: 0%;";
|
|
hideButtonCSS = "visible";
|
|
}
|
|
|
|
protected void showMenu()
|
|
{
|
|
if (MService.IdxDipendente > 0)
|
|
{
|
|
isVisible = true;
|
|
hideMenuCSS = "visible; height: 22%; display:block;";
|
|
hideButtonCSS = "hidden";
|
|
}
|
|
}
|
|
|
|
protected void slideIn()
|
|
{
|
|
isActive = false;
|
|
}
|
|
|
|
protected void slideOut()
|
|
{
|
|
isActive = true;
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
}
|
|
} |