-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from SSchulze1989/develop
v 0.12.0
- Loading branch information
Showing
28 changed files
with
737 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
src/iRLeagueManager.Web/Components/Standings/RaceByRacePoints.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
@namespace iRLeagueManager.Web.Components | ||
@using iRLeagueApiCore.Common.Models | ||
@using iRLeagueApiCore.Common.Models.Standings | ||
|
||
<MudSimpleTable Elevation=5 Dense="true" Bordered="true"> | ||
@{ | ||
var columnsCount = RaceColumns ?? StandingRows.Select(x => x.ResultRows.Count()).Max(); | ||
} | ||
<thead> | ||
<tr> | ||
<td rowspan="2" class="py-2"> | ||
Pos. | ||
</td> | ||
<td rowspan="2" class="py-2"> | ||
Name | ||
</td> | ||
@for (int i = 1; i <= columnsCount; i++) | ||
{ | ||
<th colspan="3" style="text-align: center"> | ||
R@(i.ToString()) | ||
</th> | ||
} | ||
</tr> | ||
</thead> | ||
@foreach (var row in StandingRows) | ||
{ | ||
var columns = row.ResultRows.ToList(); | ||
if (columnsCount > columns.Count) | ||
{ | ||
columns.AddRange(Enumerable.Repeat<StandingResultRowModel?>(null, columns.Count - columnsCount)); | ||
}; | ||
<tbody> | ||
<tr> | ||
<td rowspan="2" class="py-0"> | ||
@(row.Position). | ||
</td> | ||
<td rowspan="2" class="py-0"> | ||
@row.Firstname @row.Lastname | ||
</td> | ||
@foreach (var race in columns) | ||
{ | ||
<td class="@($"col-3 py-0 {(race?.IsScored == false ? "dropped" : "")}")" colspan="3" style="text-align: center"> | ||
@race?.TotalPoints | ||
</td> | ||
} | ||
</tr> | ||
<tr> | ||
@foreach (var race in columns) | ||
{ | ||
<td class="@($"col-1 py-0 {(race?.IsScored == false ? "dropped" : "")}")"> | ||
@race?.RacePoints | ||
</td> | ||
<td class="@($"col-1 py-0 {(race?.IsScored == false ? "dropped" : "")}")"> | ||
@race?.BonusPoints | ||
</td> | ||
<td class="@($"col-1 py-0 {(race?.IsScored == false ? "dropped" : "")}")" style="@(race?.PenaltyPoints != 0 ? "color:red" : "")"> | ||
@(race?.PenaltyPoints is < 0 or > 0 ? "-" : "")@race?.PenaltyPoints | ||
</td> | ||
} | ||
</tr> | ||
</tbody> | ||
} | ||
</MudSimpleTable> | ||
|
||
@code { | ||
[Parameter] public IEnumerable<StandingRowModel> StandingRows { get; set; } = default!; | ||
[Parameter] public int? RaceColumns { get; set; } | ||
|
||
protected override void OnParametersSet() | ||
{ | ||
base.OnParametersSet(); | ||
BlazorParameterNullException.ThrowIfNull(this, StandingRows); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/iRLeagueManager.Web/Components/Standings/RaceByRacePoints.razor.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.mud-simple-table .mud-table-container table tbody tr:last-child { | ||
border-bottom: 1px solid var(--mud-palette-table-lines); | ||
} | ||
|
||
.mud-simple-table .mud-table-container table tbody:hover { | ||
background-color: var(--mud-palette-table-hover) !important; | ||
} | ||
|
||
.mud-simple-table .mud-table-container table tbody:nth-of-type(2n+1):not(:hover) { | ||
background-color: var(--mud-palette-table-striped); | ||
} | ||
|
||
.mud-simple-table .mud-table-container table tbody:nth-child(2n+1):not(:hover) tr:nth-child(2n+1) td:nth-child(2n+3), | ||
.mud-simple-table .mud-table-container table tbody:nth-child(2n+1):not(:hover) tr:nth-child(2n) td:nth-child(6n+3), | ||
.mud-simple-table .mud-table-container table tbody:nth-child(2n+1):not(:hover) tr:nth-child(2n) td:nth-child(6n+2), | ||
.mud-simple-table .mud-table-container table tbody:nth-child(2n+1):not(:hover) tr:nth-child(2n) td:nth-child(6n+1) { | ||
background-color: var(--mud-palette-table-striped); | ||
filter: brightness(85%); | ||
} | ||
|
||
.mud-simple-table .mud-table-container table tbody tr td.dropped { | ||
color: var(--mud-palette-text-disabled); | ||
} |
Oops, something went wrong.