Fix caricamento apertura
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
@using SteUp.Shared.Core.BarcodeReader.Contracts
|
@using SteUp.Shared.Core.BarcodeReader.Contracts
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IBarcodeManager BarcodeManager
|
@inject IBarcodeManager BarcodeManager
|
||||||
|
@inject AuthenticationStateProvider AuthStateProvider
|
||||||
|
|
||||||
<ErrorBoundary @ref="ErrorBoundary">
|
<ErrorBoundary @ref="ErrorBoundary">
|
||||||
<ChildContent>
|
<ChildContent>
|
||||||
@@ -57,7 +58,12 @@
|
|||||||
LoadData = true;
|
LoadData = true;
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
|
|
||||||
await SteupDataService.Init();
|
var authState = await AuthStateProvider.GetAuthenticationStateAsync();
|
||||||
|
var user = authState.User;
|
||||||
|
|
||||||
|
if (user.Identity is { IsAuthenticated: true })
|
||||||
|
await SteupDataService.Init();
|
||||||
|
|
||||||
BarcodeManager.Init();
|
BarcodeManager.Init();
|
||||||
|
|
||||||
LoadData = false;
|
LoadData = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user