refactor(app): implement year filtering for accounts and enhance dashboard PDF generation

This commit is contained in:
2026-04-03 14:24:46 +02:00
parent 4636acf7b0
commit 68c7a1ca6a
10 changed files with 208 additions and 34 deletions
@@ -77,6 +77,17 @@ public class EntryService : IEntryService
.ToListAsync();
}
public async Task<List<int>> GetAllEntryYearsAsync()
{
await using var db = await _dbFactory.CreateDbContextAsync();
return await db.Entries
.Select(e => e.Date.Year)
.Distinct()
.OrderByDescending(y => y)
.ToListAsync();
}
public async Task<EntryDto> CreateEntryAsync(int accountId, EntryType type, DateTime date, string title, decimal amount)
{
await using var db = await _dbFactory.CreateDbContextAsync();