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:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('event_carpools', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->tinyInteger('seats')->unsigned();
|
||||
$table->string('note', 255)->nullable();
|
||||
$table->timestamps();
|
||||
$table->unique(['event_id', 'user_id']);
|
||||
});
|
||||
|
||||
Schema::create('event_carpool_passengers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('carpool_id')->constrained('event_carpools')->cascadeOnDelete();
|
||||
$table->foreignId('player_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('added_by')->constrained('users')->cascadeOnDelete();
|
||||
$table->timestamp('created_at')->nullable();
|
||||
$table->unique(['carpool_id', 'player_id']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('event_carpool_passengers');
|
||||
Schema::dropIfExists('event_carpools');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('event_player_stats', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('player_id')->constrained()->cascadeOnDelete();
|
||||
$table->boolean('is_goalkeeper')->default(false);
|
||||
$table->unsignedSmallInteger('goalkeeper_saves')->nullable();
|
||||
$table->unsignedSmallInteger('goalkeeper_shots')->nullable();
|
||||
$table->unsignedSmallInteger('goals')->nullable();
|
||||
$table->unsignedSmallInteger('shots')->nullable();
|
||||
$table->string('note', 500)->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['event_id', 'player_id']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('event_player_stats');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('players', function (Blueprint $table) {
|
||||
$table->string('position', 20)->nullable()->after('jersey_number');
|
||||
});
|
||||
|
||||
Schema::table('event_player_stats', function (Blueprint $table) {
|
||||
$table->string('position', 20)->nullable()->after('is_goalkeeper');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('players', function (Blueprint $table) {
|
||||
$table->dropColumn('position');
|
||||
});
|
||||
|
||||
Schema::table('event_player_stats', function (Blueprint $table) {
|
||||
$table->dropColumn('position');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user