AppDbContext: Use records instead of unnamed tuples for buckets

This commit is contained in:
2023-11-30 17:29:01 +01:00
parent 7efd34bc4d
commit 3576a066fe
9 changed files with 81 additions and 85 deletions

View File

@ -122,11 +122,11 @@
<tr class="subheading">
<th>Flächenbindungen:</th>
</tr>
@foreach (var (id, (name, right, obligation, sum, _)) in Model.MemberBuckets.OrderBy(b => b.Key)) {
if (right > 0 || obligation > 0 || (sum > 0 && buckets[id[..2]] > 1 && !id.EndsWith('_'))) {
@foreach (var (id, b) in Model.MemberBuckets.OrderBy(b => b.Key)) {
if (b.Right > 0 || b.Obligation > 0 || (b.Delivery > 0 && buckets[id[..2]] > 1 && !id.EndsWith('_'))) {
<tr class="@(sortids.Contains(id[..2]) ? "" : "optional")">
<th>@name</th>
@Raw(FormatRow(obligation, right, sum))
<th>@b.Name</th>
@Raw(FormatRow(b.Obligation, b.Right, b.Delivery))
</tr>
}
}