app->singleton(Settings::class); $this->app->make(Abilities::class)->define('it-service.manage', 'IT-Service (OpenNIT) einrichten', 'IT-Service'); $this->app->make(Navigation::class)->add('it-service', 'IT-Service', '/it-service', active: 'it-service.*', sort: 75, icon: 'headset'); // Knopf „Meine IT“ im Profilkasten der Startseite Hooks::filter('greeting.actions', fn (array $actions, User $user) => app(Settings::class)->configured() && app(PluginAccess::class)->allows('it-service', $user) ? [...$actions, ['label' => 'Meine IT', 'href' => '/it-service', 'icon' => 'monitor-smartphone']] : $actions); // Die Kachel lädt ihre Zahlen selbst nach – die Startseite wartet nicht auf OpenNIT. $this->app->make(Widgets::class)->add('it-service.summary', 'it-service::MyIt', 'aside', sort: 25, props: fn () => app(Settings::class)->configured() ? [] : null, label: 'Meine IT (offene Tickets, Ausleihen)', mobileSort: 45); } }