diff --git a/app/Console/Commands/Grapper/TxOdds/Odds/WorkCollector.php b/app/Console/Commands/Grapper/Helper/ActiveSpread.php similarity index 50% rename from app/Console/Commands/Grapper/TxOdds/Odds/WorkCollector.php rename to app/Console/Commands/Grapper/Helper/ActiveSpread.php index 26151e2c..3ad77722 100644 --- a/app/Console/Commands/Grapper/TxOdds/Odds/WorkCollector.php +++ b/app/Console/Commands/Grapper/Helper/ActiveSpread.php @@ -1,13 +1,32 @@ $value) { diff --git a/app/Console/Commands/Grapper/Helper/BookmakerOffer.php b/app/Console/Commands/Grapper/Helper/BookmakerOffer.php new file mode 100644 index 00000000..60c3213a --- /dev/null +++ b/app/Console/Commands/Grapper/Helper/BookmakerOffer.php @@ -0,0 +1,60 @@ + $bookmaker_ids) { + BookmakerSport::where('provider_id', Nuh::$options['provider_id']) + ->where('sport_id', (int) $sport_id) + ->update(['is_active' => 0]); + + foreach ($bookmaker_ids as $bookmaker_id) { + BookmakerSport::updateOrCreate([ + 'provider_id' => Nuh::$options['provider_id'], + 'bookmaker_id' => (int) $bookmaker_id, + 'sport_id' => (int) $sport_id, + ], [ + 'is_active' => 1, + ]); + } + } + } + + } +} diff --git a/app/Console/Commands/Grapper/TxOdds/Odds.php b/app/Console/Commands/Grapper/TxOdds/Odds.php index 1d4a7a26..9c87092e 100644 --- a/app/Console/Commands/Grapper/TxOdds/Odds.php +++ b/app/Console/Commands/Grapper/TxOdds/Odds.php @@ -2,6 +2,8 @@ namespace App\Console\Commands\Grapper\TxOdds; +use App\Console\Commands\Grapper\Helper\ActiveSpread; +use App\Console\Commands\Grapper\Helper\BookmakerOffer; use App\Console\Commands\Grapper\TxOdds\Odds\_2Way; use App\Console\Commands\Grapper\TxOdds\Odds\_2WayS1; use App\Console\Commands\Grapper\TxOdds\Odds\_3Way; @@ -16,7 +18,6 @@ use App\Console\Commands\Grapper\TxOdds\Odds\_Totals; use App\Console\Commands\Grapper\TxOdds\Odds\_TotalsHt; use App\Console\Commands\Grapper\TxOdds\Odds\_TotalsQ1; use App\Console\Commands\Grapper\TxOdds\Odds\_Tq; -use App\Console\Commands\Grapper\TxOdds\Odds\WorkCollector; use App\Console\Commands\Nuh; use App\Console\Commands\Xml; use App\Models\CompetitionGroup; @@ -37,6 +38,7 @@ class Odds Notice::note('txodd odd sport: '.Nuh::$options['sport_id'], 'b'); } + BookmakerOffer::init(); /** * Delete */ @@ -159,7 +161,7 @@ class Odds $_calls = []; if (Nuh::$options['id']) { if ($debug) { - Notice::note('BY ID', 'p'); + Notice::note("BY ID \nsport_id: ".Nuh::$options['sport_id'], 'p'); } /** * by SINGLE ID @@ -167,7 +169,7 @@ class Odds $_calls[] = $url."&ot=$markets&peid=".Nuh::$options['id']; } elseif (Nuh::$options['a']) { if ($debug) { - Notice::note('ALL', 'p'); + Notice::note("ALL \nsport_id: ".Nuh::$options['sport_id'], 'p'); } /** * ALL by ID @@ -178,7 +180,7 @@ class Odds } } elseif (Nuh::$options['g']) { if ($debug) { - Notice::note('PER GROUP_ID', 'p'); + Notice::note("GROUP_ID \nsport_id: ".Nuh::$options['sport_id'], 'p'); } /** * PER GROUP_ID @@ -190,19 +192,22 @@ class Odds } } elseif (Nuh::$options['t']) { if ($debug) { - Notice::note('TODAY', 'p'); + Notice::note("TODAY \nsport_id: ".Nuh::$options['sport_id'], 'p'); } + /** * TODAY */ - $res = Event::where('sport_id', Nuh::$options['sport_id'])->where('starttime', '>', Carbon::now()->toDateTimeString())->where('starttime', '<', Carbon::now()->addDays(1)->toDateTimeString())->pluck('id'); + $from = Carbon::now()->toDateTimeString(); + $to = Carbon::now()->addDays(1)->toDateTimeString(); + $res = Event::where('sport_id', Nuh::$options['sport_id'])->where('starttime', '>=', $from)->where('starttime', '<', $to)->pluck('id'); foreach ($res as $id) { $_calls[] = $url.'&spid='.Nuh::$options['sport_id']."&ot=$markets&peid=".$id; } } elseif (Nuh::$options['w']) { if ($debug) { - Notice::note('ONE WEEK FROM NOW', 'p'); + Notice::note("WEEK \nsport_id: ".Nuh::$options['sport_id'], 'p'); } /** * ONE WEEK @@ -213,7 +218,7 @@ class Odds } } else { if ($debug) { - Notice::note('WITH LASTCALL Parameter', 'p'); + Notice::note("LASTCALL \nsport_id: ".Nuh::$options['sport_id'], 'p'); } /** * WITH LASTCALL Parameter @@ -293,6 +298,8 @@ class Odds $odds['provider_id'] = Nuh::$options['provider_id']; $odds['nuh_check'] = 0; + BookmakerOffer::collect($book['bid'], $event['sport_id']); + foreach ($book->offer as $offer) { $bettypeid = 0; @@ -368,10 +375,12 @@ class Odds } } } - WorkCollector::run(); + ActiveSpread::set(); } } + BookmakerOffer::finalize(); + if ($debug) { Notice::note('DONE - EVENTS: '.$counter, 'g'); } diff --git a/app/Console/Commands/Grapper/TxOdds/Odds/FillCollector.php b/app/Console/Commands/Grapper/TxOdds/Odds/FillCollector.php deleted file mode 100644 index c59906d6..00000000 --- a/app/Console/Commands/Grapper/TxOdds/Odds/FillCollector.php +++ /dev/null @@ -1,27 +0,0 @@ -o1; $odds['a2w'] = (float) $value->o3; - $odds['starttime'] = (string) $value['starttime']; } $odds['margin'] = (float) Margin::calculate([$odds['h2w'], $odds['a2w']], 1); diff --git a/app/Console/Commands/Grapper/TxOdds/Odds/_Points.php b/app/Console/Commands/Grapper/TxOdds/Odds/_Points.php index e629df45..2822103d 100644 --- a/app/Console/Commands/Grapper/TxOdds/Odds/_Points.php +++ b/app/Console/Commands/Grapper/TxOdds/Odds/_Points.php @@ -2,6 +2,7 @@ namespace App\Console\Commands\Grapper\TxOdds\Odds; +use App\Console\Commands\Grapper\Helper\ActiveSpread; use App\Console\Commands\Nuh; use App\Utilities\Margin; use Illuminate\Support\Facades\DB; @@ -23,7 +24,7 @@ class _Points $odds['margin'] = (float) Margin::calculate([$odds['home'], $odds['away']], 1); $odds['difference'] = abs(1 / $odds['home'] - 1 / $odds['away']); - FillCollector::set($odds, 'odds_points'); + ActiveSpread::collect($odds, 'odds_points'); DB::table('odds_points')->updateOrInsert([ 'event_id' => Nuh::$id, diff --git a/app/Console/Commands/Grapper/TxOdds/Odds/_PointsHt.php b/app/Console/Commands/Grapper/TxOdds/Odds/_PointsHt.php index a09b9a30..f6a84651 100644 --- a/app/Console/Commands/Grapper/TxOdds/Odds/_PointsHt.php +++ b/app/Console/Commands/Grapper/TxOdds/Odds/_PointsHt.php @@ -2,6 +2,7 @@ namespace App\Console\Commands\Grapper\TxOdds\Odds; +use App\Console\Commands\Grapper\Helper\ActiveSpread; use App\Console\Commands\Nuh; use App\Utilities\Margin; use Illuminate\Support\Facades\DB; @@ -23,7 +24,7 @@ class _PointsHt $odds['margin'] = (float) Margin::calculate([$odds['home'], $odds['away']], 1); $odds['difference'] = abs(1 / $odds['home'] - 1 / $odds['away']); - FillCollector::set($odds, 'odds_points_ht'); + ActiveSpread::collect($odds, 'odds_points_ht'); DB::table('odds_points_ht')->updateOrInsert([ 'event_id' => Nuh::$id, diff --git a/app/Console/Commands/Grapper/TxOdds/Odds/_PointsQ1.php b/app/Console/Commands/Grapper/TxOdds/Odds/_PointsQ1.php index fc7b445c..0af12f5d 100644 --- a/app/Console/Commands/Grapper/TxOdds/Odds/_PointsQ1.php +++ b/app/Console/Commands/Grapper/TxOdds/Odds/_PointsQ1.php @@ -2,6 +2,7 @@ namespace App\Console\Commands\Grapper\TxOdds\Odds; +use App\Console\Commands\Grapper\Helper\ActiveSpread; use App\Console\Commands\Nuh; use App\Utilities\Margin; use Illuminate\Support\Facades\DB; @@ -23,7 +24,7 @@ class _PointsQ1 $odds['margin'] = (float) Margin::calculate([$odds['home'], $odds['away']], 1); $odds['difference'] = abs(1 / $odds['home'] - 1 / $odds['away']); - FillCollector::set($odds, 'odds_points_q1'); + ActiveSpread::collect($odds, 'odds_points_q1'); DB::table('odds_points_q1')->updateOrInsert([ 'event_id' => Nuh::$id, diff --git a/app/Console/Commands/Grapper/TxOdds/Odds/_Totals.php b/app/Console/Commands/Grapper/TxOdds/Odds/_Totals.php index 59f83b85..f0060b1d 100644 --- a/app/Console/Commands/Grapper/TxOdds/Odds/_Totals.php +++ b/app/Console/Commands/Grapper/TxOdds/Odds/_Totals.php @@ -2,6 +2,7 @@ namespace App\Console\Commands\Grapper\TxOdds\Odds; +use App\Console\Commands\Grapper\Helper\ActiveSpread; use App\Console\Commands\Nuh; use App\Utilities\Margin; use Illuminate\Support\Facades\DB; @@ -29,7 +30,7 @@ class _Totals $odds['margin'] = (float) Margin::calculate([$odds['over'], $odds['under']], 1); $odds['difference'] = abs(1 / $odds['over'] - 1 / $odds['under']); - FillCollector::set($odds, 'odds_totals'); + ActiveSpread::collect($odds, 'odds_totals'); DB::table('odds_totals')->updateOrInsert([ 'event_id' => Nuh::$id, diff --git a/app/Console/Commands/Grapper/TxOdds/Odds/_TotalsHt.php b/app/Console/Commands/Grapper/TxOdds/Odds/_TotalsHt.php index 9c31f212..83aeac45 100644 --- a/app/Console/Commands/Grapper/TxOdds/Odds/_TotalsHt.php +++ b/app/Console/Commands/Grapper/TxOdds/Odds/_TotalsHt.php @@ -2,6 +2,7 @@ namespace App\Console\Commands\Grapper\TxOdds\Odds; +use App\Console\Commands\Grapper\Helper\ActiveSpread; use App\Console\Commands\Nuh; use App\Utilities\Margin; use Illuminate\Support\Facades\DB; @@ -23,7 +24,7 @@ class _TotalsHt $odds['margin'] = (float) Margin::calculate([$odds['over'], $odds['under']], 1); $odds['difference'] = abs(1 / $odds['over'] - 1 / $odds['under']); - FillCollector::set($odds, 'odds_totals_ht'); + ActiveSpread::collect($odds, 'odds_totals_ht'); DB::table('odds_totals_ht')->updateOrInsert([ 'event_id' => Nuh::$id, diff --git a/app/Console/Commands/Grapper/TxOdds/Odds/_TotalsQ1.php b/app/Console/Commands/Grapper/TxOdds/Odds/_TotalsQ1.php index c51557aa..795b75f6 100644 --- a/app/Console/Commands/Grapper/TxOdds/Odds/_TotalsQ1.php +++ b/app/Console/Commands/Grapper/TxOdds/Odds/_TotalsQ1.php @@ -2,6 +2,7 @@ namespace App\Console\Commands\Grapper\TxOdds\Odds; +use App\Console\Commands\Grapper\Helper\ActiveSpread; use App\Console\Commands\Nuh; use App\Utilities\Margin; use Illuminate\Support\Facades\DB; @@ -23,7 +24,7 @@ class _TotalsQ1 $odds['margin'] = (float) Margin::calculate([$odds['over'], $odds['under']], 1); $odds['difference'] = abs(1 / $odds['over'] - 1 / $odds['under']); - FillCollector::set($odds, 'odds_totals_q1'); + ActiveSpread::collect($odds, 'odds_totals_q1'); DB::table('odds_totals_q1')->updateOrInsert([ 'event_id' => Nuh::$id, diff --git a/app/Console/Commands/Nuh.php b/app/Console/Commands/Nuh.php index 8d39434c..d6378213 100644 --- a/app/Console/Commands/Nuh.php +++ b/app/Console/Commands/Nuh.php @@ -24,7 +24,7 @@ class Nuh extends Command public static $BETSAPI_TOKEN = '36152-aeTRNnZxSPUwGe'; - protected $signature = 'nuh {process=help} {--id=0} {--f=} {--a} {--p} {--d} {--b} {--w} {--g} {--r} {--s} {--t} {--x}'; + protected $signature = 'nuh {process=help} {--id=0} {--f=} {--a} {--p} {--d} {--x} {--t} {--w} {--g} {--r} {--s} {--t} {--q}'; protected $description = 'Nuh'; @@ -37,28 +37,28 @@ class Nuh extends Command if ($this->argument('process') == 'help') { $txt = PHP_EOL; - $txt .= 'List of parameters'.PHP_EOL; + $txt .= 'Parameters'.PHP_EOL; $txt .= '----------------------------------------------'.PHP_EOL; $txt .= 'process [id] (required)'.PHP_EOL; $txt .= '--id=matchid (optional) calling spezific id'.PHP_EOL; - $txt .= '--func=name (optional) start special function in code'.PHP_EOL; + $txt .= '--f=name (optional) [bookmaker_sport]'.PHP_EOL; $txt .= '----------------------------------------------'.PHP_EOL.PHP_EOL; - $txt .= 'List of options'.PHP_EOL; + $txt .= 'Options'.PHP_EOL; $txt .= '----------------------------------------------'.PHP_EOL; $txt .= '--a reload all'.PHP_EOL; $txt .= '--p use proxy'.PHP_EOL; $txt .= '--d debug'.PHP_EOL; - $txt .= '--x supervisors'.PHP_EOL; - $txt .= '--b load one day single '.PHP_EOL; - $txt .= '--w laod one week (tx)'.PHP_EOL; + $txt .= '--x generate supervisors'.PHP_EOL; + $txt .= '--t load today'.PHP_EOL; + $txt .= '--w laod this week (tx)'.PHP_EOL; $txt .= '--g by minor groups (tx)'.PHP_EOL; - $txt .= '--f force update market'.PHP_EOL; $txt .= '--r read data from file '.PHP_EOL; $txt .= '--s store data to file '.PHP_EOL; - $txt .= '--t test server url '.PHP_EOL; + $txt .= '--f force update market'.PHP_EOL; + $txt .= '--q print all queries'.PHP_EOL; $txt .= '----------------------------------------------'.PHP_EOL.PHP_EOL; - $txt .= 'List of supervisors'.PHP_EOL; + $txt .= 'Supervisors'.PHP_EOL; $txt .= '----------------------------------------------'.PHP_EOL; $tmp = Supervisor::orderBy('provider_id')->get(); foreach ($tmp as $value) { diff --git a/app/Filament/Tables/Columns/ColumnMl.php b/app/Filament/Tables/Columns/ColumnMl.php index 2e8dde36..075b661e 100644 --- a/app/Filament/Tables/Columns/ColumnMl.php +++ b/app/Filament/Tables/Columns/ColumnMl.php @@ -2,6 +2,7 @@ namespace App\Filament\Tables\Columns; +use App\Models\BookmakerSport; use Filament\Tables\Columns\Column; class ColumnMl extends Column @@ -16,6 +17,8 @@ class ColumnMl extends Column protected $act; + protected $having; + protected ?bool $has_data; public function bookmakers(?array $bookmakers): static @@ -27,11 +30,27 @@ class ColumnMl extends Column return $this; } + public function setMC($slot, $bookmaker_id) + { + // MultilineClient::where('sport_id', auth()->user()->sport_id) + // ->where('position', $position) + // ->where('multiline_setting_id', 22) + // ->update(['bookmaker_id' => $bookmaker_id]); + } + public function getBookmaker(): ?array { return $this->bookmakers; } + public function getActivBookmaker() + { + return BookmakerSport::with('bookmaker') + ->whereNotIn('bookmaker_id', $this->having) + ->where('sport_id', auth()->user()->sport_id) + ->get(); + } + public function loadData($record) { $this->has_data = count($record->odds_2ways) ? true : false; @@ -48,6 +67,11 @@ class ColumnMl extends Column } + public function setHaving($bkmid) + { + return $this->having[] = $bkmid; + } + public function getAct() { return $this->act; diff --git a/app/Models/Bookmaker.php b/app/Models/Bookmaker.php index bef17678..6874fff1 100644 --- a/app/Models/Bookmaker.php +++ b/app/Models/Bookmaker.php @@ -17,4 +17,9 @@ class Bookmaker extends Model 'direct', 'is_active', ]; + + public function sport() + { + return $this->belongsTo(Sport::class)->where('is_active', 1); + } } diff --git a/app/Models/BookmakerSport.php b/app/Models/BookmakerSport.php new file mode 100644 index 00000000..6af9d349 --- /dev/null +++ b/app/Models/BookmakerSport.php @@ -0,0 +1,25 @@ +belongsTo(Sport::class); + } + + public function bookmaker() + { + return $this->belongsTo(Bookmaker::class); + } +} diff --git a/app/Utilities/Supervisorctl.php b/app/Utilities/Supervisorctl.php index 6c3154b1..c30b4358 100644 --- a/app/Utilities/Supervisorctl.php +++ b/app/Utilities/Supervisorctl.php @@ -46,7 +46,11 @@ class Supervisorctl if (! $debug) { sleep($options['sleep']); } else { - Notice::note('without debug process sleeps for '.$options['sleep'].'sec', 'g'); + if ($options['is_cron']) { + Notice::note('cron process timings set in crontab', 'b'); + } else { + Notice::note('in production process sleeps for '.$options['sleep'].'sec', 'b'); + } } } diff --git a/database/migrations/2026_01_11_042020_create_bookmaker_sports_table.php b/database/migrations/2026_01_11_042020_create_bookmaker_sports_table.php new file mode 100644 index 00000000..0a84fba7 --- /dev/null +++ b/database/migrations/2026_01_11_042020_create_bookmaker_sports_table.php @@ -0,0 +1,31 @@ +id(); + $table->integer('sport_id')->index()->references('id')->on('sports'); + $table->integer('bookmaker_id')->index()->references('id')->on('bookmakers'); + $table->integer('provider_id')->index()->references('id')->on('providers'); + $table->boolean('is_active')->default(0); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('bookmaker_sports'); + } +}; diff --git a/resources/views/filament/tables/columns/column-dc.blade.php b/resources/views/filament/tables/columns/column-dc.blade.php index 4fd05754..61664429 100644 --- a/resources/views/filament/tables/columns/column-dc.blade.php +++ b/resources/views/filament/tables/columns/column-dc.blade.php @@ -12,11 +12,16 @@ @php $act = $getAct(); + $rows = 0; @endphp @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_dc as $item) @if ($item->bookmaker_id == $bookmaker_id) + @php + $rows++; + @endphp + @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', @@ -51,5 +56,9 @@ @endif @endforeach @endforeach + @livewire('SetBookmakerSlot', [ + 'rows' => $rows, + 'column' => true, + ]) @endif diff --git a/resources/views/filament/tables/columns/column-dnb.blade.php b/resources/views/filament/tables/columns/column-dnb.blade.php index a8355f56..6d2605f0 100644 --- a/resources/views/filament/tables/columns/column-dnb.blade.php +++ b/resources/views/filament/tables/columns/column-dnb.blade.php @@ -12,11 +12,16 @@ @php $act = $getAct(); + $rows = 0; @endphp @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_dnb as $item) @if ($item->bookmaker_id == $bookmaker_id) + @php + $rows++; + @endphp + @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', @@ -25,14 +30,14 @@ @include('filament.tables.columns.multiline.odds', [ 'odd' => $item->dnb1, 'dec' => 2, - 'hig' => isset($act['dnb1']) && $item->dnb1 >= $act['dnb1'] ? 1: 0, + 'hig' => isset($act['dnb1']) && $item->dnb1 >= $act['dnb1'] ? 1 : 0, 'has' => isset($act['dnb1']) && $item->bookmaker_id != auth()->user()->bookmaker_id, ]) @include('filament.tables.columns.multiline.odds', [ 'odd' => $item->dnb2, 'dec' => 2, - 'hig' => isset($act['dnb2']) && $item->dnb2 >= $act['dnb2'] ? 1: 0, + 'hig' => isset($act['dnb2']) && $item->dnb2 >= $act['dnb2'] ? 1 : 0, 'has' => isset($act['dnb2']) && $item->bookmaker_id != auth()->user()->bookmaker_id, ]) @@ -44,5 +49,9 @@ @endif @endforeach @endforeach + @livewire('SetBookmakerSlot', [ + 'rows' => $rows, + 'column' => false, + ]) @endif diff --git a/resources/views/filament/tables/columns/column-ggng.blade.php b/resources/views/filament/tables/columns/column-ggng.blade.php index 0d14db40..0594686b 100644 --- a/resources/views/filament/tables/columns/column-ggng.blade.php +++ b/resources/views/filament/tables/columns/column-ggng.blade.php @@ -12,12 +12,17 @@ @php $act = $getAct(); + $rows = 0; @endphp @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_ggng as $item) @if ($item->bookmaker_id == $bookmaker_id) + @php + $rows++; + @endphp + @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', @@ -26,14 +31,14 @@ @include('filament.tables.columns.multiline.odds', [ 'odd' => $item->gg, 'dec' => 2, - 'hig' => isset($act['gg']) && $item->gg >= $act['gg'] ? 1: 0, + 'hig' => isset($act['gg']) && $item->gg >= $act['gg'] ? 1 : 0, 'has' => isset($act['gg']) && $item->bookmaker_id != auth()->user()->bookmaker_id, ]) @include('filament.tables.columns.multiline.odds', [ 'odd' => $item->ng, 'dec' => 2, - 'hig' => isset($act['ng']) && $item->ng >= $act['ng'] ? 1: 0, + 'hig' => isset($act['ng']) && $item->ng >= $act['ng'] ? 1 : 0, 'has' => isset($act['ng']) && $item->bookmaker_id != auth()->user()->bookmaker_id, ]) @@ -45,5 +50,9 @@ @endif @endforeach @endforeach + @livewire('SetBookmakerSlot', [ + 'rows' => $rows, + 'column' => false, + ]) @endif diff --git a/resources/views/filament/tables/columns/column-ml-s1.blade.php b/resources/views/filament/tables/columns/column-ml-s1.blade.php index f27c9885..8d8d540f 100644 --- a/resources/views/filament/tables/columns/column-ml-s1.blade.php +++ b/resources/views/filament/tables/columns/column-ml-s1.blade.php @@ -12,12 +12,18 @@ @php $act = $getAct(); + $rows = 0; + $column = 0; @endphp @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_2ways_s1 as $item) @if ($item->bookmaker_id == $bookmaker_id) + @php + $rows++; + @endphp + @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', diff --git a/resources/views/filament/tables/columns/column-ml.blade.php b/resources/views/filament/tables/columns/column-ml.blade.php index fc044c4d..f7adeed7 100644 --- a/resources/views/filament/tables/columns/column-ml.blade.php +++ b/resources/views/filament/tables/columns/column-ml.blade.php @@ -1,9 +1,9 @@ @php + use App\Utilities\BkmIconMap; $loadData($record); @endphp @if ($hasData()) - @include('filament.tables.columns.fumetto.fumetto_ml')
@@ -12,12 +12,19 @@ @php $act = $getAct(); + $rows = 0; + $having = []; @endphp @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_2ways as $item) @if ($item->bookmaker_id == $bookmaker_id) + @php + $rows++; + $setHaving($bookmaker_id); + @endphp + @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', @@ -45,5 +52,24 @@ @endif @endforeach @endforeach + + @for ($i = $rows; $i < 4; $i++) + + + + + @foreach ($getActivBookmaker() as $item) + +
+
+
+ @endforeach +
+
+
+
+
+ @endfor
@endif diff --git a/resources/views/filament/tables/columns/column-point-q1.blade.php b/resources/views/filament/tables/columns/column-point-q1.blade.php index beb6c91a..9dc3b53e 100644 --- a/resources/views/filament/tables/columns/column-point-q1.blade.php +++ b/resources/views/filament/tables/columns/column-point-q1.blade.php @@ -10,9 +10,18 @@ @include('filament.tables.columns.multiline.label', ['labels' => ['O', 'U', 'T']]) + @php + $act = $getAct(); + $rows = 0; + @endphp + @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_points_q1 as $item) @if ($item->bookmaker_id == $bookmaker_id) + @php + $rows++; + @endphp + @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', @@ -46,5 +55,9 @@ @endif @endforeach @endforeach + @livewire('SetBookmakerSlot', [ + 'rows' => $rows, + 'column' => true, + ]) @endif diff --git a/resources/views/filament/tables/columns/column-point.blade.php b/resources/views/filament/tables/columns/column-point.blade.php index 0309c42e..27e6b3e9 100644 --- a/resources/views/filament/tables/columns/column-point.blade.php +++ b/resources/views/filament/tables/columns/column-point.blade.php @@ -10,9 +10,18 @@ @include('filament.tables.columns.multiline.label', ['labels' => ['O', 'U', 'T']]) + @php + $act = $getAct(); + $rows = 0; + @endphp + @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_points as $item) @if ($item->bookmaker_id == $bookmaker_id) + @php + $rows++; + @endphp + @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', @@ -46,5 +55,9 @@ @endif @endforeach @endforeach + @livewire('SetBookmakerSlot', [ + 'rows' => $rows, + 'column' => true, + ]) @endif diff --git a/resources/views/filament/tables/columns/column-total-ht.blade.php b/resources/views/filament/tables/columns/column-total-ht.blade.php index ea924271..02014b5a 100644 --- a/resources/views/filament/tables/columns/column-total-ht.blade.php +++ b/resources/views/filament/tables/columns/column-total-ht.blade.php @@ -10,9 +10,18 @@ @include('filament.tables.columns.multiline.label', ['labels' => ['O', 'U', 'T']]) + @php + $act = $getAct(); + $rows = 0; + @endphp + @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_totals_ht as $item) @if ($item->bookmaker_id == $bookmaker_id) + @php + $rows++; + @endphp + @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', @@ -46,5 +55,9 @@ @endif @endforeach @endforeach + @livewire('SetBookmakerSlot', [ + 'rows' => $rows, + 'column' => true, + ]) @endif diff --git a/resources/views/filament/tables/columns/column-total-q1.blade.php b/resources/views/filament/tables/columns/column-total-q1.blade.php index 74777166..f3d5453e 100644 --- a/resources/views/filament/tables/columns/column-total-q1.blade.php +++ b/resources/views/filament/tables/columns/column-total-q1.blade.php @@ -10,9 +10,18 @@ @include('filament.tables.columns.multiline.label', ['labels' => ['O', 'U', 'T']]) + @php + $act = $getAct(); + $rows = 0; + @endphp + @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_totals_q1 as $item) @if ($item->bookmaker_id == $bookmaker_id) + @php + $rows++; + @endphp + @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', @@ -46,5 +55,9 @@ @endif @endforeach @endforeach + @livewire('SetBookmakerSlot', [ + 'rows' => $rows, + 'column' => true, + ]) @endif diff --git a/resources/views/filament/tables/columns/column-total.blade.php b/resources/views/filament/tables/columns/column-total.blade.php index f8976a29..cdacfff9 100644 --- a/resources/views/filament/tables/columns/column-total.blade.php +++ b/resources/views/filament/tables/columns/column-total.blade.php @@ -10,9 +10,18 @@ @include('filament.tables.columns.multiline.label', ['labels' => ['O', 'U', 'T']]) + @php + $act = $getAct(); + $rows = 0; + @endphp + @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_totals as $item) @if ($item->bookmaker_id == $bookmaker_id) + @php + $rows++; + @endphp + @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', @@ -46,5 +55,9 @@ @endif @endforeach @endforeach + @livewire('SetBookmakerSlot', [ + 'rows' => $rows, + 'column' => true, + ]) @endif diff --git a/resources/views/filament/tables/columns/column-tq.blade.php b/resources/views/filament/tables/columns/column-tq.blade.php index 0bcb2aac..8d06a547 100644 --- a/resources/views/filament/tables/columns/column-tq.blade.php +++ b/resources/views/filament/tables/columns/column-tq.blade.php @@ -12,11 +12,16 @@ @php $act = $getAct(); + $rows = 0; @endphp @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_tq as $item) @if ($item->bookmaker_id == $bookmaker_id) + @php + $rows++; + @endphp + @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', @@ -25,14 +30,14 @@ @include('filament.tables.columns.multiline.odds', [ 'odd' => $item->htq, 'dec' => 2, - 'hig' => isset($act['htq']) && $item->htq >= $act['htq'] ? 1: 0, + 'hig' => isset($act['htq']) && $item->htq >= $act['htq'] ? 1 : 0, 'has' => isset($act['htq']) && $item->bookmaker_id != auth()->user()->bookmaker_id, ]) @include('filament.tables.columns.multiline.odds', [ 'odd' => $item->atq, 'dec' => 2, - 'hig' => isset($act['atq']) && $item->atq >= $act['atq'] ? 1: 0, + 'hig' => isset($act['atq']) && $item->atq >= $act['atq'] ? 1 : 0, 'has' => isset($act['atq']) && $item->bookmaker_id != auth()->user()->bookmaker_id, ]) @@ -44,5 +49,9 @@ @endif @endforeach @endforeach + @livewire('SetBookmakerSlot', [ + 'rows' => $rows, + 'column' => false, + ]) @endif diff --git a/resources/views/filament/tables/columns/column_3way.blade.php b/resources/views/filament/tables/columns/column_3way.blade.php index f2f52b9d..13c23a28 100644 --- a/resources/views/filament/tables/columns/column_3way.blade.php +++ b/resources/views/filament/tables/columns/column_3way.blade.php @@ -12,11 +12,16 @@ @php $act = $getAct(); + $rows = 0; @endphp @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_3ways as $item) @if ($item->bookmaker_id == $bookmaker_id) + @php + $rows++; + @endphp + @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', @@ -51,5 +56,10 @@ @endif @endforeach @endforeach + + @livewire('SetBookmakerSlot', [ + 'rows' => $rows, + 'column' => true, + ]) @endif diff --git a/resources/views/filament/tables/columns/column_3way_ht.blade.php b/resources/views/filament/tables/columns/column_3way_ht.blade.php index e386c406..5f60c79c 100644 --- a/resources/views/filament/tables/columns/column_3way_ht.blade.php +++ b/resources/views/filament/tables/columns/column_3way_ht.blade.php @@ -12,11 +12,16 @@ @php $act = $getAct(); + $rows = 0; @endphp @foreach ($getBookmaker() as $bookmaker_id) @foreach ($record->odds_3ways_ht as $item) @if ($item->bookmaker_id == $bookmaker_id) + @php + $rows++; + @endphp + @include('filament.tables.columns.multiline.bkm', [ 'bookmaker_id' => $item->bookmaker_id, 'icon' => $item->bookmaker->icon ?? '', @@ -51,5 +56,10 @@ @endif @endforeach @endforeach + + @livewire('SetBookmakerSlot', [ + 'rows' => $rows, + 'column' => true, + ]) @endif