diff --git a/app/Filament/Resources/Events/EventResource.php b/app/Filament/Resources/Events/EventResource.php index c135bac3..21c7987f 100644 --- a/app/Filament/Resources/Events/EventResource.php +++ b/app/Filament/Resources/Events/EventResource.php @@ -69,7 +69,6 @@ class EventResource extends Resource } if (in_array('odds_3ways', EventsTable::$bettype_settings)) { $query->with('odds_3ways.bookmaker'); - // $query->with('odds_3ways.comparing_bookmaker'); } if (in_array('odds_3ways_ht', EventsTable::$bettype_settings)) { $query->with('odds_3ways_ht.bookmaker'); diff --git a/app/Filament/Resources/Events/Tables/EventsTable.php b/app/Filament/Resources/Events/Tables/EventsTable.php index d1f595f6..9c236dd4 100644 --- a/app/Filament/Resources/Events/Tables/EventsTable.php +++ b/app/Filament/Resources/Events/Tables/EventsTable.php @@ -2,6 +2,8 @@ namespace App\Filament\Resources\Events\Tables; +use App\Filament\Resources\Events\Tables\Tools\LoadBettypeSettings; +use App\Filament\Resources\Events\Tables\Tools\LoadMultilineBookmaker; use App\Filament\Tables\Columns\Column3way; use App\Filament\Tables\Columns\Column3wayHt; use App\Filament\Tables\Columns\ColumnDc; @@ -17,15 +19,11 @@ use App\Filament\Tables\Columns\ColumnTotalQ1; use App\Filament\Tables\Columns\ColumnTq; use App\Filament\Tables\Columns\EventColumn; use App\Filament\Tables\Columns\MatchIds; -use App\Models\BettypeUser; -use App\Models\ComparingBookmaker; use App\Models\CompetitionGroup; use App\Models\Country; use App\Models\Event; use App\Models\EventUserStar; use App\Models\Group; -use App\Models\MultilineClient; -use App\Models\MultilineSetting; use App\Models\Sport; use App\Models\User; use CodeWithKyrian\FilamentDateRange\Forms\Components\DateRangePicker; @@ -50,68 +48,19 @@ use Illuminate\Support\Carbon; class EventsTable { - public static $bettype_settings = []; - - public static $multiline_bookmaker = []; - - public static $multiline_gettype = []; - public static $user; - public static function load_multiline_bookmaker() - { - if (self::$user->is_multiline_direct) { + public static $bettype_settings; - if (self::$user->sport_id == 1) { - $cb = ComparingBookmaker::where('sport_id', 1)->where('client_bookmaker_id', self::$user->bookmaker_id)->select('sorting', 'bookmaker_id', 'time_lastcheck', 'margin_threshold', 'is_active')->get(); - } else { - $cb = ComparingBookmaker::where('sport_id', '!=', 1)->where('client_bookmaker_id', self::$user->bookmaker_id)->select('sorting', 'bookmaker_id', 'time_lastcheck', 'margin_threshold', 'is_active')->get(); - } - - $bookmakers = []; - foreach ($cb as $value) { - $bookmakers[] = $value->bookmaker_id; - } - - $res = MultilineSetting::where('sport_id', self::$user->sport_id)->get(); - - foreach ($res as $value) { - self::$multiline_gettype[$value->table]['filter'] = $cb; - self::$multiline_gettype[$value->table]['bookmaker'] = $bookmakers; - } - - } else { - $res = MultilineClient::with('multiline_setting') - ->select('bookmaker_id', 'multiline_setting_id') - ->orderBy('sort') - ->get(); - - foreach ($res as $value) { - $table = $value->multiline_setting->table; - self::$multiline_gettype[$table]['bookmaker'][] = (int) $value->bookmaker_id; - } - } - } - - public static function load_bettype_settings() - { - $res = BettypeUser::with('multiline_setting') - ->orderBy('multiline_setting_id') - ->where('is_active', 1) - ->get(); - - foreach ($res as $value) { - self::$bettype_settings[] = $value->multiline_setting->table; - } - } + public static $multiline_bookmaker; public static function configure(Table $table): Table { self::$user = User::getUser(); - self::load_bettype_settings(); + self::$bettype_settings = LoadBettypeSettings::load(); - self::load_multiline_bookmaker(); + self::$multiline_bookmaker = LoadMultilineBookmaker::load(); return $table ->poll('10s') @@ -143,97 +92,97 @@ class EventsTable EventColumn::make('event'), - ColumnMl::make('odds_2ways')->bookmakers(self::$multiline_gettype['odds_2ways'] ?? []) + ColumnMl::make('odds_2ways')->bookmakers(self::$multiline_bookmaker['odds_2ways'] ?? []) ->visible(fn () => in_array('odds_2ways', self::$bettype_settings)) ->verticalAlignment(VerticalAlignment::Start) ->width(225) ->alignCenter() ->label('ML'), - ColumnMlS1::make('odds_2ways_s1')->bookmakers(self::$multiline_gettype['odds_2ways'] ?? []) - ->visible(fn () => in_array('odds_2ways_s1', self::$bettype_settings)) - ->verticalAlignment(VerticalAlignment::Start) - ->alignCenter() - ->width(225) - ->label('ML S1'), - - Column3way::make('odds_3ways')->bookmakers(self::$multiline_gettype['odds_3ways'] ?? []) + Column3way::make('odds_3ways')->bookmakers(self::$multiline_bookmaker['odds_3ways'] ?? []) ->visible(fn () => in_array('odds_3ways', self::$bettype_settings)) ->verticalAlignment(VerticalAlignment::Start) ->width(225) ->alignCenter() ->label('1X2'), - Column3wayHt::make('odds_3ways_ht')->bookmakers(self::$multiline_gettype['odds_3ways_ht'] ?? []) - ->visible(fn () => in_array('odds_3ways_ht', self::$bettype_settings)) - ->verticalAlignment(VerticalAlignment::Start) - ->alignCenter() - ->width(225) - ->label('1X2 HT'), - - ColumnTotal::make('odds_totals')->bookmakers(self::$multiline_gettype['odds_totals'] ?? []) + ColumnTotal::make('odds_totals')->bookmakers(self::$multiline_bookmaker['odds_totals'] ?? []) ->visible(fn () => in_array('odds_totals', self::$bettype_settings)) ->verticalAlignment(VerticalAlignment::Start) ->alignCenter() ->width(225) ->label('Totals'), - ColumnTotalHt::make('odds_totals_ht')->bookmakers(self::$multiline_gettype['odds_totals_ht'] ?? []) + Column3wayHt::make('odds_3ways_ht')->bookmakers(self::$multiline_bookmaker['odds_3ways_ht'] ?? []) + ->visible(fn () => in_array('odds_3ways_ht', self::$bettype_settings)) + ->verticalAlignment(VerticalAlignment::Start) + ->alignCenter() + ->width(225) + ->label('1X2 HT'), + + ColumnTotalHt::make('odds_totals_ht')->bookmakers(self::$multiline_bookmaker['odds_totals_ht'] ?? []) ->visible(fn () => in_array('odds_totals_ht', self::$bettype_settings)) ->verticalAlignment(VerticalAlignment::Start) ->alignCenter() ->width(225) ->label('Totals HT'), - ColumnTotalQ1::make('odds_totals_q1')->bookmakers(self::$multiline_gettype['odds_totals_q1'] ?? []) - ->visible(fn () => in_array('odds_totals_q1', self::$bettype_settings)) + ColumnGgng::make('odds_ggng')->bookmakers(self::$multiline_bookmaker['odds_ggng'] ?? []) + ->visible(fn () => \in_array('odds_ggng', self::$bettype_settings)) ->verticalAlignment(VerticalAlignment::Start) ->alignCenter() - ->width(225) - ->label('Totals Q1'), + ->width(190) + ->label('Goal No Goal'), - ColumnPoint::make('odds_points')->bookmakers(self::$multiline_gettype['odds_points'] ?? []) + ColumnPoint::make('odds_points')->bookmakers(self::$multiline_bookmaker['odds_points'] ?? []) ->visible(fn () => in_array('odds_points', self::$bettype_settings)) ->verticalAlignment(VerticalAlignment::Start) ->alignCenter() ->width(225) ->label('Points'), - ColumnPointQ1::make('odds_points_q1')->bookmakers(self::$multiline_gettype['odds_points_q1'] ?? []) + ColumnTotalQ1::make('odds_totals_q1')->bookmakers(self::$multiline_bookmaker['odds_totals_q1'] ?? []) + ->visible(fn () => in_array('odds_totals_q1', self::$bettype_settings)) + ->verticalAlignment(VerticalAlignment::Start) + ->alignCenter() + ->width(225) + ->label('Totals Q1'), + + ColumnPointQ1::make('odds_points_q1')->bookmakers(self::$multiline_bookmaker['odds_points_q1'] ?? []) ->visible(fn () => in_array('odds_points_q1', self::$bettype_settings)) ->verticalAlignment(VerticalAlignment::Start) ->alignCenter() ->width(225) ->label('Points Q1'), - ColumnDc::make('odds_dc')->bookmakers(self::$multiline_gettype['odds_dc'] ?? []) - ->visible(fn () => in_array('odds_dc', self::$bettype_settings)) + ColumnMlS1::make('odds_2ways_s1')->bookmakers(self::$multiline_bookmaker['odds_2ways'] ?? []) + ->visible(fn () => in_array('odds_2ways_s1', self::$bettype_settings)) + ->verticalAlignment(VerticalAlignment::Start) + ->alignCenter() + ->width(225) + ->label('ML S1'), + + ColumnDc::make('odds_dc')->bookmakers(self::$multiline_bookmaker['odds_dc'] ?? []) + ->visible(fn () => \in_array('odds_dc', self::$bettype_settings)) ->verticalAlignment(VerticalAlignment::Start) ->alignCenter() ->width(225) ->label('Double Chance'), - ColumnDnb::make('odds_dnb')->bookmakers(self::$multiline_gettype['odds_dnb'] ?? []) - ->visible(fn () => in_array('odds_dnb', self::$bettype_settings)) - ->verticalAlignment(VerticalAlignment::Start) - ->alignCenter() - ->width(190) - ->label('Draw No Bet'), - - ColumnGgng::make('odds_ggng')->bookmakers(self::$multiline_gettype['odds_ggng'] ?? []) - ->visible(fn () => in_array('odds_ggng', self::$bettype_settings)) - ->verticalAlignment(VerticalAlignment::Start) - ->alignCenter() - ->width(190) - ->label('Goal No Goal'), - - ColumnTq::make('odds_tq')->bookmakers(self::$bettype_settings['odds_tq'] ?? []) - ->visible(fn () => in_array('odds_tq', self::$bettype_settings)) + ColumnTq::make('odds_tq')->bookmakers(self::$multiline_bookmaker['odds_tq'] ?? []) + ->visible(fn () => \in_array('odds_tq', self::$bettype_settings)) ->verticalAlignment(VerticalAlignment::Start) ->alignCenter() ->width(190) ->label('To Qualify'), + ColumnDnb::make('odds_dnb')->bookmakers(self::$multiline_bookmaker['odds_dnb'] ?? []) + ->visible(fn () => \in_array('odds_dnb', self::$bettype_settings)) + ->verticalAlignment(VerticalAlignment::Start) + ->alignCenter() + ->width(190) + ->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']) ->defaultSort('starttime', 'ASC') ->extremePaginationLinks() diff --git a/app/Filament/Resources/Events/Tables/Tools/LoadBettypeSettings.php b/app/Filament/Resources/Events/Tables/Tools/LoadBettypeSettings.php new file mode 100644 index 00000000..ff854dd4 --- /dev/null +++ b/app/Filament/Resources/Events/Tables/Tools/LoadBettypeSettings.php @@ -0,0 +1,23 @@ +orderBy('multiline_setting_id') + ->where('is_active', 1) + ->get(); + + $arr = []; + foreach ($res as $value) { + $arr[] = $value->multiline_setting->table; + } + + return $arr; + } +} diff --git a/app/Filament/Resources/Events/Tables/Tools/LoadMultilineBookmaker.php b/app/Filament/Resources/Events/Tables/Tools/LoadMultilineBookmaker.php new file mode 100644 index 00000000..15923a44 --- /dev/null +++ b/app/Filament/Resources/Events/Tables/Tools/LoadMultilineBookmaker.php @@ -0,0 +1,66 @@ +sport_id == 1) { + // $cb = ComparingBookmaker::where('sport_id', 1)->where('client_bookmaker_id', self::$user->bookmaker_id)->orderBy('sorting')->select('bookmaker_id', 'time_lastcheck', 'margin_threshold', 'is_active')->get()->toArray(); + // } else { + // $cb = ComparingBookmaker::where('sport_id', '!=', 1)->where('client_bookmaker_id', self::$user->bookmaker_id)->orderBy('sorting')->select('bookmaker_id', 'time_lastcheck', 'margin_threshold', 'is_active')->get()->toArray(); + // } + + $cb = ComparingBookmaker::where('sport_id', self::$user->sport_id)->where('client_bookmaker_id', self::$user->bookmaker_id)->orderBy('sorting')->select('bookmaker_id', 'time_lastcheck', 'margin_threshold', 'is_active')->get()->toArray(); + + $bookmakers = []; + $filter = []; + foreach ($cb as $value) { + $bookmakers[] = $value['bookmaker_id']; + $filter[$value['bookmaker_id']] = [ + 'time_lastcheck' => $value['time_lastcheck'], + 'margin' => $value['margin_threshold'], + ]; + } + + $res = MultilineSetting::where('sport_id', self::$user->sport_id)->get(); + + foreach ($res as $value) { + $arr[$value->table]['filter'] = $filter; + $arr[$value->table]['bookmaker'] = $bookmakers; + if (auth()->user()->is_multiline_direct) { + $arr[$value->table]['slots'] = $bookmakers; + } + } + + if (! auth()->user()->is_multiline_direct) { + $res = MultilineClient::with('multiline_setting') + ->select('bookmaker_id', 'multiline_setting_id') + ->orderBy('sort') + ->get(); + + foreach ($res as $value) { + $table = $value->multiline_setting->table; + $arr[$table]['slots'][] = (int) self::$user->bookmaker_id; + } + foreach ($res as $value) { + $table = $value->multiline_setting->table; + $arr[$table]['slots'][] = (int) $value->bookmaker_id; + } + } + + return $arr; + } +} diff --git a/app/Filament/Tables/Columns/Column3way.php b/app/Filament/Tables/Columns/Column3way.php index 84300c80..01758ff1 100644 --- a/app/Filament/Tables/Columns/Column3way.php +++ b/app/Filament/Tables/Columns/Column3way.php @@ -30,9 +30,13 @@ class Column3way extends Column return $this->bookmakers['bookmaker'] ?? []; } + public function getSlots(): ?array + { + return $this->bookmakers['slots'] ?? []; + } + public function loadData($record) { - $this->has_data = count($record->odds_3ways) ? true : false; $this->act = $record->odds_3ways->where('bookmaker_id', auth()->user()->bookmaker_id)->first(); @@ -49,12 +53,7 @@ class Column3way extends Column $this->min['a3w'] = $record->odds_3ways->min('a3w'); - // $record->odds_3ways = $record->odds_3ways->filter(function (int $value, int $key) { - - // return in_array($this->bookmakers['bookmaker'], $value['bookmaker_id']); - - // }); - + $record->odds_3ways = FilterOdds::filter($record->odds_3ways, $this->bookmakers); } public function getAct() diff --git a/app/Filament/Tables/Columns/Column3wayHt.php b/app/Filament/Tables/Columns/Column3wayHt.php index 26acda05..cd698db1 100644 --- a/app/Filament/Tables/Columns/Column3wayHt.php +++ b/app/Filament/Tables/Columns/Column3wayHt.php @@ -30,6 +30,11 @@ class Column3wayHt extends Column return $this->bookmakers['bookmaker'] ?? []; } + public function getSlots(): ?array + { + return $this->bookmakers['slots'] ?? []; + } + public function loadData($record) { $this->has_data = count($record->odds_3ways_ht) ? true : false; @@ -47,6 +52,8 @@ class Column3wayHt extends Column $this->min['d3w'] = $record->odds_3ways_ht->min('d3w'); $this->min['a3w'] = $record->odds_3ways_ht->min('a3w'); + + $record->odds_3ways_ht = FilterOdds::filter($record->odds_3ways_ht, $this->bookmakers); } public function getAct() diff --git a/app/Filament/Tables/Columns/ColumnDc.php b/app/Filament/Tables/Columns/ColumnDc.php index 536c570f..4f88c127 100644 --- a/app/Filament/Tables/Columns/ColumnDc.php +++ b/app/Filament/Tables/Columns/ColumnDc.php @@ -30,6 +30,11 @@ class ColumnDc extends Column return $this->bookmakers['bookmaker'] ?? []; } + public function getSlots(): ?array + { + return $this->bookmakers['slots'] ?? []; + } + public function loadData($record) { $this->has_data = count($record->odds_dc) ? true : false; @@ -47,6 +52,8 @@ class ColumnDc extends Column $this->min['dc12'] = $record->odds_dc->min('dc12'); $this->min['dcx2'] = $record->odds_dc->min('dcx2'); + + $record->odds_dc = FilterOdds::filter($record->odds_dc, $this->bookmakers); } public function getAct() diff --git a/app/Filament/Tables/Columns/ColumnDnb.php b/app/Filament/Tables/Columns/ColumnDnb.php index 83c09774..dca8c8d2 100644 --- a/app/Filament/Tables/Columns/ColumnDnb.php +++ b/app/Filament/Tables/Columns/ColumnDnb.php @@ -30,6 +30,11 @@ class ColumnDnb extends Column return $this->bookmakers['bookmaker'] ?? []; } + public function getSlots(): ?array + { + return $this->bookmakers['slots'] ?? []; + } + public function loadData($record) { $this->has_data = count($record->odds_dnb) ? true : false; @@ -44,6 +49,8 @@ class ColumnDnb extends Column $this->min['dnb2'] = $record->odds_dnb->min('dnb2'); + $record->odds_dnb = FilterOdds::filter($record->odds_dnb, $this->bookmakers); + } public function getAct() diff --git a/app/Filament/Tables/Columns/ColumnGgng.php b/app/Filament/Tables/Columns/ColumnGgng.php index 4bf336f0..20f24f24 100644 --- a/app/Filament/Tables/Columns/ColumnGgng.php +++ b/app/Filament/Tables/Columns/ColumnGgng.php @@ -30,6 +30,11 @@ class ColumnGgng extends Column return $this->bookmakers['bookmaker'] ?? []; } + public function getSlots(): ?array + { + return $this->bookmakers['slots'] ?? []; + } + public function loadData($record) { $this->has_data = count($record->odds_ggng) ? true : false; @@ -44,6 +49,7 @@ class ColumnGgng extends Column $this->min['ng'] = $record->odds_ggng->min('ng'); + $record->odds_ggng = FilterOdds::filter($record->odds_ggng, $this->bookmakers); } public function getAct() diff --git a/app/Filament/Tables/Columns/ColumnMl.php b/app/Filament/Tables/Columns/ColumnMl.php index be38f4ed..7d17147f 100644 --- a/app/Filament/Tables/Columns/ColumnMl.php +++ b/app/Filament/Tables/Columns/ColumnMl.php @@ -30,6 +30,11 @@ class ColumnMl extends Column return $this->bookmakers['bookmaker'] ?? []; } + public function getSlots(): ?array + { + return $this->bookmakers['slots'] ?? []; + } + public function loadData($record) { $this->has_data = count($record->odds_2ways) ? true : false; @@ -44,6 +49,7 @@ class ColumnMl extends Column $this->min['a2w'] = $record->odds_2ways->min('a2w'); + $record->odds_2ways = FilterOdds::filter($record->odds_2ways, $this->bookmakers); } public function getAct() diff --git a/app/Filament/Tables/Columns/ColumnMlS1.php b/app/Filament/Tables/Columns/ColumnMlS1.php index 901c3044..80644c75 100644 --- a/app/Filament/Tables/Columns/ColumnMlS1.php +++ b/app/Filament/Tables/Columns/ColumnMlS1.php @@ -30,6 +30,11 @@ class ColumnMlS1 extends Column return $this->bookmakers['bookmaker'] ?? []; } + public function getSlots(): ?array + { + return $this->bookmakers['slots'] ?? []; + } + public function loadData($record) { $this->has_data = count($record->odds_2ways_s1) ? true : false; @@ -44,6 +49,8 @@ class ColumnMlS1 extends Column $this->min['a2w'] = $record->odds_2ways->min('a2w'); + $record->odds_2ways_s1 = FilterOdds::filter($record->odds_2ways_s1, $this->bookmakers); + } public function getAct() diff --git a/app/Filament/Tables/Columns/ColumnPoint.php b/app/Filament/Tables/Columns/ColumnPoint.php index b2c3f465..1168a140 100644 --- a/app/Filament/Tables/Columns/ColumnPoint.php +++ b/app/Filament/Tables/Columns/ColumnPoint.php @@ -30,6 +30,11 @@ class ColumnPoint extends Column return $this->bookmakers['bookmaker'] ?? []; } + public function getSlots(): ?array + { + return $this->bookmakers['slots'] ?? []; + } + public function loadData($record) { $this->has_data = count($record->odds_points) ? true : false; @@ -44,6 +49,8 @@ class ColumnPoint extends Column $this->min['away'] = $record->odds_points->min('away'); + $record->odds_points = FilterOdds::filter($record->odds_points, $this->bookmakers); + } public function getAct() diff --git a/app/Filament/Tables/Columns/ColumnPointQ1.php b/app/Filament/Tables/Columns/ColumnPointQ1.php index 1939035f..bc4b6346 100644 --- a/app/Filament/Tables/Columns/ColumnPointQ1.php +++ b/app/Filament/Tables/Columns/ColumnPointQ1.php @@ -30,6 +30,11 @@ class ColumnPointQ1 extends Column return $this->bookmakers['bookmaker'] ?? []; } + public function getSlots(): ?array + { + return $this->bookmakers['slots'] ?? []; + } + public function loadData($record) { $this->has_data = count($record->odds_points_q1) ? true : false; @@ -44,6 +49,8 @@ class ColumnPointQ1 extends Column $this->min['away'] = $record->odds_points_q1->min('away'); + $record->odds_points_q1 = FilterOdds::filter($record->odds_points_q1, $this->bookmakers); + } public function getAct() diff --git a/app/Filament/Tables/Columns/ColumnTotal.php b/app/Filament/Tables/Columns/ColumnTotal.php index 4ff8ef6c..8668f9c6 100644 --- a/app/Filament/Tables/Columns/ColumnTotal.php +++ b/app/Filament/Tables/Columns/ColumnTotal.php @@ -30,6 +30,11 @@ class ColumnTotal extends Column return $this->bookmakers['bookmaker'] ?? []; } + public function getSlots(): ?array + { + return $this->bookmakers['slots'] ?? []; + } + public function loadData($record) { $this->has_data = count($record->odds_totals) ? true : false; @@ -44,6 +49,8 @@ class ColumnTotal extends Column $this->min['under'] = $record->odds_totals->min('under'); + $record->odds_totals = FilterOdds::filter($record->odds_totals, $this->bookmakers); + } public function getAct() diff --git a/app/Filament/Tables/Columns/ColumnTotalHt.php b/app/Filament/Tables/Columns/ColumnTotalHt.php index f6732c1e..cefaf94f 100644 --- a/app/Filament/Tables/Columns/ColumnTotalHt.php +++ b/app/Filament/Tables/Columns/ColumnTotalHt.php @@ -30,6 +30,11 @@ class ColumnTotalHt extends Column return $this->bookmakers['bookmaker'] ?? []; } + public function getSlots(): ?array + { + return $this->bookmakers['slots'] ?? []; + } + public function loadData($record) { $this->has_data = count($record->odds_totals_ht) ? true : false; @@ -44,6 +49,8 @@ class ColumnTotalHt extends Column $this->min['under'] = $record->odds_totals_ht->min('under'); + $record->odds_totals_ht = FilterOdds::filter($record->odds_totals_ht, $this->bookmakers); + } public function getAct() diff --git a/app/Filament/Tables/Columns/ColumnTotalQ1.php b/app/Filament/Tables/Columns/ColumnTotalQ1.php index cd972bb6..6f5f67a2 100644 --- a/app/Filament/Tables/Columns/ColumnTotalQ1.php +++ b/app/Filament/Tables/Columns/ColumnTotalQ1.php @@ -30,6 +30,11 @@ class ColumnTotalQ1 extends Column return $this->bookmakers['bookmaker'] ?? []; } + public function getSlots(): ?array + { + return $this->bookmakers['slots'] ?? []; + } + public function loadData($record) { $this->has_data = count($record->odds_totals_q1) ? true : false; @@ -44,6 +49,8 @@ class ColumnTotalQ1 extends Column $this->min['under'] = $record->odds_totals_q1->min('under'); + $record->odds_totals_q1 = FilterOdds::filter($record->odds_totals_q1, $this->bookmakers); + } public function getAct() diff --git a/app/Filament/Tables/Columns/ColumnTq.php b/app/Filament/Tables/Columns/ColumnTq.php index 60e9f069..14a0769e 100644 --- a/app/Filament/Tables/Columns/ColumnTq.php +++ b/app/Filament/Tables/Columns/ColumnTq.php @@ -30,6 +30,11 @@ class ColumnTq extends Column return $this->bookmakers['bookmaker'] ?? []; } + public function getSlots(): ?array + { + return $this->bookmakers['slots'] ?? []; + } + public function loadData($record) { $this->has_data = count($record->odds_tq) ? true : false; @@ -44,6 +49,8 @@ class ColumnTq extends Column $this->min['atq'] = $record->odds_tq->min('atq'); + $record->odds_tq = FilterOdds::filter($record->odds_tq, $this->bookmakers); + } public function getAct() diff --git a/app/Filament/Tables/Columns/FilterOdds.php b/app/Filament/Tables/Columns/FilterOdds.php new file mode 100644 index 00000000..210da233 --- /dev/null +++ b/app/Filament/Tables/Columns/FilterOdds.php @@ -0,0 +1,57 @@ +user()->is_multiline_direct) { + /** + * ORDER + */ + $order = $bookmakers['bookmaker'] ?? []; + + $data->sortBy(function ($model) use ($order) { + return array_search($model->bookmaker_id, $order); + }); + + /** + * FILTER + */ + if (! auth()->user()->no_filter) { + + $filter = $bookmakers['filter'] ?? []; + + if ($filter) { + $data = $data->filter(function ($model) use ($filter) { + + if ($model->bookmaker_id == auth()->user()->bookmaker_id) { + return true; + } + + $filter = $filter[$model->bookmaker_id] ?? 0; + + $checked_at = Carbon::createFromDate($model->checked_at)->timestamp; + + if (! isset($filter['margin'])) { + dd($model->bookmaker_id); + } + + if ($model->margin <= $filter['margin'] && $checked_at > time() - $filter['time_lastcheck']) { + return true; + } + + return false; + }); + } + } + } + + return $data; + + } +} diff --git a/app/Filament/Tables/Columns/Tools/Compare3way.php b/app/Filament/Tables/Columns/Tools/Compare3way.php deleted file mode 100644 index 8d1223ee..00000000 --- a/app/Filament/Tables/Columns/Tools/Compare3way.php +++ /dev/null @@ -1,25 +0,0 @@ -filter(function ($odds_3ways, $bookmaker) { - if ($odds_3ways->contains('bookmaker_id', $bookmaker['bookmaker_id'])) { - return true; - } - - return false; - }); - } - } -} diff --git a/app/Livewire/BettypeToggle.php b/app/Livewire/BettypeToggle.php index da3c6556..3d51329f 100644 --- a/app/Livewire/BettypeToggle.php +++ b/app/Livewire/BettypeToggle.php @@ -59,4 +59,11 @@ class BettypeToggle extends Component $this->dispatch('refreshBettypeMenu'); } + + public function toggleFilter() + { + User::where('id', auth()->user()->id)->update(['no_filter' => DB::raw('!no_filter')]); + + $this->dispatch('refreshBettypeMenu'); + } } diff --git a/app/Models/User.php b/app/Models/User.php index 33ef734b..df915f68 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -36,6 +36,7 @@ class User extends Authenticatable implements FilamentUser, HasAppAuthentication 'sport_id', 'star', 'is_multiline_direct', + 'no_filter', 'bookmaker_id', 'provider_id', ]; diff --git a/composer.lock b/composer.lock index ba4ac927..a4164da9 100644 --- a/composer.lock +++ b/composer.lock @@ -3873,16 +3873,16 @@ }, { "name": "livewire/livewire", - "version": "v3.7.4", + "version": "v3.7.5", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "5a8dffd4c0ab357ff7ed5b39e7c2453d962a68e0" + "reference": "b48b1e5ecb6c4740f49e18b1c2bc14ed33f8ebff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/5a8dffd4c0ab357ff7ed5b39e7c2453d962a68e0", - "reference": "5a8dffd4c0ab357ff7ed5b39e7c2453d962a68e0", + "url": "https://api.github.com/repos/livewire/livewire/zipball/b48b1e5ecb6c4740f49e18b1c2bc14ed33f8ebff", + "reference": "b48b1e5ecb6c4740f49e18b1c2bc14ed33f8ebff", "shasum": "" }, "require": { @@ -3937,7 +3937,7 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v3.7.4" + "source": "https://github.com/livewire/livewire/tree/v3.7.5" }, "funding": [ { @@ -3945,7 +3945,7 @@ "type": "github" } ], - "time": "2026-01-13T09:37:21+00:00" + "time": "2026-01-21T08:08:00+00:00" }, { "name": "masterminds/html5", @@ -10971,11 +10971,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.35", + "version": "2.1.34", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/72f843c7f59d3aac0b7510f5e70913a9b72a8e88", - "reference": "72f843c7f59d3aac0b7510f5e70913a9b72a8e88", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/070ba754a949fcade788e16e8dc5a5935b7cf2ee", + "reference": "070ba754a949fcade788e16e8dc5a5935b7cf2ee", "shasum": "" }, "require": { @@ -11020,7 +11020,7 @@ "type": "github" } ], - "time": "2026-01-20T17:33:48+00:00" + "time": "2026-01-19T19:52:16+00:00" }, { "name": "phpunit/php-code-coverage", @@ -11468,21 +11468,21 @@ }, { "name": "rector/rector", - "version": "2.3.2", + "version": "2.3.3", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "07cbbe28bd60251b96b18d42e514779b0e2faa83" + "reference": "7d09105f868491828891239462eb5b13ffdf2643" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/07cbbe28bd60251b96b18d42e514779b0e2faa83", - "reference": "07cbbe28bd60251b96b18d42e514779b0e2faa83", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/7d09105f868491828891239462eb5b13ffdf2643", + "reference": "7d09105f868491828891239462eb5b13ffdf2643", "shasum": "" }, "require": { "php": "^7.4|^8.0", - "phpstan/phpstan": "^2.1.34" + "phpstan/phpstan": "2.1.34" }, "conflict": { "rector/rector-doctrine": "*", @@ -11516,7 +11516,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/2.3.2" + "source": "https://github.com/rectorphp/rector/tree/2.3.3" }, "funding": [ { @@ -11524,7 +11524,7 @@ "type": "github" } ], - "time": "2026-01-20T01:11:51+00:00" + "time": "2026-01-21T10:54:49+00:00" }, { "name": "sebastian/cli-parser", @@ -12814,12 +12814,12 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": { "php": "^8.3" }, - "platform-dev": {}, - "plugin-api-version": "2.9.0" + "platform-dev": [], + "plugin-api-version": "2.6.0" } diff --git a/database/migrations/0001_01_01_000000_create_users_table.php b/database/migrations/0001_01_01_000000_create_users_table.php index 8d79fc9f..10980309 100644 --- a/database/migrations/0001_01_01_000000_create_users_table.php +++ b/database/migrations/0001_01_01_000000_create_users_table.php @@ -27,6 +27,7 @@ return new class extends Migration $table->boolean('has_email_authentication')->default(false); $table->boolean('stars')->default(false); $table->boolean('is_multiline_direct')->default(false); + $table->boolean('no_filter')->default(false); $table->timestamp('app_verified_at')->nullable(); $table->rememberToken(); diff --git a/database/seeders/BookmakerSeeder.php b/database/seeders/BookmakerSeeder.php index 2c887383..7bae85ee 100644 --- a/database/seeders/BookmakerSeeder.php +++ b/database/seeders/BookmakerSeeder.php @@ -25,7 +25,7 @@ class BookmakerSeeder extends Seeder (35, 'Logifuture Nigeria', 'logifuture-nig', NULL, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, NULL, '2026-01-21 08:05:31'), (36, 'Logifuture Colombia', 'logifuture-col', NULL, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, NULL, '2026-01-21 08:05:30'), (42, 'William Hill', 'willhill', NULL, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, NULL, '2026-01-21 08:18:14'), - (49, 'Bet At Home', 'betathome', NULL, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, NULL, '2026-01-21 08:20:50'), + (49, 'Bet At Home', 'betathome', NULL, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, NULL, '2026-01-21 19:41:51'), (83, 'Pinnacle', 'pinnacle', NULL, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, NULL, '2026-01-21 08:21:02'), (110, 'BetFair', 'betfair', NULL, 4, 1, 0, 1, 0, 1, 1, 0, 1, 0, NULL, '2026-01-21 08:21:12'), (117, 'SNAI', 'snai', NULL, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, NULL, '2026-01-21 08:08:28'), @@ -47,10 +47,10 @@ class BookmakerSeeder extends Seeder (577, 'Sisal', 'sisal', NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, '2026-01-21 08:03:55'), (625, 'Betaland', 'betaland', NULL, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, NULL, '2026-01-21 08:01:05'), (627, 'PlanetWin365', 'planetwin365', NULL, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL), - (649, '1XBet', '1xbet', NULL, 18, 1, 0, 0, 0, 1, 1, 0, 2, 0, NULL, '2026-01-21 08:13:48'), + (649, '1XBet', '1xbet', NULL, 18, 1, 1, 0, 0, 1, 1, 1, 2, 0, NULL, '2026-01-21 19:38:24'), (658, 'Bet9ja', 'bet9ja', NULL, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, NULL, '2026-01-21 08:08:03'), (668, 'SportPesa', 'sportpesa', NULL, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, NULL, '2026-01-21 08:08:33'), - (823, 'BetKing', 'betking', NULL, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, NULL, '2026-01-21 08:16:03'), + (823, 'BetKing', 'betking', NULL, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, NULL, '2026-01-21 19:36:10'), (824, 'BetPlay', 'betplay', NULL, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, NULL, '2026-01-21 08:02:37'), (825, 'SportyBet', 'sportybet', NULL, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, NULL, '2026-01-21 08:08:44'), (827, 'WPlay', 'wplay', NULL, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, NULL, '2026-01-21 08:08:51'), @@ -59,7 +59,8 @@ class BookmakerSeeder extends Seeder (1001, 'Betsson', 'betsson', NULL, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL), (1002, 'DafaBet', 'dafabet', NULL, 16, 0, 0, 0, 0, 0, 0, 0, 0, 1, NULL, NULL), (1003, 'BetVictor', 'betvictor', NULL, 17, 0, 0, 0, 0, 0, 0, 0, 0, 1, NULL, NULL), - (1004, 'TitanBet', 'titanbet', NULL, 15, 0, 0, 0, 0, 0, 0, 0, 0, 1, NULL, NULL);"; + (1004, 'TitanBet', 'titanbet', NULL, 15, 0, 0, 0, 0, 0, 0, 0, 0, 1, NULL, NULL); +"; DB::unprepared($sql); } diff --git a/resources/views/filament/tables/columns/column-dc.blade.php b/resources/views/filament/tables/columns/column-dc.blade.php index c3eac91b..a0ee15e9 100644 --- a/resources/views/filament/tables/columns/column-dc.blade.php +++ b/resources/views/filament/tables/columns/column-dc.blade.php @@ -11,42 +11,9 @@ @include('filament.tables.columns.multiline.label', ['labels' => ['1X', '12', 'X2']]) - @foreach ($record->odds_dc as $item) - @if ($item->bookmaker_id == auth()->user()->bookmaker_id) - @include('filament.tables.columns.multiline.bkm', [ - 'bookmaker_id' => $item->bookmaker_id, - 'icon' => $item->bookmaker->icon ?? '', - ]) - - @include('filament.tables.columns.multiline.odds', [ - 'odd' => $item->dc1x, - 'dec' => 2, - 'has' => false, - ]) - - @include('filament.tables.columns.multiline.odds', [ - 'odd' => $item->dc12, - 'dec' => 2, - 'has' => false, - ]) - - @include('filament.tables.columns.multiline.odds', [ - 'odd' => $item->dcx2, - 'dec' => 2, - 'has' => false, - ]) - - @include('filament.tables.columns.multiline.odds', [ - 'odd' => $item->margin, - 'dec' => 1, - 'has' => false, - ]) - @endif - @endforeach - @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_dc as $item) - @if ($item->bookmaker_id == $bookmaker_id) + @if ($item->bookmaker_id == $bookmaker_id && in_array($item->bookmaker_id, $getSlots())) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', diff --git a/resources/views/filament/tables/columns/column-dnb.blade.php b/resources/views/filament/tables/columns/column-dnb.blade.php index d0221112..2087c1f0 100644 --- a/resources/views/filament/tables/columns/column-dnb.blade.php +++ b/resources/views/filament/tables/columns/column-dnb.blade.php @@ -13,7 +13,7 @@ @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_dnb as $item) - @if ($item->bookmaker_id == $bookmaker_id) + @if ($item->bookmaker_id == $bookmaker_id && in_array($item->bookmaker_id, $getSlots())) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, diff --git a/resources/views/filament/tables/columns/column-ggng.blade.php b/resources/views/filament/tables/columns/column-ggng.blade.php index e069fd23..6310367b 100644 --- a/resources/views/filament/tables/columns/column-ggng.blade.php +++ b/resources/views/filament/tables/columns/column-ggng.blade.php @@ -13,7 +13,7 @@ @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_ggng as $item) - @if ($item->bookmaker_id == $bookmaker_id) + @if ($item->bookmaker_id == $bookmaker_id && in_array($item->bookmaker_id, $getSlots())) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, diff --git a/resources/views/filament/tables/columns/column-ml-s1.blade.php b/resources/views/filament/tables/columns/column-ml-s1.blade.php index 14749d41..8814da0a 100644 --- a/resources/views/filament/tables/columns/column-ml-s1.blade.php +++ b/resources/views/filament/tables/columns/column-ml-s1.blade.php @@ -13,7 +13,7 @@ @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_2ways_s1 as $item) - @if ($item->bookmaker_id == $bookmaker_id) + @if ($item->bookmaker_id == $bookmaker_id && in_array($item->bookmaker_id, $getSlots())) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, diff --git a/resources/views/filament/tables/columns/column-ml.blade.php b/resources/views/filament/tables/columns/column-ml.blade.php index 84537951..267a5344 100644 --- a/resources/views/filament/tables/columns/column-ml.blade.php +++ b/resources/views/filament/tables/columns/column-ml.blade.php @@ -13,7 +13,7 @@ @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_2ways as $item) - @if ($item->bookmaker_id == $bookmaker_id) + @if ($item->bookmaker_id == $bookmaker_id && in_array($item->bookmaker_id, $getSlots())) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, diff --git a/resources/views/filament/tables/columns/column-point-q1.blade.php b/resources/views/filament/tables/columns/column-point-q1.blade.php index 07170534..3f629981 100644 --- a/resources/views/filament/tables/columns/column-point-q1.blade.php +++ b/resources/views/filament/tables/columns/column-point-q1.blade.php @@ -13,7 +13,7 @@ @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_points_q1 as $item) - @if ($item->bookmaker_id == $bookmaker_id) + @if ($item->bookmaker_id == $bookmaker_id && in_array($item->bookmaker_id, $getSlots())) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, diff --git a/resources/views/filament/tables/columns/column-point.blade.php b/resources/views/filament/tables/columns/column-point.blade.php index 0bc7e5fc..856e8471 100644 --- a/resources/views/filament/tables/columns/column-point.blade.php +++ b/resources/views/filament/tables/columns/column-point.blade.php @@ -13,7 +13,7 @@ @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_points as $item) - @if ($item->bookmaker_id == $bookmaker_id) + @if ($item->bookmaker_id == $bookmaker_id && in_array($item->bookmaker_id, $getSlots())) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, diff --git a/resources/views/filament/tables/columns/column-total-ht.blade.php b/resources/views/filament/tables/columns/column-total-ht.blade.php index 01a2716e..bd42dfc3 100644 --- a/resources/views/filament/tables/columns/column-total-ht.blade.php +++ b/resources/views/filament/tables/columns/column-total-ht.blade.php @@ -13,7 +13,7 @@ @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_totals_ht as $item) - @if ($item->bookmaker_id == $bookmaker_id) + @if ($item->bookmaker_id == $bookmaker_id && in_array($item->bookmaker_id, $getSlots())) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, diff --git a/resources/views/filament/tables/columns/column-total-q1.blade.php b/resources/views/filament/tables/columns/column-total-q1.blade.php index 4202c2b3..f5aac891 100644 --- a/resources/views/filament/tables/columns/column-total-q1.blade.php +++ b/resources/views/filament/tables/columns/column-total-q1.blade.php @@ -13,7 +13,7 @@ @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_totals_q1 as $item) - @if ($item->bookmaker_id == $bookmaker_id) + @if ($item->bookmaker_id == $bookmaker_id && in_array($item->bookmaker_id, $getSlots())) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, diff --git a/resources/views/filament/tables/columns/column-total.blade.php b/resources/views/filament/tables/columns/column-total.blade.php index 71b149ce..4c8b2a6a 100644 --- a/resources/views/filament/tables/columns/column-total.blade.php +++ b/resources/views/filament/tables/columns/column-total.blade.php @@ -13,7 +13,7 @@ @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_totals as $item) - @if ($item->bookmaker_id == $bookmaker_id) + @if ($item->bookmaker_id == $bookmaker_id && in_array($item->bookmaker_id, $getSlots())) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', diff --git a/resources/views/filament/tables/columns/column-tq.blade.php b/resources/views/filament/tables/columns/column-tq.blade.php index 390b11b3..625926db 100644 --- a/resources/views/filament/tables/columns/column-tq.blade.php +++ b/resources/views/filament/tables/columns/column-tq.blade.php @@ -10,37 +10,9 @@
@include('filament.tables.columns.multiline.label', ['labels' => ['H', 'A']]) - - @foreach ($record->odds_tq as $item) - @if ($item->bookmaker_id == auth()->user()->bookmaker_id) - @include('filament.tables.columns.multiline.bkm', [ - 'bookmaker_id' => $item->bookmaker_id, - 'icon' => $item->bookmaker->icon ?? '', - ]) - - @include('filament.tables.columns.multiline.odds', [ - 'odd' => $item->htq, - 'dec' => 2, - 'has' => false, - ]) - - @include('filament.tables.columns.multiline.odds', [ - 'odd' => $item->atq, - 'dec' => 2, - 'has' => false, - ]) - - @include('filament.tables.columns.multiline.odds', [ - 'odd' => $item->margin, - 'dec' => 1, - 'has' => false, - ]) - @endif - @endforeach - @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_tq as $item) - @if ($item->bookmaker_id == $bookmaker_id) + @if ($item->bookmaker_id == $bookmaker_id && in_array($item->bookmaker_id, $getSlots())) @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', diff --git a/resources/views/filament/tables/columns/column_3way.blade.php b/resources/views/filament/tables/columns/column_3way.blade.php index 0dcbdcb0..e4bb1637 100644 --- a/resources/views/filament/tables/columns/column_3way.blade.php +++ b/resources/views/filament/tables/columns/column_3way.blade.php @@ -11,42 +11,10 @@ @include('filament.tables.columns.multiline.label', ['labels' => ['1', 'X', '2']]) - @foreach ($record->odds_3ways as $item) - @if ($item->bookmaker_id == auth()->user()->bookmaker_id) - @include('filament.tables.columns.multiline.bkm', [ - 'bookmaker_id' => $item->bookmaker_id, - 'icon' => $item->bookmaker->icon ?? '', - ]) - - @include('filament.tables.columns.multiline.odds', [ - 'odd' => $item->h3w, - 'dec' => 2, - 'has' => false, - ]) - - @include('filament.tables.columns.multiline.odds', [ - 'odd' => $item->d3w, - 'dec' => 2, - 'has' => false, - ]) - - @include('filament.tables.columns.multiline.odds', [ - 'odd' => $item->a3w, - 'dec' => 2, - 'has' => false, - ]) - - @include('filament.tables.columns.multiline.odds', [ - 'odd' => $item->margin, - 'dec' => 1, - 'has' => false, - ]) - @endif - @endforeach - @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_3ways as $item) - @if ($item->bookmaker_id == $bookmaker_id) + @if ($item->bookmaker_id == $bookmaker_id && in_array($item->bookmaker_id, $getSlots())) + @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', diff --git a/resources/views/filament/tables/columns/column_3way_ht.blade.php b/resources/views/filament/tables/columns/column_3way_ht.blade.php index a746487f..17eeaaf9 100644 --- a/resources/views/filament/tables/columns/column_3way_ht.blade.php +++ b/resources/views/filament/tables/columns/column_3way_ht.blade.php @@ -11,42 +11,10 @@ @include('filament.tables.columns.multiline.label', ['labels' => ['1', 'X', '2']]) - @foreach ($record->odds_3ways_ht as $item) - @if ($item->bookmaker_id == auth()->user()->bookmaker_id) - @include('filament.tables.columns.multiline.bkm', [ - 'bookmaker_id' => $item->bookmaker_id, - 'icon' => $item->bookmaker->icon ?? '', - ]) - - @include('filament.tables.columns.multiline.odds', [ - 'odd' => $item->h3w, - 'dec' => 2, - 'has' => false, - ]) - - @include('filament.tables.columns.multiline.odds', [ - 'odd' => $item->d3w, - 'dec' => 2, - 'has' => false, - ]) - - @include('filament.tables.columns.multiline.odds', [ - 'odd' => $item->a3w, - 'dec' => 2, - 'has' => false, - ]) - - @include('filament.tables.columns.multiline.odds', [ - 'odd' => $item->margin, - 'dec' => 1, - 'has' => false, - ]) - @endif - @endforeach - @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_3ways_ht as $item) - @if ($item->bookmaker_id == $bookmaker_id) + @if ($item->bookmaker_id == $bookmaker_id && in_array($item->bookmaker_id, $getSlots())) + @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', diff --git a/resources/views/livewire/bettype-toggle.blade.php b/resources/views/livewire/bettype-toggle.blade.php index 7a9ef6c9..2e5768cc 100644 --- a/resources/views/livewire/bettype-toggle.blade.php +++ b/resources/views/livewire/bettype-toggle.blade.php @@ -1,16 +1,35 @@
+ + + + + + + + + + +
+
+
+ @foreach ($bettype_toggles as $toggle)
{{ $toggle['short'] }}
@endforeach - - - - -
diff --git a/resources/views/livewire/top-menu-items.blade.php b/resources/views/livewire/top-menu-items.blade.php index 74e4ead8..abac7be4 100644 --- a/resources/views/livewire/top-menu-items.blade.php +++ b/resources/views/livewire/top-menu-items.blade.php @@ -157,10 +157,10 @@ {{-- Multiline --}} - - diff --git a/setup.sh b/setup.sh index 890d2458..225561f0 100755 --- a/setup.sh +++ b/setup.sh @@ -64,6 +64,7 @@ case "$1" in php artisan nuh --d --f 17 php artisan nuh --d --f 18 php artisan nuh --d --f 19 + php artisan nuh --d --f 53 ;; "10") php artisan nuh --d --t --f 1 @@ -87,6 +88,7 @@ case "$1" in php artisan nuh --d --f --p 17 php artisan nuh --d --f --p 18 php artisan nuh --d --f --p 19 + php artisan nuh --d --f 53 ;; *) echo ""