Removal of PlayerLeage, Pokal, PlayOff, GreenShirt

This commit is contained in:
Torsten 2024-06-30 13:16:49 +02:00
parent 6018836204
commit c3dba752d6
4 changed files with 32 additions and 201 deletions

View file

@ -33,6 +33,7 @@ class SeasonsController extends Controller
}
$winnerNames=array();
/*
$manualPayoutTypes=array('liga_platz1','liga_platz2','liga_platz3', 'liga_platz2_1', 'liga_platz3_1', 'pokal');
foreach($manualPayoutTypes as $payoutType) {
$user = ManualPayout::getWinner($payoutType);
@ -40,6 +41,7 @@ class SeasonsController extends Controller
if ($user) $name = $user->name;
$winnerNames[$payoutType] = $name;
}
*/
return view('seasons.index', compact('seasons','currentSeason','active_user_count','quotas','payouts', 'users', 'winnerNames'));
}
@ -135,6 +137,8 @@ class SeasonsController extends Controller
public function store_quota() {
if (Auth::guest()) { return redirect("/"); }
if (!Auth::user()->admin) { return redirect("/"); }
Log::info("--store_quota--");
Log::info(request());
$currentSeason=Season::getCurrent();
@ -144,13 +148,7 @@ class SeasonsController extends Controller
'season_id' => 'required',
'einsatz' => 'required',
'tagessieg' => 'required',
'pokal' => 'required',
'gshirt' => 'required',
'platzierung' => 'required',
'liga' => 'required',
'liga_platz1' => 'required',
'liga_platz2' => 'required',
'liga_platz3' => 'required',
'platz1' => 'required',
'platz2' => 'required',
'platz3' => 'required',
@ -162,32 +160,23 @@ class SeasonsController extends Controller
'platz9' => 'required',
'platz10' => 'required'
]);
Log::info("request validated");
// Create and save the season
Quota::setQuota('runden', request('round_count'));
Quota::setQuota('einsatz', request('einsatz'));
Quota::setQuota('tagessieg', str_replace(",",".",request('tagessieg')));
Quota::setQuota('gshirt', str_replace(",",".",request('gshirt')));
Quota::setQuota('pokal', str_replace(",",".",request('pokal')));
Quota::setQuota('platzierung', str_replace(",",".",request('platzierung')));
Quota::setQuota('platz1', str_replace(",",".",request('platz1')));
Quota::setQuota('platz2', str_replace(",",".",request('platz2')));
Quota::setQuota('platz 3', str_replace(",",".",request('platz3')));
Quota::setQuota('platz 4', str_replace(",",".",request('platz4')));
Quota::setQuota('platz 5', str_replace(",",".",request('platz5')));
Quota::setQuota('platz 6', str_replace(",",".",request('platz6')));
Quota::setQuota('platz 7', str_replace(",",".",request('platz7')));
Quota::setQuota('platz 8', str_replace(",",".",request('platz8')));
Quota::setQuota('platz 9', str_replace(",",".",request('platz9')));
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('platz3', str_replace(",",".",request('platz3')));
Quota::setQuota('platz4', str_replace(",",".",request('platz4')));
Quota::setQuota('platz5', str_replace(",",".",request('platz5')));
Quota::setQuota('platz6', str_replace(",",".",request('platz6')));
Quota::setQuota('platz7', str_replace(",",".",request('platz7')));
Quota::setQuota('platz8', str_replace(",",".",request('platz8')));
Quota::setQuota('platz9', str_replace(",",".",request('platz9')));
Quota::setQuota('platz10', str_replace(",",".",request('platz10')));
// Redirect to the home page
return redirect('/seasons');

View file

