wip fix
This commit is contained in:
1 parent
9bcd4432c6
commit
6f92f9e1d5
1209 files changed
+220940
No files matched your search
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Clusters\User\Resources\Users\Tables;
|
||||
|
||||
use App\Actions\SettingGeneratorUser;
|
||||
use App\Models\Client;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Enums\FiltersLayout;
|
||||
use Filament\Tables\Filters\SelectFilter;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class UsersTable
|
||||
{
|
||||
public static function configure(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->striped()
|
||||
->recordAction(null)
|
||||
->columns([
|
||||
TextColumn::make('name')
|
||||
->searchable(),
|
||||
TextColumn::make('email')
|
||||
->label('Email address')
|
||||
->searchable(),
|
||||
TextColumn::make('client.name')->badge(),
|
||||
TextColumn::make('roles.name')->badge()->color('success')->wrap(),
|
||||
TextColumn::make('bookmaker.name')
|
||||
->label('Active Bookmaker')
|
||||
->badge()
|
||||
->color('warning'),
|
||||
TextColumn::make('partnerbookmaker.name')
|
||||
->label('Partner Bookmaker')
|
||||
->badge()
|
||||
->color('warning'),
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('client_id')
|
||||
->label('Clients')
|
||||
->options(Client::pluck('name', 'id')),
|
||||
], layout: FiltersLayout::AboveContent)
|
||||
->deferFilters(false)
|
||||
->recordActions([
|
||||
Action::make('Create Settings')
|
||||
->icon('phosphor-gear-fine')
|
||||
->tooltip('Generates basic configuration for this user')
|
||||
->action(function ($record) {
|
||||
SettingGeneratorUser::run($record);
|
||||
}),
|
||||
EditAction::make()->hiddenLabel(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user