clean up tables (#78)

* add plex library sorting options

* add playout sorting options
This commit is contained in:
Jason Dove
2021-03-14 20:13:28 +00:00
committed by GitHub
parent a01888792a
commit 898a21dcd9
3 changed files with 24 additions and 13 deletions
+12 -6
View File
@@ -11,20 +11,25 @@
<MudText Typo="Typo.h6">Playouts</MudText>
</ToolBarContent>
<ColGroup>
<col/>
<col/>
<col/>
<col style="width: 120px;"/>
</ColGroup>
<HeaderContent>
<MudTh>Id</MudTh>
<MudTh>Channel</MudTh>
<MudTh>Schedule</MudTh>
<MudTh>
<MudTableSortLabel SortBy="new Func<PlayoutViewModel, object>(x => decimal.Parse(x.Channel.Number))">
Channel
</MudTableSortLabel>
</MudTh>
<MudTh>
<MudTableSortLabel SortBy="new Func<PlayoutViewModel, object>(x => x.ProgramSchedule.Name)">
Schedule
</MudTableSortLabel>
</MudTh>
@* <MudTh>Playout Type</MudTh> *@
<MudTh/>
</HeaderContent>
<RowTemplate>
<MudTd DataLabel="Id">@context.Id</MudTd>
<MudTd DataLabel="Channel">@context.Channel.Number - @context.Channel.Name</MudTd>
<MudTd DataLabel="Schedule">@context.ProgramSchedule.Name</MudTd>
@* <MudTd DataLabel="Playout Type">@context.ProgramSchedulePlayoutType</MudTd> *@
@@ -110,7 +115,8 @@
}
private async Task LoadAllPlayouts() =>
_playouts = await Mediator.Send(new GetAllPlayouts());
_playouts = await Mediator.Send(new GetAllPlayouts())
.Map(list => list.OrderBy(x => decimal.Parse(x.Channel.Number)).ToList());
}