Files
WebAPP/resources/views/events/index.blade.php
Rhino 2e24a40d68 Stand: SMTP-Test, Admin-Mail-Tab, Notifiable-Fix, Lazy-Quill
- Fix: Notifiable-Trait zum User-Model hinzugefuegt (behebt notify()-500er)
- Installer: SMTP-Verbindungstest mit EsmtpTransport + Ueberspringen-Link
- Admin: Neuer E-Mail-Tab mit SMTP-Konfiguration + Verbindungstest
- Admin: Lazy Quill-Initialisierung (nur sichtbare Locale wird geladen)
- Uebersetzungen: 17 neue Mail-Keys in allen 6 Sprachen

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 07:30:37 +01:00

90 lines
5.1 KiB
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<x-layouts.app :title="__('events.title')">
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between mb-6">
<h1 class="text-2xl font-bold">{{ __('events.title') }}</h1>
</div>
{{-- Filter --}}
<form method="GET" action="{{ route('events.index') }}" class="bg-white rounded-lg shadow p-4 mb-6">
<div class="grid grid-cols-1 sm:grid-cols-4 gap-3">
<div>
<label for="team_id" class="block text-xs font-medium text-gray-600 mb-1">{{ __('ui.team') }}</label>
<select name="team_id" id="team_id" class="w-full rounded-md border-gray-300 text-sm">
<option value="">{{ __('ui.all_teams') }}</option>
@foreach ($teams as $team)
<option value="{{ $team->id }}" {{ request('team_id') == $team->id ? 'selected' : '' }}>{{ $team->name }}</option>
@endforeach
</select>
</div>
<div>
<label for="type" class="block text-xs font-medium text-gray-600 mb-1">{{ __('ui.type') }}</label>
<select name="type" id="type" class="w-full rounded-md border-gray-300 text-sm">
<option value="">{{ __('ui.all_types') }}</option>
@foreach (\App\Enums\EventType::cases() as $type)
<option value="{{ $type->value }}" {{ request('type') === $type->value ? 'selected' : '' }}>{{ $type->label() }}</option>
@endforeach
</select>
</div>
<div>
<label for="period" class="block text-xs font-medium text-gray-600 mb-1">{{ __('ui.period') }}</label>
<select name="period" id="period" class="w-full rounded-md border-gray-300 text-sm">
<option value="upcoming" {{ request('period', 'upcoming') === 'upcoming' ? 'selected' : '' }}>{{ __('ui.upcoming') }}</option>
<option value="past" {{ request('period') === 'past' ? 'selected' : '' }}>{{ __('ui.past') }}</option>
</select>
</div>
<div class="flex items-end">
<button type="submit" class="w-full bg-blue-600 text-white rounded-md px-4 py-2 text-sm hover:bg-blue-700">{{ __('ui.filter') }}</button>
</div>
</div>
</form>
{{-- Event-Liste --}}
@if ($events->isEmpty())
<div class="bg-white rounded-lg shadow p-6 text-center text-gray-500">
{{ __('events.no_events') }}
</div>
@else
<div class="space-y-3">
@foreach ($events as $event)
@php
$minStatus = $event->minimumsStatus();
$bgClass = match($minStatus) { true => 'bg-green-50', false => 'bg-red-50', default => 'bg-white' };
@endphp
<a href="{{ route('events.show', $event) }}" class="block {{ $bgClass }} rounded-lg shadow p-4 hover:shadow-md transition-shadow">
<div class="flex flex-col sm:flex-row sm:items-center gap-3">
<div class="flex-1 min-w-0">
<div class="flex items-center gap-2 mb-1 flex-wrap">
<x-event-type-badge :type="$event->type" />
<span class="text-xs text-gray-500">{{ $event->team->name }}</span>
@if ($event->status === \App\Enums\EventStatus::Cancelled)
<span class="inline-block px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-800">{{ __('events.cancelled_label') }}</span>
@elseif ($event->status === \App\Enums\EventStatus::Draft)
<span class="inline-block px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800">{{ __('events.draft_label') }}</span>
@endif
</div>
<h3 class="font-semibold {{ $event->status === \App\Enums\EventStatus::Cancelled ? 'line-through text-gray-400' : 'text-gray-900' }}">
{{ $event->title }}
</h3>
<p class="text-sm text-gray-600">
{{ $event->start_at->translatedFormat(__('ui.date_format')) }} {{ __('ui.clock') }}
@if ($event->end_at)
{{ $event->end_at->format('H:i') }} {{ __('ui.clock') }}
@endif
</p>
@if ($event->location_name)
<p class="text-sm text-gray-500 mt-1">{{ $event->location_name }}</p>
@endif
</div>
<div class="shrink-0">
<x-event-status-boxes :event="$event" />
</div>
</div>
</a>
@endforeach
</div>
<div class="mt-6">
{{ $events->links() }}
</div>
@endif
</x-layouts.app>