DeliveryAncmtAdminWindow: Add more filters and tooltip for weight
All checks were successful
Test / Run tests (push) Successful in 1m47s

This commit is contained in:
2024-09-19 11:56:45 +02:00
parent 642fb3a625
commit 27d8a5cfb6
4 changed files with 234 additions and 6 deletions

View File

@ -134,7 +134,14 @@ namespace Elwig.Windows {
DeliveryAncmtList.ScrollIntoView(DeliveryAncmtList.SelectedItem);
ViewModel.StatusAncmts = $"{deliveryAncmts.Count:N0}";
ViewModel.StatusWeight = $"{deliveryAncmts.Sum(a => a.Weight):N0} kg";
if (filter.Count == 0) {
var (text, grid) = await DeliveryAncmtService.GenerateToolTip(deliveryAncmtQuery);
ViewModel.StatusWeight = text;
ViewModel.StatusWeightToolTip = grid;
} else {
ViewModel.StatusWeight = $"{deliveryAncmts.Sum(a => a.Weight):N0} kg";
ViewModel.StatusWeightToolTip = null;
}
}
private async Task RefreshInputs(bool validate = false) {