Fixed rankinglist display ManualPayout, fixed Liga Payout Quota Entry+Storage
This commit is contained in:
parent
e482986eac
commit
def862bc13
3 changed files with 9 additions and 8 deletions
|
|
@ -184,10 +184,10 @@ class SeasonsController extends Controller
|
|||
Quota::setQuota('platz 10', str_replace(",",".",request('platz10')));
|
||||
Quota::setQuota('liga', str_replace(",",".",request('liga')));
|
||||
Quota::setQuota('liga_platz1', str_replace(",",".",request('liga_platz1')));
|
||||
Quota::setQuota('liga platz2', str_replace(",",".",request('liga_platz2')));
|
||||
Quota::setQuota('liga platz3', str_replace(",",".",request('liga_platz3')));
|
||||
Quota::setQuota('liga platz2_1', str_replace(",",".",request('liga_platz2_1')));
|
||||
Quota::setQuota('liga platz3_1', str_replace(",",".",request('liga_platz3_1')));
|
||||
Quota::setQuota('liga_platz2', str_replace(",",".",request('liga_platz2')));
|
||||
Quota::setQuota('liga_platz3', str_replace(",",".",request('liga_platz3')));
|
||||
Quota::setQuota('liga_platz2_1', str_replace(",",".",request('liga_platz2_1')));
|
||||
Quota::setQuota('liga_platz3_1', str_replace(",",".",request('liga_platz3_1')));
|
||||
|
||||
// Redirect to the home page
|
||||
return redirect('/seasons');
|
||||
|
|
|
|||
|
|
@ -346,15 +346,17 @@ class UsersController extends Controller
|
|||
// Add GShirt, Playoff, Pokal payout
|
||||
Log::info("!> ".$user_id);
|
||||
$rankingDisplay[$user_id]['gshirt_payout'] = 0;
|
||||
$rankingDisplay[$user_id]['pokal'] = 0;Log::info("Setting pokal for user_id ".$user_id);
|
||||
$rankingDisplay[$user_id]['pokal'] = 0;
|
||||
$rankingDisplay[$user_id]['playoff'] = 0;
|
||||
$userPayouts = $payoutList[$user_id];
|
||||
|
||||
$hasGreenShirtGame=Season::hasGreenShirtGame();
|
||||
foreach ($userPayouts as $payoutItem) {
|
||||
Log::info($user_id." - ".$payoutItem['roundname']);
|
||||
if ($hasGreenShirtGame) {
|
||||
if ($payoutItem['roundname'] == "Grünes Trikot") {
|
||||
$rankingDisplay[$user_id]["gshirt_payout"] = $payoutItem['payout'];
|
||||
Log::info("GreenShirt goes to: ".$user_id);
|
||||
}
|
||||
}
|
||||
if ($payoutItem['roundname'] == 'Pokal') {
|
||||
|
|
@ -364,14 +366,13 @@ class UsersController extends Controller
|
|||
|
||||
if (strpos($payoutItem['roundname'], 'Liga') !== false) {
|
||||
$rankingDisplay[$user_id]["playoff"] = $payoutItem['payout'];
|
||||
Log::info($payoutItem['roundname']." goes to: ".$user_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$userids = array_keys($rankingDisplay);
|
||||
$round=Round::where('id','=',$max_round_id)->first();
|
||||
$games=Game::where('round_id','=',$max_round_id)->get();
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ class Quota extends Model
|
|||
$item = array();
|
||||
$item['roundname']=$names[$quota];
|
||||
$item['payout']=$_payouts[$quota];
|
||||
array_push($payoutList,$item);
|
||||
array_push($payoutList[$uId],$item);
|
||||
}
|
||||
|
||||
return $payoutList;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue