event filter wip
This commit is contained in:
1 parent
abfe5882cb
commit
988a148850
9 files changed
+120
-123
No files matched your search
@@ -12,7 +12,10 @@ use Filament\Support\Enums\FontWeight;
|
||||
use Filament\Support\Enums\IconSize;
|
||||
use Filament\Tables\Columns\IconColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Enums\FiltersLayout;
|
||||
use Filament\Tables\Filters\SelectFilter;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
class EventsTable
|
||||
{
|
||||
@@ -28,7 +31,7 @@ class EventsTable
|
||||
->size(IconSize::ExtraLarge)
|
||||
->icon(fn ($record) => $record->sport->icon)
|
||||
->tooltip(fn ($record) => $record->id),
|
||||
TextColumn::make('txodds_id')->searchable()->label('Match Id')->badge()->copyable(),
|
||||
TextColumn::make('txodds_id')->label('Match Id')->badge()->copyable(),
|
||||
TextColumn::make('starttime')
|
||||
->label('Start')
|
||||
->alignCenter()
|
||||
@@ -40,14 +43,23 @@ class EventsTable
|
||||
->label('Event')
|
||||
->icon(fn ($record) => $record->country->icon)
|
||||
->description(fn ($record) => $record->competition_group->name),
|
||||
TextColumn::make('home.name')->alignRight()->searchable(),
|
||||
TextColumn::make('away.name')->searchable(),
|
||||
TextColumn::make('home.name')->alignRight(),
|
||||
TextColumn::make('away.name'),
|
||||
|
||||
Odds3Way::make('odds_3way.bookmaker')->label('1X2'),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->defaultSort('starttime', 'ASC')
|
||||
// ->deferFilters(false)
|
||||
// ->filters([
|
||||
// SelectFilter::make('sport_id')
|
||||
// ->label('Sport')
|
||||
// ->default(1)
|
||||
// ->selectablePlaceholder(false)
|
||||
// ->relationship('sport', 'name', fn (Builder $query) => $query->where('is_active', 1))
|
||||
// ->preload(),
|
||||
// ], FiltersLayout::AboveContent)
|
||||
// ->hiddenFilterIndicators()
|
||||
->persistFiltersInSession()
|
||||
->recordActions([
|
||||
// EditAction::make(),
|
||||
DeleteAction::make()->iconButton(),
|
||||
|
||||
Reference in new issue
Block a user