diff --git a/app/Console/Commands/Grapper/TxOdds/Odds.php b/app/Console/Commands/Grapper/TxOdds/Odds.php index 105c8504..e3cf5eae 100644 --- a/app/Console/Commands/Grapper/TxOdds/Odds.php +++ b/app/Console/Commands/Grapper/TxOdds/Odds.php @@ -183,6 +183,8 @@ class Odds NuhBash::$bookmaker_id = (int) $book['bid']; + NuhBash::$bookmaker_id = (int) $book['bid']; + $odds = []; $odds['sport_id'] = (int) $event['sport_id']; $odds['provider_id'] = 2; @@ -241,6 +243,7 @@ class Odds EventBookmaker::updateOrCreate([ 'event_id' => NuhBash::$_event->id, 'bookmaker_id' => NuhBash::$bookmaker_id, + 'bookmaker_id' => NuhBash::$bookmaker_id, ], [ 'bmoid' => $value['bmoid'], 'provider_id' => 2, @@ -253,6 +256,7 @@ class Odds if ($debug) { Notice::note('END '.NuhBash::$_event->id, 'g'); + Notice::note('END', 'g'); } } } diff --git a/app/Filament/Resources/Events/Tables/EventsTable.php b/app/Filament/Resources/Events/Tables/EventsTable.php index ef727993..97d489bc 100644 --- a/app/Filament/Resources/Events/Tables/EventsTable.php +++ b/app/Filament/Resources/Events/Tables/EventsTable.php @@ -26,7 +26,6 @@ class EventsTable ->size(IconSize::ExtraLarge) ->icon(fn ($record) => $record->sport->icon) ->tooltip(fn ($record) => $record->id), - // TextColumn::make('id'), TextColumn::make('txodds_id')->label('Id')->badge()->copyable()->searchable(), TextColumn::make('starttime') ->label('Start') @@ -42,11 +41,32 @@ class EventsTable TextColumn::make('home.name')->alignRight()->searchable(), TextColumn::make('away.name')->searchable(), - MultilineClient::make('id')->label(fn ($record) => view('filament.tables.columns.multiline-labels')), + MultilineClient::make('id') + ->searchable() + ->label(fn () => view('filament.tables.columns.multiline-labels')), ]) ->defaultSort('starttime', 'ASC') - ->deferFilters(false) + // ->filters([ + // SelectFilter::make('competition_group_id') + // ->preload() + // ->label('League') + // ->multiple() + // ->searchable() + // ->options(function () { + + // $res = Event::with('country')->with('competition_group')->where('starttime', '>', Carbon::now())->groupBy('competition_group_id')->get(); + // $arr = []; + // foreach ($res as $val) { + // $arr[$val->competition_group_id] = $val->country->name.' - '.$val->competition_group->name; + // } + + // asort($arr); + + // return $arr; + // }) + // ->selectablePlaceholder(false), + // ], layout: FiltersLayout::AboveContent) ->persistFiltersInSession() ->recordActions([ // EditAction::make(), diff --git a/app/Filament/Tables/Columns/MultilineClient.php b/app/Filament/Tables/Columns/MultilineClient.php index 98680f51..b1aaeac6 100644 --- a/app/Filament/Tables/Columns/MultilineClient.php +++ b/app/Filament/Tables/Columns/MultilineClient.php @@ -17,6 +17,7 @@ class MultilineClient extends Column public function loadSlots($event_id, $bookmakers) { + $this->settings = MultilineSetting::where('id', auth()->user()->multiline_setting_id)->select('table', 'has_3_columns')->first()->toArray(); $odds = DB::table($this->settings['table'])->where('event_id', $event_id)->get(); diff --git a/resources/views/filament/tables/columns/multiline-labels.blade.php b/resources/views/filament/tables/columns/multiline-labels.blade.php index a04be868..089f7581 100644 --- a/resources/views/filament/tables/columns/multiline-labels.blade.php +++ b/resources/views/filament/tables/columns/multiline-labels.blade.php @@ -51,5 +51,5 @@
Total
@break @endswitch -
+
M