Skip to content

Commit

Permalink
Make user ID 11 a temporary 'administrator'
Browse files Browse the repository at this point in the history
To allow someone else than the challenge creator to draw the winner of
the challenge.

This is a TEMPORARY change that will be reverted once the draw is made.
  • Loading branch information
veloek committed Jun 14, 2024
1 parent 31646a8 commit 83903b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Tevling/Components/ChallengeCard.razor
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<span>Congrats to all participants 👏</span>
<span>Now it's time to draw a winner 🏆</span>
</div>
@if (Challenge.CreatedById == AthleteId)
@if (Challenge.CreatedById == AthleteId || IsAdmin)
{
<button class="btn btn-primary mt-auto" data-bs-toggle="modal" data-bs-target="#drawWinner"
@onclick:stopPropagation="true">
Expand Down
1 change: 1 addition & 0 deletions Tevling/Components/ChallengeCard.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public partial class ChallengeCard : ComponentBase

private DateTimeOffset? CurrentBrowserTime { get; set; }
private ScoreBoard? ScoreBoard { get; set; }
private bool IsAdmin => AthleteId == 11; // TEMP HACK

private string MeasurementIcon
{
Expand Down

0 comments on commit 83903b5

Please sign in to comment.