From c0379950e6dda4d2803d1d20f3734ef46934f7be Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Wed, 1 Nov 2023 14:20:32 +0000 Subject: [PATCH] Apply fixes from StyleCI --- app/Filament/Pages/Finances.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Filament/Pages/Finances.php b/app/Filament/Pages/Finances.php index 57c5fbc68..04ae3968c 100644 --- a/app/Filament/Pages/Finances.php +++ b/app/Filament/Pages/Finances.php @@ -4,8 +4,8 @@ use App\Repositories\AirlineRepository; use Filament\Forms; -use Filament\Forms\Get; use Filament\Forms\Form; +use Filament\Forms\Get; use Filament\Pages\Page; use Illuminate\Support\Facades\Auth; use Livewire\Attributes\Url; @@ -48,7 +48,9 @@ public function form(Form $form): Form return $form->statePath('filters')->schema([ Forms\Components\DatePicker::make('start_date')->native(false)->maxDate(fn (Get $get) => $get('end_date'))->live()->afterStateUpdated(function () { $this->filtersUpdated(); }), Forms\Components\DatePicker::make('end_date')->native(false)->minDate(fn (Get $get) => $get('start_date'))->maxDate(now())->live()->afterStateUpdated(function () { $this->filtersUpdated(); }), - Forms\Components\Select::make('airline_id')->label('Airline')->options(app(AirlineRepository::class)->selectBoxList())->live()->afterStateUpdated(function (?string $state) { if(!$state || $state == "") $this->filters['airline_id'] = Auth::user()->airline_id; $this->filtersUpdated(); }), + Forms\Components\Select::make('airline_id')->label('Airline')->options(app(AirlineRepository::class)->selectBoxList())->live()->afterStateUpdated(function (?string $state) { if (!$state || $state == '') { + $this->filters['airline_id'] = Auth::user()->airline_id; + } $this->filtersUpdated(); }), ])->columns(3); }