Services: Extract GenerateToolTipData() from GenerateToolTip()
All checks were successful
Test / Run tests (push) Successful in 1m35s
All checks were successful
Test / Run tests (push) Successful in 1m35s
This commit is contained in:
@ -79,9 +79,9 @@ namespace Elwig.Windows {
|
||||
if (filter.Count == 0) {
|
||||
ViewModel.StatusAreaCommitments = $"{await areaComQuery.CountAsync():N0}";
|
||||
var s = await ctx.Seasons.FindAsync(await ctx.Seasons.MaxAsync(s => s.Year));
|
||||
var (text, grid) = await AreaComService.GenerateToolTip(areaComQuery, s?.MaxKgPerHa ?? 10_000);
|
||||
var (text, gridData) = await AreaComService.GenerateToolTipData(areaComQuery, s?.MaxKgPerHa ?? 10_000);
|
||||
ViewModel.StatusArea = text;
|
||||
ViewModel.StatusAreaToolTip = grid;
|
||||
ViewModel.StatusAreaToolTip = AreaComService.GenerateToolTip(gridData);
|
||||
} else {
|
||||
ViewModel.StatusAreaCommitments = $"{areaComs.Count:N0}";
|
||||
ViewModel.StatusArea = $"{areaComs.Select(a => a.Area).Sum():N0} m²";
|
||||
|
Reference in New Issue
Block a user