Final Roundmail system, show users with missing tips/jokers in playerlist as well.
This commit is contained in:
parent
6d7ee1a47c
commit
70e28110cb
19 changed files with 3700 additions and 66 deletions
|
|
@ -38,7 +38,9 @@ class Round extends Model
|
|||
$games = Game::where('round_id','=',$round->id)->get();
|
||||
$completed = true;
|
||||
foreach($games as $game) {
|
||||
if ($game->score1==-1 || $game->score2==-1) { $completed=false; }
|
||||
if ($game->score1==-1 || $game->score2==-1) {
|
||||
$completed=false;
|
||||
}
|
||||
}
|
||||
return $completed;
|
||||
}
|
||||
|
|
@ -59,13 +61,7 @@ class Round extends Model
|
|||
$season_id = Season::getCurrent()->id;
|
||||
$rounds = Round::where('season_id','=',$season_id)->orderBy('id')->get();
|
||||
foreach($rounds as $round) {
|
||||
$games = Game::where('round_id','=',$round->id);
|
||||
foreach ($games as $game) {
|
||||
if ($game->score1 == -1 || $game->score2 == -1) {
|
||||
return $round->id;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Round::isCompleted($round->id)) return $round->id;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue