Working on Quotas
This commit is contained in:
parent
b96197a086
commit
747b20049c
4 changed files with 15 additions and 24 deletions
|
|
@ -13,7 +13,7 @@ class ManualPayout extends Model
|
|||
];
|
||||
|
||||
public static function getManualQuotaNames() {
|
||||
$manualQuotas=array('Liga Platz 1','Liga Platz 2','Liga Platz 3','Liga Platz 2_1','Liga Platz 3_1','Pokal');
|
||||
$manualQuotas=array('liga_platz1','liga_platz2','liga_platz3','liga_platz2_1','liga_platz3_1','pokal');
|
||||
return $manualQuotas;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class Quota extends Model
|
|||
|
||||
$euro_gruenes_trikot = intval($euro_pott * (($quotas["Gruenes Trikot"] / 100)));
|
||||
$euro_gruenes_trikot = Quota::get6Divisor($euro_gruenes_trikot);
|
||||
$euro_pokal= intval ($euro_pott * (($quotas["Pokal"] / 100)));
|
||||
$euro_pokal= intval ($euro_pott * (($quotas["pokal"] / 100)));
|
||||
|
||||
$euro_pokal= Quota::get6Divisor($euro_pokal);
|
||||
|
||||
|
|
@ -191,14 +191,10 @@ class Quota extends Model
|
|||
|
||||
$quota = new Quota;
|
||||
$quota->season_id = $season_id;
|
||||
$quota->name = "Pokal";
|
||||
$quota->name = "pokal";
|
||||
$quota->prc = 15;
|
||||
$quota->save();
|
||||
|
||||
/// #######################################
|
||||
|
||||
// Sub-Quotas für den Spielmodus 'Tagessieg'
|
||||
|
||||
$quota = new Quota;
|
||||
$quota->season_id = $season_id;
|
||||
$quota->name = "Platz 1";
|
||||
|
|
@ -273,35 +269,35 @@ class Quota extends Model
|
|||
|
||||
$quota = new Quota;
|
||||
$quota->season_id = $season_id;
|
||||
$quota->name = "Liga Platz 1";
|
||||
$quota->name = "liga_platz1";
|
||||
$quota->order = 10;
|
||||
$quota->prc = 50;
|
||||
$quota->save();
|
||||
|
||||
$quota = new Quota;
|
||||
$quota->season_id = $season_id;
|
||||
$quota->name = "Liga Platz 2";
|
||||
$quota->name = "liga_platz2";
|
||||
$quota->order = 10;
|
||||
$quota->prc = 20;
|
||||
$quota->save();
|
||||
|
||||
$quota = new Quota;
|
||||
$quota->season_id = $season_id;
|
||||
$quota->name = "Liga Platz 3";
|
||||
$quota->name = "liga_platz3";
|
||||
$quota->order = 10;
|
||||
$quota->prc = 17;
|
||||
$quota->save();
|
||||
|
||||
$quota = new Quota;
|
||||
$quota->season_id = $season_id;
|
||||
$quota->name = "Liga Platz 2_1";
|
||||
$quota->name = "liga_platz2_1";
|
||||
$quota->order = 10;
|
||||
$quota->prc = 8;
|
||||
$quota->save();
|
||||
|
||||
$quota = new Quota;
|
||||
$quota->season_id = $season_id;
|
||||
$quota->name = "Liga Platz 3_1";
|
||||
$quota->name = "liga_platz3_1";
|
||||
$quota->order = 10;
|
||||
$quota->prc = 5;
|
||||
$quota->save();
|
||||
|
|
@ -405,7 +401,6 @@ class Quota extends Model
|
|||
foreach ($winners as $quota => $userId) {
|
||||
Log::info($quota." => ".$userId);
|
||||
|
||||
|
||||
if (!array_key_exists($userId, $winners)) {
|
||||
Log::info("Key not found: ".$quota);
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ INSERT INTO `quotas` (`id`, `season_id`, `name`, `order`, `prc`, `created_at`, `
|
|||
(3, 1, 'Platzierung', 1, 50, '2017-08-18 14:23:49', '2017-08-18 14:23:49'),
|
||||
(4, 1, 'Gruenes Trikot', 1, 0, '2017-08-18 14:23:49', '2017-08-18 14:23:49'),
|
||||
(5, 1, 'Liga-Wertung', 1, 0, '2017-08-18 14:23:49', '2017-08-18 14:23:49'),
|
||||
(6, 1, 'Pokal', 1, 0, '2017-08-18 14:23:49', '2017-08-18 14:23:49'),
|
||||
(6, 1, 'oPokal', 1, 0, '2017-08-18 14:23:49', '2017-08-18 14:23:49'),
|
||||
(7, 1, 'Platz 1', 1, 21, '2017-08-18 14:23:49', '2017-08-18 14:23:49'),
|
||||
(8, 1, 'Platz 2', 2, 17, '2017-08-18 14:23:49', '2017-08-18 14:23:49'),
|
||||
(9, 1, 'Platz 3', 3, 13, '2017-08-18 14:23:49', '2017-08-18 14:23:49'),
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@
|
|||
<div class="form-group" style="width:650px;" >
|
||||
<h4>
|
||||
<label style="float:left; width:200px;">Liga 1, Platz 1:</label>
|
||||
<input type="text" class="form-control" id="liga_platz1" name="liga_platz1" value="{{ $quotas['Liga Platz 1'] }}" style="float:left; width:75px;"required>
|
||||
<input type="text" class="form-control" id="liga_platz1" name="liga_platz1" value="{{ $quotas['liga_platz1'] }}" style="float:left; width:75px;"required>
|
||||
|
||||
<span class="dropdown" id="dropdown1">
|
||||
<button id="btn_winner" onclick="toggleDropdown('dropdown_winner'); return false;" class="dropbtn">{{ $winnerNames['liga_platz1'] }}</button>
|
||||
|
|
@ -176,7 +176,7 @@
|
|||
<p> </p>
|
||||
|
||||
<label style="float:left; width:200px;">Liga 1, Platz 2:</label>
|
||||
<input type="text" class="form-control" id="liga_platz2" name="liga_platz2" value="{{ $quotas['Liga Platz 2'] }}" style="float:left; width:75px;"required>
|
||||
<input type="text" class="form-control" id="liga_platz2" name="liga_platz2" value="{{ $quotas['liga_platz2'] }}" style="float:left; width:75px;"required>
|
||||
|
||||
<span class="dropdown" id="dropdown2">
|
||||
<button id="btn_winner" onclick="toggleDropdown('dropdown_winner2'); return false;" class="dropbtn">{{ $winnerNames['liga_platz2'] }}</button>
|
||||
|
|
@ -191,7 +191,7 @@
|
|||
<p> </p>
|
||||
|
||||
<label style="float:left; width:200px;">Liga 1, Platz 3:</label>
|
||||
<input type="text" class="form-control" id="liga_platz3" name="liga_platz3" value="{{ $quotas['Liga Platz 3'] }}" style="float:left; width:75px;"required>
|
||||
<input type="text" class="form-control" id="liga_platz3" name="liga_platz3" value="{{ $quotas['liga_platz3'] }}" style="float:left; width:75px;"required>
|
||||
|
||||
<span class="dropdown" id="dropdown3">
|
||||
<button id="btn_winner" onclick="toggleDropdown('dropdown_winner3'); return false;" class="dropbtn">{{ $winnerNames['liga_platz3'] }}</button>
|
||||
|
|
@ -207,7 +207,7 @@
|
|||
|
||||
|
||||
<label style="float:left; width:200px;">Liga 2, Platz 1:</label>
|
||||
<input type="text" class="form-control" id="liga_platz2_1" name="liga_platz2_1" value="{{ $quotas['Liga Platz 2_1'] }}" style="float:left; width:75px;"required>
|
||||
<input type="text" class="form-control" id="liga_platz2_1" name="liga_platz2_1" value="{{ $quotas['liga_platz2_1'] }}" style="float:left; width:75px;"required>
|
||||
|
||||
<span class="dropdown" id="dropdown4">
|
||||
<button id="btn_winner" onclick="toggleDropdown('dropdown_winner4'); return false;" class="dropbtn">{{ $winnerNames['liga_platz2_1'] }}</button>
|
||||
|
|
@ -225,7 +225,7 @@
|
|||
<p> </p>
|
||||
|
||||
<label style="float:left; width:200px;">Liga 3, Platz 1:</label>
|
||||
<input type="text" class="form-control" id="liga_platz3_1" name="liga_platz3_1" value="{{ $quotas['Liga Platz 3_1'] }}" style="float:left; width:75px;"required>
|
||||
<input type="text" class="form-control" id="liga_platz3_1" name="liga_platz3_1" value="{{ $quotas['liga_platz3_1'] }}" style="float:left; width:75px;"required>
|
||||
|
||||
<span class="dropdown" id="dropdown5">
|
||||
<button id="btn_winner" onclick="toggleDropdown('dropdown_winner5'); return false;" class="dropbtn">{{ $winnerNames['liga_platz3_1'] }}</button>
|
||||
|
|
@ -246,8 +246,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<input type="hidden" name="season_id" value="{{ $currentSeason->id }}">
|
||||
|
||||
<div class="form-group">
|
||||
|
|
@ -272,9 +270,7 @@
|
|||
|
||||
<script>
|
||||
|
||||
function setWinner($user_id, $quota_name, $elem_name="btn_winner") {
|
||||
//alert($user_id+","+ $quota_name);
|
||||
//var global_winner_id = document.getElementById($elem_winner).innerHTML=$roundname;
|
||||
function setWinner($user_id, $quota_name) {
|
||||
window.location.href = '/seasons/set_winner/'+$user_id+'/'+$quota_name;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue