event filter wip
This commit is contained in:
1 parent
abfe5882cb
commit
988a148850
9 files changed
+120
-123
No files matched your search
@@ -20,11 +20,11 @@ class EventResource extends Resource
|
||||
|
||||
protected static ?string $navigationLabel = 'Monitor';
|
||||
|
||||
protected static ?string $modelLabel = 'Monitor';
|
||||
protected static ?string $modelLabel = '';
|
||||
|
||||
protected static ?string $title = 'Monitor';
|
||||
protected static ?string $title = '';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'Monitor';
|
||||
protected static ?string $pluralModelLabel = '';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Filament\Resources\Multilines\Tables;
|
||||
|
||||
use App\Actions\MultilineGenerator;
|
||||
use App\Filament\Tables\Columns\BookmakerIcon;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Tables\Columns\IconColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Enums\FiltersLayout;
|
||||
@@ -53,13 +53,9 @@ class MultilinesTable
|
||||
->headerActions([
|
||||
Action::make('generate')
|
||||
->icon('phosphor-gear-fine')
|
||||
->requiresConfirmation(),
|
||||
// EditAction::make()
|
||||
// ->mutateDataUsing(function (array $data): array {
|
||||
// $data['client_id'] = auth()->user()->client_id;
|
||||
|
||||
// return $data;
|
||||
// }),
|
||||
->action(function () {
|
||||
MultilineGenerator::run();
|
||||
}),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user