Browse Source

fix scoreboard updating

master
Aaron Parecki 7 years ago
parent
commit
31180fa1f9
No known key found for this signature in database GPG Key ID: 276C2817346D6056
2 changed files with 7 additions and 8 deletions
  1. +1
    -0
      public/js/scoreboard.js
  2. +6
    -8
      resources/views/scoreboard.blade.php

+ 1
- 0
public/js/scoreboard.js View File

@ -5,6 +5,7 @@ Echo.channel('score')
$(sel+" .team-icon span").text(e.score); $(sel+" .team-icon span").text(e.score);
$(sel+".team-icon").removeClass("hidden");
if(e.complete) { if(e.complete) {
$(sel+".team-icon").removeClass("empty"); $(sel+".team-icon").removeClass("empty");
} else { } else {

+ 6
- 8
resources/views/scoreboard.blade.php View File

@ -42,14 +42,12 @@
<td class="score" data-mission="{{ $mission->slug }}"> <td class="score" data-mission="{{ $mission->slug }}">
<div class="team-wrap"> <div class="team-wrap">
<div class="team"> <div class="team">
@if($mission->progress($team)[0] >= 1)
<span class="team-icon outlined {{ $mission->complete($team) ? '' : 'empty' }}"
style="background-color: #{{ $team->color }}; border-color: #{{ $team->color }};">
@if(!Auth::guest())
<span>{{ $mission->score($team) }}</span>
@endif
</span>
@endif
<span class="team-icon outlined {{ $mission->progress($team)[0] >= 1 ? '' : 'hidden' }} {{ $mission->complete($team) ? '' : 'empty' }}"
style="background-color: #{{ $team->color }}; border-color: #{{ $team->color }};">
@if(!Auth::guest())
<span>{{ $mission->score($team) }}</span>
@endif
</span>
</div> </div>
</div> </div>
</td> </td>

Loading…
Cancel
Save