popup highest max and min wip

This commit is contained in:
salam committed 2026-01-04 15:56:53 +01:00
1 parent 668310b03d
commit 99b901009c
20 files changed
+291 -372

No files matched your search

+33 -14
View File
@@ -10,6 +10,12 @@ class Column3way extends Column
protected ?array $bookmakers; protected ?array $bookmakers;
protected $max;
protected $min;
protected $act;
protected ?bool $has_data; protected ?bool $has_data;
public function bookmakers(?array $bookmakers): static public function bookmakers(?array $bookmakers): static
@@ -30,21 +36,34 @@ class Column3way extends Column
{ {
$this->has_data = count($record->odds_3way) ? true : false; $this->has_data = count($record->odds_3way) ? true : false;
$tmp = []; $this->act = $record->odds_3way->where('bookmaker_id', auth()->user()->bookmaker_id)->first();
$tmp['max_h3w'] = $record->odds_3way->max('h3w');
$tmp['min_h3w'] = $record->odds_3way->min('h3w');
$tmp['max_d3w'] = $record->odds_3way->max('d3w');
$tmp['min_d3w'] = $record->odds_3way->min('d3w');
$tmp['max_a3w'] = $record->odds_3way->max('a3w');
$tmp['min_a3w'] = $record->odds_3way->min('a3w');
foreach ($record->odds_3way as $key => $value) { $this->max['h3w'] = $record->odds_3way->max('h3w');
if ($value->h3w == $tmp['max_h3w']) {
$record->odds_3way->key->max_h3w = true; $this->max['d3w'] = $record->odds_3way->max('d3w');
} else {
$record->odds_3way->key->max_h3w = false; $this->max['a3w'] = $record->odds_3way->max('a3w');
}
} $this->min['h3w'] = $record->odds_3way->min('h3w');
$this->min['d3w'] = $record->odds_3way->min('d3w');
$this->min['a3w'] = $record->odds_3way->min('a3w');
}
public function getAct()
{
return $this->act;
}
public function getMax()
{
return $this->max;
}
public function getMin()
{
return $this->min;
} }
public function hasData() public function hasData()
+19 -8
View File
@@ -8,9 +8,11 @@ class ColumnDc extends Column
{ {
protected string $view = 'filament.tables.columns.column-dc'; protected string $view = 'filament.tables.columns.column-dc';
protected ?array $max; protected $max;
protected ?array $min; protected $min;
protected $act;
protected ?array $bookmakers; protected ?array $bookmakers;
@@ -18,6 +20,8 @@ class ColumnDc extends Column
public function bookmakers(?array $bookmakers): static public function bookmakers(?array $bookmakers): static
{ {
array_unshift($bookmakers, auth()->user()->bookmaker_id);
$this->bookmakers = $bookmakers; $this->bookmakers = $bookmakers;
return $this; return $this;
@@ -30,19 +34,26 @@ class ColumnDc extends Column
public function loadData($record) public function loadData($record)
{ {
$this->has_data = count($record->odds_dc) ? true : false;
$this->act = $record->odds_dc->where('bookmaker_id', auth()->user()->bookmaker_id)->first();
$this->max['dc1x'] = $record->odds_dc->max('dc1x'); $this->max['dc1x'] = $record->odds_dc->max('dc1x');
$this->min['dc1x'] = $record->odds_dc->min('dc1x');
$this->max['dc12'] = $record->odds_dc->max('dc12'); $this->max['dc12'] = $record->odds_dc->max('dc12');
$this->min['dc12'] = $record->odds_dc->min('dc12');
$this->max['dcx2'] = $record->odds_dc->max('dcx2'); $this->max['dcx2'] = $record->odds_dc->max('dcx2');
$this->min['dc1x'] = $record->odds_dc->min('dc1x');
$this->min['dc12'] = $record->odds_dc->min('dc12');
$this->min['dcx2'] = $record->odds_dc->min('dcx2'); $this->min['dcx2'] = $record->odds_dc->min('dcx2');
}
$this->max['margin'] = $record->odds_dc->max('margin'); public function getAct()
$this->min['margin'] = $record->odds_dc->min('margin'); {
return $this->act;
$this->has_data = count($record->odds_dc) ? true : false;
} }
public function getMax() public function getMax()
+19 -8
View File
@@ -8,16 +8,20 @@ class ColumnDnb extends Column
{ {
protected string $view = 'filament.tables.columns.column-dnb'; protected string $view = 'filament.tables.columns.column-dnb';
protected ?array $max;
protected ?array $min;
protected ?array $bookmakers; protected ?array $bookmakers;
protected $max;
protected $min;
protected $act;
protected ?bool $has_data; protected ?bool $has_data;
public function bookmakers(?array $bookmakers): static public function bookmakers(?array $bookmakers): static
{ {
array_unshift($bookmakers, auth()->user()->bookmaker_id);
$this->bookmakers = $bookmakers; $this->bookmakers = $bookmakers;
return $this; return $this;
@@ -30,16 +34,23 @@ class ColumnDnb extends Column
public function loadData($record) public function loadData($record)
{ {
$this->has_data = count($record->odds_dnb) ? true : false;
$this->act = $record->odds_dnb->where('bookmaker_id', auth()->user()->bookmaker_id)->first();
$this->max['dnb1'] = $record->odds_dnb->max('dnb1'); $this->max['dnb1'] = $record->odds_dnb->max('dnb1');
$this->min['dnb1'] = $record->odds_dnb->min('dnb1');
$this->max['dnb2'] = $record->odds_dnb->max('dnb2'); $this->max['dnb2'] = $record->odds_dnb->max('dnb2');
$this->min['dnb1'] = $record->odds_dnb->min('dnb1');
$this->min['dnb2'] = $record->odds_dnb->min('dnb2'); $this->min['dnb2'] = $record->odds_dnb->min('dnb2');
$this->max['margin'] = $record->odds_dnb->max('margin'); }
$this->min['margin'] = $record->odds_dnb->min('margin');
$this->has_data = count($record->odds_dnb) ? true : false; public function getAct()
{
return $this->act;
} }
public function getMax() public function getMax()
+19 -8
View File
@@ -8,16 +8,20 @@ class ColumnGgng extends Column
{ {
protected string $view = 'filament.tables.columns.column-ggng'; protected string $view = 'filament.tables.columns.column-ggng';
protected ?array $max;
protected ?array $min;
protected ?array $bookmakers; protected ?array $bookmakers;
protected $max;
protected $min;
protected $act;
protected ?bool $has_data; protected ?bool $has_data;
public function bookmakers(?array $bookmakers): static public function bookmakers(?array $bookmakers): static
{ {
array_unshift($bookmakers, auth()->user()->bookmaker_id);
$this->bookmakers = $bookmakers; $this->bookmakers = $bookmakers;
return $this; return $this;
@@ -30,16 +34,23 @@ class ColumnGgng extends Column
public function loadData($record) public function loadData($record)
{ {
$this->has_data = count($record->odds_ggng) ? true : false;
$this->act = $record->odds_ggng->where('bookmaker_id', auth()->user()->bookmaker_id)->first();
$this->max['gg'] = $record->odds_ggng->max('gg'); $this->max['gg'] = $record->odds_ggng->max('gg');
$this->min['gg'] = $record->odds_ggng->min('gg');
$this->max['ng'] = $record->odds_ggng->max('ng'); $this->max['ng'] = $record->odds_ggng->max('ng');
$this->min['gg'] = $record->odds_ggng->min('gg');
$this->min['ng'] = $record->odds_ggng->min('ng'); $this->min['ng'] = $record->odds_ggng->min('ng');
$this->max['margin'] = $record->odds_ggng->max('margin'); }
$this->min['margin'] = $record->odds_ggng->min('margin');
$this->has_data = count($record->odds_ggng) ? true : false; public function getAct()
{
return $this->act;
} }
public function getMax() public function getMax()
+19 -8
View File
@@ -8,16 +8,20 @@ class ColumnTotal extends Column
{ {
protected string $view = 'filament.tables.columns.column-total'; protected string $view = 'filament.tables.columns.column-total';
protected ?array $max;
protected ?array $min;
protected ?array $bookmakers; protected ?array $bookmakers;
protected $max;
protected $min;
protected $act;
protected ?bool $has_data; protected ?bool $has_data;
public function bookmakers(?array $bookmakers): static public function bookmakers(?array $bookmakers): static
{ {
array_unshift($bookmakers, auth()->user()->bookmaker_id);
$this->bookmakers = $bookmakers; $this->bookmakers = $bookmakers;
return $this; return $this;
@@ -30,16 +34,23 @@ class ColumnTotal extends Column
public function loadData($record) public function loadData($record)
{ {
$this->has_data = count($record->odds_total) ? true : false;
$this->act = $record->odds_total->where('bookmaker_id', auth()->user()->bookmaker_id)->first();
$this->max['over'] = $record->odds_total->max('over'); $this->max['over'] = $record->odds_total->max('over');
$this->min['over'] = $record->odds_total->min('over');
$this->max['under'] = $record->odds_total->max('under'); $this->max['under'] = $record->odds_total->max('under');
$this->min['over'] = $record->odds_total->min('over');
$this->min['under'] = $record->odds_total->min('under'); $this->min['under'] = $record->odds_total->min('under');
$this->max['margin'] = $record->odds_total->max('margin'); }
$this->min['margin'] = $record->odds_total->min('margin');
$this->has_data = count($record->odds_total) ? true : false; public function getAct()
{
return $this->act;
} }
public function getMax() public function getMax()
+19 -8
View File
@@ -8,16 +8,20 @@ class ColumnTq extends Column
{ {
protected string $view = 'filament.tables.columns.column-tq'; protected string $view = 'filament.tables.columns.column-tq';
protected ?array $max;
protected ?array $min;
protected ?array $bookmakers; protected ?array $bookmakers;
protected $max;
protected $min;
protected $act;
protected ?bool $has_data; protected ?bool $has_data;
public function bookmakers(?array $bookmakers): static public function bookmakers(?array $bookmakers): static
{ {
array_unshift($bookmakers, auth()->user()->bookmaker_id);
$this->bookmakers = $bookmakers; $this->bookmakers = $bookmakers;
return $this; return $this;
@@ -30,16 +34,23 @@ class ColumnTq extends Column
public function loadData($record) public function loadData($record)
{ {
$this->has_data = count($record->odds_tq) ? true : false;
$this->act = $record->odds_tq->where('bookmaker_id', auth()->user()->bookmaker_id)->first();
$this->max['htq'] = $record->odds_tq->max('htq'); $this->max['htq'] = $record->odds_tq->max('htq');
$this->min['htq'] = $record->odds_tq->min('htq');
$this->max['atq'] = $record->odds_tq->max('atq'); $this->max['atq'] = $record->odds_tq->max('atq');
$this->min['htq'] = $record->odds_tq->min('htq');
$this->min['atq'] = $record->odds_tq->min('atq'); $this->min['atq'] = $record->odds_tq->min('atq');
$this->max['margin'] = $record->odds_tq->max('margin'); }
$this->min['margin'] = $record->odds_tq->min('margin');
$this->has_data = count($record->odds_tq) ? true : false; public function getAct()
{
return $this->act;
} }
public function getMax() public function getMax()
@@ -10,82 +10,44 @@
@include('filament.tables.columns.multiline.label', ['labels' => ['1X', '12', 'X2']]) @include('filament.tables.columns.multiline.label', ['labels' => ['1X', '12', 'X2']])
@foreach ($record->odds_dc as $item) @php
@if ($item->bookmaker_id == auth()->user()->bookmaker_id) $act = $getAct();
@include('filament.tables.columns.multiline.bkm', [ @endphp
@foreach ($getBookmaker() as $bookmaker_id)
@foreach ($record->odds_dc as $item)
@if ($item->bookmaker_id == $bookmaker_id)
@include('filament.tables.columns.multiline.bkm', [
'bookmaker_id' => $item->bookmaker_id, 'bookmaker_id' => $item->bookmaker_id,
'icon' => $item->bookmaker->icon ?? '', 'icon' => $item->bookmaker->icon ?? '',
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->dc1x, 'odd' => $item->dc1x,
'decimal' => 2, 'dec' => 2,
'max' => false, 'hig' => isset($act['dc1x']) && $item->dc1x >= $act['dc1x'] ? 1: 0,
'min' => false, 'has' => isset($act['dc1x']) && $item->bookmaker_id != auth()->user()->bookmaker_id,
'main' => true,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->dc12, 'odd' => $item->dc12,
'decimal' => 2, 'dec' => 2,
'max' => false, 'hig' => isset($act['dc12']) && $item->dc12 >= $act['dc12'] ? 1: 0,
'min' => false, 'has' => isset($act['dc12']) && $item->bookmaker_id != auth()->user()->bookmaker_id,
'main' => true,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->dcx2, 'odd' => $item->dcx2,
'decimal' => 2, 'dec' => 2,
'max' => false, 'hig' => isset($act['dcx2']) && $item->dcx2 >= $act['dcx2'] ? 1: 0,
'min' => false, 'has' => isset($act['dcx2']) && $item->bookmaker_id != auth()->user()->bookmaker_id,
'main' => true,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->margin, 'odd' => $item->margin,
'decimal' => 1, 'dec' => 1,
'max' => false, 'has' => false
'min' => false,
'main' => true,
]) ])
@endif
@endforeach
@foreach ($getBookmaker() as $bookmaker_id)
@foreach ($record->odds_dc as $item)
@if ($item->bookmaker_id == $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,
'decimal' => 2,
'max' => false,
'min' => false,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->dc12,
'decimal' => 2,
'max' => false,
'min' => false,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->dcx2,
'decimal' => 2,
'max' => false,
'min' => false,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->margin,
'decimal' => 1,
'max' => false,
'min' => false,
])
@endif @endif
@endforeach @endforeach
@endforeach @endforeach
@@ -10,38 +10,9 @@
@include('filament.tables.columns.multiline.label', ['labels' => ['DNB1', 'DNB2']]) @include('filament.tables.columns.multiline.label', ['labels' => ['DNB1', 'DNB2']])
@foreach ($record->odds_dnb as $item) @php
@if ($item->bookmaker_id == auth()->user()->bookmaker_id) $act = $getAct();
@include('filament.tables.columns.multiline.bkm', [ @endphp
'bookmaker_id' => $item->bookmaker_id,
'icon' => $item->bookmaker->icon ?? '',
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->dnb1,
'decimal' => 2,
'max' => false,
'min' => false,
'main' => true,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->dnb2,
'decimal' => 2,
'max' => false,
'min' => false,
'main' => true,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->margin,
'decimal' => 1,
'max' => false,
'min' => false,
'main' => true,
])
@endif
@endforeach
@foreach ($getBookmaker() as $bookmaker_id) @foreach ($getBookmaker() as $bookmaker_id)
@foreach ($record->odds_dnb as $item) @foreach ($record->odds_dnb as $item)
@@ -53,23 +24,22 @@
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->dnb1, 'odd' => $item->dnb1,
'decimal' => 2, 'dec' => 2,
'max' => false, 'hig' => isset($act['dnb1']) && $item->dnb1 >= $act['dnb1'] ? 1: 0,
'min' => false, 'has' => isset($act['dnb1']) && $item->bookmaker_id != auth()->user()->bookmaker_id,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->dnb2, 'odd' => $item->dnb2,
'decimal' => 2, 'dec' => 2,
'max' => false, 'hig' => isset($act['dnb2']) && $item->dnb2 >= $act['dnb2'] ? 1: 0,
'min' => false, 'has' => isset($act['dnb2']) && $item->bookmaker_id != auth()->user()->bookmaker_id,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->margin, 'odd' => $item->margin,
'decimal' => 1, 'dec' => 1,
'max' => false, 'has' => false,
'min' => false,
]) ])
@endif @endif
@endforeach @endforeach
@@ -10,38 +10,10 @@
@include('filament.tables.columns.multiline.label', ['labels' => ['GG', 'NG']]) @include('filament.tables.columns.multiline.label', ['labels' => ['GG', 'NG']])
@foreach ($record->odds_ggng as $item) @php
@if ($item->bookmaker_id == auth()->user()->bookmaker_id) $act = $getAct();
@include('filament.tables.columns.multiline.bkm', [ @endphp
'bookmaker_id' => $item->bookmaker_id,
'icon' => $item->bookmaker->icon ?? '',
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->gg,
'decimal' => 2,
'max' => false,
'min' => false,
'main' => true,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->ng,
'decimal' => 2,
'max' => false,
'min' => false,
'main' => true,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->margin,
'decimal' => 1,
'max' => false,
'min' => false,
'main' => true,
])
@endif
@endforeach
@foreach ($getBookmaker() as $bookmaker_id) @foreach ($getBookmaker() as $bookmaker_id)
@foreach ($record->odds_ggng as $item) @foreach ($record->odds_ggng as $item)
@@ -53,23 +25,22 @@
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->gg, 'odd' => $item->gg,
'decimal' => 2, 'dec' => 2,
'max' => false, 'hig' => isset($act['gg']) && $item->gg >= $act['gg'] ? 1: 0,
'min' => false, 'has' => isset($act['gg']) && $item->bookmaker_id != auth()->user()->bookmaker_id,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->ng, 'odd' => $item->ng,
'decimal' => 2, 'dec' => 2,
'max' => false, 'hig' => isset($act['ng']) && $item->ng >= $act['ng'] ? 1: 0,
'min' => false, 'has' => isset($act['ng']) && $item->bookmaker_id != auth()->user()->bookmaker_id,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->margin, 'odd' => $item->margin,
'decimal' => 1, 'dec' => 1,
'max' => false, 'has' => false,
'min' => false,
]) ])
@endif @endif
@endforeach @endforeach
@@ -10,47 +10,6 @@
@include('filament.tables.columns.multiline.label', ['labels' => ['O', 'U', 'T']]) @include('filament.tables.columns.multiline.label', ['labels' => ['O', 'U', 'T']])
@foreach ($record->odds_total 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->over,
'decimal' => 2,
'max' => false,
'min' => false,
'main' => true,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->under,
'decimal' => 2,
'max' => false,
'min' => false,
'main' => true,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->total,
'decimal' => 1,
'max' => false,
'min' => false,
'main' => true,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->margin,
'decimal' => 1,
'max' => false,
'min' => false,
'main' => true,
])
@endif
@endforeach
@foreach ($getBookmaker() as $bookmaker_id) @foreach ($getBookmaker() as $bookmaker_id)
@foreach ($record->odds_total as $item) @foreach ($record->odds_total as $item)
@if ($item->bookmaker_id == $bookmaker_id) @if ($item->bookmaker_id == $bookmaker_id)
@@ -61,30 +20,28 @@
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->over, 'odd' => $item->over,
'decimal' => 2, 'dec' => 2,
'max' => false, 'hig' => isset($act['over']) && $item->over >= $act['over'] ? 1: 0,
'min' => false, 'has' => isset($act['over']) && $item->bookmaker_id != auth()->user()->bookmaker_id,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->under, 'odd' => $item->under,
'decimal' => 2, 'dec' => 2,
'max' => false, 'hig' => isset($act['under']) && $item->under >= $act['under'] ? 1: 0,
'min' => false, 'has' => isset($act['under']) && $item->bookmaker_id != auth()->user()->bookmaker_id,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->total, 'odd' => $item->total,
'decimal' => 1, 'dec' => 1,
'max' => false, 'has' => false,
'min' => false,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->margin, 'odd' => $item->margin,
'decimal' => 1, 'dec' => 1,
'max' => false, 'has' => false,
'min' => false,
]) ])
@endif @endif
@endforeach @endforeach
@@ -10,38 +10,9 @@
@include('filament.tables.columns.multiline.label', ['labels' => ['H', 'A']]) @include('filament.tables.columns.multiline.label', ['labels' => ['H', 'A']])
@foreach ($record->odds_tq as $item) @php
@if ($item->bookmaker_id == auth()->user()->bookmaker_id) $act = $getAct();
@include('filament.tables.columns.multiline.bkm', [ @endphp
'bookmaker_id' => $item->bookmaker_id,
'icon' => $item->bookmaker->icon ?? '',
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->htq,
'decimal' => 2,
'max' => false,
'min' => false,
'main' => true,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->atq,
'decimal' => 2,
'max' => false,
'min' => false,
'main' => true,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->margin,
'decimal' => 1,
'max' => false,
'min' => false,
'main' => true,
])
@endif
@endforeach
@foreach ($getBookmaker() as $bookmaker_id) @foreach ($getBookmaker() as $bookmaker_id)
@foreach ($record->odds_tq as $item) @foreach ($record->odds_tq as $item)
@@ -53,23 +24,22 @@
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->htq, 'odd' => $item->htq,
'decimal' => 2, 'dec' => 2,
'max' => false, 'hig' => isset($act['htq']) && $item->htq >= $act['htq'] ? 1: 0,
'min' => false, 'has' => isset($act['htq']) && $item->bookmaker_id != auth()->user()->bookmaker_id,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->atq, 'odd' => $item->atq,
'decimal' => 2, 'dec' => 2,
'max' => false, 'hig' => isset($act['atq']) && $item->atq >= $act['atq'] ? 1: 0,
'min' => false, 'has' => isset($act['atq']) && $item->bookmaker_id != auth()->user()->bookmaker_id,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->margin, 'odd' => $item->margin,
'decimal' => 1, 'dec' => 1,
'max' => false, 'has' => false,
'min' => false,
]) ])
@endif @endif
@endforeach @endforeach
@@ -4,15 +4,18 @@
@if ($hasData()) @if ($hasData())
{{-- @include('filament.tables.columns.fumetto.fumetto_1x2') --}} @include('filament.tables.columns.fumetto.fumetto_1x2')
<div {{ $getExtraAttributeBag() }} class="grid grid-cols-5" style="width: 225px;"> <div {{ $getExtraAttributeBag() }} class="grid grid-cols-5" style="width: 225px;">
@include('filament.tables.columns.multiline.label', ['labels' => ['1', 'X', '2']]) @include('filament.tables.columns.multiline.label', ['labels' => ['1', 'X', '2']])
@php
$act = $getAct();
@endphp
@foreach ($getBookmaker() as $bookmaker_id) @foreach ($getBookmaker() as $bookmaker_id)
@foreach ($record->odds_3way as $item) @foreach ($record->odds_3way as $item)
@if ($item->bookmaker_id == $bookmaker_id) @if ($item->bookmaker_id == $bookmaker_id)
@include('filament.tables.columns.multiline.bkm', [ @include('filament.tables.columns.multiline.bkm', [
'bookmaker_id' => $item->bookmaker_id, 'bookmaker_id' => $item->bookmaker_id,
@@ -22,33 +25,28 @@
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->h3w, 'odd' => $item->h3w,
'dec' => 2, 'dec' => 2,
'hig' => $item->max_h3w, 'hig' => isset($act['h3w']) && $item->h3w >= $act['h3w'] ? 1: 0,
'max' => false, 'has' => isset($act['h3w']) && $item->bookmaker_id != auth()->user()->bookmaker_id,
'min' => false,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->d3w, 'odd' => $item->d3w,
'dec' => 2, 'dec' => 2,
'hig' => false, 'hig' => isset($act['d3w']) && $item->d3w >= $act['d3w'] ? 1: 0,
'max' => false, 'has' => isset($act['d3w']) && $item->bookmaker_id != auth()->user()->bookmaker_id,
'min' => false,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->a3w, 'odd' => $item->a3w,
'dec' => 2, 'dec' => 2,
'hig' => false, 'hig' => isset($act['a3w']) && $item->a3w >= $act['a3w'] ? 1: 0,
'max' => false, 'has' => isset($act['a3w']) && $item->bookmaker_id != auth()->user()->bookmaker_id,
'min' => false,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.odds', [
'odd' => $item->margin, 'odd' => $item->margin,
'dec' => 1, 'dec' => 1,
'hig' => false, 'has' => false,
'max' => false,
'min' => false,
]) ])
@endif @endif
@endforeach @endforeach
@@ -5,36 +5,43 @@
@include('filament.tables.columns.multiline.label', ['labels' => ['1', 'X', '2']]) @include('filament.tables.columns.multiline.label', ['labels' => ['1', 'X', '2']])
@php
$max = $getMax();
$min = $getMin();
@endphp
@foreach ($record->odds_3way as $item) @foreach ($record->odds_3way as $item)
@include('filament.tables.columns.multiline.bkm', [ @include('filament.tables.columns.multiline.bkm', [
'bookmaker_id' => $item->bookmaker_id, 'bookmaker_id' => $item->bookmaker_id,
'icon' => $item->bookmaker->icon ?? '', 'icon' => $item->bookmaker->icon ?? '',
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->h3w, 'odd' => $item->h3w,
'decimal' => 2, 'dec' => 2,
'max' => $item?->max_h3w, 'max' => $item->h3w >= $max['h3w'] ? 1 :0,
'min' => $item?->min_h3w, 'min' => $item->h3w <= $min['h3w'] ? 1 :0,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->d3w, 'odd' => $item->d3w,
'decimal' => 2, 'dec' => 2,
'max' => $item?->max_d3w, 'max' => $item->d3w >= $max['d3w'] ? 1 :0,
'min' => $item?->min_d3w, 'min' => $item->d3w <= $min['d3w'] ? 1 :0,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->a3w, 'odd' => $item->a3w,
'decimal' => 2, 'dec' => 2,
'max' => $item?->max_a3w, 'max' => $item->a3w >= $max['a3w'] ? 1 :0,
'min' => $item?->min_a3w, 'min' => $item->a3w <= $min['a3w'] ? 1 :0,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->margin, 'odd' => $item->margin,
'decimal' => 1, 'dec' => 1,
'max' => false,
'min' => false,
]) ])
@endforeach @endforeach
</div> </div>
@@ -16,32 +16,32 @@
'icon' => $item->bookmaker->icon ?? '', 'icon' => $item->bookmaker->icon ?? '',
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->dc1x, 'odd' => $item->dc1x,
'decimal' => 2, 'dec' => 2,
'max' => $item->dc1x == $max['dc1x'] ? 1 : 0, 'max' => $item->dc1x >= $max['dc1x'] ? 1 : 0,
'min' => $item->dc1x == $min['dc1x'] ? 1 : 0, 'min' => $item->dc1x <= $min['dc1x'] ? 1 : 0,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->dc12, 'odd' => $item->dc12,
'decimal' => 2, 'dec' => 2,
'max' => $item->dc12 == $max['dc12'] ? 1 : 0, 'max' => $item->dc12 >= $max['dc12'] ? 1 : 0,
'min' => $item->dc12 == $min['dc12'] ? 1 : 0, 'min' => $item->dc12 <= $min['dc12'] ? 1 : 0,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->dcx2, 'odd' => $item->dcx2,
'decimal' => 2, 'dec' => 2,
'max' => $item->dcx2 == $max['dcx2'] ? 1 : 0, 'max' => $item->dcx2 >= $max['dcx2'] ? 1 : 0,
'min' => $item->dcx2 == $min['dcx2'] ? 1 : 0, 'min' => $item->dcx2 <= $min['dcx2'] ? 1 : 0,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->margin, 'odd' => $item->margin,
'decimal' => 1, 'dec' => 1,
'max' => $item->margin == $max['margin'] ? 1 : 0, 'max' => false,
'min' => $item->margin == $min['margin'] ? 1 : 0, 'min' => false,
]) ])
@endforeach @endforeach
</div> </div>
@@ -16,25 +16,25 @@
'icon' => $item->bookmaker->icon ?? '', 'icon' => $item->bookmaker->icon ?? '',
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->dnb1, 'odd' => $item->dnb1,
'decimal' => 2, 'dec' => 2,
'max' => $item->dnb1 == $max['dnb1'] ? 1 : 0, 'max' => $item->dnb1 == $max['dnb1'] ? 1 : 0,
'min' => $item->dnb1 == $min['dnb1'] ? 1 : 0, 'min' => $item->dnb1 == $min['dnb1'] ? 1 : 0,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->dnb2, 'odd' => $item->dnb2,
'decimal' => 2, 'dec' => 2,
'max' => $item->dnb2 == $max['dnb2'] ? 1 : 0, 'max' => $item->dnb2 == $max['dnb2'] ? 1 : 0,
'min' => $item->dnb2 == $min['dnb2'] ? 1 : 0, 'min' => $item->dnb2 == $min['dnb2'] ? 1 : 0,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->margin, 'odd' => $item->margin,
'decimal' => 1, 'dec' => 1,
'max' => $item->margin == $max['margin'] ? 1 : 0, 'max' => false,
'min' => $item->margin == $min['margin'] ? 1 : 0, 'min' => false,
]) ])
@endforeach @endforeach
</div> </div>
@@ -16,25 +16,25 @@
'icon' => $item->bookmaker->icon ?? '', 'icon' => $item->bookmaker->icon ?? '',
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->gg, 'odd' => $item->gg,
'decimal' => 2, 'dec' => 2,
'max' => $item->gg == $max['gg'] ? 1 : 0, 'max' => $item->gg == $max['gg'] ? 1 : 0,
'min' => $item->gg == $min['gg'] ? 1 : 0, 'min' => $item->gg == $min['gg'] ? 1 : 0,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->ng, 'odd' => $item->ng,
'decimal' => 2, 'dec' => 2,
'max' => $item->ng == $max['ng'] ? 1 : 0, 'max' => $item->ng == $max['ng'] ? 1 : 0,
'min' => $item->ng == $min['ng'] ? 1 : 0, 'min' => $item->ng == $min['ng'] ? 1 : 0,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->margin, 'odd' => $item->margin,
'decimal' => 1, 'dec' => 1,
'max' => $item->margin == $max['margin'] ? 1 : 0, 'max' => false,
'min' => $item->margin == $min['margin'] ? 1 : 0, 'min' => false,
]) ])
@endforeach @endforeach
</div> </div>
@@ -16,32 +16,32 @@
'icon' => $item->bookmaker->icon ?? '', 'icon' => $item->bookmaker->icon ?? '',
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->over, 'odd' => $item->over,
'decimal' => 2, 'dec' => 2,
'max' => $item->over == $max['over'] ? 1 : 0, 'max' => $item->over == $max['over'] ? 1 : 0,
'min' => $item->over == $min['over'] ? 1 : 0, 'min' => $item->over == $min['over'] ? 1 : 0,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->under, 'odd' => $item->under,
'decimal' => 2, 'dec' => 2,
'max' => $item->under == $max['under'] ? 1 : 0, 'max' => $item->under == $max['under'] ? 1 : 0,
'min' => $item->under == $min['under'] ? 1 : 0, 'min' => $item->under == $min['under'] ? 1 : 0,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->total, 'odd' => $item->total,
'decimal' => 1, 'dec' => 1,
'max' => false, 'max' => false,
'min' => false, 'min' => false,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->margin, 'odd' => $item->margin,
'decimal' => 1, 'dec' => 1,
'max' => $item->margin == $max['margin'] ? 1 : 0, 'max' => false,
'min' => $item->margin == $min['margin'] ? 1 : 0, 'min' => false,
]) ])
@endforeach @endforeach
</div> </div>
@@ -16,25 +16,25 @@
'icon' => $item->bookmaker->icon ?? '', 'icon' => $item->bookmaker->icon ?? '',
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->htq, 'odd' => $item->htq,
'decimal' => 2, 'dec' => 2,
'max' => $item->htq == $max['htq'] ? 1 : 0, 'max' => $item->htq == $max['htq'] ? 1 : 0,
'min' => $item->htq == $min['htq'] ? 1 : 0, 'min' => $item->htq == $min['htq'] ? 1 : 0,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->atq, 'odd' => $item->atq,
'decimal' => 2, 'dec' => 2,
'max' => $item->atq == $max['atq'] ? 1 : 0, 'max' => $item->atq == $max['atq'] ? 1 : 0,
'min' => $item->atq == $min['atq'] ? 1 : 0, 'min' => $item->atq == $min['atq'] ? 1 : 0,
]) ])
@include('filament.tables.columns.multiline.odds', [ @include('filament.tables.columns.multiline.fums', [
'odd' => $item->margin, 'odd' => $item->margin,
'decimal' => 1, 'dec' => 1,
'max' => $item->margin == $max['margin'] ? 1 : 0, 'max' => false,
'min' => $item->margin == $min['margin'] ? 1 : 0, 'min' => false,
]) ])
@endforeach @endforeach
</div> </div>
@@ -0,0 +1,17 @@
<div style="font-size: 10.5px; text-align:center;" class="mb-0.5 ml-0.5
@if($max)
bg-green-600/25 rounded
@endif
@if($min)
bg-blue-600/25 rounded
@endif
">
&nbsp;
@if (isset($odd))
{{ number_format($odd, $dec) }}
@endif
&nbsp;
</div>
@@ -1,14 +1,7 @@
<div style="font-size: 10.5px; text-align:center;" class="mb-0.5 ml-0.5 <div style="font-size: 10.5px; text-align:center;" class="mb-0.5 ml-0.5
@if($max)
bg-green-600/25 rounded
@endif
@if($min) @if($has && $hig)
bg-blue-600/25 rounded
@endif
@if($hig)
bg-gray-400/25 rounded bg-gray-400/25 rounded
@endif @endif