wip starttime
This commit is contained in:
1 parent
91c17ddf03
commit
34c0cb4ba4
1 file changed
+13
-2
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user