grapper wip

This commit is contained in:
salam committed 2025-08-25 12:57:17 +02:00
1 parent 944aa736b2
commit adb15e701b
9 files changed
+95 -68

No files matched your search

@@ -6,6 +6,9 @@ use App\Models\Bookmaker;
use App\Models\Sport;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Schemas\Components\Fieldset;
use Filament\Schemas\Components\Utilities\Get;
use Filament\Schemas\Schema;
class SupervisorForm
@@ -16,7 +19,14 @@ class SupervisorForm
->components([
TextInput::make('name')
->required()
->default(null),
->columnSpan(2),
Select::make('type')
->options([
'Grapper' => 'Grapper',
'Comparatore' => 'Comparatore',
])
->default('grapper')
->selectablePlaceholder(false),
Select::make('provider_id')
->relationship('provider', 'name')
->required()
@@ -26,15 +36,16 @@ class SupervisorForm
->nullable(),
Select::make('bookmaker_id')
->options(Bookmaker::query()->where('is_active', 1)->pluck('name', 'id'))
->nullable(),
TextInput::make('sleep')
->required()
->numeric()
->default(30),
TextInput::make('limit')
->required()
->numeric()
->default(0),
->selectablePlaceholder(true),
Fieldset::make('Supervisor or Cron Toggle')
->schema([
Toggle::make('is_cron')->live(),
TextInput::make('sleep')
->label('Sleep between loops')
->hidden(fn (Get $get): bool => $get('is_cron'))
->numeric()
->default(30),
])->columnSpan(2),
]);
}
}