Refactor StateScheduleHandout component for improved print layout and styling
This commit is contained in:
@@ -11,12 +11,14 @@
|
||||
@inject IOptionsMonitor<StateScheduleHandoutOptions> HandoutOptionsMonitor
|
||||
@inject IEventOccurrenceService EventOccurrenceService
|
||||
|
||||
<PageHeader
|
||||
Title="State schedule handout"
|
||||
Description="Print per-student schedules and the combined master list (browser Print)."
|
||||
Icon="@Icons.Material.Filled.Print"
|
||||
ShowBackButton="true"
|
||||
BackButtonUrl="/calendar" />
|
||||
<div class="no-print">
|
||||
<PageHeader
|
||||
Title="State schedule handout"
|
||||
Description="Print per-student schedules and the combined master list."
|
||||
Icon="@Icons.Material.Filled.Print"
|
||||
ShowBackButton="true"
|
||||
BackButtonUrl="/calendar" />
|
||||
</div>
|
||||
|
||||
@if (_students == null || _allOccurrences == null)
|
||||
{
|
||||
@@ -26,7 +28,7 @@ else
|
||||
{
|
||||
var opts = HandoutOptionsMonitor.CurrentValue;
|
||||
|
||||
<MudContainer>
|
||||
<MudContainer Class="state-schedule-handout">
|
||||
@foreach (var student in _students)
|
||||
{
|
||||
<MudContainer Class="pagebreak">
|
||||
@@ -45,18 +47,25 @@ else
|
||||
</MudText>
|
||||
|
||||
<MudText Typo="Typo.subtitle1" Class="mb-1">Events</MudText>
|
||||
<MudTable Items="@GetEventSummaryRows(student)" Dense="true" Hover="false" Class="mb-4 nobrk">
|
||||
<HeaderContent>
|
||||
<MudTh>State ID</MudTh>
|
||||
<MudTh>Event</MudTh>
|
||||
<MudTh>Activity</MudTh>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
<MudTd DataLabel="State ID">@context.StateRegistrationId</MudTd>
|
||||
<MudTd DataLabel="Event">@context.EventName</MudTd>
|
||||
<MudTd DataLabel="Activity">@context.Activity</MudTd>
|
||||
</RowTemplate>
|
||||
</MudTable>
|
||||
<MudSimpleTable Dense="true" Class="state-schedule-table mb-4 nobrk">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>State ID</th>
|
||||
<th>Event</th>
|
||||
<th>Activity</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var eventRow in GetEventSummaryRows(student))
|
||||
{
|
||||
<tr>
|
||||
<td>@eventRow.StateRegistrationId</td>
|
||||
<td>@eventRow.EventName</td>
|
||||
<td>@eventRow.Activity</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</MudSimpleTable>
|
||||
|
||||
@{
|
||||
var scheduleRows = BuildStudentSchedule(student, opts).ToList();
|
||||
|
||||
Reference in New Issue
Block a user