diff --git a/app/Console/Commands/Grapper/TxOdds/Odds.php b/app/Console/Commands/Grapper/TxOdds/Odds.php index 1df6ea91..840843b5 100644 --- a/app/Console/Commands/Grapper/TxOdds/Odds.php +++ b/app/Console/Commands/Grapper/TxOdds/Odds.php @@ -237,7 +237,10 @@ class Odds 'competition_group_id' => (int) $row->group['cgid'], ]; - Event::firstOrCreate(['id' => (int) $row['id']], $event); + $res = Event::firstOrCreate(['id' => (int) $row['id']], $event); + if ($res) { + $event_id = $res->id; + } $group = [ 'competition_group_id' => (string) $row->group['cgid'], diff --git a/app/Filament/Resources/Events/Pages/ListEvents.php b/app/Filament/Resources/Events/Pages/ListEvents.php index 77aeb6c9..bbb56642 100644 --- a/app/Filament/Resources/Events/Pages/ListEvents.php +++ b/app/Filament/Resources/Events/Pages/ListEvents.php @@ -14,7 +14,6 @@ class ListEvents extends ListRecords protected string|Width|null $maxContentWidth = Width::Full; protected $listeners = [ - 'refreshBettypeMenu' => '$refresh', 'filterClearFilter' => 'clearFilters', 'filterUpdateGreen' => 'updateTableFiltersGreen', 'filterUpdateYellow' => 'updateTableFiltersYellow', @@ -22,7 +21,6 @@ class ListEvents extends ListRecords 'filterUpdatePeriode' => 'updateTablePeriode', 'filterStarFilter' => 'updateStar', 'filterNoteFilter' => 'updateNote', - 'filterNotificationFilter' => 'updateNotification', ]; protected function getHeaderWidgets(): array @@ -34,11 +32,10 @@ class ListEvents extends ListRecords public function clearFilters(): void { + foreach ($this->tableFilters['events'] as $key => $value) { + $this->tableFilters['events'][$key] = null; + } $this->removeTableFilters(); - - // $this->dispatch('refreshMapperLeft'); - - // $this->dispatch('refreshMapperRight'); } public function updateCompareDifferences(): void diff --git a/app/Filament/Resources/Events/Tables/EventsTable.php b/app/Filament/Resources/Events/Tables/EventsTable.php index 1e9b8111..c2996b78 100644 --- a/app/Filament/Resources/Events/Tables/EventsTable.php +++ b/app/Filament/Resources/Events/Tables/EventsTable.php @@ -185,7 +185,6 @@ class EventsTable Hidden::make('filter_alarm_red'), Hidden::make('filter_stars'), Hidden::make('filter_notes'), - Hidden::make('filter_notification'), Hidden::make('filter_periode'), Select::make(name: 'country_id') ->hidden(fn () => auth()->user()->sport_id == 5) @@ -447,24 +446,24 @@ class EventsTable if ($data['country_id'] ?? null) { $countries = Country::whereIn('id', $data['country_id'])->pluck('name')->toArray(); if (count($countries) > 1) { - $indicators[] = Indicator::make('Countries: '.implode(', ', $countries))->removeField('country_id')->color('info'); + $indicators[] = Indicator::make('Countries: '.implode(', ', $countries))->removeField('country_id')->color('warning'); } else { - $indicators[] = Indicator::make('Country: '.$countries[0])->removeField('country_id')->color('info'); + $indicators[] = Indicator::make('Country: '.$countries[0])->removeField('country_id')->color('warning'); } } if ($data['group_id'] ?? null) { $group_ids = Group::whereIn('id', $data['group_id'])->pluck('name')->toArray(); if (count($group_ids) > 1) { - $indicators[] = Indicator::make('Tournament: '.implode(', ', $group_ids))->removeField('group_id')->color('info'); + $indicators[] = Indicator::make('Tournament: '.implode(', ', $group_ids))->removeField('group_id')->color('warning'); } else { - $indicators[] = Indicator::make('Tournaments: '.$group_ids[0])->removeField('group_id')->color('info'); + $indicators[] = Indicator::make('Tournaments: '.$group_ids[0])->removeField('group_id')->color('warning'); } } if ($data['client_group_list_id'] ?? null) { $client_group_list_name = ClientGroupList::where('id', $data['client_group_list_id'])->value('name'); - $indicators[] = Indicator::make('Custom Group: '.$client_group_list_name)->removeField('client_group_list_id')->color('info'); + $indicators[] = Indicator::make('Custom Group: '.$client_group_list_name)->removeField('client_group_list_id')->color('warning'); } if ($data['filter_stars'] ?? null) { @@ -472,14 +471,14 @@ class EventsTable } if (in_array('odds_tq', self::$bettype_settings)) { - $indicators[] = Indicator::make('To Qualify')->color('away')->removable(false); + $indicators[] = Indicator::make('To Qualify')->color('info')->removable(false); } if (auth()->user()->all_only_none == 1) { - $indicators[] = Indicator::make('Only events with '.auth()->user()->bookmaker->name)->color('away')->removable(false); + $indicators[] = Indicator::make('With '.auth()->user()->bookmaker->name)->color('info')->removable(false); } if (auth()->user()->all_only_none == 2) { - $indicators[] = Indicator::make('Only events without '.auth()->user()->bookmaker->name)->color('away')->removable(false); + $indicators[] = Indicator::make('Without '.auth()->user()->bookmaker->name)->color('info')->removable(false); } if (auth()->user()->partner_show == 1) { @@ -490,17 +489,13 @@ class EventsTable } if (auth()->user()->bookmaker_partner_differences == 1) { - $indicators[] = Indicator::make('Different events '.auth()->user()->bookmaker->name.' vs '.auth()->user()->partnerbookmaker->name)->color('home')->removable(false); + $indicators[] = Indicator::make('Different events '.auth()->user()->bookmaker->name.' vs '.auth()->user()->partnerbookmaker->name)->color('info')->removable(false); } if ($data['filter_notes'] ?? null) { $indicators[] = Indicator::make('Notes')->removeField('filter_notes')->color('info'); } - if ($data['filter_notification'] ?? null) { - $indicators[] = Indicator::make('Notifications')->removeField('filter_notification')->color('home'); - } - if ($data['filter_alarm_green'] ?? null) { $title = OddsTable::where('name', $data['filter_alarm_green'])->value('title'); $indicators[] = Indicator::make('Alarms: '.$title)->removeField('filter_alarm_green')->color('success'); @@ -526,32 +521,32 @@ class EventsTable $text .= ' To '.Carbon::parse($span['end'])->toFormattedDateString(); } if ($text) { - $indicators[] = Indicator::make($text)->removeField('starttime_period.start')->color('info'); + $indicators[] = Indicator::make($text)->removeField('starttime_period.start')->color('warning'); } } if ($data['competition_group_id'] ?? null) { $competition_groups = CompetitionGroup::whereIn('id', $data['competition_group_id'])->pluck('name')->toArray(); if (count($competition_groups) > 1) { - $indicators[] = Indicator::make('Leagues: '.implode(', ', $competition_groups))->removeField('competition_group_id')->color('info'); + $indicators[] = Indicator::make('Leagues: '.implode(', ', $competition_groups))->removeField('competition_group_id')->color('warning'); } else { - $indicators[] = Indicator::make('League: '.$competition_groups[0])->removeField('competition_group_id')->color('info')->color('info'); + $indicators[] = Indicator::make('League: '.$competition_groups[0])->removeField('competition_group_id')->color('info')->color('warning'); } } if ($data['favorit_threshold'] ?? null) { switch (auth()->user()->sport_id) { case 1: - $indicators[] = Indicator::make('1X2 Fav <= '.$data['favorit_threshold'])->removeField('favorit_threshold')->color('info'); + $indicators[] = Indicator::make('1X2 Fav <= '.$data['favorit_threshold'])->removeField('favorit_threshold')->color('warning'); break; case 2: - $indicators[] = Indicator::make('1X2 Fav <= '.$data['favorit_threshold'])->removeField('favorit_threshold')->color('info'); + $indicators[] = Indicator::make('1X2 Fav <= '.$data['favorit_threshold'])->removeField('favorit_threshold')->color('warning'); break; case 3: - $indicators[] = Indicator::make('HC Fav <= '.$data['favorit_threshold'])->removeField('favorit_threshold')->color('info'); + $indicators[] = Indicator::make('HC Fav <= '.$data['favorit_threshold'])->removeField('favorit_threshold')->color('warning'); break; case 5: - $indicators[] = Indicator::make('ML Fav <= '.$data['favorit_threshold'])->removeField('favorit_threshold')->color('info'); + $indicators[] = Indicator::make('ML Fav <= '.$data['favorit_threshold'])->removeField('favorit_threshold')->color('warning'); break; } diff --git a/app/Livewire/BettypeToggle.php b/app/Livewire/BettypeToggle.php index 8750abdb..bf29f49c 100644 --- a/app/Livewire/BettypeToggle.php +++ b/app/Livewire/BettypeToggle.php @@ -61,6 +61,11 @@ class BettypeToggle extends Component return view('livewire.bettype-toggle'); } + public function clearAllFilter() + { + $this->dispatch('filterClearFilter'); + } + public function toggleBettype($multiline_setting_id) { BettypeUser::where('multiline_setting_id', $multiline_setting_id)->update(['is_active' => DB::raw('!is_active')]); @@ -78,11 +83,6 @@ class BettypeToggle extends Component $this->dispatch('filterNoteFilter'); } - public function toggleNotification() - { - $this->dispatch('filterNotificationFilter'); - } - public function toggleShowPartner() { User::where('id', auth()->user()->id)->update(['partner_compare' => 0, 'partner_show' => DB::raw('!partner_show')]); diff --git a/composer.lock b/composer.lock index bcf1344a..f0819f88 100644 --- a/composer.lock +++ b/composer.lock @@ -543,16 +543,16 @@ }, { "name": "brick/math", - "version": "0.14.6", + "version": "0.14.7", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "32498d5e1897e7642c0b961ace2df6d7dc9a3bc3" + "reference": "07ff363b16ef8aca9692bba3be9e73fe63f34e50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/32498d5e1897e7642c0b961ace2df6d7dc9a3bc3", - "reference": "32498d5e1897e7642c0b961ace2df6d7dc9a3bc3", + "url": "https://api.github.com/repos/brick/math/zipball/07ff363b16ef8aca9692bba3be9e73fe63f34e50", + "reference": "07ff363b16ef8aca9692bba3be9e73fe63f34e50", "shasum": "" }, "require": { @@ -591,7 +591,7 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.14.6" + "source": "https://github.com/brick/math/tree/0.14.7" }, "funding": [ { @@ -599,7 +599,7 @@ "type": "github" } ], - "time": "2026-02-05T07:59:58+00:00" + "time": "2026-02-07T10:57:35+00:00" }, { "name": "carbonphp/carbon-doctrine-types", @@ -4029,16 +4029,16 @@ }, { "name": "livewire/livewire", - "version": "v3.7.8", + "version": "v3.7.9", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "06ec7e8cd61bb01739b8f26396db6fe73b7e0607" + "reference": "112b27e41e87e89d828a96e37b257aff2a058c7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/06ec7e8cd61bb01739b8f26396db6fe73b7e0607", - "reference": "06ec7e8cd61bb01739b8f26396db6fe73b7e0607", + "url": "https://api.github.com/repos/livewire/livewire/zipball/112b27e41e87e89d828a96e37b257aff2a058c7a", + "reference": "112b27e41e87e89d828a96e37b257aff2a058c7a", "shasum": "" }, "require": { @@ -4093,7 +4093,7 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v3.7.8" + "source": "https://github.com/livewire/livewire/tree/v3.7.9" }, "funding": [ { @@ -4101,7 +4101,7 @@ "type": "github" } ], - "time": "2026-02-03T02:57:56+00:00" + "time": "2026-02-05T23:27:27+00:00" }, { "name": "masterminds/html5", @@ -4514,16 +4514,16 @@ }, { "name": "nette/schema", - "version": "v1.3.3", + "version": "v1.3.4", "source": { "type": "git", "url": "https://github.com/nette/schema.git", - "reference": "2befc2f42d7c715fd9d95efc31b1081e5d765004" + "reference": "086497a2f34b82fede9b5a41cc8e131d087cd8f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/schema/zipball/2befc2f42d7c715fd9d95efc31b1081e5d765004", - "reference": "2befc2f42d7c715fd9d95efc31b1081e5d765004", + "url": "https://api.github.com/repos/nette/schema/zipball/086497a2f34b82fede9b5a41cc8e131d087cd8f7", + "reference": "086497a2f34b82fede9b5a41cc8e131d087cd8f7", "shasum": "" }, "require": { @@ -4531,8 +4531,8 @@ "php": "8.1 - 8.5" }, "require-dev": { - "nette/tester": "^2.5.2", - "phpstan/phpstan-nette": "^2.0@stable", + "nette/tester": "^2.6", + "phpstan/phpstan": "^2.0@stable", "tracy/tracy": "^2.8" }, "type": "library", @@ -4573,9 +4573,9 @@ ], "support": { "issues": "https://github.com/nette/schema/issues", - "source": "https://github.com/nette/schema/tree/v1.3.3" + "source": "https://github.com/nette/schema/tree/v1.3.4" }, - "time": "2025-10-30T22:57:59+00:00" + "time": "2026-02-08T02:54:00+00:00" }, { "name": "nette/utils", @@ -9463,29 +9463,29 @@ }, { "name": "doctrine/deprecations", - "version": "1.1.5", + "version": "1.1.6", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38" + "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38", - "reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", + "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "conflict": { - "phpunit/phpunit": "<=7.5 || >=13" + "phpunit/phpunit": "<=7.5 || >=14" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^12 || ^13", - "phpstan/phpstan": "1.4.10 || 2.1.11", + "doctrine/coding-standard": "^9 || ^12 || ^14", + "phpstan/phpstan": "1.4.10 || 2.1.30", "phpstan/phpstan-phpunit": "^1.0 || ^2", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12.4 || ^13.0", "psr/log": "^1 || ^2 || ^3" }, "suggest": { @@ -9505,9 +9505,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.5" + "source": "https://github.com/doctrine/deprecations/tree/1.1.6" }, - "time": "2025-04-07T20:06:18+00:00" + "time": "2026-02-07T07:09:04+00:00" }, { "name": "fakerphp/faker", @@ -11637,21 +11637,21 @@ }, { "name": "rector/rector", - "version": "2.3.5", + "version": "2.3.6", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "9442f4037de6a5347ae157fe8e6c7cda9d909070" + "reference": "ca9ebb81d280cd362ea39474dabd42679e32ca6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/9442f4037de6a5347ae157fe8e6c7cda9d909070", - "reference": "9442f4037de6a5347ae157fe8e6c7cda9d909070", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/ca9ebb81d280cd362ea39474dabd42679e32ca6b", + "reference": "ca9ebb81d280cd362ea39474dabd42679e32ca6b", "shasum": "" }, "require": { "php": "^7.4|^8.0", - "phpstan/phpstan": "^2.1.36" + "phpstan/phpstan": "^2.1.38" }, "conflict": { "rector/rector-doctrine": "*", @@ -11685,7 +11685,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/2.3.5" + "source": "https://github.com/rectorphp/rector/tree/2.3.6" }, "funding": [ { @@ -11693,7 +11693,7 @@ "type": "github" } ], - "time": "2026-01-28T15:22:48+00:00" + "time": "2026-02-06T14:25:06+00:00" }, { "name": "sebastian/cli-parser", diff --git a/resources/views/components/alarm-neutral.blade.php b/resources/views/components/alarm-neutral.blade.php index cda3fd03..10abcea0 100644 --- a/resources/views/components/alarm-neutral.blade.php +++ b/resources/views/components/alarm-neutral.blade.php @@ -1,4 +1,4 @@