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 Properties
|
|
|
|
protected bool isActive { get; set; } = false;
|
|
|
|
[Inject]
|
|
protected MessageService MService { get; set; } = null!;
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected void goTo(string target)
|
|
{
|
|
NavManager.NavigateTo(target, true);
|
|
}
|
|
|
|
protected void goToAdmin()
|
|
{
|
|
goTo("Admin");
|
|
}
|
|
|
|
protected void goToIndex()
|
|
{
|
|
goTo("Index");
|
|
}
|
|
|
|
protected void goToMPF()
|
|
{
|
|
goTo("DayOff");
|
|
}
|
|
|
|
protected void hideMenu()
|
|
{
|
|
hideMenuCSS = "hidden; height: 0%;";
|
|
hideButtonCSS = "visible";
|
|
}
|
|
|
|
protected void showMenu()
|
|
{
|
|
if (MService.IdxDipendente > 0)
|
|
{
|
|
hideMenuCSS = "visible; height: 20%; display:block;";
|
|
hideButtonCSS = "hidden";
|
|
}
|
|
}
|
|
|
|
protected void slideIn()
|
|
{
|
|
cssAll = "bottom: 0rem;";
|
|
isActive = false;
|
|
}
|
|
|
|
protected void slideOut()
|
|
{
|
|
cssAll = "bottom: 15rem;";
|
|
cssContenuto = "height: 100%";
|
|
isActive = true;
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Fields
|
|
|
|
private string cssAll = "";
|
|
private string cssContenuto = "";
|
|
private string hideButtonCSS = "visible";
|
|
private string hideMenuCSS = "hidden";
|
|
|
|
#endregion Private Fields
|
|
|
|
#region Private Properties
|
|
|
|
[Inject]
|
|
private NavigationManager NavManager { get; set; } = null!;
|
|
|
|
#endregion Private Properties
|
|
}
|
|
} |