Skip to content

Commit

Permalink
Sort events by date
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbl4 committed Aug 24, 2023
1 parent 21a7f42 commit 7bb2f53
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions DataService/Controllers/DataController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ public ActionResult<List<SeriesDto>> ListSeries()
[HttpGet("championships")]
public ActionResult<List<ChampionshipDto>> ListChampionships([FromQuery]Id<SeriesDto> value)
{
return upstreamRepository.ListChampionships(value).ToList();
return upstreamRepository.ListChampionships(value)
.OrderBy(x => x.Name).ToList();
}

[HttpGet("classes")]
Expand All @@ -152,7 +153,8 @@ public ActionResult<List<ClassDto>> ListClasses([FromQuery]Id<ChampionshipDto> v
[HttpGet("events")]
public ActionResult<List<EventDto>> ListEvents([FromQuery]Id<ChampionshipDto> value)
{
return upstreamRepository.ListEvents(value).ToList();
return upstreamRepository.ListEvents(value)
.OrderByDescending(x => x.EndOfRegistration).ToList();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {EventSelectorService} from "@app/service/event-selector-service";
selector: 'app-event-view',
template: `
<h3>{{eventDto.name}}</h3>
<table class="table table-bordered">
<table class="table table-bordered" *ngIf="sessions">
<thead>
<tr>
<th>Название</th>
Expand Down
2 changes: 1 addition & 1 deletion DataService/publish-docker.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#1.0.3
#1.0.5

function Main()
{
Expand Down

0 comments on commit 7bb2f53

Please sign in to comment.