Skip to content

Commit

Permalink
fix: bcr project national toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiio committed Jun 17, 2024
1 parent 490044d commit 5c7ee5c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion app/Filament/Resources/BCRProjectResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Filament\Forms\Components\SpatieMediaLibraryFileUpload;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Resources\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
Expand Down Expand Up @@ -71,12 +72,21 @@ public static function form(Form $form): Form
->columnSpanFull()
->required(),

Toggle::make('is_national')
->label(__('project.labels.is_national'))
->inlineLabel()
->columnSpanFull()
->reactive()
->required(),

Select::make('county_id')
->label(__('bcr-project.labels.county'))
->relationship('county', 'name')
->inlineLabel()
->columnSpanFull()
->required(),
->required()
->hidden(fn (callable $get) => $get('is_national') === true),

Select::make('status')
->label(__('bcr-project.labels.status'))
->inlineLabel()
Expand Down

0 comments on commit 5c7ee5c

Please sign in to comment.