Add finance reconciliation probe

This commit is contained in:
2026-05-04 09:32:50 +02:00
parent 4a1561d85f
commit 15dec06f31
7 changed files with 715 additions and 2 deletions
@@ -12,10 +12,14 @@ public interface IDashboardPageService
public sealed class DashboardPageService : IDashboardPageService
{
private readonly IDbContextFactory<AppDbContext> _dbFactory;
private readonly IFinanceReconciliationService _financeReconciliationService;
public DashboardPageService(IDbContextFactory<AppDbContext> dbFactory)
public DashboardPageService(
IDbContextFactory<AppDbContext> dbFactory,
IFinanceReconciliationService financeReconciliationService)
{
_dbFactory = dbFactory;
_financeReconciliationService = financeReconciliationService;
}
public async Task<DashboardPageState> LoadAsync()
@@ -65,7 +69,8 @@ public sealed class DashboardPageService : IDashboardPageService
return new DashboardPageState
{
DashboardRows = rows,
ConsolidatedRows = BuildConsolidatedRows(await db.ExportSettings.FirstOrDefaultAsync() ?? new())
ConsolidatedRows = BuildConsolidatedRows(await db.ExportSettings.FirstOrDefaultAsync() ?? new()),
NetSalesReferenceRows = await _financeReconciliationService.BuildNetSalesReferenceRowsAsync(2025)
};
}
@@ -114,6 +119,7 @@ public sealed class DashboardPageState
{
public List<DashboardRow> DashboardRows { get; set; } = [];
public List<ConsolidatedDashboardRow> ConsolidatedRows { get; set; } = [];
public List<NetSalesReferenceRow> NetSalesReferenceRows { get; set; } = [];
}
public sealed class DashboardRow