wip
This commit is contained in:
1 parent
49b1eba348
commit
9ca5657827
28 files changed
+288
-234
No files matched your search
@@ -11,6 +11,7 @@ use App\Filament\Tables\Columns\TooltipOdds;
|
||||
use App\Models\CompetitionGroup;
|
||||
use App\Models\Country;
|
||||
use App\Models\Event;
|
||||
use App\Models\EventBookmaker;
|
||||
use App\Models\EventUserStar;
|
||||
use App\Models\Group;
|
||||
use App\Models\Sport;
|
||||
@@ -33,6 +34,7 @@ use Filament\Tables\Filters\Indicator;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class EventsTable
|
||||
{
|
||||
@@ -164,7 +166,7 @@ class EventsTable
|
||||
->verticalAlignment(VerticalAlignment::Start)
|
||||
->label('Draw No Bet'),
|
||||
|
||||
])->searchable(['id', 'home.name', 'away.name', 'betsapi_id', 'betradar_id', 'bet365_id', 'bwin_id', 'magnig_id', 'magken_id', 'lognig_id', 'logcol_id'])
|
||||
])->searchable(['id', 'home.name', 'away.name', 'betsapi_id', 'betradar_id', 'bet365_id', 'bwin_id', 'event_bookmaker.event_id'])
|
||||
->defaultSort('starttime', 'ASC')
|
||||
->extremePaginationLinks()
|
||||
->filters([
|
||||
@@ -349,7 +351,7 @@ class EventsTable
|
||||
->recordActions([
|
||||
Action::make('star')
|
||||
->iconButton()
|
||||
// ->color('gray')
|
||||
->color('gray')
|
||||
->icon(function ($record) {
|
||||
if (isset($record->event_user_star->id)) {
|
||||
return 'phosphor-star-fill';
|
||||
@@ -377,6 +379,14 @@ class EventsTable
|
||||
->icon('phosphor-arrow-square-out')
|
||||
->url(fn ($record): string => route('txodds_odds', ['sportid' => $record->sport_id, 'txoddsid' => $record->id]))
|
||||
->openUrlInNewTab(),
|
||||
Action::make('swap_elements')
|
||||
->icon('phosphor-swap')
|
||||
->action(function ($record, $livewire) {
|
||||
EventBookmaker::where('event_id', $record->id)->where('bookmaker_id', auth()->user()->bookmaker_id)->update(['is_swopped' => DB::raw('!is_swopped')]);
|
||||
|
||||
$livewire->dispatch('refreshBettypeMenu');
|
||||
}),
|
||||
|
||||
])->iconButton()
|
||||
->icon('phosphor-dots-three-vertical'),
|
||||
])->toolbarActions([
|
||||
|
||||
Reference in new issue
Block a user