supervisor resource wip

This commit is contained in:
salam committed 2025-08-25 09:26:04 +02:00
1 parent 769fbc242c
commit 944aa736b2
8 files changed
+45 -92

No files matched your search

@@ -2,8 +2,10 @@
namespace App\Filament\Resources\Supervisors\Schemas;
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\Schema;
class SupervisorForm
@@ -13,41 +15,26 @@ class SupervisorForm
return $schema
->components([
TextInput::make('name')
->required()
->default(null),
TextInput::make('provider_id')
Select::make('provider_id')
->relationship('provider', 'name')
->required()
->numeric()
->default(0),
TextInput::make('sport_id')
->required()
->numeric()
->default(0),
TextInput::make('bookmaker_id')
->required()
->numeric()
->default(0),
->preload(),
Select::make('sport_id')
->options(Sport::query()->where('is_active', 1)->pluck('name', 'id'))
->nullable(),
Select::make('bookmaker_id')
->options(Bookmaker::query()->where('is_active', 1)->pluck('name', 'id'))
->nullable(),
TextInput::make('sleep')
->required()
->numeric()
->default(10),
->default(30),
TextInput::make('limit')
->required()
->numeric()
->default(0),
TextInput::make('runtime')
->default(null),
TextInput::make('events')
->required()
->numeric()
->default(0),
TextInput::make('lastcall')
->required()
->numeric()
->default(0),
Toggle::make('is_cron')
->required(),
Toggle::make('is_active')
->required(),
]);
}
}