47 lines
1.5 KiB
PHP
47 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Bookmakers\Tables;
|
|
|
|
use App\Filament\Tables\Columns\BookmakerIcon;
|
|
use Filament\Actions\EditAction;
|
|
use Filament\Tables\Columns\TextColumn;
|
|
use Filament\Tables\Columns\ToggleColumn;
|
|
use Filament\Tables\Filters\TernaryFilter;
|
|
use Filament\Tables\Table;
|
|
|
|
class BookmakersTable
|
|
{
|
|
public static function configure(Table $table): Table
|
|
{
|
|
return $table
|
|
->striped()
|
|
->recordAction(null)
|
|
->columns([
|
|
TextColumn::make('id')->searchable(),
|
|
TextColumn::make('name')
|
|
->searchable(),
|
|
BookmakerIcon::make('icon')->label('Icon'),
|
|
TextColumn::make('baid')
|
|
->label('BAID')
|
|
->numeric()
|
|
->sortable(),
|
|
ToggleColumn::make('txso')->offColor('gray'),
|
|
ToggleColumn::make('txot')->offColor('gray'),
|
|
ToggleColumn::make('betsapi')->offColor('gray'),
|
|
ToggleColumn::make('direct')->offColor('gray'),
|
|
ToggleColumn::make('is_active')->offColor('gray'),
|
|
])
|
|
->defaultSort('name')
|
|
->filters([
|
|
TernaryFilter::make('txso'),
|
|
TernaryFilter::make('txot'),
|
|
TernaryFilter::make('betsapi'),
|
|
TernaryFilter::make('direct'),
|
|
TernaryFilter::make('is_active')->default(true),
|
|
])
|
|
->recordActions([
|
|
EditAction::make()->hiddenLabel(),
|
|
]);
|
|
}
|
|
}
|