diff --git a/app/Filament/Resources/Events/Tables/EventsTable.php b/app/Filament/Resources/Events/Tables/EventsTable.php index 7c9b0bfa..76b5cf1e 100644 --- a/app/Filament/Resources/Events/Tables/EventsTable.php +++ b/app/Filament/Resources/Events/Tables/EventsTable.php @@ -80,13 +80,24 @@ class EventsTable MatchIds::make('ids')->grow(false)->visibleFrom('xl') ->visible(fn () => auth()->user()->hasRole('super_admin')), - TextColumn::make('starttime') + TextColumn::make('event_bookmaker.starttime') ->timezone('CET') ->label('Start') ->alignCenter() ->dateTime('H:i') ->weight(FontWeight::Bold) - ->description(fn ($state): string => Carbon::createFromDate($state)->format('d. M')), + ->color(function ($record) { + $bkm = $record->event_bookmaker?->starttime ?? null; + if ($bkm) { + return $bkm != $record->starttime ? 'danger' : 'info'; + } + + return 'gray'; + }) + ->state(function ($record) { + return $record->event_bookmaker->starttime ?? $record->starttime; + }) + ->description(fn ($record): string => Carbon::createFromDate($record->event_bookmaker->starttime ?? $record->starttime)->format('d. M')), TextColumn::make('country.name') ->wrap()