filter finised

This commit is contained in:
salam committed 2026-02-02 18:33:32 +01:00
1 parent ff43f231f0
commit f684d61a61
15 files changed
+376 -136

No files matched your search

@@ -39,25 +39,18 @@ class ListEvents extends ListRecords
public function updateStar(): void
{
// $filters = $this->table->getFilters();
$filters = $this->getTable()->getFilters();
dd($filters['filter_stars']->getState());
$filter_stars = $filters['filter_stars']->getState();
$this->tableFilters['events']['filter_stars'] = ! $filter_stars;
$this->tableFilters['events']['filter_stars'] = ! $this->tableFilters['events']['filter_stars'];
}
// public function updateNote(): void
// {
// $this->tableFilters['events']['filter_notes'] = auth()->user()->filter_notes;
// }
public function updateNote(): void
{
$this->tableFilters['events']['filter_notes'] = ! $this->tableFilters['events']['filter_notes'];
}
// public function updateNotification(): void
// {
// $this->tableFilters['events']['filter_notification'] = auth()->user()->filter_notification;
// }
public function updateNotification(): void
{
$this->tableFilters['events']['filter_notification'] = ! $this->tableFilters['events']['filter_notification'];
}
public function updateTablePeriode(string $filter): void
{
@@ -26,8 +26,8 @@ use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteAction;
use Filament\Actions\DeleteBulkAction;
use Filament\Forms\Components\Hidden;
use Filament\Forms\Components\Radio;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Schemas\Components\Utilities\Get;
@@ -43,6 +43,7 @@ use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
use JaOcero\RadioDeck\Forms\Components\RadioDeck;
class EventsTable
{
@@ -105,7 +106,8 @@ class EventsTable
->label('ML S1'),
TooltipOdds::make('1x2')->bettype('odds_3ways')->label('')->visible(fn () => in_array('odds_3ways', self::$bettype_settings)),
ColumnOdds::make('odds_3ways')->bettype('odds_3ways')
ColumnOdds::make('odds_3ways')
->bettype('odds_3ways')
->visible(fn () => in_array('odds_3ways', self::$bettype_settings))
->verticalAlignment(VerticalAlignment::Start)
->label('1X2'),
@@ -446,15 +448,15 @@ class EventsTable
}
if ($data['filter_stars'] ?? null) {
$indicators[] = Indicator::make('Filter Favorits')->removeField('filter_stars')->color('success');
$indicators[] = Indicator::make('Filter Favorits')->removeField('filter_stars')->color('info');
}
if ($data['filter_notes'] ?? null) {
$indicators[] = Indicator::make('Filter Notes')->removeField('filter_notes')->color('success');
$indicators[] = Indicator::make('Filter Notes')->removeField('filter_notes')->color('info');
}
if ($data['filter_notification'] ?? null) {
$indicators[] = Indicator::make('Filter Notifications')->removeField('filter_notification')->color('success');
$indicators[] = Indicator::make('Filter Notifications')->removeField('filter_notification')->color('info');
}
if ($data['filter_alarm_green'] ?? null) {
@@ -513,10 +515,6 @@ class EventsTable
}
}
// if ($data['stars_filter'] ?? null) {
// $indicators[] = Indicator::make('Favorits')->removeField('stars_filter')->color('info');
// }
if ($data['filter_compare_differences'] ?? null) {
$opt = explode('-', $data['filter_compare_differences']);
$title = $opt[0];
@@ -577,9 +575,7 @@ class EventsTable
->modalIcon('phosphor-note')
->modalWidth(Width::Large)
->modalSubmitActionLabel('Save')
->extraModalFooterActions(fn (Action $action): array => [
$action->makeModalSubmitAction('Delete', arguments: ['delete' => true])->color('danger'),
])
->extraModalFooterActions(fn (Action $action, $record) => $record->event_user_note->isEmpty() ? [] : [$action->makeModalSubmitAction('Delete', arguments: ['delete' => true])->color('danger')])
->fillForm(data: function ($record) {
foreach ($record->event_user_note as $value) {
if ($value->user_id == auth()->user()->id && $value->bookmaker_id == auth()->user()->bookmaker_id) {
@@ -594,14 +590,17 @@ class EventsTable
})
->schema([
Hidden::make('event_user_note_id'),
TextInput::make('message')->prefixIcon('phosphor-note-pencil')->hiddenLabel()->live()
->extraInputAttributes(['onClick' => 'this.select()']),
Textarea::make('message')
->rows(2)
->hiddenLabel(),
])
->icon('phosphor-note-pencil')
->iconButton()
->tooltip(fn ($record) => view('filament.resources.events.tooltip.event-user-note-tooltip', ['notes' => $record->event_user_note]))
->action(function ($record, array $data) {
if ($data['event_user_note_id']) {
->action(function ($record, array $data, $arguments = []) {
if ($arguments) {
EventUserNote::where('id', $data['event_user_note_id'])->delete();
} elseif ($data['event_user_note_id']) {
if (! $data['message']) {
EventUserNote::where('id', $data['event_user_note_id'])->delete();
} else {
@@ -622,9 +621,7 @@ class EventsTable
Action::make('event_notification')
->modalWidth(Width::Large)
->modalSubmitActionLabel('Save')
->extraModalFooterActions(fn (Action $action): array => [
$action->makeModalSubmitAction('Delete', arguments: ['delete' => true])->color('danger'),
])
->extraModalFooterActions(fn (Action $action, $record) => $record->event_user_notification->isEmpty() ? [] : [$action->makeModalSubmitAction('Delete', arguments: ['delete' => true])->color('danger')])
->modalIcon('phosphor-bell')
->fillForm(data: function ($record) {
foreach ($record->event_user_notification as $value) {
@@ -643,36 +640,44 @@ class EventsTable
})
->schema([
Hidden::make('event_user_notification_id'),
Toggle::make('is_notified')->label('Monitoring')
->aboveContent('If a notification has been send "Monitoring" will be off')
Toggle::make('is_notified')->label('Monitoring Favorit')
// ->aboveContent('If a notification has been send "Monitoring" will be off')
->onColor('gray')
->offColor('info'),
Select::make('odds_table_id')
->label('Monitor Bettype Favorit')
->belowContent('Favorit is compared with bookmaker favorit filtert by method')
RadioDeck::make('odds_table_id')
->label('Bettype')
->columns(3)
->colors('info')
->required()
->prefixIcon('phosphor-dots-three-outline-vertical')
->native(false)
->extraCardsAttributes([ // Extra attributes for card elements
'class' => 'dark:bg-gray-900!',
])
->options(fn ($record) => OddsTable::options_sport()),
Radio::make('alarm_level_id')
RadioDeck::make('alarm_level_id')
->label('Alarm level')
->colors('info')
->columns(3)
->required()
->inline()
->belowContent('If favorit enters alarm level a notification will be send.')
->extraCardsAttributes([ // Extra attributes for card elements
'class' => 'dark:bg-gray-900!',
])
->options([
'1' => 'Level 1',
'2' => 'Level 2',
'3' => 'Level 3',
]),
Toggle::make('notify_by_email')->label('E-Mail')
->belowContent('Notify me also by e-mail')
Toggle::make('notify_by_email')->label('Send also E-Mail')
// ->belowContent('Notify me also by e-mail')
->onColor('info')
->offColor('gray'),
])
->icon('phosphor-bell')
->iconButton()
->action(function ($record, array $data) {
if ($data['event_user_notification_id']) {
->color(fn ($record) => $record?->event_user_notification->isEmpty() ? 'gray' : 'info')
->action(function ($record, array $data, $arguments = []) {
if ($arguments) {
EventUserNotification::where('id', $data['event_user_notification_id'])->delete();
} elseif ($data['event_user_notification_id']) {
EventUserNotification::where('id', $data['event_user_notification_id'])->update([
'odds_table_id' => $data['odds_table_id'],
'alarm_level_id' => $data['alarm_level_id'],
@@ -691,8 +696,7 @@ class EventsTable
'is_notified' => $data['is_notified'],
]);
}
})
->color(fn ($record) => $record->event_user_notification->isEmpty() ? 'gray' : 'info'),
}),
ActionGroup::make([
DeleteAction::make()->visible(fn () => auth()->user()->hasRole('super_admin')),
Action::make('txodds_odds')
@@ -28,6 +28,12 @@ class ColumnOdds extends Column
protected $client;
protected $filter_compare_bookmaker;
protected $filter_compare_mode;
protected $favorits = [];
public $compare;
public $partner;
@@ -42,6 +48,18 @@ class ColumnOdds extends Column
{
$this->getData($record);
$this->setCompareDifferences();
$this->favorits = ['h2w' => 0, 'a2w' => 0, 'h3w' => 0, 'd3w' => 0, 'a3w' => 0, 'home' => 0, 'away' => 0, 'margin' => 0];
if ($this->filter_compare_bookmaker) {
if ($this->filter_compare_mode == 'Favorit') {
$this->setFavorits($record);
} elseif ($this->filter_compare_mode == 'X') {
$this->favorits = ['h2w' => 0, 'a2w' => 0, 'h3w' => 0, 'd3w' => 1, 'a3w' => 0, 'home' => 0, 'away' => 0, 'margin' => 0];
} elseif ($this->filter_compare_mode == 'Margin') {
$this->favorits = ['h2w' => 0, 'a2w' => 0, 'h3w' => 0, 'd3w' => 0, 'a3w' => 0, 'home' => 0, 'away' => 0, 'margin' => 1];
}
}
if (! $this->data) {
$this->state = false;
@@ -74,10 +92,31 @@ class ColumnOdds extends Column
return $this;
}
public function setCompareDifferences()
{
$filters = $this->getTable()->getFilters();
$filters = [$filters];
foreach ($filters as $value) {
$filter = $value['events']->getState();
}
if (isset($filter['filter_compare_differences'])) {
$tmp = explode('-', $filter['filter_compare_differences']);
$this->filter_compare_bookmaker = (int) $tmp[2];
$this->filter_compare_mode = $tmp[0];
} else {
$this->filter_compare_bookmaker = 0;
}
}
/*******************************
* GETTER
*******************************/
public function getCompareBookmaker()
{
return $this->filter_compare_bookmaker;
}
public function getBettype()
{
return $this->bettype;
@@ -132,6 +171,11 @@ class ColumnOdds extends Column
return $this->min;
}
public function getFavorits()
{
return $this->favorits;
}
public function getData($record)
{
$this->client = null;
@@ -274,6 +318,42 @@ class ColumnOdds extends Column
* SETTER
*******************************/
public function setFavorits($record)
{
if ($this->filter_compare_bookmaker) {
switch ($this->bettype) {
case 'odds_2ways':
$tmp = $record->odds_2ways->where('bookmaker_id', $this->filter_compare_bookmaker)->first();
if ($tmp->h2w < $tmp->a2w) {
$this->favorits['h2w'] = 1;
} else {
$this->favorits['a2w'] = 1;
}
break;
case 'odds_3ways':
$tmp = $record->odds_3ways->where('bookmaker_id', $this->filter_compare_bookmaker)->first();
if ($tmp->h3w < $tmp->d3w && $tmp->h3w < $tmp->a3w) {
$this->favorits['h3w'] = 1;
} elseif ($tmp->d3w < $tmp->a3w) {
$this->favorits['d3w'] = 1;
} else {
$this->favorits['a3w'] = 1;
}
break;
case 'odds_points':
$tmp = $record->odds_points->where('bookmaker_id', $this->filter_compare_bookmaker)->first();
if ($tmp->home < $tmp->away) {
$this->favorits['home'] = 1;
} else {
$this->favorits['away'] = 1;
}
break;
}
}
}
public function setMinMax($record)
{
switch ($this->bettype) {
+9 -12
View File
@@ -16,12 +16,6 @@ class BettypeToggle extends Component
'refreshBettypeMenu' => '$refresh',
];
protected $filter_star = false;
protected $filter_note = false;
protected $filter_notify = false;
public function boot()
{
$this->bettype_toggles = [];
@@ -39,6 +33,12 @@ class BettypeToggle extends Component
'is_active' => $set->is_active,
];
}
// $filters = $livewire->getTable()->getFilters();
// $filters = [$filters];
// foreach ($filters as $value) {
// dd($value['events']->getState());
// }
}
public function render()
@@ -54,20 +54,17 @@ class BettypeToggle extends Component
public function toggleStar()
{
$this->filter_star = ! $this->filter_star;
$this->dispatch('filterStarFilter', ['filter', $this->filter_star]);
$this->dispatch('filterStarFilter');
}
public function toggleNote()
{
User::where('id', auth()->user()->id)->update(['filter_notes' => DB::raw('!filter_notes')]);
$this->dispatch('filterNotificationFilter');
$this->dispatch('filterNoteFilter');
}
public function toggleNotification()
{
User::where('id', auth()->user()->id)->update(['filter_notification' => DB::raw('!filter_notification')]);
$this->dispatch('filterStarFilter');
$this->dispatch('filterNotificationFilter');
}
public function toggleShowPartner()
+12 -2
View File
@@ -17,6 +17,10 @@ class SportSwitcher extends Component
public $iconcolor = '';
protected $listeners = [
'refreshSportSwitcher' => '$refresh',
];
public function mount()
{
$cps = Client::where('id', auth()->user()->client_id)->pluck('sport')->first();
@@ -35,9 +39,15 @@ class SportSwitcher extends Component
{
User::where('id', auth()->user()->id)->update(['sport_id' => $this->sport_id]);
$this->dispatch('clear_filters');
$this->sporticon = Sport::where('id', $this->sport_id)->pluck('icon')->first();
$this->js('window.location.reload()');
$this->iconcolor = Sport::where('id', $this->sport_id)->pluck('color')->first();
// $this->js('window.location.reload()');
$this->dispatch('filterClearFilter');
$this->dispatch('refreshSportSwitcher');
}
public function render()
-3
View File
@@ -34,9 +34,6 @@ class User extends Authenticatable implements FilamentUser, HasAppAuthentication
'app_verified_at',
'client_id',
'sport_id',
'filter_stars',
'filter_notes',
'filter_notification',
'is_multiline_direct',
'all_only_none',
'partner_show',
+1
View File
@@ -17,6 +17,7 @@
"codewithkyrian/filament-date-range": "^2.0",
"filament/filament": "^4.0",
"guava/filament-modal-relation-managers": "^2.0",
"jaocero/radio-deck": "^3.0",
"joaopaulolndev/filament-edit-profile": "^2.0",
"laravel/framework": "^12.0",
"laravel/tinker": "^2.10.1",
Generated
+92 -17
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "fbdcd8c04f0bcdcc155c4356c15965e6",
"content-hash": "872a298c0c1cebe00cac20f0cb2539f7",
"packages": [
{
"name": "agencetwogether/hookshelper",
@@ -543,16 +543,16 @@
},
{
"name": "brick/math",
"version": "0.14.2",
"version": "0.14.3",
"source": {
"type": "git",
"url": "https://github.com/brick/math.git",
"reference": "55c950aa71a2cabc1d8f2bec1f8a7020bd244aa2"
"reference": "6af96b11de3f7d99730c118c200418c48274edb4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/brick/math/zipball/55c950aa71a2cabc1d8f2bec1f8a7020bd244aa2",
"reference": "55c950aa71a2cabc1d8f2bec1f8a7020bd244aa2",
"url": "https://api.github.com/repos/brick/math/zipball/6af96b11de3f7d99730c118c200418c48274edb4",
"reference": "6af96b11de3f7d99730c118c200418c48274edb4",
"shasum": ""
},
"require": {
@@ -591,7 +591,7 @@
],
"support": {
"issues": "https://github.com/brick/math/issues",
"source": "https://github.com/brick/math/tree/0.14.2"
"source": "https://github.com/brick/math/tree/0.14.3"
},
"funding": [
{
@@ -599,7 +599,7 @@
"type": "github"
}
],
"time": "2026-01-30T14:03:11+00:00"
"time": "2026-02-01T15:18:05+00:00"
},
{
"name": "carbonphp/carbon-doctrine-types",
@@ -2539,6 +2539,81 @@
],
"time": "2025-08-22T14:27:06+00:00"
},
{
"name": "jaocero/radio-deck",
"version": "v3.0",
"source": {
"type": "git",
"url": "https://github.com/199ocero/radio-deck.git",
"reference": "d38aa42f7794cd25d605b43a0fe18bd1e2933430"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/199ocero/radio-deck/zipball/d38aa42f7794cd25d605b43a0fe18bd1e2933430",
"reference": "d38aa42f7794cd25d605b43a0fe18bd1e2933430",
"shasum": ""
},
"require": {
"filament/forms": "^4.0|^5.0",
"illuminate/contracts": "^11.0|^12.0",
"php": "^8.2",
"spatie/laravel-package-tools": "^1.15.0"
},
"require-dev": {
"laravel/pint": "^1.24",
"nunomaduro/collision": "^8.1",
"orchestra/testbench": "^9.0",
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-arch": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"JaOcero\\RadioDeck\\RadioDeckServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"JaOcero\\RadioDeck\\": "src/",
"JaOcero\\RadioDeck\\Database\\Factories\\": "database/factories/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jay-Are Ocero",
"email": "199ocero@gmail.com",
"role": "Developer"
}
],
"description": "Turn filament default radio button into a selectable card with icons, title and description.",
"homepage": "https://github.com/jaocero/radio-deck",
"keywords": [
"filament-form",
"filament-plugin",
"filamentphp",
"jaocero",
"laravel",
"radio-deck"
],
"support": {
"issues": "https://github.com/jaocero/radio-deck/issues",
"source": "https://github.com/jaocero/radio-deck"
},
"funding": [
{
"url": "https://github.com/jaocero",
"type": "github"
}
],
"time": "2026-02-02T00:05:32+00:00"
},
{
"name": "jaybizzle/crawler-detect",
"version": "v1.3.6",
@@ -6210,22 +6285,22 @@
},
{
"name": "spatie/shiki-php",
"version": "2.3.2",
"version": "2.3.3",
"source": {
"type": "git",
"url": "https://github.com/spatie/shiki-php.git",
"reference": "a2e78a9ff8a1290b25d550be8fbf8285c13175c5"
"reference": "9d50ff4d9825d87d3283a6695c65ae9c3c3caa6b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/shiki-php/zipball/a2e78a9ff8a1290b25d550be8fbf8285c13175c5",
"reference": "a2e78a9ff8a1290b25d550be8fbf8285c13175c5",
"url": "https://api.github.com/repos/spatie/shiki-php/zipball/9d50ff4d9825d87d3283a6695c65ae9c3c3caa6b",
"reference": "9d50ff4d9825d87d3283a6695c65ae9c3c3caa6b",
"shasum": ""
},
"require": {
"ext-json": "*",
"php": "^8.0",
"symfony/process": "^5.4|^6.4|^7.1"
"symfony/process": "^5.4|^6.4|^7.1|^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^v3.0",
@@ -6263,7 +6338,7 @@
"spatie"
],
"support": {
"source": "https://github.com/spatie/shiki-php/tree/2.3.2"
"source": "https://github.com/spatie/shiki-php/tree/2.3.3"
},
"funding": [
{
@@ -6271,7 +6346,7 @@
"type": "github"
}
],
"time": "2025-02-21T14:16:57+00:00"
"time": "2026-02-01T09:30:04+00:00"
},
{
"name": "swisnl/filament-backgrounds",
@@ -12895,12 +12970,12 @@
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {},
"stability-flags": [],
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": "^8.3"
},
"platform-dev": {},
"plugin-api-version": "2.9.0"
"platform-dev": [],
"plugin-api-version": "2.6.0"
}
@@ -26,9 +26,6 @@ return new class extends Migration
$table->text('app_authentication_secret')->nullable();
$table->text('app_authentication_recovery_codes')->nullable();
$table->boolean('has_email_authentication')->default(false);
$table->boolean('filter_stars')->default(false);
$table->boolean('filter_notes')->default(false);
$table->boolean('filter_notification')->default(false);
$table->boolean('is_multiline_direct')->default(false);
$table->boolean('all_only_none')->default(false);
$table->boolean('partner_show')->default(false);
+1
View File
@@ -6,6 +6,7 @@
@source '../../../../resources/views/components/**/*';
@source '../../../../vendor/awcodes/light-switch/resources/**/*.blade.php';
@source '../../../../vendor/guava/filament-modal-relation-managers/resources/**/*';
@source '../../../../vendor/jaocero/radio-deck/resources/views';
/* hide reset link in filters */
.fi-ta-filters-heading,
@@ -1,6 +1,6 @@
<div>
@if (!$notes->isEmpty())
<div class="grid grid-cols-6 gap-2 m-5 max-w-120">
<div class="grid grid-cols-6 gap-2 m-5 max-w-90">
@foreach ($notes as $item)
@include('filament.tables.columns.multiline.bkm', [
'bookmaker_id' => $item->bookmaker_id,
@@ -13,36 +13,36 @@
@case ('odds_tq')
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->htq ?? 0,
'alarm' => $partner?->htq != 0 && htq > $partner?->htq ? 4 : 0,
'alarm' => $partner?->htq != 0 && $client->htq > $partner?->htq ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->atq,
'alarm' => $partner?->atq != 0 && atq > $partner?->atq ? 4 : 0,
'alarm' => $partner?->atq != 0 && $client->atq > $partner?->atq ? 4 : 0,
'd' => 2,
])
@break;
@case ('odds_2ways')
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->h2w,
'alarm' => $partner?->h2w != 0 && h2w > $partner?->h2w ? 4 : 0,
'alarm' => $partner?->h2w != 0 && $client->h2w > $partner?->h2w ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->a2w,
'alarm' => $partner?->a2w != 0 && a2w > $partner?->a2w ? 4 : 0,
'alarm' => $partner?->a2w != 0 && $client->a2w > $partner?->a2w ? 4 : 0,
'd' => 2,
])
@break;
@case ('odds_2ways_s1')
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->h2w,
'alarm' => $partner?->h2w != 0 && h2w > $partner?->h2w ? 4 : 0,
'alarm' => $partner?->h2w != 0 && $client->h2w > $partner?->h2w ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->a2w,
'alarm' => $partner?->a2w != 0 && a2w > $partner?->a2w ? 4 : 0,
'alarm' => $partner?->a2w != 0 && $client->a2w > $partner?->a2w ? 4 : 0,
'd' => 2,
])
@break;
@@ -54,83 +54,83 @@
])
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->d3w,
'alarm' => $partner?->a3w != 0 && d3w > $partner?->d3w ? 4 : 0,
'alarm' => $partner?->a3w != 0 && $client->d3w > $partner?->d3w ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->a3w,
'alarm' => $partner?->a3w != 0 && a3w > $partner?->a3w ? 4 : 0,
'alarm' => $partner?->a3w != 0 && $client->a3w > $partner?->a3w ? 4 : 0,
'd' => 2,
])
@break;
@case ('odds_3ways_ht')
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->h3w,
'alarm' => $partner?->h3w != 0 && h3w > $partner?->h3w ? 4 : 0,
'alarm' => $partner?->h3w != 0 && $client->h3w > $partner?->h3w ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->d3w,
'alarm' => $partner?->d3w != 0 && d3w > $partner?->d3w ? 4 : 0,
'alarm' => $partner?->d3w != 0 && $client->d3w > $partner?->d3w ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->a3w,
'alarm' => $partner?->a3w != 0 && a3w > $partner?->a3w ? 4 : 0,
'alarm' => $partner?->a3w != 0 && $client->a3w > $partner?->a3w ? 4 : 0,
'd' => 2,
])
@break;
@case ('odds_dc')
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->dc1x,
'alarm' => $partner?->dc1x != 0 && dc1x > $partner?->dc1x ? 4 : 0,
'alarm' => $partner?->dc1x != 0 && $client->dc1x > $partner?->dc1x ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->dc12,
'alarm' => $partner?->dc12 != 0 && dc12 > $partner?->dc12 ? 4 : 0,
'alarm' => $partner?->dc12 != 0 && $client->dc12 > $partner?->dc12 ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->dcx2,
'alarm' => $partner?->dcx2 != 0 && dcx2 > $partner?->dcx2 ? 4 : 0,
'alarm' => $partner?->dcx2 != 0 && $client->dcx2 > $partner?->dcx2 ? 4 : 0,
'd' => 2,
])
@break;
@case ('odds_dnb')
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->dnb1,
'alarm' => $partner?->dnb1 != 0 && dnb1 > $partner?->dnb1 ? 4 : 0,
'alarm' => $partner?->dnb1 != 0 && $client->dnb1 > $partner?->dnb1 ? 4 : 0,
'alarm' => 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->dnb2,
'alarm' => $partner?->dnb2 != 0 && dnb2 > $partner?->dnb2 ? 4 : 0,
'alarm' => $partner?->dnb2 != 0 && $client->dnb2 > $partner?->dnb2 ? 4 : 0,
'd' => 2,
])
@break;
@case ('odds_ggng')
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->gg,
'alarm' => $partner?->gg != 0 && gg > $partner?->gg ? 4 : 0,
'alarm' => $partner?->gg != 0 && $client->gg > $partner?->gg ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->ng,
'alarm' => $partner?->ng != 0 && ng > $partner?->ng ? 4 : 0,
'alarm' => $partner?->ng != 0 && $client->ng > $partner?->ng ? 4 : 0,
'd' => 2,
])
@break;
@case ('odds_points')
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->home,
'alarm' => $partner?->home != 0 && home > $partner?->home ? 4 : 0,
'alarm' => $partner?->home != 0 && $client->home > $partner?->home ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->away,
'alarm' => $partner?->away != 0 && away > $partner?->away ? 4 : 0,
'alarm' => $partner?->away != 0 && $client->away > $partner?->away ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
@@ -142,12 +142,12 @@
@case ('odds_points_ht')
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->home,
'alarm' => $partner?->home != 0 && home > $partner?->home ? 4 : 0,
'alarm' => $partner?->home != 0 && $client->home > $partner?->home ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->away,
'alarm' => $partner?->away != 0 && away > $partner?->away ? 4 : 0,
'alarm' => $partner?->away != 0 && $client->away > $partner?->away ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
@@ -159,12 +159,12 @@
@case ('odds_points_q1')
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->home,
'alarm' => $partner?->home != 0 && home > $partner?->home ? 4 : 0,
'alarm' => $partner?->home != 0 && $client->home > $partner?->home ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->away,
'alarm' => $partner?->away != 0 && away > $partner?->away ? 4 : 0,
'alarm' => $partner?->away != 0 && $client->away > $partner?->away ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
@@ -176,12 +176,12 @@
@case ('odds_totals')
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->over,
'alarm' => $partner?->over != 0 && over > $partner?->over ? 4 : 0,
'alarm' => $partner?->over != 0 && $client->over > $partner?->over ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->under,
'alarm' => $partner?->under != 0 && under > $partner?->under ? 4 : 0,
'alarm' => $partner?->under != 0 && $client->under > $partner?->under ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
@@ -193,12 +193,12 @@
@case ('odds_totals_ht')
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->over,
'alarm' => $partner?->over != 0 && over > $partner?->over ? 4 : 0,
'alarm' => $partner?->over != 0 && $client->over > $partner?->over ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->under,
'alarm' => $partner?->under != 0 && under > $partner?->under ? 4 : 0,
'alarm' => $partner?->under != 0 && $client->under > $partner?->under ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
@@ -210,12 +210,12 @@
@case ('odds_totals_q1')
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->over,
'alarm' => $partner?->over != 0 && over > $partner?->over ? 4 : 0,
'alarm' => $partner?->over != 0 && $client->over > $partner?->over ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
'odd' => $client->under,
'alarm' => $partner?->under != 0 && under > $partner?->under ? 4 : 0,
'alarm' => $partner?->under != 0 && $client->under > $partner?->under ? 4 : 0,
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-compare', [
@@ -4,6 +4,8 @@
@php
$taken = false;
$compare_bookmaker_id = $getCompareBookmaker();
$favorits = $getFavorits();
@endphp
@foreach ($multilines as $multiline)
@@ -11,6 +13,11 @@
@if ($multiline->bookmaker_id == $slot)
@php
$taken = true;
$favorit = 0;
$compared = $compare_bookmaker_id == $multiline->bookmaker_id ? 1 :0;
if($compared){
$favorit = min($client?->h3w,$client?->d3w,$client?->a3w);
}
@endphp
@include('filament.tables.columns.multiline.bkm', [
@@ -19,9 +26,25 @@
])
@switch ($getBettype())
@case ('odds_tq')
@case ('odds_2ways')
@include('filament.tables.columns.multiline.odd-slots', [
'odd' => $multiline->h2w,
'client' => $client?->h2w,
'compared' => $compared,
'favorit' => $favorits['h2w'],
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-slots', [
'odd' => $multiline->a2w,
'client' => $client?->a2w,
'compared' => $compared,
'favorit' => $favorits['a2w'],
'd' => 2,
])
@break;
@case ('odds_tq')
@case ('odds_2ways_s1')
@include('filament.tables.columns.multiline.odd', [
@@ -35,7 +58,30 @@
'd' => 2,
])
@break;
@case ('odds_3ways')
@include('filament.tables.columns.multiline.odd-slots', [
'odd' => $multiline?->h3w,
'client' => $client?->h3w,
'compared' => $compared,
'favorit' => $favorits['h3w'],
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-slots', [
'odd' => $multiline->d3w,
'client' => $client?->d3w,
'compared' => $compared,
'favorit' => $favorits['d3w'],
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-slots', [
'odd' => $multiline->a3w,
'client' => $client?->a3w,
'compared' => $compared,
'favorit' => $favorits['a3w'],
'd' => 2,
])
@break;
@case ('odds_3ways_ht')
@include('filament.tables.columns.multiline.odd', [
@@ -96,6 +142,26 @@
])
@break;
@case ('odds_points')
@include('filament.tables.columns.multiline.odd-slots', [
'odd' => $multiline->home,
'client' => $client?->home,
'compared' => $compared,
'favorit' => $favorits['home'],
'd' => 2,
])
@include('filament.tables.columns.multiline.odd-slots', [
'odd' => $multiline->away,
'compared' => $compared,
'client' => $client?->away,
'favorit' => $favorits['away'],
'd' => 2,
])
@include('filament.tables.columns.multiline.odd', [
'odd' => $multiline->handicap,
'client' => false,
'd' => 1,
])
@break;
@case ('odds_points_ht')
@@ -116,6 +182,7 @@
'd' => 1,
])
@break;
@case ('odds_totals')
@case ('odds_totals_ht')
@@ -139,10 +206,11 @@
@break;
@endswitch
@include('filament.tables.columns.multiline.odd', [
@include('filament.tables.columns.multiline.odd-slots', [
'odd' => $multiline->margin,
'client' => false,
'compared' => $compared,
'client' => $client?->margin,
'favorit' => $favorits['margin'],
'd' => 1,
])
@endif
@@ -0,0 +1,21 @@
@if (isset($client) && $client > 1 && $odd >= $client)
@if($compared && $favorit)
<x-alarm-blue>
{{ number_format($odd, $d) }}
</x-alarm-blue>
@else
<x-column.highest>
{{ number_format($odd, $d) }}
</x-column.highest>
@endif
@else
@if($compared && $favorit)
<x-alarm-blue>
{{ number_format($odd, $d) }}
</x-alarm-blue>
@else
<x-column.blank>
{{ number_format($odd, $d) }}
</x-column.blank>
@endif
@endif
@@ -18,6 +18,9 @@
tooltip="Filter Partner Differences" :disabled="auth()->user()->partner_show ? false : true" :color="auth()->user()->partner_compare ? 'info' : 'gray'" icon="phosphor-funnel">
</x-filament::button>
<x-filament::button size="xs" wire:click="toggleMultiline" :tooltip="auth()->user()->is_multiline_direct ? 'Multiline slots are disabled' : 'Multiline slots are active'" :color="auth()->user()->is_multiline_direct ? 'info' : 'gray'"
:icon="auth()->user()->is_multiline_direct ? 'phosphor-not-equals' : 'phosphor-equals'">
</x-filament::button>
<div></div>
<div></div>
<div></div>
@@ -45,21 +48,14 @@
@default
@endswitch
<x-filament::button size="xs" wire:click="toggleMultiline" :tooltip="auth()->user()->is_multiline_direct ? 'Multiline slots are disabled' : 'Multiline slots are active'" :color="auth()->user()->is_multiline_direct ? 'info' : 'gray'"
:icon="auth()->user()->is_multiline_direct ? 'phosphor-not-equals' : 'phosphor-equals'">
</x-filament::button>
<x-filament::button size="xs" tooltip="Filter favorits" wire:click="toggleStar" :color="$this->filter_star ? 'info' : 'gray'"
:icon="$this->filter_star ? 'phosphor-star-fill' : 'phosphor-star'">
</x-filament::button>
<x-filament::button size="xs" tooltip="Filter notes" wire:click="toggleNote" :color="auth()->user()->filter_notes ? 'info' : 'gray'"
:icon="auth()->user()->filter_notes ? 'phosphor-note-fill' : 'phosphor-note'">
</x-filament::button>
<x-filament::button size="xs" tooltip="Filter alarm notification" wire:click="toggleNotification"
:color="auth()->user()->filter_notification ? 'info' : 'gray'" :icon="auth()->user()->filter_notification ? 'phosphor-bell-fill' : 'phosphor-bell'">
</x-filament::button>
<div></div>
<div></div>
<div></div>
<x-filament::button size="xs" tooltip="Filter favorits" wire:click="toggleStar" color="gray" icon="phosphor-star" />
<x-filament::button size="xs" tooltip="Filter notes" wire:click="toggleNote" color="gray" icon="phosphor-note" />
<x-filament::button size="xs" tooltip="Filter alarm notification" wire:click="toggleNotification" color="gray" icon="phosphor-bell" />
<div></div>
<div></div>