toggle difference s book and partner; remove sport froma larm filter
This commit is contained in:
1 parent
7c0fd2b7a0
commit
4e64f2f318
12 files changed
+84
-90
No files matched your search
@@ -5,15 +5,12 @@ namespace App\Livewire;
|
||||
use App\Filament\Tables\Columns\BookmakerIcon;
|
||||
use App\Models\Bookmaker;
|
||||
use App\Models\PersonalNotification;
|
||||
use App\Models\Sport;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\Concerns\InteractsWithActions;
|
||||
use Filament\Actions\Contracts\HasActions;
|
||||
use Filament\Schemas\Concerns\InteractsWithSchemas;
|
||||
use Filament\Schemas\Contracts\HasSchemas;
|
||||
use Filament\Support\Enums\FontWeight;
|
||||
use Filament\Support\Enums\IconSize;
|
||||
use Filament\Tables\Columns\IconColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Concerns\InteractsWithTable;
|
||||
use Filament\Tables\Contracts\HasTable;
|
||||
@@ -36,14 +33,8 @@ class PersonalNotificationTable extends Component implements HasActions, HasSche
|
||||
->description('Send a notification when favorit enters an alarm level.')
|
||||
->striped()
|
||||
->columns([
|
||||
// TextColumn::make('sport.name'),
|
||||
BookmakerIcon::make('bookmaker.icon')
|
||||
->label('Bookmaker')->size('lg'),
|
||||
// IconColumn::make('sport.icon')
|
||||
// ->label('')
|
||||
// ->color(fn ($record) => $record->sport->color)
|
||||
// ->icon(fn ($record) => $record->sport->icon)
|
||||
// ->size(IconSize::ExtraLarge),
|
||||
TextColumn::make('alarm_level.name')
|
||||
->color(fn ($record) => $record->alarm_level->color)
|
||||
->weight(FontWeight::Black)
|
||||
@@ -60,12 +51,6 @@ class PersonalNotificationTable extends Component implements HasActions, HasSche
|
||||
->selectablePlaceholder(false)
|
||||
->options(Bookmaker::options([auth()->user()->partner_bookmaker_id, auth()->user()->bookmaker_id]))
|
||||
->preload(),
|
||||
SelectFilter::make('sport_id')
|
||||
->label('Sport')
|
||||
->default(1)
|
||||
->selectablePlaceholder(false)
|
||||
->options(Sport::getSportForClient(auth()->user()->client_id))
|
||||
->preload(),
|
||||
], FiltersLayout::AboveContent)
|
||||
->filtersFormColumns(3)
|
||||
->hiddenFilterIndicators()
|
||||
@@ -87,7 +72,6 @@ class PersonalNotificationTable extends Component implements HasActions, HasSche
|
||||
PersonalNotification::where('id', $record->id)->update(['notify_by_email' => ! $record->notify_by_email]);
|
||||
}),
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
public function render(): View
|
||||
|
||||
Reference in new issue
Block a user