diff --git a/theme/components/raid-signup.php b/theme/components/raid-signup.php index 7986baf..c11826c 100644 --- a/theme/components/raid-signup.php +++ b/theme/components/raid-signup.php @@ -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]; +} ?>
border border-character->color ?> shadow" x-data="{open : false}"> diff --git a/theme/pages/roster.php b/theme/pages/roster.php index cf63f32..cb9cec8 100644 --- a/theme/pages/roster.php +++ b/theme/pages/roster.php @@ -31,6 +31,8 @@ get_header(); Rang Server Gilde + Raider + User @@ -59,6 +61,8 @@ get_header(); rank ?> realm ?> guild ?> + raidchar?"Ja":"Nein" ?> +
diff --git a/theme/wowpress/Database/CreateCharacterTable.php b/theme/wowpress/Database/CreateCharacterTable.php index b9c8329..0437574 100644 --- a/theme/wowpress/Database/CreateCharacterTable.php +++ b/theme/wowpress/Database/CreateCharacterTable.php @@ -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',