Skip to content

Commit

Permalink
Merge pull request #357 from ECFMP/event-fir-name-not-showing
Browse files Browse the repository at this point in the history
fix: display events fir properly for non-editors
  • Loading branch information
AndyTWF authored Jan 20, 2023
2 parents fe4e3f5 + 9b2fad0 commit db06b58
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/Filament/Resources/EventResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ public static function form(Form $form): Form
->hintIcon('heroicon-o-folder')
->searchable()
->options(
fn (?Event $record) =>
in_array(auth()->user()->role->key, [
RoleKey::SYSTEM,
RoleKey::NMT
]) ? self::setFirOptions(FlightInformationRegion::all()) :
self::setFirOptions(auth()->user()
->flightInformationRegions)
self::setFirOptions(collect(is_null($record) ? [] : [$record->flightInformationRegion->id => $record->flightInformationRegion])->merge(auth()->user()
->flightInformationRegions))
)
->required(),
Forms\Components\DateTimePicker::make('date_start')
Expand Down

0 comments on commit db06b58

Please sign in to comment.