This commit is contained in:
salam committed 2026-01-21 13:35:16 +01:00
1 parent f59ac10c2a
commit 7a9eeb8aad
25 files changed
+253 -78

No files matched your search

@@ -58,7 +58,8 @@ class EventResource extends Resource
->with('country') ->with('country')
->with('home') ->with('home')
->with('away') ->with('away')
->with('event_user_star'); ->with('event_user_star')
->where('sport_id', auth()->user()->sport_id);
if (in_array('odds_2ways', EventsTable::$bettype_settings)) { if (in_array('odds_2ways', EventsTable::$bettype_settings)) {
$query->with('odds_2ways.bookmaker'); $query->with('odds_2ways.bookmaker');
@@ -68,6 +69,7 @@ class EventResource extends Resource
} }
if (in_array('odds_3ways', EventsTable::$bettype_settings)) { if (in_array('odds_3ways', EventsTable::$bettype_settings)) {
$query->with('odds_3ways.bookmaker'); $query->with('odds_3ways.bookmaker');
// $query->with('odds_3ways.comparing_bookmaker');
} }
if (in_array('odds_3ways_ht', EventsTable::$bettype_settings)) { if (in_array('odds_3ways_ht', EventsTable::$bettype_settings)) {
$query->with('odds_3ways_ht.bookmaker'); $query->with('odds_3ways_ht.bookmaker');
@@ -18,12 +18,14 @@ use App\Filament\Tables\Columns\ColumnTq;
use App\Filament\Tables\Columns\EventColumn; use App\Filament\Tables\Columns\EventColumn;
use App\Filament\Tables\Columns\MatchIds; use App\Filament\Tables\Columns\MatchIds;
use App\Models\BettypeUser; use App\Models\BettypeUser;
use App\Models\ComparingBookmaker;
use App\Models\CompetitionGroup; use App\Models\CompetitionGroup;
use App\Models\Country; use App\Models\Country;
use App\Models\Event; use App\Models\Event;
use App\Models\EventUserStar; use App\Models\EventUserStar;
use App\Models\Group; use App\Models\Group;
use App\Models\MultilineClient; use App\Models\MultilineClient;
use App\Models\MultilineSetting;
use App\Models\Sport; use App\Models\Sport;
use App\Models\User; use App\Models\User;
use CodeWithKyrian\FilamentDateRange\Forms\Components\DateRangePicker; use CodeWithKyrian\FilamentDateRange\Forms\Components\DateRangePicker;
@@ -54,16 +56,40 @@ class EventsTable
public static $multiline_gettype = []; public static $multiline_gettype = [];
public static $user;
public static function load_multiline_bookmaker() public static function load_multiline_bookmaker()
{ {
$res = MultilineClient::with('multiline_setting') if (self::$user->is_multiline_direct) {
->select('bookmaker_id', 'multiline_setting_id')
->orderBy('sort')
->get();
foreach ($res as $value) { if (self::$user->sport_id == 1) {
$table = $value->multiline_setting->table; $cb = ComparingBookmaker::where('sport_id', 1)->where('client_bookmaker_id', self::$user->bookmaker_id)->select('sorting', 'bookmaker_id', 'time_lastcheck', 'margin_threshold', 'is_active')->get();
self::$multiline_gettype[$table][] = (int) $value->bookmaker_id; } else {
$cb = ComparingBookmaker::where('sport_id', '!=', 1)->where('client_bookmaker_id', self::$user->bookmaker_id)->select('sorting', 'bookmaker_id', 'time_lastcheck', 'margin_threshold', 'is_active')->get();
}
$bookmakers = [];
foreach ($cb as $value) {
$bookmakers[] = $value->bookmaker_id;
}
$res = MultilineSetting::where('sport_id', self::$user->sport_id)->get();
foreach ($res as $value) {
self::$multiline_gettype[$value->table]['filter'] = $cb;
self::$multiline_gettype[$value->table]['bookmaker'] = $bookmakers;
}
} else {
$res = MultilineClient::with('multiline_setting')
->select('bookmaker_id', 'multiline_setting_id')
->orderBy('sort')
->get();
foreach ($res as $value) {
$table = $value->multiline_setting->table;
self::$multiline_gettype[$table]['bookmaker'][] = (int) $value->bookmaker_id;
}
} }
} }
@@ -81,6 +107,8 @@ class EventsTable
public static function configure(Table $table): Table public static function configure(Table $table): Table
{ {
self::$user = User::getUser();
self::load_bettype_settings(); self::load_bettype_settings();
self::load_multiline_bookmaker(); self::load_multiline_bookmaker();
@@ -109,7 +137,7 @@ class EventsTable
TextColumn::make('country.name') TextColumn::make('country.name')
->wrap() ->wrap()
->hidden(fn () => auth()->user()->sport_id == 5) ->hidden(fn () => self::$user->sport_id == 5)
->color('gray') ->color('gray')
->icon(fn ($record) => $record->country?->icon), ->icon(fn ($record) => $record->country?->icon),
@@ -214,8 +242,8 @@ class EventsTable
->columns(5)->columnSpan(5) ->columns(5)->columnSpan(5)
->schema([ ->schema([
Select::make(name: 'sport_id') Select::make(name: 'sport_id')
->default(auth()->user()->sport_id) ->default(self::$user->sport_id)
->prefixIcon(auth()->user()->sport->icon) ->prefixIcon(self::$user->sport->icon)
->selectablePlaceholder(false) ->selectablePlaceholder(false)
->hiddenLabel() ->hiddenLabel()
->preload() ->preload()
@@ -226,9 +254,7 @@ class EventsTable
->reactive() ->reactive()
->afterStateUpdated(function (callable $set, $state, $livewire) { ->afterStateUpdated(function (callable $set, $state, $livewire) {
auth()->user()->sport_id = (int) $state; User::where('id', self::$user->id)->update(['sport_id' => (int) $state]);
User::where('id', auth()->user()->id)->update(['sport_id' => (int) $state]);
$livewire->dispatch('refreshBettypeMenu'); $livewire->dispatch('refreshBettypeMenu');
@@ -238,15 +264,15 @@ class EventsTable
}), }),
Select::make(name: 'country_id') Select::make(name: 'country_id')
->hidden(fn () => auth()->user()->sport_id == 5) ->hidden(fn () => self::$user->sport_id == 5)
->placeholder('Country') ->placeholder('Country')
->hiddenLabel() ->hiddenLabel()
->label('') ->label('')
->multiple() ->multiple()
->searchable() ->searchable()
->preload() ->preload()
->options(function (Get $get) { ->options(function () {
$res = Event::where('sport_id', $get('sport_id'))->where('starttime', '>', Carbon::now())->groupBy('country_id')->pluck('country_id')->toArray(); $res = Event::where('sport_id', self::$user->sport_id)->where('starttime', '>', Carbon::now())->groupBy('country_id')->pluck('country_id')->toArray();
return Country::query()->whereIn('id', $res)->pluck('name', 'id'); return Country::query()->whereIn('id', $res)->pluck('name', 'id');
}) })
@@ -256,7 +282,7 @@ class EventsTable
$set('competition_group_id', null); $set('competition_group_id', null);
}), }),
Select::make('competition_group_id') Select::make('competition_group_id')
->hidden(fn () => auth()->user()->sport_id == 5) ->hidden(fn () => self::$user->sport_id == 5)
->placeholder('League') ->placeholder('League')
->hiddenLabel() ->hiddenLabel()
->label('') ->label('')
@@ -264,9 +290,9 @@ class EventsTable
->searchable() ->searchable()
->options(function (Get $get) { ->options(function (Get $get) {
if ($get('country_id')) { if ($get('country_id')) {
$res = Event::where('sport_id', $get('sport_id'))->with('country')->with('competition_group')->where('country_id', $get('country_id'))->where('starttime', '>', Carbon::now())->groupBy('competition_group_id')->get(); $res = Event::where('sport_id', self::$user->sport_id)->with('country')->with('competition_group')->where('country_id', $get('country_id'))->where('starttime', '>', Carbon::now())->groupBy('competition_group_id')->get();
} else { } else {
$res = Event::where('sport_id', $get('sport_id'))->with('country')->with('competition_group')->where('starttime', '>', Carbon::now())->groupBy('competition_group_id')->get(); $res = Event::where('sport_id', self::$user->sport_id)->with('country')->with('competition_group')->where('starttime', '>', Carbon::now())->groupBy('competition_group_id')->get();
} }
$arr = []; $arr = [];
foreach ($res as $val) { foreach ($res as $val) {
@@ -278,7 +304,7 @@ class EventsTable
}) })
->live(), ->live(),
Select::make('group_id') Select::make('group_id')
->visible(fn () => auth()->user()->sport_id == 5) ->visible(fn () => self::$user->sport_id == 5)
->placeholder('Tournament') ->placeholder('Tournament')
->hiddenLabel() ->hiddenLabel()
->label('') ->label('')
@@ -286,9 +312,9 @@ class EventsTable
->searchable() ->searchable()
->options(function (Get $get) { ->options(function (Get $get) {
if ($get('country_id')) { if ($get('country_id')) {
$res = Event::with('country')->where('sport_id', $get('sport_id'))->with('group')->where('country_id', $get('country_id'))->where('starttime', '>', Carbon::now())->groupBy('group_id')->get(); $res = Event::with('country')->where('sport_id', self::$user->sport_id)->with('group')->where('country_id', $get('country_id'))->where('starttime', '>', Carbon::now())->groupBy('group_id')->get();
} else { } else {
$res = Event::with('country')->where('sport_id', $get('sport_id'))->with('group')->where('starttime', '>', Carbon::now())->groupBy('group_id')->get(); $res = Event::with('country')->where('sport_id', self::$user->sport_id)->with('group')->where('starttime', '>', Carbon::now())->groupBy('group_id')->get();
} }
$arr = []; $arr = [];
foreach ($res as $val) { foreach ($res as $val) {
@@ -310,13 +336,9 @@ class EventsTable
->query(function (Builder $query, array $data): Builder { ->query(function (Builder $query, array $data): Builder {
return $query return $query
->when( ->when(
auth()->user()->stars, self::$user->stars,
fn (Builder $query) => $query->whereHas('event_user_star') fn (Builder $query) => $query->whereHas('event_user_star')
) )
->when(
$data['sport_id'],
fn (Builder $query, $sport_id) => $query->where('sport_id', $sport_id)
)
->when( ->when(
$data['country_id'], $data['country_id'],
fn (Builder $query, $country_id) => $query->where('country_id', $country_id) fn (Builder $query, $country_id) => $query->where('country_id', $country_id)
@@ -418,20 +440,20 @@ class EventsTable
->tooltip('Add to favorits') ->tooltip('Add to favorits')
->action(function ($record) { ->action(function ($record) {
$res = EventUserStar::where('event_id', $record->id) $res = EventUserStar::where('event_id', $record->id)
->where('user_id', auth()->user()->id) ->where('user_id', self::$user->id)
->first(); ->first();
if ($res) { if ($res) {
EventUserStar::find($res->id)->delete(); EventUserStar::find($res->id)->delete();
} else { } else {
EventUserStar::insert(['event_id' => $record->id, 'user_id' => auth()->user()->id]); EventUserStar::insert(['event_id' => $record->id, 'user_id' => self::$user->id]);
} }
}), }),
ActionGroup::make([ ActionGroup::make([
// EditAction::make(), // EditAction::make(),
DeleteAction::make()->visible(fn () => auth()->user()->hasRole('super_admin')), DeleteAction::make()->visible(fn () => self::$user->hasRole('super_admin')),
Action::make('txodds_odds') Action::make('txodds_odds')
->label('TxOdds') ->label('TxOdds')
->disabled(fn () => ! auth()->user()->hasRole('super_admin')) ->disabled(fn () => ! self::$user->hasRole('super_admin'))
->icon('phosphor-arrow-square-out') ->icon('phosphor-arrow-square-out')
->url(fn ($record): string => route('txodds_odds', ['sportid' => $record->sport_id, 'txoddsid' => $record->id])) ->url(fn ($record): string => route('txodds_odds', ['sportid' => $record->sport_id, 'txoddsid' => $record->id]))
->openUrlInNewTab(), ->openUrlInNewTab(),
@@ -439,7 +461,7 @@ class EventsTable
->icon('phosphor-dots-three-vertical'), ->icon('phosphor-dots-three-vertical'),
])->toolbarActions([ ])->toolbarActions([
BulkActionGroup::make([ BulkActionGroup::make([
DeleteBulkAction::make()->visible(fn () => auth()->user()->hasRole('super_admin')), DeleteBulkAction::make()->visible(fn () => self::$user->hasRole('super_admin')),
]), ]),
]); ]);
} }
+9 -3
View File
@@ -20,8 +20,6 @@ class Column3way 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;
@@ -29,11 +27,12 @@ class Column3way extends Column
public function getBookmaker(): ?array public function getBookmaker(): ?array
{ {
return $this->bookmakers; return $this->bookmakers['bookmaker'] ?? [];
} }
public function loadData($record) public function loadData($record)
{ {
$this->has_data = count($record->odds_3ways) ? true : false; $this->has_data = count($record->odds_3ways) ? true : false;
$this->act = $record->odds_3ways->where('bookmaker_id', auth()->user()->bookmaker_id)->first(); $this->act = $record->odds_3ways->where('bookmaker_id', auth()->user()->bookmaker_id)->first();
@@ -49,6 +48,13 @@ class Column3way extends Column
$this->min['d3w'] = $record->odds_3ways->min('d3w'); $this->min['d3w'] = $record->odds_3ways->min('d3w');
$this->min['a3w'] = $record->odds_3ways->min('a3w'); $this->min['a3w'] = $record->odds_3ways->min('a3w');
// $record->odds_3ways = $record->odds_3ways->filter(function (int $value, int $key) {
// return in_array($this->bookmakers['bookmaker'], $value['bookmaker_id']);
// });
} }
public function getAct() public function getAct()
+1 -3
View File
@@ -20,8 +20,6 @@ class Column3wayHt 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;
@@ -29,7 +27,7 @@ class Column3wayHt extends Column
public function getBookmaker(): ?array public function getBookmaker(): ?array
{ {
return $this->bookmakers; return $this->bookmakers['bookmaker'] ?? [];
} }
public function loadData($record) public function loadData($record)
+1 -3
View File
@@ -20,8 +20,6 @@ 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;
@@ -29,7 +27,7 @@ class ColumnDc extends Column
public function getBookmaker(): ?array public function getBookmaker(): ?array
{ {
return $this->bookmakers; return $this->bookmakers['bookmaker'] ?? [];
} }
public function loadData($record) public function loadData($record)
+1 -3
View File
@@ -20,8 +20,6 @@ class ColumnDnb 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;
@@ -29,7 +27,7 @@ class ColumnDnb extends Column
public function getBookmaker(): ?array public function getBookmaker(): ?array
{ {
return $this->bookmakers; return $this->bookmakers['bookmaker'] ?? [];
} }
public function loadData($record) public function loadData($record)
+1 -3
View File
@@ -20,8 +20,6 @@ class ColumnGgng 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;
@@ -29,7 +27,7 @@ class ColumnGgng extends Column
public function getBookmaker(): ?array public function getBookmaker(): ?array
{ {
return $this->bookmakers; return $this->bookmakers['bookmaker'] ?? [];
} }
public function loadData($record) public function loadData($record)
+1 -3
View File
@@ -20,8 +20,6 @@ class ColumnMl 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;
@@ -29,7 +27,7 @@ class ColumnMl extends Column
public function getBookmaker(): ?array public function getBookmaker(): ?array
{ {
return $this->bookmakers; return $this->bookmakers['bookmaker'] ?? [];
} }
public function loadData($record) public function loadData($record)
+1 -3
View File
@@ -20,8 +20,6 @@ class ColumnMlS1 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;
@@ -29,7 +27,7 @@ class ColumnMlS1 extends Column
public function getBookmaker(): ?array public function getBookmaker(): ?array
{ {
return $this->bookmakers; return $this->bookmakers['bookmaker'] ?? [];
} }
public function loadData($record) public function loadData($record)
+1 -3
View File
@@ -20,8 +20,6 @@ class ColumnPoint 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;
@@ -29,7 +27,7 @@ class ColumnPoint extends Column
public function getBookmaker(): ?array public function getBookmaker(): ?array
{ {
return $this->bookmakers; return $this->bookmakers['bookmaker'] ?? [];
} }
public function loadData($record) public function loadData($record)
@@ -20,8 +20,6 @@ class ColumnPointQ1 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;
@@ -29,7 +27,7 @@ class ColumnPointQ1 extends Column
public function getBookmaker(): ?array public function getBookmaker(): ?array
{ {
return $this->bookmakers; return $this->bookmakers['bookmaker'] ?? [];
} }
public function loadData($record) public function loadData($record)
+1 -3
View File
@@ -20,8 +20,6 @@ class ColumnTotal 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;
@@ -29,7 +27,7 @@ class ColumnTotal extends Column
public function getBookmaker(): ?array public function getBookmaker(): ?array
{ {
return $this->bookmakers; return $this->bookmakers['bookmaker'] ?? [];
} }
public function loadData($record) public function loadData($record)
@@ -20,8 +20,6 @@ class ColumnTotalHt 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;
@@ -29,7 +27,7 @@ class ColumnTotalHt extends Column
public function getBookmaker(): ?array public function getBookmaker(): ?array
{ {
return $this->bookmakers; return $this->bookmakers['bookmaker'] ?? [];
} }
public function loadData($record) public function loadData($record)
@@ -20,8 +20,6 @@ class ColumnTotalQ1 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;
@@ -29,7 +27,7 @@ class ColumnTotalQ1 extends Column
public function getBookmaker(): ?array public function getBookmaker(): ?array
{ {
return $this->bookmakers; return $this->bookmakers['bookmaker'] ?? [];
} }
public function loadData($record) public function loadData($record)
+1 -3
View File
@@ -20,8 +20,6 @@ class ColumnTq 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;
@@ -29,7 +27,7 @@ class ColumnTq extends Column
public function getBookmaker(): ?array public function getBookmaker(): ?array
{ {
return $this->bookmakers; return $this->bookmakers['bookmaker'] ?? [];
} }
public function loadData($record) public function loadData($record)
@@ -0,0 +1,25 @@
<?php
namespace App\Filament\Tables\Columns\Tools;
class Compare3way
{
public static function run($odds_3ways, $bookmakers)
{
return;
$maxrows = 4;
$count = 1;
$tmp = [];
dd($bookmakers);
foreach ($bookmakers as $bookmaker) {
$odds_3ways = $odds_3ways->filter(function ($odds_3ways, $bookmaker) {
if ($odds_3ways->contains('bookmaker_id', $bookmaker['bookmaker_id'])) {
return true;
}
return false;
});
}
}
}
+7
View File
@@ -52,4 +52,11 @@ class BettypeToggle extends Component
$this->dispatch('refreshBettypeMenu'); $this->dispatch('refreshBettypeMenu');
} }
public function toggleMultiline()
{
User::where('id', auth()->user()->id)->update(['is_multiline_direct' => DB::raw('!is_multiline_direct')]);
$this->dispatch('refreshBettypeMenu');
}
} }
+5
View File
@@ -32,6 +32,11 @@ class Odds3way extends Model
'oddchange_at', 'oddchange_at',
]; ];
public function comparing_bookmaker()
{
return $this->hasOne(ComparingBookmaker::class, 'bookmaker_id', 'bookmaker_id')->where('comparing_bookmakers.sport_id', auth()->user()->sport_id);
}
public function event() public function event()
{ {
return $this->belongsTo(Event::class); return $this->belongsTo(Event::class);
+2
View File
@@ -34,6 +34,8 @@ class User extends Authenticatable implements FilamentUser, HasAppAuthentication
'app_verified_at', 'app_verified_at',
'client_id', 'client_id',
'sport_id', 'sport_id',
'star',
'is_multiline_direct',
'bookmaker_id', 'bookmaker_id',
'provider_id', 'provider_id',
]; ];
@@ -26,6 +26,7 @@ return new class extends Migration
$table->text('app_authentication_recovery_codes')->nullable(); $table->text('app_authentication_recovery_codes')->nullable();
$table->boolean('has_email_authentication')->default(false); $table->boolean('has_email_authentication')->default(false);
$table->boolean('stars')->default(false); $table->boolean('stars')->default(false);
$table->boolean('is_multiline_direct')->default(false);
$table->timestamp('app_verified_at')->nullable(); $table->timestamp('app_verified_at')->nullable();
$table->rememberToken(); $table->rememberToken();
@@ -11,10 +11,42 @@
@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)
@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->dc1x,
'dec' => 2,
'has' => false,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->dc12,
'dec' => 2,
'has' => false,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->dcx2,
'dec' => 2,
'has' => false,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->margin,
'dec' => 1,
'has' => false,
])
@endif
@endforeach
@foreach ($getBookmaker() as $bookmaker_id) @foreach ($getBookmaker() as $bookmaker_id)
@foreach ($record->odds_dc as $item) @foreach ($record->odds_dc 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,
'icon' => $item->bookmaker->icon ?? '', 'icon' => $item->bookmaker->icon ?? '',
@@ -1,6 +1,6 @@
@php @php
$loadData($record); $loadData($record);
$act = $getAct(); $act = $getAct();
@endphp @endphp
@if ($hasData()) @if ($hasData())
@@ -11,10 +11,36 @@
@include('filament.tables.columns.multiline.label', ['labels' => ['H', 'A']]) @include('filament.tables.columns.multiline.label', ['labels' => ['H', 'A']])
@foreach ($record->odds_tq 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->htq,
'dec' => 2,
'has' => false,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->atq,
'dec' => 2,
'has' => false,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->margin,
'dec' => 1,
'has' => false,
])
@endif
@endforeach
@foreach ($getBookmaker() as $bookmaker_id) @foreach ($getBookmaker() as $bookmaker_id)
@foreach ($record->odds_tq as $item) @foreach ($record->odds_tq 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,
'icon' => $item->bookmaker->icon ?? '', 'icon' => $item->bookmaker->icon ?? '',
@@ -11,6 +11,39 @@
@include('filament.tables.columns.multiline.label', ['labels' => ['1', 'X', '2']]) @include('filament.tables.columns.multiline.label', ['labels' => ['1', 'X', '2']])
@foreach ($record->odds_3ways 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->h3w,
'dec' => 2,
'has' => false,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->d3w,
'dec' => 2,
'has' => false,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->a3w,
'dec' => 2,
'has' => false,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->margin,
'dec' => 1,
'has' => false,
])
@endif
@endforeach
@foreach ($getBookmaker() as $bookmaker_id) @foreach ($getBookmaker() as $bookmaker_id)
@foreach ($record->odds_3ways as $item) @foreach ($record->odds_3ways as $item)
@if ($item->bookmaker_id == $bookmaker_id) @if ($item->bookmaker_id == $bookmaker_id)
@@ -1,6 +1,6 @@
@php @php
$loadData($record); $loadData($record);
$act = $getAct(); $act = $getAct();
@endphp @endphp
@if ($hasData()) @if ($hasData())
@@ -11,10 +11,42 @@
@include('filament.tables.columns.multiline.label', ['labels' => ['1', 'X', '2']]) @include('filament.tables.columns.multiline.label', ['labels' => ['1', 'X', '2']])
@foreach ($record->odds_3ways_ht 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->h3w,
'dec' => 2,
'has' => false,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->d3w,
'dec' => 2,
'has' => false,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->a3w,
'dec' => 2,
'has' => false,
])
@include('filament.tables.columns.multiline.odds', [
'odd' => $item->margin,
'dec' => 1,
'has' => false,
])
@endif
@endforeach
@foreach ($getBookmaker() as $bookmaker_id) @foreach ($getBookmaker() as $bookmaker_id)
@foreach ($record->odds_3ways_ht as $item) @foreach ($record->odds_3ways_ht 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,
'icon' => $item->bookmaker->icon ?? '', 'icon' => $item->bookmaker->icon ?? '',
@@ -5,6 +5,12 @@
<div class="m-0 p-0">{{ $toggle['short'] }}</div> <div class="m-0 p-0">{{ $toggle['short'] }}</div>
</x-filament::button> </x-filament::button>
@endforeach @endforeach
<x-filament::button size="xs" outlined color="gray" wire:click="toggleStar" :color="auth()->user()->stars ? 'primary' : 'gray'" :icon="auth()->user()->stars ? 'phosphor-star-fill' : 'phosphor-star'"> <x-filament::button size="xs"
tooltip="
Toggle multiline between 'Comparing Bookmaker List' or 'Fixed Bookmaker'"
wire:click="toggleMultiline" :color="auth()->user()->is_multiline_direct ? 'primary' : 'gray'" icon='phosphor-list'>
</x-filament::button>
<x-filament::button size="xs" wire:click="toggleStar" :color="auth()->user()->stars ? 'primary' : 'gray'" :icon="auth()->user()->stars ? 'phosphor-star-fill' : 'phosphor-star'">
</x-filament::button> </x-filament::button>
</div> </div>