@ -12,7 +12,6 @@
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/seasons">Saison</a>
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/rounds#{{\App\Round::getFirstIncompleteRound()}}">Runden</a>
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/users">Spieler</a>
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/league/swapform">Ligatausch</a>
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/roundmails">Rundmail</a>
</div>
</label>
@ -22,24 +21,12 @@
&nbsp;
<a style="font-color: blue; font-size: 22px;" href="/users/ranking/roundid_-1#playerid_{{Auth::user()->id}}" >Rangliste</a> &nbsp;
<label class="dropdown" id="dropdown2">
<a href="#" id="btn_league" onclick="toggleSelect('dropdown_league'); return false;" style="font-weight:normal; font-color: blue; font-size: 22px;">Spieler-Liga</a>
<div id="dropdown_league" class="dropdown-content">
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/league_show_rounds">Spielplan</a> &nbsp;<!-- /league_show_rounds -->
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/league/show#playerid_ {{ Auth::user()->id }}">Tabellen</a> &nbsp; <!-- /league/show#playerid_ (( Auth::user()->id )) -->
</div>
</label>
&nbsp;
<label class="dropdown" id="dropdown3">
<a href="#" id="btn_info" onclick="toggleSelect('dropdown_info'); return false;" style="font-weight:normal; font-color: blue; font-size: 22px;">Info</a>
<div id="dropdown_info" class="dropdown-content">
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/users/show_payouts">Quoten</a> &nbsp;
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/users/payout#playerid_{{Auth::user()->id}}">Geldrangliste</a> &nbsp;
@if (App\Season::hasGreenShirtGame())
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/users/gshirt_ranking">Grünes Trikot</a> &nbsp;
@endif
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/users/pokal">Pokal</a> &nbsp;
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/users/playoff">Play-Off</a> &nbsp;
</div>
</label>
&nbsp;

View file

