popup fixed al ok

This commit is contained in:
salam committed 2026-01-23 13:51:36 +01:00
1 parent b0482cacf6
commit 82e6a60253
45 files changed
+8043 -1277

No files matched your search

+3 -3
View File
@@ -125,10 +125,10 @@ class Odds
$from_to = '&days='.Nuh::$options['days_from'].','.Nuh::$options['days_to'];
$groupids = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->groupBy('group_id')->pluck('group_id');
$events = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->where('group_id', Nuh::$options['g'])->pluck('id');
foreach ($groupids as $groupid) {
$_calls[] = $url.$markets.$from_to.'&pgid='.$groupid;
foreach ($events as $event_id) {
$_calls[] = $url.$markets.$from_to.'&peid='.$event_id;
}
} elseif (Nuh::$options['t']) {
@@ -16,7 +16,7 @@ class ActiveSpread
public static function collect($odds, $table)
{
if (! isset(self::$collector[$table]['difference'])) {
if (! isset(self::$collector[$table])) {
self::$collector[$table]['difference'] = $odds['difference'];
if (isset($odds['handicap'])) {
self::$collector[$table]['active_spread'] = $odds['handicap'];
@@ -42,6 +42,6 @@ class _PointsQ1
$res->save();
}
ActiveSpread::collect($odds, 'odds_totals_q1');
ActiveSpread::collect($odds, 'odds_points_q1');
}
}
+2 -1
View File
@@ -21,7 +21,7 @@ class Nuh extends Command
public static $id = 0;
protected $signature = 'nuh {process=help} {--id=0} {--fn=} {--p} {--d} {--x} {--t} {--w} {--g} {--a} {--r} {--s} {--t} {--q} {--f}';
protected $signature = 'nuh {process=help} {--id=0} {--fn=} {--g=} {--p} {--d} {--x} {--t} {--w} {--a} {--r} {--s} {--t} {--q} {--f}';
public function handle()
{
@@ -37,6 +37,7 @@ class Nuh extends Command
$txt .= 'process [id] (required)'.PHP_EOL;
$txt .= '--id=matchid (optional) calling spezific id'.PHP_EOL;
$txt .= '--fn=name (optional) [bkms, markets]'.PHP_EOL;
$txt .= '--g=groupid (optional) [bkms, groupid]'.PHP_EOL;
$txt .= '----------------------------------------------'.PHP_EOL.PHP_EOL;
$txt .= 'Options'.PHP_EOL;
$txt .= '----------------------------------------------'.PHP_EOL;
@@ -58,8 +58,7 @@ class EventResource extends Resource
->with('country')
->with('home')
->with('away')
->with('event_user_star')
->where('sport_id', auth()->user()->sport_id);
->with('event_user_star');
if (auth()->user()->stars) {
$query->whereHas('event_user_star');
@@ -19,7 +19,7 @@ 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\Filament\Tables\Columns\PopupOdds;
use App\Filament\Tables\Columns\TooltipOdds;
use App\Models\CompetitionGroup;
use App\Models\Country;
use App\Models\Event;
@@ -93,97 +93,95 @@ class EventsTable
EventColumn::make('event'),
TooltipOdds::make('ml')->bettype('odds_2ways')->label('')->visible(fn () => in_array('odds_2ways', self::$bettype_settings)),
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'),
PopupOdds::make('1x2')->label(''),
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'),
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'),
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'),
ColumnGgng::make('odds_ggng')->bookmakers(self::$multiline_bookmaker['odds_ggng'] ?? [])
->visible(fn () => \in_array('odds_ggng', self::$bettype_settings))
->verticalAlignment(VerticalAlignment::Start)
->alignCenter()
->width(190)
->label('Goal No Goal'),
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'),
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'),
TooltipOdds::make('mls1')->bettype('odds_2ways_s1')->label('')->visible(fn () => in_array('odds_2ways_s1', 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'),
TooltipOdds::make('1x2')->bettype('odds_3ways')->label('')->visible(fn () => in_array('odds_3ways', self::$bettype_settings)),
Column3way::make('odds_3ways')->bookmakers(self::$multiline_bookmaker['odds_3ways'] ?? [])
->visible(fn () => in_array('odds_3ways', self::$bettype_settings))
->verticalAlignment(VerticalAlignment::Start)
->alignCenter()
->label('1X2'),
TooltipOdds::make('total')->bettype('odds_totals')->label('')->visible(fn () => in_array('odds_totals', self::$bettype_settings)),
ColumnTotal::make('odds_totals')->bookmakers(self::$multiline_bookmaker['odds_totals'] ?? [])
->visible(fn () => in_array('odds_totals', self::$bettype_settings))
->verticalAlignment(VerticalAlignment::Start)
->alignCenter()
->label('Totals'),
TooltipOdds::make('1x2ht')->bettype('odds_3ways_ht')->label('')->visible(fn () => in_array('odds_3ways_ht', self::$bettype_settings)),
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()
->label('1X2 HT'),
TooltipOdds::make('total_ht')->bettype('odds_totals_ht')->label('')->visible(fn () => in_array('odds_totals_ht', self::$bettype_settings)),
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()
->label('Totals HT'),
TooltipOdds::make('ggng')->bettype('odds_ggng')->label('')->visible(fn () => in_array('odds_ggng', 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()
->label('Goal No Goal'),
TooltipOdds::make('points')->bettype('odds_points')->label('')->visible(fn () => in_array('odds_points', self::$bettype_settings)),
ColumnPoint::make('odds_points')->bookmakers(self::$multiline_bookmaker['odds_points'] ?? [])
->visible(fn () => in_array('odds_points', self::$bettype_settings))
->verticalAlignment(VerticalAlignment::Start)
->alignCenter()
->label('Points'),
TooltipOdds::make('total_q1')->bettype('odds_totals_q1')->label('')->visible(fn () => in_array('odds_totals_q1', self::$bettype_settings)),
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()
->label('Totals Q1'),
TooltipOdds::make('points_q1')->bettype('odds_points_q1')->label('')->visible(fn () => in_array('odds_points_q1', self::$bettype_settings)),
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()
->label('Points Q1'),
TooltipOdds::make('dc')->bettype('odds_dc')->label('')->visible(fn () => in_array('odds_dc', self::$bettype_settings)),
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'),
TooltipOdds::make('tq')->bettype('odds_tq')->label('')->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'),
TooltipOdds::make('dnb')->bettype('odds_dnb')->label('')->visible(fn () => in_array('odds_dnb', self::$bettype_settings)),
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'])
@@ -194,16 +192,11 @@ class EventsTable
->columns(5)->columnSpan(5)
->schema([
Select::make(name: 'sport_id')
->options(fn () => Sport::getSportForClient())
->default(self::$user->sport_id)
->prefixIcon(self::$user->sport->icon)
->selectablePlaceholder(false)
->hiddenLabel()
->preload()
->options(function () {
return Sport::getSportForClient();
})
->live()
->reactive()
->afterStateUpdated(function (callable $set, $state, $livewire) {
User::where('id', self::$user->id)->update(['sport_id' => (int) $state]);
@@ -223,8 +216,8 @@ class EventsTable
->multiple()
->searchable()
->preload()
->options(function () {
$res = Event::where('sport_id', self::$user->sport_id)->where('starttime', '>', Carbon::now())->groupBy('country_id')->pluck('country_id')->toArray();
->options(function (Get $get) {
$res = Event::where('sport_id', $get('sport_id'))->where('starttime', '>', Carbon::now())->groupBy('country_id')->pluck('country_id')->toArray();
return Country::query()->whereIn('id', $res)->pluck('name', 'id');
})
@@ -242,9 +235,9 @@ class EventsTable
->searchable()
->options(function (Get $get) {
if ($get('country_id')) {
$res = Event::where('sport_id', self::$user->sport_id)->with('country')->with('competition_group')->where('country_id', $get('country_id'))->where('starttime', '>', Carbon::now())->groupBy('competition_group_id')->get();
$res = Event::where('sport_id', $get('sport_id'))->with('country')->with('competition_group')->where('country_id', $get('country_id'))->where('starttime', '>', Carbon::now())->groupBy('competition_group_id')->get();
} else {
$res = Event::where('sport_id', self::$user->sport_id)->with('country')->with('competition_group')->where('starttime', '>', Carbon::now())->groupBy('competition_group_id')->get();
$res = Event::where('sport_id', $get('sport_id'))->with('country')->with('competition_group')->where('starttime', '>', Carbon::now())->groupBy('competition_group_id')->get();
}
$arr = [];
foreach ($res as $val) {
@@ -264,9 +257,9 @@ class EventsTable
->searchable()
->options(function (Get $get) {
if ($get('country_id')) {
$res = Event::with('country')->where('sport_id', self::$user->sport_id)->with('group')->where('country_id', $get('country_id'))->where('starttime', '>', Carbon::now())->groupBy('group_id')->get();
$res = Event::with('country')->where('sport_id', $get('sport_id'))->with('group')->where('country_id', $get('country_id'))->where('starttime', '>', Carbon::now())->groupBy('group_id')->get();
} else {
$res = Event::with('country')->where('sport_id', self::$user->sport_id)->with('group')->where('starttime', '>', Carbon::now())->groupBy('group_id')->get();
$res = Event::with('country')->where('sport_id', $get('sport_id'))->with('group')->where('starttime', '>', Carbon::now())->groupBy('group_id')->get();
}
$arr = [];
foreach ($res as $val) {
@@ -287,6 +280,9 @@ class EventsTable
])
->query(function (Builder $query, array $data): Builder {
return $query->when(
$data['sport_id'],
fn (Builder $query, $sport_id) => $query->where('sport_id', $sport_id)
)->when(
$data['country_id'],
fn (Builder $query, $country_id) => $query->where('country_id', $country_id)
)->when(
@@ -320,7 +316,6 @@ class EventsTable
);
})->indicateUsing(function (array $data): array {
$indicators = [];
if ($data['country_id'] ?? null) {
$countries = Country::whereIn('id', $data['country_id'])->pluck('name')->toArray();
if (count($countries) > 1) {
+19 -19
View File
@@ -22,33 +22,33 @@ class FilterOdds
/**
* FILTER
*/
if (! auth()->user()->no_filter) {
// if (! auth()->user()->no_filter) {
$filter = $bookmakers['filter'] ?? [];
// $filter = $bookmakers['filter'] ?? [];
if ($filter) {
$data = $data->filter(function ($model) use ($filter) {
// if ($filter) {
// $data = $data->filter(function ($model) use ($filter) {
if ($model->bookmaker_id == auth()->user()->bookmaker_id) {
return true;
}
// if ($model->bookmaker_id == auth()->user()->bookmaker_id) {
// return true;
// }
$filter = $filter[$model->bookmaker_id] ?? 0;
// $filter = $filter[$model->bookmaker_id] ?? 0;
$checked_at = Carbon::createFromDate($model->checked_at)->timestamp;
// $checked_at = Carbon::createFromDate($model->checked_at)->timestamp;
if (! isset($filter['margin'])) {
Bookmakers::updateOrCreate(['id' => (int) $model->bookmaker_id], ['need_check' => 1]);
}
// if (! isset($filter['margin'])) {
// Bookmakers::updateOrCreate(['id' => (int) $model->bookmaker_id], ['need_check' => 1]);
// }
if ($model->margin <= $filter['margin'] && $checked_at > time() - $filter['time_lastcheck']) {
return true;
}
// if ($model->margin <= $filter['margin'] && $checked_at > time() - $filter['time_lastcheck']) {
// return true;
// }
return false;
});
}
}
// return false;
// });
// }
// }
}
return $data;
-58
View File
@@ -1,58 +0,0 @@
<?php
namespace App\Filament\Tables\Columns;
use Filament\Tables\Columns\Column;
class PopupOdds extends Column
{
protected string $view = 'filament.tables.columns.popup-odds';
protected $max;
protected $min;
protected $act;
protected ?int $has_data;
public function loadData($record)
{
$this->has_data = count($record->odds_3ways);
$this->act = $record->odds_3ways->where('bookmaker_id', auth()->user()->bookmaker_id)->first();
$this->max['h3w'] = $record->odds_3ways->max('h3w');
$this->max['d3w'] = $record->odds_3ways->max('d3w');
$this->max['a3w'] = $record->odds_3ways->max('a3w');
$this->min['h3w'] = $record->odds_3ways->min('h3w');
$this->min['d3w'] = $record->odds_3ways->min('d3w');
$this->min['a3w'] = $record->odds_3ways->min('a3w');
}
public function getAct()
{
return $this->act;
}
public function getMax()
{
return $this->max;
}
public function getMin()
{
return $this->min;
}
public function hasData()
{
return $this->has_data;
}
}
+277
View File
@@ -0,0 +1,277 @@
<?php
namespace App\Filament\Tables\Columns;
use App\Utilities\BkmIconMap;
use Filament\Tables\Columns\Column;
use Illuminate\Support\Carbon;
class TooltipOdds extends Column
{
protected string $view = 'filament.tables.columns.tooltip-odds';
protected $bettype;
protected $two_cols_break = 9;
protected $pop;
protected $oddnames = [];
protected $data;
protected $max;
protected $min;
protected $size;
public function bettype($bettype): static
{
$this->bettype = $bettype;
return $this;
}
public function getPop()
{
return $this->pop;
}
public function getSize()
{
return $this->size;
}
public function loadData($record)
{
switch ($this->bettype) {
case 'odds_3ways':
$this->oddnames = ['h3w', 'd3w', 'a3w'];
$this->data = $record->odds_3ways;
break;
case 'odds_3ways_ht':
$this->oddnames = ['h3w', 'd3w', 'a3w'];
$this->data = $record->odds_3ways_ht;
break;
case 'odds_2ways':
$this->oddnames = ['h2w', 'a2w'];
$this->data = $record->odds_2ways;
break;
case 'odds_2ways_s1':
$this->oddnames = ['h2w', 'a2w'];
$this->data = $record->odds_2ways_s1;
break;
case 'odds_dc':
$this->oddnames = ['dc1x', 'dc12', 'dcx2'];
$this->data = $record->odds_dc;
break;
case 'odds_ggng':
$this->oddnames = ['gg', 'ng'];
$this->data = $record->odds_ggng;
break;
case 'odds_dnb':
$this->oddnames = ['dnb1', 'dnb2'];
$this->data = $record->odds_dnb;
break;
case 'odds_tq':
$this->oddnames = ['htq', 'atq'];
$this->data = $record->odds_tq;
break;
case 'odds_totals':
$this->oddnames = ['over', 'under', 'total'];
$this->data = $record->odds_totals;
break;
case 'odds_totals_ht':
$this->oddnames = ['over', 'under', 'total'];
$this->data = $record->odds_totals_ht;
break;
case 'odds_totals_q1':
$this->oddnames = ['over', 'under', 'total'];
$this->data = $record->odds_totals_q1;
break;
case 'odds_points':
$this->oddnames = ['home', 'away', 'handicap'];
$this->data = $record->odds_points;
break;
case 'odds_points_q1':
$this->oddnames = ['home', 'away', 'handicap'];
$this->data = $record->odds_points_q1;
break;
}
if (! $this->data) {
return;
}
$this->size = \count($this->data);
$this->setMinMax();
$this->makeHeader();
$this->makeTooltip();
}
public function setMinMax()
{
foreach ($this->oddnames as $oddname) {
if ($this->bettype == 'odds_dc') {
$this->max[$oddname] = $this->data->where('margin', '<', 250)->max($oddname);
$this->min[$oddname] = $this->data->where($oddname, '>', 1)->where('margin', '<', 250)->min($oddname);
} else {
$this->max[$oddname] = $this->data->where('margin', '<', 150)->max($oddname);
$this->min[$oddname] = $this->data->where($oddname, '>', 1)->where('margin', '<', 150)->min($oddname);
}
}
}
public function makeTooltip()
{
foreach ($this->data as $k => $value) {
$this->pop .= $this->getIcon($value);
foreach ($this->oddnames as $oddname) {
$this->pop .= $this->getOdd($value[$oddname], $oddname);
}
$this->pop .= $this->getMargin($value->margin);
$this->pop .= $this->getCheck($value->checked_at);
if ($k % 2 == 0 && $this->size > $this->two_cols_break) {
$this->pop .= '<div></div>';
}
}
$this->pop .= '</div>';
}
public function getIcon($value)
{
$this->pop .= '<div class="h-3 m-0 bg-contain bg-center bg-no-repeat my-auto dark:opacity-80" title="'.$value->bookmaker_id.'" style="background-image: url('.BkmIconMap::get($value->bookmaker->icon).')"></div>';
}
public function getOdd($odd, $name)
{
if ($odd == $this->max[$name]) {
$str = '<div class="mb-0.5 ml-0.5 bg-green-600/25 rounded shadow">';
} elseif ($odd == $this->min[$name]) {
$str = '<div class="mb-0.5 ml-0.5 bg-blue-600/25 rounded shadow">';
} else {
$str = '<div class="mb-0.5 ml-0.5">';
}
$this->pop .= $str.number_format($odd, 2).'</div>';
}
public function getMargin($odd)
{
$str = '<div class="mb-0.5 ml-0.5">';
$this->pop .= $str.number_format($odd, 1).'</div>';
}
public function getCheck($lastcheck)
{
$lastcheck_5min = Carbon::createFromDate($lastcheck)->addMinutes(5);
$lastcheck_30min = Carbon::createFromDate($lastcheck)->addMinutes(30);
$now = Carbon::now();
if ($lastcheck_30min->lt($now)) {
$this->pop .= '<div class="text-xs text-nowrap bg-red-600/20 rounded shadow">';
} elseif ($lastcheck_5min->lt($now)) {
$this->pop .= '<div class="text-xs text-nowrap bg-blue-600/20 rounded">';
} else {
$this->pop .= '<div class="text-xs text-nowrap">';
}
$this->pop .= Carbon::createFromDate($lastcheck)->format('H:i').'</div>';
}
public function makeHeader()
{
switch ($this->bettype) {
case 'odds_3ways':
case 'odds_3ways_ht':
$title = '1X2';
$labels = ['Book', '1', 'X', '2', 'Margin', 'Check'];
$columns = 6;
break;
case 'odds_dc':
$title = 'Double Chance';
$labels = ['Book', '1X', '12', 'X2', 'Margin', 'Check'];
$columns = 6;
break;
case 'odds_ggng':
$title = 'Goal No Goal';
$labels = ['Book', 'GG', 'NG', 'Margin', 'Check'];
$columns = 5;
break;
case 'odds_dnb':
$title = 'Draw No Bet';
$labels = ['Book', 'Home', 'Away', 'Margin', 'Check'];
$columns = 5;
break;
case 'odds_tq':
$title = 'To Qualify';
$labels = ['Book', 'Home', 'Away', 'Margin', 'Check'];
$columns = 5;
break;
case 'odds_totals':
case 'odds_totals_ht':
case 'odds_totals_q1':
$title = 'Totals';
$labels = ['Book', 'Over', 'Under', 'Total', 'Margin', 'Check'];
$columns = 6;
break;
case 'odds_2ways':
case 'odds_2ways_s1':
$title = 'Money Line';
$labels = ['Book', 'Home', 'Away', 'Margin', 'Check'];
$columns = 5;
break;
case 'odds_points':
case 'odds_points_q1':
$title = 'Points';
$labels = ['Book', 'Home', 'Away', 'Handicap', 'Margin', 'Check'];
$columns = 6;
break;
}
if ($this->size > $this->two_cols_break) {
if ($columns == 6) {
$this->pop = '<div class="grid grid-cols-13 gap-2 m-5 z-100 text-xs text-center">';
} else {
$this->pop = '<div class="grid grid-cols-11 gap-2 m-5 z-100 text-xs text-center">';
}
} else {
if ($columns == 6) {
$this->pop = '<div class="grid grid-cols-6 gap-2 m-5 z-100 text-xs text-center">';
} else {
$this->pop = '<div class="grid grid-cols-5 gap-2 m-5 z-100 text-xs text-center">';
}
}
$this->pop .= '<div class="col-span-full text-center text-md font-bold mb-2">'.$title.'</div>';
foreach ($labels as $label) {
$this->pop .= '<div>'.$label.'</div>';
}
if ($this->size > $this->two_cols_break) {
$this->pop .= '<div></div>';
foreach ($labels as $label) {
$this->pop .= '<div>'.$label.'</div>';
}
}
}
}