Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 1m3s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m7s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 1m16s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 1m20s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m29s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m33s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 1m28s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m33s
CI / Build-Artefakte aktuell (pull_request) Failing after 52s
- Nüchterne, professionelle Optik: neutrale Flächen, Markenfarbe nur als Akzent, Inter-Schrift (lokal) - Zweizeiliger Header mit Suche, Hauptnavigation und Avatar-Menü - Startseite mit Begrüßungskarte, Schnellzugriffen und „Neu im Team“ - Personenverzeichnis mit Suche, Abteilungsfilter und Seitenaufteilung - Markenfarbe exakt übernommen, Abstufungen serverseitig in OKLCH (ColorPalette) – gemeinsam für Portal und Admin, keine Farbberechnung im Browser - Schnellzugriffe im Admin pflegbar - Filament-Avatare lokal statt über ui-avatars.com (DSGVO) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
72 lines
2.4 KiB
PHP
72 lines
2.4 KiB
PHP
<?php
|
|
|
|
namespace App\Support;
|
|
|
|
/**
|
|
* Schnellzugriffe auf der Startseite (App-Launcher), gepflegt im Admin-Bereich.
|
|
*/
|
|
class QuickLinks
|
|
{
|
|
/**
|
|
* Auswahl an Symbolen (Lucide-Namen). Das Portal bündelt genau diese Symbole,
|
|
* deshalb ist die Liste bewusst begrenzt.
|
|
*/
|
|
public const ICONS = [
|
|
'link' => 'Link',
|
|
'clock' => 'Uhr / Zeiterfassung',
|
|
'calendar-days' => 'Kalender / Dienstplan',
|
|
'plane' => 'Urlaub',
|
|
'receipt' => 'Reisekosten / Belege',
|
|
'graduation-cap' => 'Fortbildung',
|
|
'headset' => 'IT-Support',
|
|
'utensils' => 'Speiseplan',
|
|
'car' => 'Fahrdienst',
|
|
'file-text' => 'Formulare / Dokumente',
|
|
'book-open' => 'Handbuch / Richtlinien',
|
|
'users' => 'Personen / Teams',
|
|
'mail' => 'E-Mail',
|
|
'message-square' => 'Chat / Feedback',
|
|
'lightbulb' => 'Ideen',
|
|
'shield-check' => 'Datenschutz / Sicherheit',
|
|
'heart-handshake' => 'Soziales / MAV',
|
|
'building-2' => 'Standorte',
|
|
'wrench' => 'Technik / Hausmeister',
|
|
'monitor' => 'Anwendung',
|
|
'folder' => 'Ablage',
|
|
'phone' => 'Telefonbuch',
|
|
'megaphone' => 'Ankündigungen',
|
|
'briefcase' => 'Stellenangebote',
|
|
];
|
|
|
|
public function __construct(private readonly Settings $settings) {}
|
|
|
|
/**
|
|
* @return list<array{label: string, url: string, icon: string, new_tab: bool}>
|
|
*/
|
|
public function all(): array
|
|
{
|
|
$links = $this->settings->get('portal.quick_links');
|
|
|
|
if (! is_array($links)) {
|
|
return $this->defaults();
|
|
}
|
|
|
|
return array_values(array_map(fn (array $link) => [
|
|
'label' => (string) ($link['label'] ?? ''),
|
|
'url' => preg_match('#^(https?://|/)#i', (string) ($link['url'] ?? '')) ? (string) $link['url'] : '#',
|
|
'icon' => array_key_exists($link['icon'] ?? '', self::ICONS) ? $link['icon'] : 'link',
|
|
'new_tab' => (bool) ($link['new_tab'] ?? false),
|
|
], $links));
|
|
}
|
|
|
|
/**
|
|
* @return list<array{label: string, url: string, icon: string, new_tab: bool}>
|
|
*/
|
|
public function defaults(): array
|
|
{
|
|
return [
|
|
['label' => 'Personen', 'url' => '/personen', 'icon' => 'users', 'new_tab' => false],
|
|
['label' => 'Mein Profil', 'url' => '/profil/bearbeiten', 'icon' => 'file-text', 'new_tab' => false],
|
|
];
|
|
}
|
|
}
|