Gestiti salvataggi rest

This commit is contained in:
2026-03-02 10:50:34 +01:00
parent e027d8e5cf
commit ab9578a45f
58 changed files with 1235 additions and 305 deletions

View File

@@ -1,3 +1,4 @@
@using SteUp.Shared.Components.Pages.Utility
@using SteUp.Shared.Components.SingleElements.Modal.ExceptionModal
@using SteUp.Shared.Core.BarcodeReader.Contracts
@inject NavigationManager NavigationManager
@@ -8,21 +9,29 @@
<CascadingAuthenticationState>
<Router AppAssembly="@typeof(Routes).Assembly" NotFoundPage="typeof(Pages.NotFound)">
<Found Context="routeData">
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(Layout.MainLayout)">
<Authorizing>
<p>Authorizing page</p>
</Authorizing>
<NotAuthorized>
@if (context.User.Identity?.IsAuthenticated != true)
{
NavigationManager.NavigateTo("/login");
}
else
{
<p role="alert">You are not authorized to access this resource.</p>
}
</NotAuthorized>
</AuthorizeRouteView>
@if (!LoadData)
{
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(Layout.MainLayout)">
<Authorizing>
<AuthorizingPage/>
</Authorizing>
<NotAuthorized>
@if (context.User.Identity?.IsAuthenticated != true)
{
NavigationManager.NavigateTo("/login");
}
else
{
<p role="alert">You are not authorized to access this resource.</p>
}
</NotAuthorized>
</AuthorizeRouteView>
}
else
{
<AuthorizingPage/>
}
<FocusOnNavigate RouteData="@routeData" Selector="h1"/>
</Found>
</Router>
@@ -38,13 +47,21 @@
</ErrorBoundary>
@code {
private bool LoadData { get; set; }
private ErrorBoundary? ErrorBoundary { get; set; }
private ExceptionModal ExceptionModal { get; set; } = null!;
protected override async Task OnInitializedAsync()
{
LoadData = true;
StateHasChanged();
await SteupDataService.Init();
BarcodeManager.Init();
LoadData = false;
StateHasChanged();
}
}