From ac0ddfcdbdb0ac824d860adc9de04b9dd5cb0a0d Mon Sep 17 00:00:00 2001 From: salam Date: Fri, 13 Feb 2026 13:53:46 +0100 Subject: [PATCH] wip --- app/Livewire/MapperLeft.php | 4 ++-- app/Livewire/MapperRight.php | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Livewire/MapperLeft.php b/app/Livewire/MapperLeft.php index 88837e9b..b1f226d4 100644 --- a/app/Livewire/MapperLeft.php +++ b/app/Livewire/MapperLeft.php @@ -79,8 +79,8 @@ class MapperLeft extends Component implements HasActions, HasSchemas, HasTable ->description(fn ($record): string => $record->country?->name ?? '') ->action(function ($record) { if ($record?->competition_group_id ?? null && ! in_array($record->competition_group_id, $this->tableFilters['events']['competition_group_id'])) { - $this->tableFilters['events']['competition_group_id'][] = (string) $record->competition_group_id; - $this->dispatch('refreshMapperRight'); + $this->tableFilters['events']['competition_group_id'] = (string) $record->competition_group_id; + $this->dispatch('refreshMapperLeft'); } }), TextColumn::make('starttime') diff --git a/app/Livewire/MapperRight.php b/app/Livewire/MapperRight.php index 92889c53..f12eff43 100644 --- a/app/Livewire/MapperRight.php +++ b/app/Livewire/MapperRight.php @@ -82,7 +82,7 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable ->description(fn ($record): string => $record->country_betsapi?->name.' '.$record->country) ->action(function ($record) { if ($record?->group_id ?? null && ! in_array($record->group_id, $this->tableFilters['events']['group_id'])) { - $this->tableFilters['events']['group_id'][] = (string) $record->group_id; + $this->tableFilters['events']['group_id'] = (string) $record->group_id; $this->dispatch('refreshMapperRight'); } }), @@ -137,7 +137,6 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable ->label('') ->searchable() ->preload() - ->multiple() ->options(function (Get $get) { if ($get('country_id')) { return Mapper::query()->where('sport_id', auth()->user()->sport_id)->where('provider_id', auth()->user()->provider_id)->where('starttime', '>', Carbon::now())->where('country_id', $get('country_id'))->groupBy('group_id')->pluck('group', 'group_id')->toArray(); @@ -170,7 +169,7 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable function (Builder $query, $group_id) { $this->setPage(1); - return $query->whereIn('group_id', $group_id); + return $query->where('group_id', $group_id); } )->when( $data['starttime_period'],