Only render grouped critical table header when needed

This commit is contained in:
2026-03-14 14:02:32 +01:00
parent 9f1b39d83a
commit 1ebda6f4e4

View File

@@ -72,34 +72,17 @@
<div class="table-scroll">
<table class="critical-table">
<thead>
<tr>
<th class="roll-band-header" rowspan="2"></th>
@if (detail.Groups.Count > 0)
{
foreach (var group in detail.Groups)
<tr>
<th class="roll-band-header" rowspan="2"></th>
@foreach (var group in detail.Groups)
{
<th colspan="@detail.Columns.Count">@group.Label</th>
}
}
else
{
<th colspan="@detail.Columns.Count"></th>
}
</tr>
<tr>
@if (detail.Groups.Count > 0)
{
foreach (var group in detail.Groups)
{
foreach (var column in detail.Columns)
{
<th>
<span>@column.Label</span>
</th>
}
}
}
else
@foreach (var group in detail.Groups)
{
foreach (var column in detail.Columns)
{
@@ -109,6 +92,19 @@
}
}
</tr>
}
else
{
<tr>
<th class="roll-band-header"></th>
@foreach (var column in detail.Columns)
{
<th>
<span>@column.Label</span>
</th>
}
</tr>
}
</thead>
<tbody>
@foreach (var rollBand in detail.RollBands)