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

+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()