Gestito appVersion

This commit is contained in:
2026-02-18 12:12:10 +01:00
parent e7357bd78a
commit 1b36efb176
3 changed files with 14 additions and 0 deletions

View File

@@ -86,6 +86,7 @@ else
try try
{ {
SteupDataService.RegisterAppVersion();
await UserAccountService.Login(UserData.Username, UserData.Password, UserData.CodHash); await UserAccountService.Login(UserData.Username, UserData.Password, UserData.CodHash);
AuthenticationStateProvider.NotifyAuthenticationState(); //Chiamato per forzare il refresh AuthenticationStateProvider.NotifyAuthenticationState(); //Chiamato per forzare il refresh
await SteupDataService.Init(); await SteupDataService.Init();

View File

@@ -6,6 +6,7 @@ namespace SteUp.Shared.Core.Data.Contracts;
public interface ISteupDataService public interface ISteupDataService
{ {
Task Init(); Task Init();
void RegisterAppVersion();
List<PuntoVenditaDto> PuntiVenditaList { get; } List<PuntoVenditaDto> PuntiVenditaList { get; }
InspectionPageState InspectionPageState { get; set; } InspectionPageState InspectionPageState { get; set; }

View File

@@ -1,21 +1,33 @@
using IntegryApiClient.Core.Domain.Abstraction.Contracts.Account; using IntegryApiClient.Core.Domain.Abstraction.Contracts.Account;
using IntegryApiClient.Core.Domain.Abstraction.Contracts.Device;
using SteUp.Shared.Core.Data.Contracts; using SteUp.Shared.Core.Data.Contracts;
using SteUp.Shared.Core.Dto; using SteUp.Shared.Core.Dto;
using SteUp.Shared.Core.Dto.PageState; using SteUp.Shared.Core.Dto.PageState;
using SteUp.Shared.Core.Interface.IntegryApi; using SteUp.Shared.Core.Interface.IntegryApi;
using SteUp.Shared.Core.Interface.LocalDb; using SteUp.Shared.Core.Interface.LocalDb;
using SteUp.Shared.Core.Interface.System;
namespace SteUp.Shared.Core.Data; namespace SteUp.Shared.Core.Data;
public class SteupDataService( public class SteupDataService(
IIntegrySteupService integrySteupService, IIntegrySteupService integrySteupService,
IUserSession userSession, IUserSession userSession,
IDeviceService deviceService,
IGenericSystemService genericSystemService,
IDbInitializer dbInitializer) : ISteupDataService IDbInitializer dbInitializer) : ISteupDataService
{ {
public async Task Init() public async Task Init()
{ {
await dbInitializer.InitializeAsync(); await dbInitializer.InitializeAsync();
await LoadDataAsync(); await LoadDataAsync();
RegisterAppVersion();
}
public void RegisterAppVersion()
{
deviceService.RegisterAppVersion(
genericSystemService.GetCurrentAppVersion()
);
} }
private async Task LoadDataAsync() private async Task LoadDataAsync()