wip relation manager :(
This commit is contained in:
1 parent
ae5b566231
commit
94a3c6c472
24 files changed
+318
-217
No files matched your search
@@ -23,6 +23,8 @@ use Filament\Actions\ActionGroup;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\ViewAction;
|
||||
use Filament\Forms\Components\Hidden;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
@@ -35,7 +37,6 @@ use Filament\Tables\Enums\FiltersLayout;
|
||||
use Filament\Tables\Filters\Filter;
|
||||
use Filament\Tables\Filters\Indicator;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -59,8 +60,8 @@ class EventsTable
|
||||
LoadBettype::load();
|
||||
|
||||
return $table
|
||||
->poll('10s')
|
||||
->striped()
|
||||
->poll('5s')
|
||||
->deferLoading()
|
||||
->defaultPaginationPageOption(50)
|
||||
->paginated([5, 10, 15])
|
||||
@@ -167,7 +168,6 @@ class EventsTable
|
||||
->visible(fn () => \in_array('odds_dnb', self::$bettype_settings))
|
||||
->verticalAlignment(VerticalAlignment::Start)
|
||||
->label('Draw No Bet'),
|
||||
|
||||
])->searchable(['id', 'home.name', 'away.name', 'betsapi_id', 'betradar_id', 'bet365_id', 'bwin_id', 'event_bookmaker.event_id'])
|
||||
->defaultSort('starttime', 'ASC')
|
||||
->extremePaginationLinks()
|
||||
@@ -509,19 +509,9 @@ class EventsTable
|
||||
->persistFiltersInSession()
|
||||
->emptyStateHeading('No events')
|
||||
->emptyStateDescription('Modify the filter')
|
||||
->recordUrl(null) // disable row click for page
|
||||
->recordAction(null) // disable row click for modal
|
||||
->recordActions([
|
||||
Action::make('note')
|
||||
->before(fn () => $this->pollingInterval = null)
|
||||
->after(fn () => $this->pollingInterval = '1s')
|
||||
->iconButton()->icon('phosphor-note')->color('gray')
|
||||
->tooltip('Add a note')
|
||||
->modalSubmitAction(false)
|
||||
->modalCancelAction(fn (Action $action) => $action->label('Close'))
|
||||
->modalContent(fn ($record): View => view(
|
||||
'filament.tables.columns.make-note',
|
||||
['record' => $record],
|
||||
)),
|
||||
Action::make('notify')->iconButton()->icon('phosphor-bell')->color('gray')->tooltip('Add a notifications'),
|
||||
Action::make('star')
|
||||
->iconButton()
|
||||
->color(function ($record) {
|
||||
@@ -549,8 +539,9 @@ class EventsTable
|
||||
EventUserStar::insert(['event_id' => $record->id, 'user_id' => auth()->user()->id]);
|
||||
}
|
||||
}),
|
||||
EditAction::make()->iconButton()->color(fn ($record) => $record->user_notes->isEmpty() ? 'gray' : 'info')->icon('phosphor-note-pencil'),
|
||||
ViewAction::make()->iconButton()->color('gray')->icon('phosphor-note-pencil'),
|
||||
ActionGroup::make([
|
||||
// EditAction::make(),
|
||||
DeleteAction::make()->visible(fn () => auth()->user()->hasRole('super_admin')),
|
||||
Action::make('txodds_odds')
|
||||
->label('TxOdds')
|
||||
|
||||
Reference in new issue
Block a user