Raid anmeldung 2.0
parent
6bb27671fd
commit
db6b0eff95
|
@ -7,12 +7,14 @@ use WoWPress\Models\Signup;
|
|||
$id = "raidSignup_" . uniqid();
|
||||
|
||||
global $user;
|
||||
$chars = [];
|
||||
if(!empty($this->character->user->ID)){
|
||||
$chars = $this->character->user->characters;
|
||||
}else{
|
||||
$chars = [$this->character];
|
||||
$chars = $this->character->user->characters()->where('raidchar',true)->get();
|
||||
}
|
||||
|
||||
if(empty($chars) || empty($chars->first())){
|
||||
$chars = [$this->character];
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="flex <?= $vertical ? "flex-col" : "flex-row" ?> border border-<?= $this->character->color ?> shadow" x-data="{open : false}">
|
||||
|
|
|
@ -31,6 +31,8 @@ get_header();
|
|||
<td class="p-auto hidden lg:table-cell">Rang</td>
|
||||
<td class="p-auto hidden lg:table-cell">Server</td>
|
||||
<td class="p-auto hidden lg:table-cell">Gilde</td>
|
||||
<td class="p-auto hidden lg:table-cell">Raider</td>
|
||||
|
||||
<?php if (current_user_can('wowpress_edit_characters')) : ?>
|
||||
<td class="p-auto hidden lg:table-cell">
|
||||
User
|
||||
|
@ -59,6 +61,8 @@ get_header();
|
|||
<td class="p-auto hidden lg:table-cell"><?= $char->rank ?></td>
|
||||
<td class="p-auto hidden lg:table-cell"><?= $char->realm ?></td>
|
||||
<td class="p-auto hidden lg:table-cell"><?= $char->guild ?></td>
|
||||
<td class="p-auto hidden lg:table-cell"><?= $char->raidchar?"Ja":"Nein" ?></td>
|
||||
|
||||
<?php if (current_user_can('wowpress_edit_characters')) : ?>
|
||||
<td class="p-auto hidden lg:table-cell">
|
||||
<form action="/request" method="POST">
|
||||
|
|
|
@ -13,6 +13,7 @@ class CreateCharacterTable extends CreateTable
|
|||
'spec' => "text DEFAULT Brave",
|
||||
'id_blizz' => 'mediumint',
|
||||
'id_wowaudit' => 'mediumint',
|
||||
'raidchar' => 'boolean DEFAULT 0',
|
||||
'guild' => "text",
|
||||
'rank' => 'tinyint DEFAULT 99',
|
||||
'user_id' => 'mediumint',
|
||||
|
|
Loading…
Reference in New Issue