Implementato sdk honeywell e metodi per lo scanner barcode
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
@page "/login"
|
||||
@using SteUp.Shared.Components.Layout.Spinner
|
||||
@using SteUp.Shared.Core.BarcodeReader.Contracts
|
||||
@using SteUp.Shared.Core.Interface.System
|
||||
@using SteUp.Shared.Core.Services
|
||||
@inject IUserAccountService UserAccountService
|
||||
@inject AppAuthenticationStateProvider AuthenticationStateProvider
|
||||
@inject IGenericSystemService GenericSystemService
|
||||
@inject IBarcodeManager BarcodeManager
|
||||
|
||||
@if (Spinner)
|
||||
{
|
||||
@@ -90,6 +92,7 @@ else
|
||||
await UserAccountService.Login(UserData.Username, UserData.Password, UserData.CodHash);
|
||||
AuthenticationStateProvider.NotifyAuthenticationState(); //Chiamato per forzare il refresh
|
||||
await SteupDataService.Init();
|
||||
BarcodeManager.Init();
|
||||
|
||||
LocalStorage.SetString("codHash", UserData.CodHash);
|
||||
NavigationManager.NavigateTo("/");
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
@using SteUp.Shared.Components.SingleElements.Modal.ExceptionModal
|
||||
@using SteUp.Shared.Core.BarcodeReader.Contracts
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject IBarcodeManager BarcodeManager
|
||||
|
||||
<ErrorBoundary @ref="ErrorBoundary">
|
||||
<ChildContent>
|
||||
@@ -43,5 +45,6 @@
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await SteupDataService.Init();
|
||||
BarcodeManager.Init();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
.card-form-modal {
|
||||
background: var(--mud-palette-table-striped);
|
||||
border-radius: 1em;
|
||||
border-radius: 20px;
|
||||
padding: .5rem 1rem;
|
||||
width: -webkit-fill-available;
|
||||
}
|
||||
|
||||
@@ -8,11 +8,13 @@
|
||||
@using SteUp.Shared.Core.Interface.LocalDb
|
||||
@using SteUp.Shared.Core.Interface.System
|
||||
@using SteUp.Shared.Core.Interface.System.Network
|
||||
@using SteUp.Shared.Core.Messages.Scanner
|
||||
@inject INetworkService NetworkService
|
||||
@inject IDialogService Dialog
|
||||
@inject IIntegryApiService IntegryApiService
|
||||
@inject IAttachedService AttachedService
|
||||
@inject IIspezioniService IspezioniService
|
||||
@inject OnScannerService OnScannerService
|
||||
|
||||
<MudDialog Class="customDialog-form">
|
||||
<DialogContent>
|
||||
@@ -159,6 +161,9 @@
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
OnScannerService.OnNewScanSuccessful += OnNewScanSuccessful;
|
||||
OnScannerService.OnErrorScan += OnErrorScan;
|
||||
|
||||
_originalScheda = Scheda.Clone();
|
||||
Snackbar.Configuration.PositionClass = Defaults.Classes.Position.TopCenter;
|
||||
|
||||
@@ -351,7 +356,7 @@
|
||||
AttachedList.Add(new AttachedDto { Name = a.Name, MimeType = a.MimeType, FileBytes = a.FileBytes });
|
||||
|
||||
await InvokeAsync(StateHasChanged);
|
||||
|
||||
|
||||
RecalcDirty(true);
|
||||
|
||||
// Processa in background e aggiorna UI man mano (o a blocchi)
|
||||
@@ -419,4 +424,19 @@
|
||||
await InvokeAsync(StateHasChanged);
|
||||
});
|
||||
}
|
||||
|
||||
#region Scanner
|
||||
|
||||
public static void OnNewScanSuccessful(string? value)
|
||||
{
|
||||
//To be implemented
|
||||
}
|
||||
|
||||
private static void OnErrorScan(string? value)
|
||||
{
|
||||
//To be implemented
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user