wip
This commit is contained in:
1 parent
6fb18dc223
commit
ac0ddfcdbd
2 files changed
+4
-5
No files matched your search
@@ -79,8 +79,8 @@ class MapperLeft extends Component implements HasActions, HasSchemas, HasTable
|
|||||||
->description(fn ($record): string => $record->country?->name ?? '')
|
->description(fn ($record): string => $record->country?->name ?? '')
|
||||||
->action(function ($record) {
|
->action(function ($record) {
|
||||||
if ($record?->competition_group_id ?? null && ! in_array($record->competition_group_id, $this->tableFilters['events']['competition_group_id'])) {
|
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->tableFilters['events']['competition_group_id'] = (string) $record->competition_group_id;
|
||||||
$this->dispatch('refreshMapperRight');
|
$this->dispatch('refreshMapperLeft');
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
TextColumn::make('starttime')
|
TextColumn::make('starttime')
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
|
|||||||
->description(fn ($record): string => $record->country_betsapi?->name.' '.$record->country)
|
->description(fn ($record): string => $record->country_betsapi?->name.' '.$record->country)
|
||||||
->action(function ($record) {
|
->action(function ($record) {
|
||||||
if ($record?->group_id ?? null && ! in_array($record->group_id, $this->tableFilters['events']['group_id'])) {
|
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');
|
$this->dispatch('refreshMapperRight');
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
@@ -137,7 +137,6 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
|
|||||||
->label('')
|
->label('')
|
||||||
->searchable()
|
->searchable()
|
||||||
->preload()
|
->preload()
|
||||||
->multiple()
|
|
||||||
->options(function (Get $get) {
|
->options(function (Get $get) {
|
||||||
if ($get('country_id')) {
|
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();
|
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) {
|
function (Builder $query, $group_id) {
|
||||||
$this->setPage(1);
|
$this->setPage(1);
|
||||||
|
|
||||||
return $query->whereIn('group_id', $group_id);
|
return $query->where('group_id', $group_id);
|
||||||
}
|
}
|
||||||
)->when(
|
)->when(
|
||||||
$data['starttime_period'],
|
$data['starttime_period'],
|
||||||
|
|||||||
Reference in new issue
Block a user