disable double when comapare and in lis view all
This commit is contained in:
1 parent
d0eb6e13b5
commit
87871c09fa
2 files changed
+13
No files matched your search
@@ -30,6 +30,8 @@ class ColumnOdds extends Column
|
||||
|
||||
protected $filter_compare_bookmaker;
|
||||
|
||||
protected $compare_bookmaker_id;
|
||||
|
||||
protected $filter_compare_mode;
|
||||
|
||||
protected $favorits = [];
|
||||
@@ -176,6 +178,11 @@ class ColumnOdds extends Column
|
||||
return $this->favorits;
|
||||
}
|
||||
|
||||
public function getCompareBookmakerId()
|
||||
{
|
||||
return $this->compare_bookmaker_id;
|
||||
}
|
||||
|
||||
public function getData($record)
|
||||
{
|
||||
$this->client = null;
|
||||
@@ -428,6 +435,7 @@ class ColumnOdds extends Column
|
||||
public function setCompare($record)
|
||||
{
|
||||
$this->compare = null;
|
||||
$this->compare_bookmaker_id = 0;
|
||||
|
||||
$this->data->filter(function ($model) {
|
||||
|
||||
@@ -439,12 +447,14 @@ class ColumnOdds extends Column
|
||||
if ($this->bettype == 'odds_dc') {
|
||||
if ($model->margin <= $filter['margin'] * 2) {
|
||||
$this->compare = $this->data->where('bookmaker_id', $model->bookmaker_id)->first();
|
||||
$this->compare_bookmaker_id = $model->bookmaker_id;
|
||||
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if ($model->margin <= $filter['margin']) {
|
||||
$this->compare = $this->data->where('bookmaker_id', $model->bookmaker_id)->first();
|
||||
$this->compare_bookmaker_id = $model->bookmaker_id;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
@foreach ($multilines as $multiline)
|
||||
|
||||
@if($getCompareBookmakerId() != $multiline->bookmaker_id)
|
||||
|
||||
@if (in_array($multiline->bookmaker_id, $slots))
|
||||
|
||||
@include('filament.tables.columns.multiline.bkm', [
|
||||
@@ -136,4 +138,5 @@
|
||||
'd' => 1,
|
||||
])
|
||||
@endif
|
||||
@endif
|
||||
@endforeach
|
||||
Reference in new issue
Block a user