ss ->sortable

This commit is contained in:
salam committed 2026-08-07 11:15:20 +02:00
1 parent c8cf1edaf4
commit 000f6fa046
18 files changed
+157 -106

No files matched your search

@@ -36,32 +36,39 @@ class ElementsTable
->striped()
->columns([
IconColumn::make('sport.icon')
->sortable()
->label('')
->grow(false)
->width(30)
->icon(fn ($record) => $record->sport->icon)
->tooltip(fn ($record) => $record->id)
->icon(fn($record) => $record->sport->icon)
->tooltip(fn($record) => $record->id)
->visibleFrom('lg'),
TextColumn::make('id')
->sortable()
->tooltip('click to copy')
->alignCenter()
->copyable(),
TextColumn::make('name')
->sortable()
->sortable()
->searchable()
->color('primary'),
TextColumn::make('country.name')
->wrap()
->sortable()
->color('gray')
->icon(fn ($record) => $record->country->icon),
->icon(fn($record) => $record->country->icon),
TextColumn::make('element_group.competition_group_id')->label('Group Id')
->sortable()
->alignCenter()
->tooltip('click to copy')
->copyable(),
TextColumn::make('element_group.competition_group.name')->label('Group'),
TextColumn::make('element_group.competition_group.name')->label('Group')
->sortable(),
// TextColumn::make('element_group.group.name')->label('Group'),
ImageColumn::make('betsapi_image_id')
->label('Logo')
->defaultImageUrl(fn ($state) => url('https://assets.b365api.com/images/team/m/'.$state.'.png')),
->defaultImageUrl(fn($state) => url('https://assets.b365api.com/images/team/m/' . $state . '.png')),
])->filters([
SelectFilter::make('sport_id')
->label('Sport')
@@ -88,7 +95,7 @@ class ElementsTable
->query(function (Builder $query, array $data): Builder {
return $query->when(
$data['country_id'],
fn (Builder $query, $country_id) => $query->where('country_id', $country_id)
fn(Builder $query, $country_id) => $query->where('country_id', $country_id)
)->when(
$data['competition_group_id'],
function (Builder $query, $competition_group_id) {