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
+292 -373

No files matched your search

+33 -14
View File
@@ -10,6 +10,12 @@ class Column3way extends Column
protected ?array $bookmakers;
protected $max;
protected $min;
protected $act;
protected ?bool $has_data;
public function bookmakers(?array $bookmakers): static
@@ -30,21 +36,34 @@ class Column3way extends Column
{
$this->has_data = count($record->odds_3way) ? true : false;
$tmp = [];
$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');
$this->act = $record->odds_3way->where('bookmaker_id', auth()->user()->bookmaker_id)->first();
foreach ($record->odds_3way as $key => $value) {
if ($value->h3w == $tmp['max_h3w']) {
$record->odds_3way->key->max_h3w = true;
} else {
$record->odds_3way->key->max_h3w = false;
}
}
$this->max['h3w'] = $record->odds_3way->max('h3w');
$this->max['d3w'] = $record->odds_3way->max('d3w');
$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()
+19 -8
View File
@@ -8,9 +8,11 @@ class ColumnDc extends Column
{
protected string $view = 'filament.tables.columns.column-dc';
protected ?array $max;
protected $max;
protected ?array $min;
protected $min;
protected $act;
protected ?array $bookmakers;
@@ -18,6 +20,8 @@ class ColumnDc extends Column
public function bookmakers(?array $bookmakers): static
{
array_unshift($bookmakers, auth()->user()->bookmaker_id);
$this->bookmakers = $bookmakers;
return $this;
@@ -30,19 +34,26 @@ class ColumnDc extends Column
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->min['dc1x'] = $record->odds_dc->min('dc1x');
$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->min['dc1x'] = $record->odds_dc->min('dc1x');
$this->min['dc12'] = $record->odds_dc->min('dc12');
$this->min['dcx2'] = $record->odds_dc->min('dcx2');
}
$this->max['margin'] = $record->odds_dc->max('margin');
$this->min['margin'] = $record->odds_dc->min('margin');
$this->has_data = count($record->odds_dc) ? true : false;
public function getAct()
{
return $this->act;
}
public function getMax()
+19 -8
View File
@@ -8,16 +8,20 @@ class ColumnDnb extends Column
{
protected string $view = 'filament.tables.columns.column-dnb';
protected ?array $max;
protected ?array $min;
protected ?array $bookmakers;
protected $max;
protected $min;
protected $act;
protected ?bool $has_data;
public function bookmakers(?array $bookmakers): static
{
array_unshift($bookmakers, auth()->user()->bookmaker_id);
$this->bookmakers = $bookmakers;
return $this;
@@ -30,16 +34,23 @@ class ColumnDnb extends Column
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->min['dnb1'] = $record->odds_dnb->min('dnb1');
$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->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()
+19 -8
View File
@@ -8,16 +8,20 @@ class ColumnGgng extends Column
{
protected string $view = 'filament.tables.columns.column-ggng';
protected ?array $max;
protected ?array $min;
protected ?array $bookmakers;
protected $max;
protected $min;
protected $act;
protected ?bool $has_data;
public function bookmakers(?array $bookmakers): static
{
array_unshift($bookmakers, auth()->user()->bookmaker_id);
$this->bookmakers = $bookmakers;
return $this;
@@ -30,16 +34,23 @@ class ColumnGgng extends Column
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->min['gg'] = $record->odds_ggng->min('gg');
$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->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()
+19 -8
View File
@@ -8,16 +8,20 @@ class ColumnTotal extends Column
{
protected string $view = 'filament.tables.columns.column-total';
protected ?array $max;
protected ?array $min;
protected ?array $bookmakers;
protected $max;
protected $min;
protected $act;
protected ?bool $has_data;
public function bookmakers(?array $bookmakers): static
{
array_unshift($bookmakers, auth()->user()->bookmaker_id);
$this->bookmakers = $bookmakers;
return $this;
@@ -30,16 +34,23 @@ class ColumnTotal extends Column
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->min['over'] = $record->odds_total->min('over');
$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->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()
+19 -8
View File
@@ -8,16 +8,20 @@ class ColumnTq extends Column
{
protected string $view = 'filament.tables.columns.column-tq';
protected ?array $max;
protected ?array $min;
protected ?array $bookmakers;
protected $max;
protected $min;
protected $act;
protected ?bool $has_data;
public function bookmakers(?array $bookmakers): static
{
array_unshift($bookmakers, auth()->user()->bookmaker_id);
$this->bookmakers = $bookmakers;
return $this;
@@ -30,16 +34,23 @@ class ColumnTq extends Column
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->min['htq'] = $record->odds_tq->min('htq');
$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->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()