Added roundname for missing tipps and jokers

This commit is contained in:
Torsten 2017-11-16 09:05:26 +01:00
parent 25cd90a1fb
commit ff0e6dfb46
3 changed files with 9 additions and 12 deletions

View file

@ -124,7 +124,12 @@ class UsersController extends Controller
} }
} }
return view('users.index', compact('users','active_user_count','total_user_count')); $round = Round::getFirstTippableRound();
$firstTippableRound=new Round();
$firstTippableRound->name="-";
if ($round) { $firstTippableRound = $round; }
return view('users.index', compact('users','active_user_count','total_user_count', 'firstTippableRound'));
} }
/* /*
public function showUsers() { public function showUsers() {

View file

@ -123,15 +123,7 @@ class Round extends Model
} }
public static function getFirstTippableRoundId($seasonId=-1) { public static function getFirstTippableRoundId($seasonId=-1) {
$season=null; $round = Round::getFirstTippableRound();
if ($seasonId==-1) {
$season=Season::getCurrent();
} else {
$season=Season::where('id','=', $seasonId)->first();
}
if (!$season) return null;
$round = Round::getFirstTippableRound($season->id);
if (!$round) return -1; if (!$round) return -1;
return $round->id; return $round->id;
} }

View file

@ -15,8 +15,8 @@
<td class="table-bordered col-std-2">&nbsp;Saison bezahlt&nbsp;</td> <td class="table-bordered col-std-2">&nbsp;Saison bezahlt&nbsp;</td>
<td class="table-bordered col-std-2">&nbsp;E-Mail Adresse&nbsp;</td> <td class="table-bordered col-std-2">&nbsp;E-Mail Adresse&nbsp;</td>
<td class="table-bordered col-std-2">Status</td> <td class="table-bordered col-std-2">Status</td>
<td class="table_bordered col-std-2">Tipps</td> <td class="table_bordered col-std-2">Tipps<br>{{$firstTippableRound->name}}</td>
<td class="table_bordered col-std-2">Joker</td> <td class="table_bordered col-std-2">Joker<br>{{$firstTippableRound->name}}</td>
</tr> </tr>
@foreach($users as $user) @foreach($users as $user)
<tr> <tr>