@ -60,35 +60,8 @@
<span>&nbsp;</span>
<p>&nbsp;</p>
<label style="float:left; width:200px;">Grünes Trikot:</label>
<input type="text" class="form-control" id="gshirt" name="gshirt" value="{{ $quotas['gshirt'] }}" style="float:left; width:75px;"required>
<label style="float:left;">&nbsp;% = {{$payouts['gshirt']}} €</label>
<span>&nbsp;</span>
<p>&nbsp;</p>
<label style="float:left; width:200px;">Pokal:</label>
<input type="text" class="form-control" id="pokal" name="pokal" value="{{ $quotas['pokal'] }}" style="float:left; width:75px;" required>
<label style="float:left;">&nbsp;% = {{ $payouts['pokal'] }} €</label>
<span class="dropdown" id="dropdown6">
<button id="btn_winner" onclick="toggleDropdown('dropdown_pokal_winner'); return false;" class="dropbtn">{{ $winnerNames['pokal'] }}</button>
<div id="dropdown_pokal_winner" class="dropdown-content" style="width:250px;">
@foreach($users as $user)
<a onclick=" setWinner('{{$user->id}}','pokal');return false;" style="width:250px";>{{$user->name}}</a>
@endforeach
</div>
</span>
<span>
<button id="btn_clear_pokal_winner" onclick="setWinner(0,'pokal'); return false;" style="width:25px;">x</button>
</span>
<p>&nbsp;</p>
<label style="float:left; width:200px;">Liga:</label>
<input type="text" class="form-control" id="liga" name="liga" value="{{ $quotas['liga'] }}" style="float:left; width:75px;"required>
<label style="float:left;">&nbsp;% = {{ $payouts['liga_platz1']+$payouts['liga_platz2']+$payouts['liga_platz3']+$payouts['liga_platz2_1']+$payouts['liga_platz3_1'] }} €</label>
<p>&nbsp;</p>
</h4>
</div>
@ -153,120 +126,6 @@
</h4>
<h3>Liga:</h3>
@if($currentSeason)
<div>
<a class="btn btn-primary" href="/league_settings/season={{$currentSeason->id}}">Liga bearbeiten</a>
</div>
@endif
<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_platz1'] }}" style="float:left; width:75px;"required>
<span class="dropdown" id="dropdown1">
<button id="btn_winner" onclick="toggleDropdown('dropdown_p1_winner'); return false;" class="dropbtn">{{ $winnerNames['liga_platz1'] }}</button>
<div id="dropdown_p1_winner" class="dropdown-content" style="width:250px;">
@foreach($users as $user)
<a onclick=" setWinner('{{$user->id}}','liga_platz1');return false;" style="width:250px";>{{$user->name}}</a>
@endforeach
</div>
</span>
<span>
<button id="btn_clear_p1_winner" onclick="setWinner(0,'liga_platz1'); return false;" style="width:25px;">x</button>
</span>
<label style="float:left">&nbsp;% = {{$payouts['liga_platz1']}} €</label>
<p>&nbsp;</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_platz2'] }}" style="float:left; width:75px;"required>
<span class="dropdown" id="dropdown2">
<button id="btn_winner" onclick="toggleDropdown('dropdown_p2_winner2'); return false;" class="dropbtn">{{ $winnerNames['liga_platz2'] }}</button>
<div id="dropdown_p2_winner2" class="dropdown-content" style="width:250px;">
@foreach($users as $user)
<a onclick=" setWinner('{{$user->id}}','liga_platz2');return false;" style="width:250px";>{{$user->name}}</a>
@endforeach
</div>
</span>
<span>
<button id="btn_clear_p2_winner" onclick="setWinner(0,'liga_platz2'); return false;" style="width:25px;">x</button>
</span>
<label style="float:left;">&nbsp;% = {{$payouts['liga_platz2']}} €</label>
<p>&nbsp;</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_platz3'] }}" style="float:left; width:75px;"required>
<span class="dropdown" id="dropdown3">
<button id="btn_winner" onclick="toggleDropdown('dropdown_p3_winner'); return false;" class="dropbtn">{{ $winnerNames['liga_platz3'] }}</button>
<div id="dropdown_p3_winner" class="dropdown-content" style="width:250px;">
@foreach($users as $user)
<a onclick=" setWinner('{{$user->id}}','liga_platz3');return false;" style="width:250px";>{{$user->name}}</a>
@endforeach
</div>
</span>
<span>
<button id="btn_clear_p3_winner" onclick="setWinner(0,'liga_platz3'); return false;" style="width:25px;">x</button>
</span>
<label style="float:left;">&nbsp;% = {{ $payouts['liga_platz3'] }} €</label>
<p>&nbsp;</p>
<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_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>
<div id="dropdown_winner4" class="dropdown-content" style="width:250px;">
@foreach($users as $user)
<a onclick=" setWinner('{{$user->id}}','liga_platz2_1');return false;" style="width:250px";>{{$user->name}}</a>
@endforeach
</div>
</span>
<span>
<button id="btn_clear_p2_1_winner" onclick="setWinner(0,'liga_platz2_1'); return false;" style="width:25px;">x</button>
</span>
<label style="float:left;">&nbsp;% = {{ $payouts['liga_platz2_1'] }} €</label>
<p>&nbsp;</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_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>
<div id="dropdown_winner5" class="dropdown-content" style="width:250px;">
@foreach($users as $user)
<a onclick=" setWinner('{{$user->id}}','liga_platz3_1');return false;" style="width:250px";>{{$user->name}}</a>
@endforeach
</div>
</span>
<span>
<button id="btn_clear_p3_1_winner" onclick="setWinner(0,'liga_platz3_1'); return false;" style="width:25px;">x</button>
</span>
<label style="float:left;">&nbsp;% = {{ $payouts['liga_platz3_1'] }} €</label>
<p>&nbsp;</p>
</h4>
</div>
<p>&nbsp;
</div>
<input type="hidden" name="season_id" value="{{ $currentSeason->id }}">

View file

