31 lines
1.0 KiB
C#
31 lines
1.0 KiB
C#
using IntegryApiClient.Core.Domain.Abstraction.Contracts.Account;
|
|
using SteUp.Shared.Core.Data.Contracts;
|
|
using SteUp.Shared.Core.Dto;
|
|
using SteUp.Shared.Core.Dto.PageState;
|
|
using SteUp.Shared.Core.Interface.IntegryApi;
|
|
|
|
namespace SteUp.Shared.Core.Data;
|
|
|
|
public class SteupDataService(
|
|
IIntegrySteupService integrySteupService,
|
|
IUserSession userSession) : ISteupDataService
|
|
{
|
|
public Task Init()
|
|
{
|
|
return LoadDataAsync();
|
|
}
|
|
|
|
private async Task LoadDataAsync()
|
|
{
|
|
if (!await userSession.IsLoggedIn()) return;
|
|
|
|
PuntiVenditaList = await integrySteupService.RetrievePuntiVendita();
|
|
Reparti = await integrySteupService.RetrieveReparti();
|
|
TipiAttività = await integrySteupService.RetrieveActivityType();
|
|
}
|
|
|
|
public InspectionPageState Inspection { get; set; } = new();
|
|
public List<PuntoVenditaDto> PuntiVenditaList { get; private set; } = [];
|
|
public List<JtbFasiDto> Reparti { get; private set; } = [];
|
|
public List<StbActivityTypeDto> TipiAttività { get; private set; } = [];
|
|
} |