First version of LeagueSwap

This commit is contained in:
Torsten 2022-06-12 00:22:19 +02:00
parent 07ce7961c9
commit 8cc4e620ec
5 changed files with 78 additions and 23 deletions

View file

@ -12,6 +12,7 @@
<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>

View file

@ -40,7 +40,7 @@
<!-- Start Matchgruppen-Loop-->
@foreach($playerTuples as $pos => $player)
<tr class="table-bordered">
<td><input id="{{$player[0]}}__{{$userNames[$player[0]]}}__{{$leagueNames[$leagueId]}}" type="checkbox"></td>
<td><input id="{{$player[0]}}" type="checkbox"></td>
<td style="width:50px;background-color:{{ $cols[$rankInfo[$player[0]]] }}">&nbsp; {{$pos+1}}&nbsp;</td>
<td>&nbsp;<a name="playerid_{{$player[0]}}" class="{{ $player[0]==Auth::user()->id ? 'blink_text' : '' }}" href="/league/showSingleUserMatches/user_id={{$player[0]}}"> {{$userNames[$player[0]]}} </a>&nbsp;</td>
<td>&nbsp; {{$player[1]}} &nbsp;</td>
@ -101,11 +101,11 @@
method: 'post',
credentials: "same-origin",
body: JSON.stringify({
user1: inputElems[0].id,
user2: inputElems[1].id
user1_id: selected_players[0],
user2_id: selected_players[1]
})
}).then((data) => {
window.location.href = redirect;
location.reload();
})
.catch(function(error) {
console.log(error);