- 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>
44 lines
906 B
PHP
Executable File
44 lines
906 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
enum EventType: string
|
|
{
|
|
case HomeGame = 'home_game';
|
|
case AwayGame = 'away_game';
|
|
case Training = 'training';
|
|
case Tournament = 'tournament';
|
|
case Meeting = 'meeting';
|
|
case Other = 'other';
|
|
|
|
public function label(): string
|
|
{
|
|
return __("ui.enums.event_type.{$this->value}");
|
|
}
|
|
|
|
public function isGameType(): bool
|
|
{
|
|
return in_array($this, [self::HomeGame, self::AwayGame]);
|
|
}
|
|
|
|
public function hasCatering(): bool
|
|
{
|
|
return !in_array($this, [self::AwayGame, self::Meeting]);
|
|
}
|
|
|
|
public function hasTimekeepers(): bool
|
|
{
|
|
return !in_array($this, [self::AwayGame, self::Meeting]);
|
|
}
|
|
|
|
public function hasCarpool(): bool
|
|
{
|
|
return $this !== self::Meeting;
|
|
}
|
|
|
|
public function hasPlayerParticipants(): bool
|
|
{
|
|
return $this !== self::Meeting;
|
|
}
|
|
}
|