We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fe4e3f5 + 9b2fad0 commit db06b58Copy full SHA for db06b58
app/Filament/Resources/EventResource.php
@@ -60,12 +60,13 @@ public static function form(Form $form): Form
60
->hintIcon('heroicon-o-folder')
61
->searchable()
62
->options(
63
+ fn (?Event $record) =>
64
in_array(auth()->user()->role->key, [
65
RoleKey::SYSTEM,
66
RoleKey::NMT
67
]) ? self::setFirOptions(FlightInformationRegion::all()) :
- self::setFirOptions(auth()->user()
68
- ->flightInformationRegions)
+ self::setFirOptions(collect(is_null($record) ? [] : [$record->flightInformationRegion->id => $record->flightInformationRegion])->merge(auth()->user()
69
+ ->flightInformationRegions))
70
)
71
->required(),
72
Forms\Components\DateTimePicker::make('date_start')
0 commit comments