label(__('panel.applications.actions.reply')) ->icon('heroicon-o-envelope') ->color('primary') ->url(fn (Application $record) => 'mailto:'.$record->email.'?subject=' .rawurlencode(__('panel.applications.reply_subject', [ 'subject' => $record->subject(), ]))) ->openUrlInNewTab(), Action::make('notes') ->label(__('panel.applications.actions.notes')) ->icon('heroicon-o-pencil-square') ->color('gray') ->authorize('update') ->schema([ Textarea::make('notes') ->label(__('panel.applications.fields.notes')) ->helperText(__('panel.applications.fields.notes_hint')) ->rows(6), ]) ->fillForm(fn (Application $record) => ['notes' => $record->notes]) ->action(function (Application $record, array $data): void { // Notes are outside the model's fillable list on purpose — // nothing arriving from the public form may ever land in // them — so they are written explicitly here. $record->forceFill(['notes' => $data['notes']])->save(); Notification::make() ->title(__('panel.applications.saved')) ->success() ->send(); }), ...ApplicationsTable::statusActions(), DeleteAction::make(), RestoreAction::make(), ForceDeleteAction::make(), ]; } }