*/ protected function getDefaultHeaderActions(): array { return [ Action::make('runNow') ->authorize(fn () => auth()->user()->can(Permission::ACTION_SCHEDULE_UPDATE, Filament::getTenant())) ->label(fn (Schedule $schedule) => $schedule->tasks->count() === 0 ? trans('server/schedule.no_tasks') : ($schedule->is_processing ? trans('server/schedule.processing') : trans('server/schedule.run_now'))) ->color(fn (Schedule $schedule) => $schedule->tasks->count() === 0 || $schedule->is_processing ? 'warning' : 'primary') ->disabled(fn (Schedule $schedule) => $schedule->tasks->count() === 0 || $schedule->is_processing) ->action(function (ProcessScheduleService $service, Schedule $schedule) { $service->handle($schedule, true); Activity::event('server:schedule.execute') ->subject($schedule) ->property('name', $schedule->name) ->log(); $this->fillForm(); }), EditAction::make() ->hiddenLabel()->iconButton()->iconSize(IconSize::ExtraLarge) ->icon('tabler-calendar-code') ->tooltip(trans('server/schedule.edit')), ]; } public function getBreadcrumbs(): array { return []; } }