diff --git a/app/Filament/Resources/Clients/ClientResource.php b/app/Filament/Resources/Clients/ClientResource.php index 12ea7813..f53d567e 100644 --- a/app/Filament/Resources/Clients/ClientResource.php +++ b/app/Filament/Resources/Clients/ClientResource.php @@ -17,7 +17,7 @@ class ClientResource extends Resource protected static ?int $navigationSort = 32; - protected static string|\BackedEnum|null $navigationIcon = 'lucide-square-user'; + protected static string|\BackedEnum|null $navigationIcon = 'phosphor-baseball-helmet'; protected static ?string $cluster = AdministratorCluster::class; diff --git a/app/Filament/Resources/Events/Tables/EventsTable.php b/app/Filament/Resources/Events/Tables/EventsTable.php index b1686ee6..dadb745a 100644 --- a/app/Filament/Resources/Events/Tables/EventsTable.php +++ b/app/Filament/Resources/Events/Tables/EventsTable.php @@ -3,6 +3,7 @@ namespace App\Filament\Resources\Events\Tables; use App\Filament\Tables\Columns\Column3way; +use App\Filament\Tables\Columns\Column3wayHt; use App\Filament\Tables\Columns\ColumnDc; use App\Filament\Tables\Columns\ColumnDnb; use App\Filament\Tables\Columns\ColumnGgng; @@ -11,6 +12,7 @@ use App\Filament\Tables\Columns\ColumnMlS1; use App\Filament\Tables\Columns\ColumnPoint; use App\Filament\Tables\Columns\ColumnPointQ1; use App\Filament\Tables\Columns\ColumnTotal; +use App\Filament\Tables\Columns\ColumnTotalHt; use App\Filament\Tables\Columns\ColumnTotalQ1; use App\Filament\Tables\Columns\ColumnTq; use App\Filament\Tables\Columns\MatchIds; @@ -47,7 +49,12 @@ class EventsTable public static function load_multiline_bookmaker() { - $res = MultilineClient::with('multiline_setting')->where('client_id', auth()->user()->client_id)->where('sport_id', auth()->user()->sport_id)->select('bookmaker_id', 'multiline_setting_id')->orderBy('multiline_setting_id')->orderBy('sort')->get(); + $res = MultilineClient::with('multiline_setting') + ->where('client_id', auth()->user()->client_id) + ->where('sport_id', auth()->user()->sport_id) + ->select('bookmaker_id', 'multiline_setting_id') + ->orderBy('sort') + ->get(); foreach ($res as $value) { self::$multiline_gettype[$value->multiline_setting->table][] = $value->bookmaker_id; @@ -56,7 +63,10 @@ class EventsTable public static function load_bettype_settings() { - $res = BettypeUser::with('multiline_setting')->where('is_active', 1)->get(); + $res = BettypeUser::with('multiline_setting') + ->orderBy('multiline_setting_id') + ->where('is_active', 1) + ->get(); foreach ($res as $value) { self::$bettype_settings[] = $value->multiline_setting->table; @@ -107,6 +117,7 @@ class EventsTable TextColumn::make('away.name') ->wrap() ->searchable(), + ColumnMl::make('odds_2ways')->bookmakers(self::$multiline_gettype['odds_2ways'] ?? []) ->visible(fn () => in_array('odds_2ways', self::$bettype_settings)) ->verticalAlignment(VerticalAlignment::Start) @@ -125,8 +136,16 @@ class EventsTable ->visible(fn () => in_array('odds_3ways', self::$bettype_settings)) ->verticalAlignment(VerticalAlignment::Start) ->width(225) + ->alignCenter() ->label('1X2'), + Column3wayHt::make('odds_3ways_ht')->bookmakers(self::$multiline_gettype['odds_3ways_ht'] ?? []) + ->visible(fn () => in_array('odds_3ways_ht', self::$bettype_settings)) + ->verticalAlignment(VerticalAlignment::Start) + ->alignCenter() + ->width(225) + ->label('1X2 HT'), + ColumnTotal::make('odds_totals')->bookmakers(self::$multiline_gettype['odds_totals'] ?? []) ->visible(fn () => in_array('odds_totals', self::$bettype_settings)) ->verticalAlignment(VerticalAlignment::Start) @@ -134,6 +153,13 @@ class EventsTable ->width(225) ->label('Totals'), + ColumnTotalHt::make('odds_totals_ht')->bookmakers(self::$multiline_gettype['odds_totals_ht'] ?? []) + ->visible(fn () => in_array('odds_totals_ht', self::$bettype_settings)) + ->verticalAlignment(VerticalAlignment::Start) + ->alignCenter() + ->width(225) + ->label('Totals HT'), + ColumnTotalQ1::make('odds_totals_q1')->bookmakers(self::$multiline_gettype['odds_totals_q1'] ?? []) ->visible(fn () => in_array('odds_totals_q1', self::$bettype_settings)) ->verticalAlignment(VerticalAlignment::Start) @@ -191,7 +217,7 @@ class EventsTable ->schema([ Select::make(name: 'country_id') ->placeholder('Country') - ->columnSpan(2) + ->columnSpan(4) ->hiddenLabel() ->label('') ->searchable() @@ -211,7 +237,7 @@ class EventsTable ->hiddenLabel() ->label('') ->multiple() - ->columnSpan(3) + ->columnSpan(6) ->searchable() ->options(function (Get $get) { if ($get('country_id')) { @@ -229,7 +255,7 @@ class EventsTable }) ->live(), DateRangePicker::make('starttime_period') - ->columnSpan(4) + ->columnSpan(8) ->startPrefix('From') ->displayFormat('d M Y') ->minDate(now()) @@ -279,7 +305,7 @@ class EventsTable } ); }) - ->columns(12)->columnSpan(12), + ->columns(19)->columnSpan(19), ], layout: FiltersLayout::AboveContent) ->filtersFormColumns(6) ->deferFilters(false) diff --git a/app/Filament/Tables/Columns/Column3wayHt.php b/app/Filament/Tables/Columns/Column3wayHt.php new file mode 100644 index 00000000..b50862c1 --- /dev/null +++ b/app/Filament/Tables/Columns/Column3wayHt.php @@ -0,0 +1,73 @@ +user()->bookmaker_id); + + $this->bookmakers = $bookmakers; + + return $this; + } + + public function getBookmaker(): ?array + { + return $this->bookmakers; + } + + public function loadData($record) + { + $this->has_data = count($record->odds_3ways_ht) ? true : false; + + $this->act = $record->odds_3ways_ht->where('bookmaker_id', auth()->user()->bookmaker_id)->first(); + + $this->max['h3w'] = $record->odds_3ways_ht->max('h3w'); + + $this->max['d3w'] = $record->odds_3ways_ht->max('d3w'); + + $this->max['a3w'] = $record->odds_3ways_ht->max('a3w'); + + $this->min['h3w'] = $record->odds_3ways_ht->min('h3w'); + + $this->min['d3w'] = $record->odds_3ways_ht->min('d3w'); + + $this->min['a3w'] = $record->odds_3ways_ht->min('a3w'); + } + + public function getAct() + { + return $this->act; + } + + public function getMax() + { + return $this->max; + } + + public function getMin() + { + return $this->min; + } + + public function hasData() + { + return $this->has_data; + } +} diff --git a/app/Filament/Tables/Columns/ColumnTotalHt.php b/app/Filament/Tables/Columns/ColumnTotalHt.php new file mode 100644 index 00000000..68c075ba --- /dev/null +++ b/app/Filament/Tables/Columns/ColumnTotalHt.php @@ -0,0 +1,70 @@ +user()->bookmaker_id); + + $this->bookmakers = $bookmakers; + + return $this; + } + + public function getBookmaker(): ?array + { + return $this->bookmakers; + } + + public function loadData($record) + { + $this->has_data = count($record->odds_totals_ht) ? true : false; + + $this->act = $record->odds_totals_ht->where('bookmaker_id', auth()->user()->bookmaker_id)->first(); + + $this->max['over'] = $record->odds_totals_ht->max('over'); + + $this->max['under'] = $record->odds_totals_ht->max('under'); + + $this->min['over'] = $record->odds_totals_ht->min('over'); + + $this->min['under'] = $record->odds_totals_ht->min('under'); + + } + + public function getAct() + { + return $this->act; + } + + public function getMax() + { + return $this->max; + } + + public function getMin() + { + return $this->min; + } + + public function hasData() + { + return $this->has_data; + } +} diff --git a/app/Livewire/BettypeToggle.php b/app/Livewire/BettypeToggle.php index 6f02a5ab..cbcf298f 100644 --- a/app/Livewire/BettypeToggle.php +++ b/app/Livewire/BettypeToggle.php @@ -8,7 +8,7 @@ use Livewire\Component; class BettypeToggle extends Component { - public $multilines = []; + public $bettype_toggles = []; protected $listeners = [ 'refreshBettypeMenu' => '$refresh', @@ -16,15 +16,18 @@ class BettypeToggle extends Component public function boot() { - $this->multilines = []; + $this->bettype_toggles = []; - $res = BettypeUser::with('multiline_setting')->get(); + $res = BettypeUser::with('multiline_setting') + ->orderBy('multiline_setting_id') + ->get(); foreach ($res as $set) { - $this->multilines[] = [ + $this->bettype_toggles[] = [ 'id' => $set->multiline_setting_id, 'name' => $set->multiline_setting->name, 'short' => $set->multiline_setting->short, + 'matchpart' => $set->multiline_setting->matchpart, 'is_active' => $set->is_active, ]; } diff --git a/app/Livewire/KontoSwitcher.php b/app/Livewire/KontoSwitcher.php new file mode 100644 index 00000000..4c4f2e75 --- /dev/null +++ b/app/Livewire/KontoSwitcher.php @@ -0,0 +1,37 @@ +clients = Client::where('id', '!=', auth()->user()->client_id)->pluck('name', 'id')->all(); + } + + public function swopClient($client_id) + { + $providers = Client::where('id', $client_id)->pluck('provider')->first(); + + $provider_id = array_shift($providers); + + $bookmakers = Client::where('id', $client_id)->pluck('bookmaker')->first(); + + $bookmaker_id = array_shift($bookmakers); + + User::where('id', auth()->user()->id)->update(['sport_id' => 1, 'provider_id' => $provider_id, 'bookmaker_id' => $bookmaker_id, 'client_id' => $client_id]); + + $this->js('window.location.reload()'); + } + + public function render() + { + return view('livewire.konto-switcher'); + } +} diff --git a/app/Livewire/SportSwitcher.php b/app/Livewire/SportSwitcher.php new file mode 100644 index 00000000..0f54d13c --- /dev/null +++ b/app/Livewire/SportSwitcher.php @@ -0,0 +1,47 @@ +user()->client_id)->pluck('sport')->first(); + + $this->sports = Sport::whereIn('id', $cps)->pluck('name', 'id'); + + $this->sporticon = Sport::where('id', auth()->user()->sport_id)->pluck('icon')->first(); + + $this->iconcolor = Sport::where('id', auth()->user()->sport_id)->pluck('color')->first(); + + $this->sport_id = auth()->user()->sport_id; + + } + + public function swopSport() + { + User::where('id', auth()->user()->id)->update(['sport_id' => $this->sport_id]); + + $this->dispatch('clear_filters'); + + $this->js('window.location.reload()'); + } + + public function render() + { + return view('livewire.sport-switcher'); + } +} diff --git a/app/Livewire/TopMenuItems.php b/app/Livewire/TopMenuItems.php index 57a9620d..fd51157f 100644 --- a/app/Livewire/TopMenuItems.php +++ b/app/Livewire/TopMenuItems.php @@ -2,26 +2,12 @@ namespace App\Livewire; -use App\Models\Client; -use App\Models\Sport; use App\Models\User; use Illuminate\Support\Facades\Route; use Livewire\Component; class TopMenuItems extends Component { - public $clients = []; - - public ?string $client = ''; - - public $sports = []; - - public $sport_id = 0; - - public $sporticon = ''; - - public $iconcolor = ''; - public $current = ''; protected $listeners = [ @@ -31,20 +17,6 @@ class TopMenuItems extends Component public function mount() { - $cps = Client::where('id', auth()->user()->client_id)->pluck('sport')->first(); - - $this->sports = Sport::whereIn('id', $cps)->pluck('name', 'id'); - - $this->sporticon = Sport::where('id', auth()->user()->sport_id)->pluck('icon')->first(); - - $this->iconcolor = Sport::where('id', auth()->user()->sport_id)->pluck('color')->first(); - - $this->sport_id = auth()->user()->sport_id; - - $this->clients = Client::pluck('name', 'id')->all(); - - $this->client = Client::where('id', auth()->user()->client_id)->pluck('name')->first(); - $this->current = Route::currentRouteName(); } @@ -53,21 +25,6 @@ class TopMenuItems extends Component return view('livewire.top-menu-items'); } - public function swop($client_id) - { - $providers = Client::where('id', $client_id)->pluck('provider')->first(); - - $provider_id = array_shift($providers); - - $bookmakers = Client::where('id', $client_id)->pluck('bookmaker')->first(); - - $bookmaker_id = array_shift($bookmakers); - - User::where('id', auth()->user()->id)->update(['sport_id' => 1, 'provider_id' => $provider_id, 'bookmaker_id' => $bookmaker_id, 'client_id' => $client_id]); - - $this->js('window.location.reload()'); - } - public function swopBookmaker($bookmaker_id) { User::where('id', auth()->user()->id)->update(['bookmaker_id' => $bookmaker_id]); @@ -81,11 +38,4 @@ class TopMenuItems extends Component $this->dispatch('reload_data_right'); } - - public function swopSport() - { - User::where('id', auth()->user()->id)->update(['sport_id' => $this->sport_id]); - - $this->js('window.location.reload()'); - } } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index cd52a7fd..7dc86b62 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -28,6 +28,17 @@ class AppServiceProvider extends ServiceProvider */ public function boot(): void { + FilamentView::registerRenderHook( + PanelsRenderHook::USER_MENU_PROFILE_AFTER, + fn (): string => Blade::render('@livewire(\'konto-switcher\')'), + ); + FilamentView::registerRenderHook( + TablesRenderHook::TOOLBAR_SEARCH_BEFORE, + fn (): string => Blade::render('@livewire(\'sport-switcher\')'), + scopes: [ + ListEvents::class, + ] + ); FilamentView::registerRenderHook( TablesRenderHook::TOOLBAR_SEARCH_AFTER, fn (): string => Blade::render('@livewire(\'bettype-toggle\')'), @@ -35,9 +46,8 @@ class AppServiceProvider extends ServiceProvider ListEvents::class, ] ); - // GLOBAL_SEARCH_BEFORE FilamentView::registerRenderHook( - PanelsRenderHook::TOPBAR_LOGO_AFTER, + PanelsRenderHook::GLOBAL_SEARCH_BEFORE, fn (): string => Blade::render('@livewire(\'top-menu-items\')') // fn (): string => auth()->user()->hasRole('konto_switch') ? Blade::render('@livewire(\'konto-switch\')') : false ); diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php index 1d1e9b04..136c1235 100644 --- a/app/Providers/Filament/AdminPanelProvider.php +++ b/app/Providers/Filament/AdminPanelProvider.php @@ -3,9 +3,9 @@ namespace App\Providers\Filament; use Agencetwogether\HooksHelper\HooksHelperPlugin; -use BezhanSalleh\FilamentShield\FilamentShieldPlugin; use Awcodes\LightSwitch\Enums\Alignment; use Awcodes\LightSwitch\LightSwitchPlugin; +use BezhanSalleh\FilamentShield\FilamentShieldPlugin; use Filament\Actions\Action; use Filament\Auth\MultiFactor\App\AppAuthentication; use Filament\Auth\MultiFactor\Email\EmailAuthentication; diff --git a/database/migrations/2025_12_14_090816_create_multiline_settings_table.php b/database/migrations/2025_12_14_090816_create_multiline_settings_table.php index 8f99d816..e3d929f8 100644 --- a/database/migrations/2025_12_14_090816_create_multiline_settings_table.php +++ b/database/migrations/2025_12_14_090816_create_multiline_settings_table.php @@ -17,6 +17,7 @@ return new class extends Migration $table->string('name'); $table->string('short'); $table->string('table'); + $table->string('matchpart'); $table->integer('rows')->default(4); $table->integer('has_3_columns')->default(0); $table->timestamps(); diff --git a/database/seeders/MatchpartSeeder.php b/database/seeders/MatchpartSeeder.php index f7b988a2..f3553380 100644 --- a/database/seeders/MatchpartSeeder.php +++ b/database/seeders/MatchpartSeeder.php @@ -12,24 +12,33 @@ class MatchpartSeeder extends Seeder /** * Clients */ - $sql = "INSERT INTO `matchparts` (`id`, `short`, `name`, `color`, `is_active`, `soccer`, `icehockey`, `basketball`, `tennis`, `handball`, `rugby`, `created_at`, `updated_at`) + $sql = "INSERT INTO `multiline_settings` (`id`, `sport_id`, `name`, `short`, `table`, `matchpart`, `rows`, `has_3_columns`, `created_at`, `updated_at`) VALUES - ('1', 'FT', 'Fulltime', 'primary', '1', '1', '1', '1', '1', '1', '0', NULL, NULL), - ('2', 'HT', 'Halftime', 'success', '1', '1', '0', '1', '0', '1', '0', NULL, NULL), - ('3', 'H2', 'Second Half', 'warning', '1', '1', '0', '1', '0', '1', '0', NULL, NULL), - ('4', 'CO', 'Combo', 'info', '1', '1', '1', '1', '0', '0', '0', NULL, NULL), - ('5', 'Q1', 'Quarter 1', 'quarter', '1', '0', '0', '1', '0', '0', '0', NULL, NULL), - ('6', 'Q2', 'Quarter 2', 'quarter', '0', '0', '0', '1', '0', '0', '0', NULL, NULL), - ('7', 'Q3', 'Quarter 3', 'quarter', '0', '0', '0', '1', '0', '0', '0', NULL, NULL), - ('8', 'Q4', 'Quarter 4', 'quarter', '0', '0', '0', '1', '0', '0', '0', NULL, NULL), - ('9', 'P1', 'Period 1', 'period', '1', '0', '1', '0', '0', '0', '0', NULL, NULL), - ('10', 'P2', 'Period 2', 'period', '0', '0', '1', '0', '0', '0', '0', NULL, NULL), - ('11', 'P3', 'Period 3', 'period', '0', '0', '1', '0', '0', '0', '0', NULL, NULL), - ('12', 'S1', 'Set 1', 'set', '1', '0', '0', '0', '1', '0', '0', NULL, NULL), - ('13', 'S2', 'Set 2', 'set', '0', '0', '0', '0', '1', '0', '0', NULL, NULL), - ('14', 'S3', 'Set 3', 'set', '0', '0', '0', '0', '1', '0', '0', NULL, NULL), - ('15', 'S4', 'Set 4', 'set', '0', '0', '0', '0', '1', '0', '0', NULL, NULL), - ('16', 'S5', 'Set 5', 'set', '0', '0', '0', '0', '1', '0', '0', NULL, NULL); + (1, 1, '1X2', '1X2', 'odds_3ways', 'Fulltime', 4, 1, '2025-12-14 09:25:48', '2025-12-14 09:25:48'), + (2, 1, 'TOTALS', 'OU', 'odds_totals', 'Fulltime', 4, 1, '2025-12-14 09:32:38', '2025-12-14 09:32:38'), + (3, 1, '1X2 HALF TIME', '1X2 HT', 'odds_3ways_ht', 'Halftime', 4, 1, '2025-12-14 09:25:48', '2025-12-14 09:25:48'), + (4, 1, 'TOTALS HALF TIME', 'OU HT', 'odds_totals_ht', 'Halftime', 4, 1, '2025-12-14 09:32:38', '2025-12-14 09:32:38'), + (5, 1, 'GOAL NO GOAL', 'GGNG', 'odds_ggng', 'Fulltime', 4, 0, '2025-12-14 09:31:56', '2025-12-14 09:31:56'), + (6, 1, 'DOUBLE CHANCE', 'DC', 'odds_dc', 'Fulltime', 4, 1, '2025-12-14 09:31:22', '2025-12-14 09:32:55'), + (7, 1, 'TO QUALIFY', 'TQ', 'odds_tq', 'Fulltime', 4, 0, '2025-12-14 09:32:19', '2025-12-14 09:32:19'), + (8, 1, 'DRAW NO BET', 'DNB', 'odds_dnb', 'Fulltime', 4, 0, '2025-12-14 09:31:42', '2025-12-14 09:31:42'), + (9, 2, '1X2', '1X2', 'odds_3ways', 'Fulltime', 4, 1, '2025-12-14 09:41:34', '2025-12-14 09:41:34'), + (10, 2, 'MONEY LINE', 'ML', 'odds_2ways', 'Fulltime', 4, 0, '2025-12-14 09:41:21', '2025-12-14 09:41:21'), + (11, 2, 'POINTS', 'HC', 'odds_points', 'Fulltime', 4, 1, '2025-12-14 09:41:56', '2025-12-14 09:41:56'), + (12, 2, 'TOTALS', 'OU', 'odds_totals', 'Fulltime', 4, 1, '2025-12-14 09:42:13', '2025-12-14 09:42:13'), + (13, 2, 'POINTS FIRST QUARTER', 'HC Q1', 'odds_points_q1', 'First Quarter', 4, 1, '2025-12-14 09:41:56', '2025-12-14 09:41:56'), + (14, 2, 'TOTALS FIRST QUARTER', 'OU Q1', 'odds_totals_q1', 'First Quarter', 4, 1, '2025-12-14 09:42:13', '2025-12-14 09:42:13'), + (15, 3, 'MONEY LINE', 'ML', 'odds_2ways', 'Fulltime', 4, 0, '2025-12-14 09:37:32', '2025-12-14 09:37:32'), + (16, 3, 'POINTS', 'HC', 'odds_points', 'Fulltime', 4, 1, '2025-12-14 09:38:05', '2025-12-14 09:38:05'), + (17, 3, 'TOTALS', 'OU', 'odds_totals', 'Fulltime', 4, 1, '2025-12-14 09:38:44', '2025-12-14 09:38:44'), + (18, 3, 'POINTS FIRST QUARTER', 'HC Q1', 'odds_points_q1', 'First Quarter', 4, 1, '2025-12-14 09:38:26', '2025-12-14 09:39:54'), + (19, 3, 'TOTALS FIRST QUARTER', 'OU Q1', 'odds_totals_q1', 'First Quarter', 4, 1, '2025-12-14 09:39:12', '2025-12-14 09:39:59'), + (20, 3, 'POINTS HALF TIME', 'HC HT', 'odds_points_ht', 'Halftime', 4, 1, '2025-12-14 09:38:26', '2025-12-14 09:39:54'), + (21, 3, 'TOTALS HALF TIME', 'OU HT', 'odds_totals_ht', 'Halftime', 4, 1, '2025-12-14 09:39:12', '2025-12-14 09:39:59'), + (22, 5, 'MONEY LINE', 'ML', 'odds_2ways', 'Fulltime', 4, 0, '2025-12-14 09:43:52', '2025-12-14 09:43:52'), + (23, 5, 'MONEY LINE SET 1', 'ML S1', 'odds_2ways_s1', 'Set 1', 4, 0, '2025-12-14 09:44:13', '2025-12-14 09:44:13'), + (24, 5, 'TOTALS', 'OU', 'odds_totals', 'Fulltime', 4, 1, '2025-12-14 09:44:26', '2025-12-14 09:44:26'), + (25, 5, 'POINTS', 'HC', 'odds_points', 'Fulltime', 4, 1, '2025-12-14 09:44:26', '2025-12-14 09:44:26'); "; DB::unprepared($sql); diff --git a/resources/views/filament/tables/columns/column-total-ht.blade.php b/resources/views/filament/tables/columns/column-total-ht.blade.php new file mode 100644 index 00000000..ea924271 --- /dev/null +++ b/resources/views/filament/tables/columns/column-total-ht.blade.php @@ -0,0 +1,50 @@ +@php + $loadData($record); +@endphp + +@if ($hasData()) + + @include('filament.tables.columns.fumetto.fumetto_total_ht') + +
+ + @include('filament.tables.columns.multiline.label', ['labels' => ['O', 'U', 'T']]) + + @foreach ($getBookmaker() as $bookmaker_id) + @foreach ($record->odds_totals_ht as $item) + @if ($item->bookmaker_id == $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->over, + 'dec' => 2, + 'hig' => isset($act['over']) && $item->over >= $act['over'] ? 1 : 0, + 'has' => isset($act['over']) && $item->bookmaker_id != auth()->user()->bookmaker_id, + ]) + + @include('filament.tables.columns.multiline.odds', [ + 'odd' => $item->under, + 'dec' => 2, + 'hig' => isset($act['under']) && $item->under >= $act['under'] ? 1 : 0, + 'has' => isset($act['under']) && $item->bookmaker_id != auth()->user()->bookmaker_id, + ]) + + @include('filament.tables.columns.multiline.odds', [ + 'odd' => $item->total, + 'dec' => 1, + 'has' => false, + ]) + + @include('filament.tables.columns.multiline.odds', [ + 'odd' => $item->margin, + 'dec' => 1, + 'has' => false, + ]) + @endif + @endforeach + @endforeach +
+@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 new file mode 100644 index 00000000..e386c406 --- /dev/null +++ b/resources/views/filament/tables/columns/column_3way_ht.blade.php @@ -0,0 +1,55 @@ +@php + $loadData($record); +@endphp + +@if ($hasData()) + + @include('filament.tables.columns.fumetto.fumetto_1x2_ht') + +
+ + @include('filament.tables.columns.multiline.label', ['labels' => ['1', 'X', '2']]) + + @php + $act = $getAct(); + @endphp + + @foreach ($getBookmaker() as $bookmaker_id) + @foreach ($record->odds_3ways_ht as $item) + @if ($item->bookmaker_id == $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, + 'hig' => isset($act['h3w']) && $item->h3w >= $act['h3w'] ? 1 : 0, + 'has' => isset($act['h3w']) && $item->bookmaker_id != auth()->user()->bookmaker_id, + ]) + + @include('filament.tables.columns.multiline.odds', [ + 'odd' => $item->d3w, + 'dec' => 2, + 'hig' => isset($act['d3w']) && $item->d3w >= $act['d3w'] ? 1 : 0, + 'has' => isset($act['d3w']) && $item->bookmaker_id != auth()->user()->bookmaker_id, + ]) + + @include('filament.tables.columns.multiline.odds', [ + 'odd' => $item->a3w, + 'dec' => 2, + 'hig' => isset($act['a3w']) && $item->a3w >= $act['a3w'] ? 1 : 0, + 'has' => isset($act['a3w']) && $item->bookmaker_id != auth()->user()->bookmaker_id, + ]) + + @include('filament.tables.columns.multiline.odds', [ + 'odd' => $item->margin, + 'dec' => 1, + 'has' => false, + ]) + @endif + @endforeach + @endforeach +
+@endif diff --git a/resources/views/filament/tables/columns/fumetto/fumetto_1x2_ht.blade.php b/resources/views/filament/tables/columns/fumetto/fumetto_1x2_ht.blade.php new file mode 100644 index 00000000..18233380 --- /dev/null +++ b/resources/views/filament/tables/columns/fumetto/fumetto_1x2_ht.blade.php @@ -0,0 +1,59 @@ +@if ($hasData()) +
+ + + +
+@endif diff --git a/resources/views/filament/tables/columns/fumetto/fumetto_total_ht.blade.php b/resources/views/filament/tables/columns/fumetto/fumetto_total_ht.blade.php new file mode 100644 index 00000000..dbbdaf3e --- /dev/null +++ b/resources/views/filament/tables/columns/fumetto/fumetto_total_ht.blade.php @@ -0,0 +1,58 @@ +@if ($hasData()) +
+ + + +
+@endif diff --git a/resources/views/livewire/bettype-toggle.blade.php b/resources/views/livewire/bettype-toggle.blade.php index d7974c08..86d2d1a9 100644 --- a/resources/views/livewire/bettype-toggle.blade.php +++ b/resources/views/livewire/bettype-toggle.blade.php @@ -1,7 +1,9 @@
- @foreach ($multilines as $multiline) - - {{ $multiline['short'] }} + @foreach ($bettype_toggles as $toggle) + +
{{ $toggle['short'] }}
+ {{--
{{ $toggle['matchpart'] }}
--}} +
@endforeach
diff --git a/resources/views/livewire/konto-switcher.blade.php b/resources/views/livewire/konto-switcher.blade.php new file mode 100644 index 00000000..ecf2ad53 --- /dev/null +++ b/resources/views/livewire/konto-switcher.blade.php @@ -0,0 +1,20 @@ +
+ @if (auth()->user()->hasRole('konto_switch')) + + + + Swop Client + + + + + @foreach ($clients as $id => $name) + + {{ $name }} + + @endforeach + + + @endif +
diff --git a/resources/views/livewire/sport-switcher.blade.php b/resources/views/livewire/sport-switcher.blade.php new file mode 100644 index 00000000..5deffb42 --- /dev/null +++ b/resources/views/livewire/sport-switcher.blade.php @@ -0,0 +1,9 @@ +
+ + + @foreach ($sports as $id => $name) + + @endforeach + + +
diff --git a/resources/views/livewire/top-menu-items.blade.php b/resources/views/livewire/top-menu-items.blade.php index af41bad0..71e0ab6d 100644 --- a/resources/views/livewire/top-menu-items.blade.php +++ b/resources/views/livewire/top-menu-items.blade.php @@ -60,23 +60,13 @@ - {{-- Swop Sport --}} - - - @foreach ($sports as $id => $name) - - @endforeach - - - - {{-- Event Mapper --}} - - Event Mapper + @@ -168,8 +158,7 @@ - - Settings + @@ -249,24 +238,4 @@ @endif - - @if (auth()->user()->hasRole('konto_switch')) - - - - {{ $client }} - - - - - @foreach ($clients as $id => $name) - @if ($name != $client) - - {{ $name }} - - @endif - @endforeach - - - @endif