Spielerpositionen, Statistiken, Fahrgemeinschaften, Spielfeld-Visualisierung
- PlayerPosition Enum (7 Handball-Positionen) mit Label/ShortLabel - Spielerstatistik pro Spiel (Tore, Würfe, TW-Paraden, Bemerkung) - Position-Dropdown in Spieler-Editor und Event-Stats-Formular - Statistik-Seite: TW zuerst, Trennlinie, Feldspieler, Position-Badges - Spielfeld-SVG mit Ampel-Performance (grün/gelb/rot) - Anklickbare Spieler im Spielfeld öffnen Detail-Modal - Fahrgemeinschaften (Anbieten, Zuordnen, Zurückziehen) - Übersetzungen in allen 6 Sprachen (de, en, pl, ru, ar, tr) - .gitignore für Laravel hinzugefügt - Demo-Daten mit Positionen und Statistiken Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,11 @@ enum EventType: string
|
||||
return !in_array($this, [self::AwayGame, self::Meeting]);
|
||||
}
|
||||
|
||||
public function hasCarpool(): bool
|
||||
{
|
||||
return $this !== self::Meeting;
|
||||
}
|
||||
|
||||
public function hasPlayerParticipants(): bool
|
||||
{
|
||||
return $this !== self::Meeting;
|
||||
|
||||
34
app/Enums/PlayerPosition.php
Normal file
34
app/Enums/PlayerPosition.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum PlayerPosition: string
|
||||
{
|
||||
case Torwart = 'torwart';
|
||||
case LinksAussen = 'links_aussen';
|
||||
case RechtsAussen = 'rechts_aussen';
|
||||
case RueckraumLinks = 'rueckraum_links';
|
||||
case RueckraumMitte = 'rueckraum_mitte';
|
||||
case RueckraumRechts = 'rueckraum_rechts';
|
||||
case Kreislaeufer = 'kreislaeufer';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return __("ui.enums.player_position.{$this->value}");
|
||||
}
|
||||
|
||||
public function shortLabel(): string
|
||||
{
|
||||
return __("ui.enums.player_position_short.{$this->value}");
|
||||
}
|
||||
|
||||
public function isGoalkeeper(): bool
|
||||
{
|
||||
return $this === self::Torwart;
|
||||
}
|
||||
|
||||
public static function values(): array
|
||||
{
|
||||
return array_column(self::cases(), 'value');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user