This commit is contained in:
salam committed 2026-02-03 16:48:02 +01:00
1 parent 8a5db5d6da
commit 368af4b565
16 files changed
+97 -281

No files matched your search

@@ -26,6 +26,7 @@ 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;
@@ -43,7 +44,6 @@ 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
{
@@ -65,7 +65,7 @@ class EventsTable
return $table
->striped()
->poll('10s')
// ->poll('10s')
->deferLoading()
->defaultPaginationPageOption(5)
->paginated([5, 10, 15])
@@ -619,6 +619,7 @@ class EventsTable
->color(fn ($record) => $record->event_user_note->isEmpty() ? 'gray' : 'info'),
Action::make('event_notification')
->modalWidth(Width::Large)
->modalDescription('Monitoring favorit and if condition is matchted the system will emit a notification')
->modalSubmitActionLabel('Save')
->extraModalFooterActions(fn (Action $action, $record) => $record->event_user_notification->isEmpty() ? [] : [$action->makeModalSubmitAction('Delete', arguments: ['delete' => true])->color('danger')])
->modalIcon('phosphor-bell')
@@ -639,27 +640,18 @@ class EventsTable
})
->schema([
Hidden::make('event_user_notification_id'),
Toggle::make('is_notified')->label('Monitoring Favorit')
// ->aboveContent('If a notification has been send "Monitoring" will be off')
Toggle::make('is_notified')->label('On/Off')
->onColor('gray')
->offColor('info'),
RadioDeck::make('odds_table_id')
Radio::make('odds_table_id')
->label('Bettype')
->columns(3)
->colors('info')
->required()
->extraCardsAttributes([ // Extra attributes for card elements
'class' => 'dark:bg-gray-900!',
])
->options(fn ($record) => OddsTable::options_sport()),
RadioDeck::make('alarm_level_id')
Radio::make('alarm_level_id')
->label('Alarm level')
->colors('info')
->columns(3)
->required()
->extraCardsAttributes([ // Extra attributes for card elements
'class' => 'dark:bg-gray-900!',
])
->options([
'1' => 'Level 1',
'2' => 'Level 2',