TireTargetsWeb/Components/Pages/Portal.razor.cs

32 lines
946 B
C#
Raw Normal View History

2025-07-21 14:01:24 -04:00

using TireTargets.Components.CSharp;
namespace TireTargets.Components.Pages
{
public partial class Portal
{
public string locText = "";
private bool needSelection = false;
private bool userHasLocation = false;
protected override async Task OnInitializedAsync()
{
userHasLocation = await DatabaseDriver.DoesUserHaveLocation(Layout.MainLayout.Session["id"], Layout.MainLayout.Session["login_method"]);
if (userHasLocation)
{
var needSelectionAll = await DatabaseDriver.DoesLocationNeedSelection();
foreach (var current in needSelectionAll)
{
if (current.Item2)
{
needSelection = true;
break;
}
}
}
await base.OnInitializedAsync();
}
}
}