@ -60,12 +60,13 @@
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;width:50px;">Tagessieg</span>
</div>
</th>
<!--
<th style="height:140px;white-space: nowrap;">
<div style="transform:translate(10px, 51px) rotate(270deg);width:30px;">
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;width:50px;">Grünes Trikot</span>
</div>
</th>
-->
<th style="height:140px;white-space: nowrap;">
<div style="transform:translate(10px, 51px) rotate(270deg);width:30px;">
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;width:150px;">Spieler</span>
@ -158,29 +159,24 @@
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">Preisgeld Platzierung</span>
</div>
</th>
<th style="height:140px;white-space: nowrap;">
<div style="transform:translate(10px, 51px) rotate(270deg);width:30px;">
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">Preisgeld gr&uuml;nes Trikot</span>
<!-- 30.06.2024: removed th containing green shirt -->
<!-- 30.06.2024: removed th containing pokal -->
<!-- 30.06.2024: removed th containing playoff -->
</div>
</th>
<th style="height:140px;white-space: nowrap;">
<div style="transform:translate(10px, 51px) rotate(270deg);width:30px;">
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">Preisgeld Pokal</span>
</div>
</th>
<th style="height:140px;white-space: nowrap;">
<div style="transform:translate(10px, 51px) rotate(270deg);width:30px;">
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">Preisgeld Playoff</span>
</div>
</th>
@endif
@endif
@foreach($rankingDisplay as $entry)
<tr>
<td class="table-bordered" >&nbsp;<span class="text list-unstyled" href="#" >&nbsp;{{ $entry["rank"] }}&nbsp;</span></td>
<!-- <td class="table-bordered" align="center">&nbsp; $entry["dayScoreWithRankScore"] &nbsp;</td> -->
<td class="table-bordered"><div style="margin: 0 auto; width: 32px;"><img src="/img/crown.png" style="{{ ($entry["is_dayscorewinner"] ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></div></td>
<!-- <td class="table-bordered" align="center" style="">&nbsp;<img src="/img/green_shirt.png"/>&nbsp;</td>-->
<td class="table-bordered" align="center">&nbsp; <img src="/img/green_shirt.png" style="{{ ($entry["gshirt_leader"]==1 ? 'width:32px;height:32px' : 'display: none;') }}"/> &nbsp;</td>
<!-- 30.06.2024: removed td containing green shirt -->
<td class="table-bordered">&nbsp;<a class="text list-unstyled {{ $entry['user_id']==Auth::user()->id ? 'blink_text' : '' }}" name="playerid_{{$entry['user_id']}}" href="#" style="vertical-align: middle;">{{ $entry["user_name"] }} &nbsp;</a></td>
<td class="table-bordered" align="center">&nbsp;{{ $entry["totalRankScore"] }}&nbsp;</td>
<td class="table-bordered" align="center">&nbsp;{{ $entry["rankscore"] }}&nbsp;</td>
@ -201,9 +197,9 @@
<td class="table-bordered" align="center" >&nbsp;{{ $entry["payout"] }}&nbsp;{{ $entry["payout"]>0 ? '€': '' }}</td>
@if($isFinalRound)
<td class="table-bordered" align="center" >&nbsp;{{ $entry["ranking_payout"]>0 ? $entry["ranking_payout"].'€': '' }} &nbsp; </td>
<td class="table-bordered" align="center" >&nbsp;{{ $entry["gshirt_payout"]>0 ? $entry["gshirt_payout"].'€': '' }} &nbsp; </td>
<td class="table-bordered" align="center" >&nbsp;{{ $entry["pokal"]>0 ? $entry["pokal"].'€': '' }} &nbsp; </td>
<td class="table-bordered" align="center" >&nbsp;{{ $entry["playoff"]>0 ? $entry["playoff"].'€': '' }} &nbsp; </td>
<!-- 30.06.2024: removed td containing green shirt -->
<!-- 30.06.2024: removed td containing pokal -->
<!-- 30.06.2024: removed td containing playoff -->
@endif
</tr>
@endforeach