namespace TrafagSalesExporter.Services; public interface IPurchasingDashboardService { Task LoadAsync(CancellationToken cancellationToken = default); } public sealed class PurchasingDashboardLiveState { public bool SapReachable { get; set; } public bool EkkoLoaded { get; set; } public bool EkpoLoaded { get; set; } public bool EketLoaded { get; set; } public int PurchaseOrderCount { get; set; } public int SupplierCount { get; set; } public DateTime? LatestOrderDate { get; set; } public int PositionSampleCount { get; set; } public int ScheduleSampleCount { get; set; } public bool UsesCache { get; set; } public string CacheStatus { get; set; } = string.Empty; public DateTime? CacheCompletedAtUtc { get; set; } public decimal SpendChfSample { get; set; } public decimal OpenQuantitySample { get; set; } public decimal OpenValueSample { get; set; } public decimal ContractValueSample { get; set; } public string TopSupplierLabel { get; set; } = string.Empty; public string TopMaterialGroupLabel { get; set; } = string.Empty; public string TopArticleLabel { get; set; } = string.Empty; public List SpendChartRows { get; set; } = []; public List OpenValueChartRows { get; set; } = []; public List ContractChartRows { get; set; } = []; public string Message { get; set; } = string.Empty; } public sealed record PurchasingLiveChartPoint(string Label, decimal Value);