Files
magman/MagMan.UI/Pages/AdminArea.razor.cs
T
2024-01-13 12:45:54 +01:00

74 lines
1.6 KiB
C#

// Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this
// file to you under the MIT license.
using MagMan.Data.Tenant.Services;
using Microsoft.AspNetCore.Components;
namespace MagMan.UI.Pages
{
public partial class AdminArea
{
#region Protected Enums
protected enum CtMode
{
Company,
Users,
Machine,
AuthKeys
}
#endregion Protected Enums
#region Protected Properties
[Inject]
protected MessageService AppMService { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected override void OnInitialized()
{
AppMService.ShowSearch = false;
AppMService.PageName = "Admin Area";
AppMService.PageIcon = "fa-solid fa-house pr-2";
}
protected void SetCustomer(int CustId)
{
CustomerID = CustId;
}
#endregion Protected Methods
#region Private Fields
private CtMode currMode = CtMode.Company;
private int CustomerID = 0;
#endregion Private Fields
#region Private Properties
[Inject]
private NavigationManager NavMan { get; set; } = null!;
#endregion Private Properties
#region Private Methods
private string IsActive(CtMode modeReq)
{
string answ = currMode == modeReq ? "active" : "";
return answ;
}
private void SetMode(CtMode newMode)
{
currMode = newMode;
}
#endregion Private Methods
}
}