comparatore bookmaker odds wip
This commit is contained in:
1 parent
adaec7b3dc
commit
218c1e6e1c
59 files changed
+470
-129
No files matched your search
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Multilines\Tables;
|
||||
|
||||
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\Table;
|
||||
|
||||
class MultilinesTable
|
||||
{
|
||||
public static function configure(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->reorderRecordsTriggerAction(
|
||||
fn (Action $action, bool $isReordering) => $action
|
||||
->button()
|
||||
->label($isReordering ? 'Disable reordering' : 'Enable reordering'),
|
||||
)
|
||||
->reorderable('sort')
|
||||
->columns([
|
||||
IconColumn::make('sport.icon')
|
||||
->label('')
|
||||
->width('1rem')
|
||||
->icon(function ($record): string {
|
||||
return $record->sport->icon;
|
||||
}),
|
||||
TextColumn::make('sport.name'),
|
||||
TextColumn::make('matchpart.name'),
|
||||
TextColumn::make('bettype.name'),
|
||||
TextColumn::make('bookmaker.name'),
|
||||
BookmakerIcon::make('bookmaker.icon')->label('Icon'),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()
|
||||
->mutateDataUsing(function (array $data): array {
|
||||
$data['client_id'] = auth()->user()->client_id;
|
||||
|
||||
return $data;
|
||||
}),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user