move all into clusters

This commit is contained in:
salam committed 2026-03-04 19:07:33 +01:00
1 parent 7ff3fbadb6
commit a980ea92ce
91 files changed
+300 -262

No files matched your search

@@ -0,0 +1,48 @@
<?php
namespace App\Filament\Clusters\User\Resources\Clients\Tables;
use App\Actions\SettingGeneratorClient;
use App\Models\Bookmaker;
use App\Models\Provider;
use App\Models\Sport;
use Filament\Actions\Action;
use Filament\Actions\EditAction;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
class ClientsTable
{
public static function configure(Table $table): Table
{
return $table
->striped()
->recordAction(null)
->columns([
TextColumn::make('name'),
TextColumn::make('bookmaker')
->wrap()
->badge()
->formatStateUsing(fn (string $state): string => Bookmaker::where('id', $state)->pluck('name')->first()),
TextColumn::make('provider')
->badge()
->wrap()
->color('success')
->formatStateUsing(fn (string $state): string => Provider::where('id', $state)->pluck('name')->first()),
TextColumn::make('sport')
->badge()
->wrap()
->color('warning')
->formatStateUsing(fn (string $state): string => Sport::where('id', $state)->pluck('name')->first()),
])
->recordActions([
Action::make('Create Settings')
->icon('phosphor-gear-fine')
->tooltip('Generates basic configuration for client')
->action(function ($record) {
SettingGeneratorClient::run($record);
}),
EditAction::make()->hiddenLabel(),
]);
}
}