wip
This commit is contained in:
1 parent
cd91e3b708
commit
c30aaa15fe
32 files changed
+365
-10160
No files matched your search
@@ -52,7 +52,7 @@ class SupervisorsTable
|
||||
SelectColumn::make('name')
|
||||
->selectablePlaceholder(true)
|
||||
->hidden(function (ListSupervisors $livewire) {
|
||||
return $livewire->tableFilters['provider_id']['value'] == 8;
|
||||
return (bool) in_array($livewire->tableFilters['provider_id']['value'], [8,12]);
|
||||
})
|
||||
->options(function ($record) {
|
||||
switch ($record->provider_id) {
|
||||
@@ -116,7 +116,7 @@ class SupervisorsTable
|
||||
}),
|
||||
SelectColumn::make('sport_id')
|
||||
->hidden(function (ListSupervisors $livewire) {
|
||||
return in_array($livewire->tableFilters['provider_id']['value'], [11]);
|
||||
return in_array($livewire->tableFilters['provider_id']['value'], [11, 12]);
|
||||
})
|
||||
->options(fn () => Sport::where('is_active', 1)->pluck('name', 'id'))
|
||||
->placeholder('All'),
|
||||
@@ -182,6 +182,7 @@ class SupervisorsTable
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('provider_id')
|
||||
->selectablePlaceholder(false)
|
||||
->relationship('provider', 'name')
|
||||
->label('Provider'),
|
||||
SelectFilter::make('sport_id')
|
||||
|
||||
+3
@@ -5,6 +5,7 @@ namespace App\Filament\Clusters\StaticData\Resources\SofaScoreTasks\Schemas;
|
||||
use App\Models\Sport;
|
||||
use Filament\Forms\Components\DatePicker;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Components\Utilities\Get;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
@@ -15,6 +16,8 @@ class SofaScoreTaskForm
|
||||
return $schema
|
||||
->columns(1)
|
||||
->components([
|
||||
TextInput::make('name')
|
||||
->required(),
|
||||
Select::make('sport_id')
|
||||
->default(1)
|
||||
->selectablePlaceholder(false)
|
||||
|
||||
+2
@@ -19,6 +19,8 @@ class SofaScoreTasksTable
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('id')->badge()->alignCenter()->width('1rem'),
|
||||
TextColumn::make('name'),
|
||||
IconColumn::make('sport.icon')
|
||||
->label('')
|
||||
->grow(false)
|
||||
|
||||
Reference in new issue
Block a user