Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Nov 1, 2023
1 parent 58182b0 commit c037995
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/Filament/Pages/Finances.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit c037995

Please sign in to comment.