Skip to content

Commit

Permalink
Flag overruled match results. (#132)
Browse files Browse the repository at this point in the history
* Resolves #122 
* Append superscript character "/" to match points
* Add text "Awarded points were adjusted manually" at the bottom of the list
  • Loading branch information
axunonb authored Jan 25, 2024
1 parent 5b1b74d commit 26ab499
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<Copyright>Copyright 2011-$(CurrentYear) axuno gGmbH</Copyright>
<RepositoryUrl>https://github.com/axuno/Volleyball-League</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<Version>6.6.1</Version>
<FileVersion>6.6.1</FileVersion>
<Version>6.7.1</Version>
<FileVersion>6.7.1</FileVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion> <!--only update AssemblyVersion with major releases -->
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
Expand Down
14 changes: 12 additions & 2 deletions League/Views/Match/Results.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
@inject ITenantContext TenantContext
@model League.Models.MatchViewModels.ResultsViewModel
@{
const string overruled = "/";
ViewData["Title"] = Localizer["Match Results"].Value + " - " + Model.Tournament?.Name;
var tenantUrlSegment = TenantContext.SiteContext.UrlSegmentValue;
if (Model.CompletedMatches.Count == 0)
Expand Down Expand Up @@ -94,8 +95,9 @@
@{ zonedTime = Model.TimeZoneConverter.ToZonedTime(match.MatchDate);}
<td class="date text-truncate">@(Html.Raw(zonedTime != null ? zonedTime.DateTimeOffset.DateTime.ToShortDateString() + "<br/>" + zonedTime.Abbreviation : Localizer["unknown"].Value))</td>
<td class="result">
<div>@(match.HomeMatchPoints.HasValue ? match.HomeMatchPoints.ToString() : unknown)</div>
<div>@(match.GuestMatchPoints.HasValue ? match.GuestMatchPoints.ToString() : unknown)</div>
@{ var flag = match.IsOverruled ? overruled : ""; }
<div>@(match.HomeMatchPoints.HasValue ? match.HomeMatchPoints.ToString() : unknown)<sup>@flag</sup></div>
<div>@(match.GuestMatchPoints.HasValue ? match.GuestMatchPoints.ToString() : unknown)<sup>@flag</sup></div>
</td>
<td class="result">
<div>@(match.HomeSetPoints.HasValue ? match.HomeSetPoints.ToString() : unknown)</div>
Expand Down Expand Up @@ -166,6 +168,14 @@
</tbody>
</table>
</div>
@{
if (Model.CompletedMatches.Any(m => m.RoundId == r.RoundId && m.IsOverruled))
{
<div class="text-muted">
@(overruled) = @Localizer["Awarded points were adjusted manually"].
</div>
}
}
@{ zonedTime = Model.TimeZoneConverter.ToZonedTime(Model.CompletedMatches.Where(m => m.RoundId == r.RoundId).Max(m => m.ModifiedOn)); }
<div class="text-muted">
@Localizer["Last update"]: @zonedTime?.DateTimeOffset.DateTime.ToShortDateString() @zonedTime?.DateTimeOffset.DateTime.ToLongTimeString() @zonedTime?.Abbreviation
Expand Down
4 changes: 4 additions & 0 deletions League/Views/Match/Results.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,8 @@
<data name="unknown" xml:space="preserve">
<value>offen</value>
</data>
<data name="Awarded points were adjusted manually" xml:space="preserve">
<value>Die vergebenen Punkte wurden manuell angepasst</value>
<comment>Flag if result is overruled</comment>
</data>
</root>

0 comments on commit 26ab499

Please sign in to comment.