clean up tables (#78)
* add plex library sorting options * add playout sorting options
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
}
|
||||
@@ -20,8 +20,16 @@
|
||||
<col style="width: 100px;"/>
|
||||
</ColGroup>
|
||||
<HeaderContent>
|
||||
<MudTh>Name</MudTh>
|
||||
<MudTh>Media Type</MudTh>
|
||||
<MudTh>
|
||||
<MudTableSortLabel SortBy="new Func<PlexMediaSourceLibraryEditViewModel, object>(x => x.Name)">
|
||||
Name
|
||||
</MudTableSortLabel>
|
||||
</MudTh>
|
||||
<MudTh>
|
||||
<MudTableSortLabel SortBy="new Func<PlexMediaSourceLibraryEditViewModel, object>(x => x.MediaKind)">
|
||||
Media Kind
|
||||
</MudTableSortLabel>
|
||||
</MudTh>
|
||||
<MudTh>Synchronize</MudTh>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
@@ -55,7 +63,7 @@
|
||||
{
|
||||
_source = source;
|
||||
_libraries = await Mediator.Send(new GetPlexLibrariesBySourceId(Id))
|
||||
.Map(list => list.Map(ProjectToEditViewModel).ToList());
|
||||
.Map(list => list.Map(ProjectToEditViewModel).OrderBy(x => x.MediaKind).ThenBy(x => x.Name).ToList());
|
||||
},
|
||||
() =>
|
||||
{
|
||||
|
||||
@@ -11,19 +11,16 @@
|
||||
<MudText Typo="Typo.h6">Schedules</MudText>
|
||||
</ToolBarContent>
|
||||
<ColGroup>
|
||||
<col/>
|
||||
<col/>
|
||||
<col/>
|
||||
<col style="width: 180px;"/>
|
||||
</ColGroup>
|
||||
<HeaderContent>
|
||||
<MudTh>Id</MudTh>
|
||||
<MudTh>Name</MudTh>
|
||||
<MudTh>Collection Playback Order</MudTh>
|
||||
<MudTh/>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
<MudTd DataLabel="Id">@context.Id</MudTd>
|
||||
<MudTd DataLabel="Name">@context.Name</MudTd>
|
||||
<MudTd DataLabel="Name">@context.MediaCollectionPlaybackOrder</MudTd>
|
||||
<MudTd>
|
||||
@@ -88,7 +85,7 @@
|
||||
{
|
||||
_selectedSchedule = schedule;
|
||||
await Mediator.Send(new GetProgramScheduleItems(schedule.Id))
|
||||
.IterT(results => _selectedScheduleItems = results.ToList());
|
||||
.IterT(results => _selectedScheduleItems = results.OrderBy(x => x.Name).ToList());
|
||||
}
|
||||
|
||||
private async Task DeleteSchedule(ProgramScheduleViewModel programSchedule)
|
||||
|
||||
Reference in New Issue
Block a user