Neues Modul: Qualitätsmanagement
All checks were successful
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 2m46s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m51s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 3m2s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 2m55s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 4m15s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 4m16s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 3m44s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 3m46s
CI / Build-Artefakte aktuell (pull_request) Successful in 52s
All checks were successful
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 2m46s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m51s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 3m2s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 2m55s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 4m15s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 4m16s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 3m44s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 3m46s
CI / Build-Artefakte aktuell (pull_request) Successful in 52s
- Kategorien mit farbigen Ordnerkacheln; Farbe und Symbol je Ordner (Auswahl oder eigener Upload, SVG bereinigt), an Unterordner vererbt - Ordnerseite: Einführungstext, Ansprechpartner (Profilfelder wählbar), Unterordner, Liste mit Dokument, Version, Stand, Größe, Aktion - Einträge: Datei (Lesefassung + bearbeitbare Vorlage), Link, Online-Formular; neue Fassungen archivieren die bisherigen - PDF-Betrachter im Portal (pdf.js) - Eigene Volltextsuche (PDF, Word, Excel, PowerPoint, OpenDocument) mit Textausschnitt; optionale Texterkennung per Tesseract - Rollen-Ausschluss für das ganze Modul, Pflegerecht qm.manage, Zielgruppen je Kategorie - Vorbereitet: Wiedervorlage, Verantwortliche, Lesebestätigungen - Abhängigkeit smalot/pdfparser Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f78cc96be7
commit
b3a057e27c
218 changed files with 13478 additions and 358 deletions
12
CHANGELOG.md
12
CHANGELOG.md
|
|
@ -4,6 +4,18 @@ Neueste Version oben. Jeder Abschnitt beginnt mit `## MAJOR.MINOR.PATCH` und
|
|||
enthält kurze Stichpunkte für Anwenderinnen und Anwender – keine Commit-Texte.
|
||||
Der Self-Updater zeigt diese Abschnitte bei neuen Versionen an.
|
||||
|
||||
## 0.11.0
|
||||
|
||||
- **Neues Modul „Qualitätsmanagement“** (Menüpunkt „Qualitätsmanagement“, Adresse /qm):
|
||||
- Startseite mit Kategorien (durch Linien getrennt) und farbigen Ordnerkacheln; jeder Ordner mit Farbe und Symbol – aus der Symbolauswahl oder selbst hochgeladen –, Unterordner übernehmen beides
|
||||
- Ordnerseite mit Einführungstext, Ansprechpartner*innen (Foto und frei wählbare Profilfelder), Unterordnern und Dokumentenliste
|
||||
- Einträge als Datei, Link oder Online-Formular; Liste mit Dokument, Version, Stand, Größe und Aktion
|
||||
- Dateien: Lesefassung (PDF öffnet sich direkt im Portal) und optional eine bearbeitbare Vorlage; neue Fassungen schieben die bisherigen ins Archiv
|
||||
- Eigene Suche nur im QM – auch im Text von PDF, Word, Excel und PowerPoint, mit Textausschnitt; eingescannte PDFs per Texterkennung, wenn der Server sie bietet
|
||||
- Rollen lassen sich vom ganzen Modul ausschließen (z. B. Klient*innen); pflegen darf, wer „Qualitätsmanagement pflegen“ hat; Kategorien können auf Zielgruppen beschränkt werden
|
||||
- Vorbereitet: Wiedervorlage, Verantwortliche, Lesebestätigungen
|
||||
- Seitenkopf mit optionalem Symbol links; Dateityp-Symbol als gemeinsamer Baustein
|
||||
|
||||
## 0.10.0
|
||||
|
||||
- **„Dokumente“ heißt jetzt „Downloads“** (Adresse /downloads, alte Links leiten weiter). Der Name „Dokumente“ ist für das kommende QM-Modul mit QM-Dokumenten und Formularen vorgesehen. Ordner, Dateien, Rechte, Sichtbarkeiten, Favoriten, Menüpunkte und eingebundene Blöcke werden beim Update automatisch übernommen
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@ namespace App;
|
|||
*/
|
||||
final class Version
|
||||
{
|
||||
public const VERSION = '0.10.0';
|
||||
public const VERSION = '0.11.0';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
"laravel/framework": "^13.17",
|
||||
"league/commonmark": "^2.10",
|
||||
"onelogin/php-saml": "^4.3",
|
||||
"smalot/pdfparser": "^2.12",
|
||||
"symfony/html-sanitizer": "^7.4"
|
||||
},
|
||||
"require-dev": {
|
||||
|
|
|
|||
53
composer.lock
generated
53
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "6d9154cd3a1a14d3c801025c7efbeda5",
|
||||
"content-hash": "72f7525a1e66b25ed25efb76099164be",
|
||||
"packages": [
|
||||
{
|
||||
"name": "anourvalar/eloquent-serialize",
|
||||
|
|
@ -5844,6 +5844,57 @@
|
|||
],
|
||||
"time": "2022-12-17T21:53:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "smalot/pdfparser",
|
||||
"version": "v2.12.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/smalot/pdfparser.git",
|
||||
"reference": "2cfa0d92bd557875c9f52a75fde0e8392302a354"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/smalot/pdfparser/zipball/2cfa0d92bd557875c9f52a75fde0e8392302a354",
|
||||
"reference": "2cfa0d92bd557875c9f52a75fde0e8392302a354",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-iconv": "*",
|
||||
"ext-zlib": "*",
|
||||
"php": ">=7.1",
|
||||
"symfony/polyfill-mbstring": "^1.18"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Smalot\\PdfParser\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastien MALOT",
|
||||
"email": "sebastien@malot.fr"
|
||||
}
|
||||
],
|
||||
"description": "Pdf parser library. Can read and extract information from pdf file.",
|
||||
"homepage": "https://www.pdfparser.org",
|
||||
"keywords": [
|
||||
"extract",
|
||||
"parse",
|
||||
"parser",
|
||||
"pdf",
|
||||
"text"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/smalot/pdfparser/issues",
|
||||
"source": "https://github.com/smalot/pdfparser/tree/v2.12.5"
|
||||
},
|
||||
"time": "2026-04-17T11:37:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/invade",
|
||||
"version": "2.1.1",
|
||||
|
|
|
|||
|
|
@ -102,6 +102,23 @@ ein Plugin (unter „Plugins“ abschaltbar); mehrere Verfahren gleichzeitig sin
|
|||
Nach der ersten Anmeldung zeigt das Formular unter „Zuletzt empfangene Angaben“, welche
|
||||
Attribute und Gruppen der Anbieter liefert.
|
||||
|
||||
## Qualitätsmanagement: Texterkennung (optional)
|
||||
|
||||
Der Text von PDF-, Word-, Excel- und PowerPoint-Dateien wird ohne weitere Voraussetzungen
|
||||
durchsuchbar gemacht. **Eingescannte PDFs** (Bilder ohne Textebene) brauchen eine
|
||||
Texterkennung. Dafür gibt es kein Apache- oder PHP-Modul; das Portal ruft das Programm
|
||||
**Tesseract** auf und wandelt PDF-Seiten mit `pdftoppm` (poppler-utils) oder PHP-Imagick in Bilder um.
|
||||
|
||||
Auf einem eigenen Server (Debian/Ubuntu):
|
||||
|
||||
apt install tesseract-ocr tesseract-ocr-deu poppler-utils
|
||||
|
||||
Dann unter **Administration → Qualitätsmanagement → QM-Einstellungen** die Texterkennung
|
||||
einschalten. Die Seite zeigt, was der Server bereitstellt. Erkannt wird im Hintergrund
|
||||
(Hintergrundaufgaben), einige Dateien je Durchgang. PHP muss Programme starten dürfen
|
||||
(`proc_open` nicht in `disable_functions`). Auf Shared Hosting ist das meist nicht möglich –
|
||||
eingescannte PDFs sind dort nur über Titel und Beschreibung auffindbar.
|
||||
|
||||
## Erscheinungsbild
|
||||
|
||||
Unter **Administration → Portal → Erscheinungsbild** lassen sich Name, Logos,
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ Kantinenplan, Ideenbox, Urlaubsanträge.
|
|||
| **4 – CMS** ✅ | Seitenbaum, Pagebuilder (Layout-, Inhalts-, Medien- und dynamische Blöcke, Sichtbarkeit je Block), Entwürfe, Versionen, Zeitsteuerung, Bearbeitungssperre, Freigaben; News-Freigabe-Workflow und Redaktion im Portal; Benachrichtigungen. Offen: Vorlagen und wiederverwendbare Blöcke |
|
||||
| **4b – Formulare & Umstieg** ✅ | Formular-Plugin (visueller Baukasten im Portal, Bedingungen, Uploads, anonyme Formulare, Mail + Backend, Ergebnis-Rechte je Formular und Rolle, CSV, Löschfristen; eingebunden per Pagebuilder-Block und unter Beiträgen, kein eigener Menüpunkt); WordPress-Import (Beiträge, Kategorien, Bilder, Seiten); E-Mail-Versand im Admin; anpassbare Startseite mit eigenen Kacheln; Geburtstage (optionales Plugin) |
|
||||
| **5 – Branding & Theming** ✅ | Vollständige Seite „Erscheinungsbild“: Logo-Varianten, Farben inkl. Farbtreue & Kontrastprüfung, Schriften, Form, Login-Seite, E-Mails, Live-Vorschau, Entwurf/Veröffentlichen, Export/Import |
|
||||
| **6 – Weitere Plugins & IdPs** | ✅ Organigramm (aus Vorgesetzten, im Admin pflegbar), ✅ Downloads (Ordner mit vererbten Rechten und Sichtbarkeit, Versionen, Suche, Favoriten, Pagebuilder-Block – früher „Dokumente“); geplant: QM-Modul für QM-Dokumente und -Formulare; ✅ OIDC generisch, LDAP/AD, SAML 2 (als Plugins auf gemeinsamem Treiber-Unterbau); offen: Lasttests 5.000 User |
|
||||
| **6 – Weitere Plugins & IdPs** | ✅ Organigramm (aus Vorgesetzten, im Admin pflegbar), ✅ Downloads (Ordner mit vererbten Rechten und Sichtbarkeit, Versionen, Suche, Favoriten, Pagebuilder-Block – früher „Dokumente“); ✅ Qualitätsmanagement (Kategorien, farbige Ordner mit Symbolen, Einführung, Ansprechpartner, Versionen mit Stand und Archiv, Volltextsuche inkl. OCR-Anbindung, PDF-Betrachter, Rollen-Ausschluss; vorbereitet: Wiedervorlage, Lesebestätigung); ✅ OIDC generisch, LDAP/AD, SAML 2 (als Plugins auf gemeinsamem Treiber-Unterbau); offen: Lasttests 5.000 User |
|
||||
| **7 – Plugin-SDK öffentlich** | Doku, Generator, Beispiel-Plugins (kein Plugin-Verzeichnis) |
|
||||
| **8 – Mobil** | REST-API (Sanctum), Web-Push, native App |
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script setup>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { ChevronRight, Download } from '@lucide/vue';
|
||||
import FileIcon from '../components/FileIcon.vue';
|
||||
import FileIcon from '@/components/FileIcon.vue';
|
||||
|
||||
defineProps({ block: { type: Object, required: true } });
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import FileIcon from './FileIcon.vue';
|
||||
import FileIcon from '@/components/FileIcon.vue';
|
||||
|
||||
/**
|
||||
* Kurze Liste für Seitenspalten (Meine Downloads, Häufig genutzt).
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { formatRelative } from '@/lib/format';
|
|||
import { folderSummary, formatSize } from '../lib';
|
||||
import DownloadMenu from './DownloadMenu.vue';
|
||||
import FavoriteButton from './FavoriteButton.vue';
|
||||
import FileIcon from './FileIcon.vue';
|
||||
import FileIcon from '@/components/FileIcon.vue';
|
||||
|
||||
/**
|
||||
* Listenansicht wie in einer Dateiablage: Ordner oben, Dateien darunter,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script setup>
|
||||
import { onBeforeUnmount, onMounted, ref } from 'vue';
|
||||
import FileIcon from './FileIcon.vue';
|
||||
import FileIcon from '@/components/FileIcon.vue';
|
||||
|
||||
/**
|
||||
* Kopf einer Datei-Kachel: Vorschaubild (Bild oder erste PDF-Seite), sonst Dateitypsymbol.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script setup>
|
||||
import { Star } from '@lucide/vue';
|
||||
import Panel from '@/components/Panel.vue';
|
||||
import FileIcon from '../components/FileIcon.vue';
|
||||
import FileIcon from '@/components/FileIcon.vue';
|
||||
|
||||
/**
|
||||
* Startseite: gemerkte Dateien (Stern) – ohne Favoriten die meistgenutzten.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,111 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('qm_categories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name', 120);
|
||||
$table->unsignedInteger('sort')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('qm_folders', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('category_id')->nullable()->constrained('qm_categories')->nullOnDelete();
|
||||
$table->foreignId('parent_id')->nullable()->constrained('qm_folders')->restrictOnDelete();
|
||||
$table->string('name', 120);
|
||||
$table->string('color', 20)->nullable(); // null = vom übergeordneten Ordner erben
|
||||
$table->string('icon', 60)->nullable(); // Symbol aus der Auswahl (wie im Menü)
|
||||
$table->string('icon_path')->nullable(); // oder eigenes, hochgeladenes Symbol
|
||||
$table->boolean('icon_mono')->default(true); // eigenes Symbol einfarbig darstellen
|
||||
$table->text('intro')->nullable();
|
||||
$table->unsignedInteger('sort')->default(0);
|
||||
$table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['parent_id', 'sort']);
|
||||
});
|
||||
|
||||
Schema::create('qm_folder_contacts', function (Blueprint $table) {
|
||||
$table->foreignId('folder_id')->constrained('qm_folders')->cascadeOnDelete();
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->unsignedInteger('sort')->default(0);
|
||||
|
||||
$table->primary(['folder_id', 'user_id']);
|
||||
});
|
||||
|
||||
Schema::create('qm_entries', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('folder_id')->constrained('qm_folders')->restrictOnDelete();
|
||||
$table->string('type', 10); // file | link | form
|
||||
$table->string('title');
|
||||
$table->string('description', 1000)->nullable();
|
||||
$table->string('version', 30)->nullable();
|
||||
$table->date('valid_from')->nullable(); // „Stand“
|
||||
$table->string('url', 1000)->nullable();
|
||||
$table->unsignedBigInteger('form_id')->nullable();
|
||||
$table->unsignedInteger('sort')->default(0);
|
||||
// Vorgesehen für später: Wiedervorlage, Verantwortliche, Lesebestätigung
|
||||
$table->date('review_due_at')->nullable();
|
||||
$table->foreignId('responsible_id')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->boolean('requires_acknowledgement')->default(false);
|
||||
$table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->foreignId('updated_by')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['folder_id', 'sort']);
|
||||
});
|
||||
|
||||
Schema::create('qm_files', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('entry_id')->constrained('qm_entries')->cascadeOnDelete();
|
||||
$table->string('kind', 10); // reading = Lesefassung, editable = bearbeitbare Vorlage
|
||||
$table->string('version', 30)->nullable();
|
||||
$table->date('valid_from')->nullable();
|
||||
$table->string('name');
|
||||
$table->string('path');
|
||||
$table->string('mime', 150)->nullable();
|
||||
$table->unsignedBigInteger('size')->default(0);
|
||||
$table->longText('text')->nullable();
|
||||
$table->string('text_status', 20)->default('pending'); // pending | ok | empty | needs_ocr | ocr | failed | unsupported
|
||||
$table->timestamp('archived_at')->nullable();
|
||||
$table->foreignId('uploaded_by')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->timestamp('created_at')->nullable();
|
||||
|
||||
$table->index(['entry_id', 'archived_at']);
|
||||
$table->index('text_status');
|
||||
});
|
||||
|
||||
// Volltextindex für die Suche im Inhalt (MySQL und MariaDB, InnoDB)
|
||||
if (in_array(DB::getDriverName(), ['mysql', 'mariadb'], true)) {
|
||||
DB::statement('ALTER TABLE qm_files ADD FULLTEXT qm_files_text_fulltext (text)');
|
||||
}
|
||||
|
||||
// Vorgesehen für später: Lesebestätigungen
|
||||
Schema::create('qm_acknowledgements', function (Blueprint $table) {
|
||||
$table->foreignId('entry_id')->constrained('qm_entries')->cascadeOnDelete();
|
||||
$table->foreignId('file_id')->nullable()->constrained('qm_files')->nullOnDelete();
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->timestamp('acknowledged_at');
|
||||
|
||||
$table->primary(['entry_id', 'user_id']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('qm_acknowledgements');
|
||||
Schema::dropIfExists('qm_files');
|
||||
Schema::dropIfExists('qm_entries');
|
||||
Schema::dropIfExists('qm_folder_contacts');
|
||||
Schema::dropIfExists('qm_folders');
|
||||
Schema::dropIfExists('qm_categories');
|
||||
}
|
||||
};
|
||||
13
plugins-core/qm/plugin.json
Normal file
13
plugins-core/qm/plugin.json
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"slug": "qm",
|
||||
"name": "Qualitätsmanagement",
|
||||
"version": "1.0.0",
|
||||
"description": "QM-Dokumente und -Formulare in farbigen Ordnern mit Einführungstext und Ansprechpartnern, Versionen mit Gültigkeitsdatum, Archiv, Volltextsuche (auch im Inhalt von PDF, Word, Excel; optional mit Texterkennung) und Lesen direkt im Browser.",
|
||||
"author": "Inhaus",
|
||||
"namespace": "Inhaus\\Plugins\\Qm\\",
|
||||
"class": "Inhaus\\Plugins\\Qm\\QmPlugin",
|
||||
"requires": {
|
||||
"core": ">=0.11.0",
|
||||
"php": ">=8.3"
|
||||
}
|
||||
}
|
||||
20
plugins-core/qm/resources/js/colors.js
Normal file
20
plugins-core/qm/resources/js/colors.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* Ordnerfarben – passend zu Inhaus\Plugins\Qm\Colors (gleiche Töne, weiße Schrift lesbar).
|
||||
* Klassen ausgeschrieben, damit Tailwind sie findet.
|
||||
*/
|
||||
const palette = {
|
||||
blue: { tile: 'bg-blue-600', text: 'text-blue-700 dark:text-blue-300', soft: 'bg-blue-50 dark:bg-blue-950/60', dot: 'bg-blue-600' },
|
||||
sky: { tile: 'bg-sky-700', text: 'text-sky-700 dark:text-sky-300', soft: 'bg-sky-50 dark:bg-sky-950/60', dot: 'bg-sky-700' },
|
||||
teal: { tile: 'bg-teal-700', text: 'text-teal-700 dark:text-teal-300', soft: 'bg-teal-50 dark:bg-teal-950/60', dot: 'bg-teal-700' },
|
||||
emerald: { tile: 'bg-emerald-700', text: 'text-emerald-700 dark:text-emerald-300', soft: 'bg-emerald-50 dark:bg-emerald-950/60', dot: 'bg-emerald-700' },
|
||||
green: { tile: 'bg-green-700', text: 'text-green-700 dark:text-green-300', soft: 'bg-green-50 dark:bg-green-950/60', dot: 'bg-green-700' },
|
||||
amber: { tile: 'bg-amber-700', text: 'text-amber-700 dark:text-amber-300', soft: 'bg-amber-50 dark:bg-amber-950/60', dot: 'bg-amber-700' },
|
||||
orange: { tile: 'bg-orange-700', text: 'text-orange-700 dark:text-orange-300', soft: 'bg-orange-50 dark:bg-orange-950/60', dot: 'bg-orange-700' },
|
||||
red: { tile: 'bg-red-600', text: 'text-red-700 dark:text-red-300', soft: 'bg-red-50 dark:bg-red-950/60', dot: 'bg-red-600' },
|
||||
rose: { tile: 'bg-rose-600', text: 'text-rose-700 dark:text-rose-300', soft: 'bg-rose-50 dark:bg-rose-950/60', dot: 'bg-rose-600' },
|
||||
violet: { tile: 'bg-violet-600', text: 'text-violet-700 dark:text-violet-300', soft: 'bg-violet-50 dark:bg-violet-950/60', dot: 'bg-violet-600' },
|
||||
indigo: { tile: 'bg-indigo-600', text: 'text-indigo-700 dark:text-indigo-300', soft: 'bg-indigo-50 dark:bg-indigo-950/60', dot: 'bg-indigo-600' },
|
||||
slate: { tile: 'bg-slate-600', text: 'text-slate-700 dark:text-slate-300', soft: 'bg-slate-100 dark:bg-slate-900', dot: 'bg-slate-600' },
|
||||
};
|
||||
|
||||
export const qmColor = (key) => palette[key] ?? palette.blue;
|
||||
51
plugins-core/qm/resources/js/components/ArchiveDialog.vue
Normal file
51
plugins-core/qm/resources/js/components/ArchiveDialog.vue
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { Download } from '@lucide/vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@/components/ui/dialog';
|
||||
import { Skeleton } from '@/components/ui/skeleton';
|
||||
import { http } from '@/lib/http';
|
||||
import { formatSize, formatStand } from '../format';
|
||||
|
||||
const props = defineProps({
|
||||
open: { type: Boolean, default: false },
|
||||
entry: { type: Object, default: null },
|
||||
});
|
||||
|
||||
defineEmits(['update:open']);
|
||||
|
||||
const files = ref(null);
|
||||
|
||||
watch(() => props.open, async (open) => {
|
||||
if (!open || !props.entry) return;
|
||||
files.value = null;
|
||||
files.value = (await http.get(`/qm/eintraege/${props.entry.id}/archiv`)).files;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Dialog :open="open" @update:open="(v) => $emit('update:open', v)">
|
||||
<DialogContent class="sm:max-w-2xl">
|
||||
<DialogHeader>
|
||||
<DialogTitle>Fassungen</DialogTitle>
|
||||
<DialogDescription>{{ entry?.title }} – frühere Fassungen sieht nur das QM-Team.</DialogDescription>
|
||||
</DialogHeader>
|
||||
<div v-if="!files" class="grid gap-2" aria-busy="true"><Skeleton v-for="n in 3" :key="n" class="h-10" /></div>
|
||||
<ul v-else class="-mx-2 divide-y">
|
||||
<li v-for="file in files" :key="file.id" class="flex items-center gap-3 px-2 py-2.5">
|
||||
<div class="min-w-0 flex-1">
|
||||
<p class="truncate text-sm">
|
||||
{{ file.name }}
|
||||
<span class="ml-1 rounded px-1.5 py-0.5 text-[11px]" :class="file.archived ? 'bg-muted text-muted-foreground' : 'bg-brand-soft text-brand-soft-foreground'">{{ file.archived ? 'Archiv' : 'aktuell' }}</span>
|
||||
<span v-if="file.kind === 'editable'" class="ml-1 text-[11px] text-muted-foreground">Vorlage</span>
|
||||
</p>
|
||||
<p class="text-xs text-muted-foreground">
|
||||
Version {{ file.version || '–' }} · Stand {{ formatStand(file.valid_from) }} · {{ formatSize(file.size) }}<template v-if="file.uploader"> · {{ file.uploader }}</template>
|
||||
</p>
|
||||
</div>
|
||||
<Button variant="ghost" size="icon" as-child :title="`${file.name} herunterladen`"><a :href="file.url"><Download /></a></Button>
|
||||
</li>
|
||||
</ul>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
</template>
|
||||
28
plugins-core/qm/resources/js/components/ContactCard.vue
Normal file
28
plugins-core/qm/resources/js/components/ContactCard.vue
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<script setup>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { Mail, Phone, Smartphone } from '@lucide/vue';
|
||||
import PersonAvatar from '@/components/PersonAvatar.vue';
|
||||
|
||||
defineProps({
|
||||
contact: { type: Object, required: true },
|
||||
});
|
||||
|
||||
const href = (field) => (field.type === 'phone' ? `tel:${field.value}` : field.type === 'email' ? `mailto:${field.value}` : null);
|
||||
const icon = (field) => (field.key === 'mobile' ? Smartphone : field.type === 'phone' ? Phone : field.type === 'email' ? Mail : null);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex gap-3">
|
||||
<Link :href="`/personen/${contact.id}`" class="shrink-0"><PersonAvatar :person="contact" class="size-14 text-base" /></Link>
|
||||
<div class="min-w-0 pt-0.5">
|
||||
<Link :href="`/personen/${contact.id}`" class="block truncate text-sm font-semibold hover:underline">{{ contact.name }}</Link>
|
||||
<ul class="mt-1 grid gap-0.5 text-[13px]">
|
||||
<li v-for="field in contact.fields" :key="field.key" class="flex min-w-0 items-center gap-1.5">
|
||||
<component :is="icon(field)" v-if="icon(field)" class="size-3.5 shrink-0 text-muted-foreground" />
|
||||
<a v-if="href(field)" :href="href(field)" class="truncate text-brand-text hover:underline">{{ field.value }}</a>
|
||||
<span v-else class="truncate text-muted-foreground">{{ field.value }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
135
plugins-core/qm/resources/js/components/EntryDialog.vue
Normal file
135
plugins-core/qm/resources/js/components/EntryDialog.vue
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
<script setup>
|
||||
import { computed, watch } from 'vue';
|
||||
import { useForm } from '@inertiajs/vue3';
|
||||
import { ClipboardList, FileText, Link2, LoaderCircle } from '@lucide/vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog';
|
||||
import FormField from '@/components/FormField.vue';
|
||||
import NativeSelect from '@/components/NativeSelect.vue';
|
||||
import FilePick from './FilePick.vue';
|
||||
|
||||
/**
|
||||
* Eintrag anlegen oder bearbeiten. mode: create | edit | version (neue Fassung).
|
||||
*/
|
||||
const props = defineProps({
|
||||
open: { type: Boolean, default: false },
|
||||
mode: { type: String, default: 'create' },
|
||||
entry: { type: Object, default: null },
|
||||
folderId: { type: Number, required: true },
|
||||
forms: { type: Array, default: () => [] },
|
||||
maxUploadMb: { type: Number, default: 20 },
|
||||
});
|
||||
|
||||
const emit = defineEmits(['update:open']);
|
||||
|
||||
const today = () => new Date().toISOString().slice(0, 10);
|
||||
const form = useForm({ type: 'file', title: '', description: '', version: '', valid_from: today(), url: '', form_id: null, reading: null, editable: null, remove_editable: false });
|
||||
|
||||
watch(() => props.open, (open) => {
|
||||
if (!open) return;
|
||||
|
||||
form.clearErrors();
|
||||
const e = props.entry;
|
||||
form.defaults({
|
||||
type: e?.type ?? 'file',
|
||||
title: e?.title ?? '',
|
||||
description: e?.description ?? '',
|
||||
version: e?.version ?? '',
|
||||
valid_from: props.mode === 'version' ? today() : e?.valid_from ?? today(),
|
||||
url: e?.url ?? '',
|
||||
form_id: e?.form_id ?? null,
|
||||
reading: null,
|
||||
editable: null,
|
||||
remove_editable: false,
|
||||
});
|
||||
form.reset();
|
||||
});
|
||||
|
||||
const types = [
|
||||
{ value: 'file', label: 'Datei', icon: FileText },
|
||||
{ value: 'link', label: 'Link', icon: Link2 },
|
||||
{ value: 'form', label: 'Online-Formular', icon: ClipboardList },
|
||||
];
|
||||
|
||||
const title = computed(() => ({ create: 'Eintrag hinzufügen', edit: 'Eintrag bearbeiten', version: 'Neue Fassung hochladen' })[props.mode]);
|
||||
|
||||
function submit() {
|
||||
const url = props.mode === 'create' ? `/qm/ordner/${props.folderId}/eintraege` : `/qm/eintraege/${props.entry.id}`;
|
||||
form.post(url, { forceFormData: true, preserveScroll: true, onSuccess: () => emit('update:open', false) });
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Dialog :open="open" @update:open="(v) => emit('update:open', v)">
|
||||
<DialogContent class="sm:max-w-xl">
|
||||
<DialogHeader>
|
||||
<DialogTitle>{{ title }}</DialogTitle>
|
||||
<DialogDescription v-if="mode === 'version'">„{{ entry?.title }}“ – die bisherige Fassung kommt ins Archiv und bleibt für das QM-Team abrufbar.</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<form class="grid gap-4" @submit.prevent="submit">
|
||||
<div v-if="mode === 'create'" class="grid grid-cols-3 gap-2" role="radiogroup" aria-label="Art des Eintrags">
|
||||
<button
|
||||
v-for="type in types"
|
||||
:key="type.value"
|
||||
type="button"
|
||||
role="radio"
|
||||
:aria-checked="form.type === type.value"
|
||||
class="flex items-center justify-center gap-2 rounded-md border px-3 py-2 text-sm"
|
||||
:class="form.type === type.value ? 'border-brand-400 bg-brand-soft font-medium text-brand-soft-foreground' : 'hover:bg-accent'"
|
||||
@click="form.type = type.value"
|
||||
>
|
||||
<component :is="type.icon" class="size-4" /> {{ type.label }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<FormField id="qm-title" label="Titel" :error="form.errors.title">
|
||||
<Input id="qm-title" v-model="form.title" maxlength="250" placeholder="z. B. Urlaubsantrag" />
|
||||
</FormField>
|
||||
|
||||
<div class="grid gap-4 sm:grid-cols-2">
|
||||
<FormField id="qm-version" label="Version" :error="form.errors.version">
|
||||
<Input id="qm-version" v-model="form.version" maxlength="30" placeholder="z. B. 2.1" />
|
||||
</FormField>
|
||||
<FormField id="qm-valid" label="Stand (gültig ab)" :error="form.errors.valid_from">
|
||||
<Input id="qm-valid" v-model="form.valid_from" type="date" />
|
||||
</FormField>
|
||||
</div>
|
||||
|
||||
<FormField id="qm-description" label="Beschreibung (optional)" :error="form.errors.description">
|
||||
<Input id="qm-description" v-model="form.description" maxlength="1000" />
|
||||
</FormField>
|
||||
|
||||
<template v-if="form.type === 'file'">
|
||||
<FormField id="qm-reading" :label="mode === 'edit' ? 'Datei ersetzen (optional – neue Fassung)' : 'Datei (PDF empfohlen – öffnet sich direkt zum Lesen)'" :error="form.errors.reading">
|
||||
<FilePick id="qm-reading" v-model="form.reading" accept=".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.odt,.ods,.odp,.rtf,.txt,.csv,.png,.jpg,.jpeg,.gif,.webp,.zip" />
|
||||
</FormField>
|
||||
<FormField id="qm-editable" label="Bearbeitbare Vorlage (optional, z. B. Word oder Excel zum Ausfüllen)" :error="form.errors.editable">
|
||||
<FilePick id="qm-editable" v-model="form.editable" accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx,.odt,.ods,.odp,.rtf,.txt,.csv,.pdf,.zip" />
|
||||
</FormField>
|
||||
<label v-if="mode !== 'create' && entry?.editable && !form.editable" class="flex items-center gap-2 text-[13px]">
|
||||
<input v-model="form.remove_editable" type="checkbox" /> Bisherige Vorlage „{{ entry.editable.name }}“ entfernen
|
||||
</label>
|
||||
<p class="text-xs text-muted-foreground">Bis {{ maxUploadMb }} MB je Datei. Der Inhalt wird für die Suche erfasst.</p>
|
||||
</template>
|
||||
|
||||
<FormField v-if="form.type === 'link'" id="qm-url" label="Adresse" :error="form.errors.url">
|
||||
<Input id="qm-url" v-model="form.url" placeholder="https://… oder /seiten/…" />
|
||||
</FormField>
|
||||
|
||||
<FormField v-if="form.type === 'form'" id="qm-form" label="Formular" :error="form.errors.form_id">
|
||||
<NativeSelect id="qm-form" v-model="form.form_id" :options="[{ value: null, label: 'Bitte wählen …' }, ...forms]" />
|
||||
</FormField>
|
||||
|
||||
<DialogFooter>
|
||||
<Button type="button" variant="outline" @click="emit('update:open', false)">Abbrechen</Button>
|
||||
<Button type="submit" :disabled="form.processing || (mode === 'version' && !form.reading && !form.editable)">
|
||||
<LoaderCircle v-if="form.processing" class="animate-spin" /> Speichern
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
<div v-if="form.progress" class="h-1 overflow-hidden rounded-full bg-muted"><div class="h-full bg-brand" :style="{ width: `${form.progress.percentage}%` }" /></div>
|
||||
</form>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
</template>
|
||||
100
plugins-core/qm/resources/js/components/EntryTable.vue
Normal file
100
plugins-core/qm/resources/js/components/EntryTable.vue
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
<script setup>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { Archive, ClipboardList, Download, EllipsisVertical, ExternalLink, FileUp, PencilLine, ScanText, Trash2 } from '@lucide/vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from '@/components/ui/dropdown-menu';
|
||||
import FileIcon from '@/components/FileIcon.vue';
|
||||
import { formatSize, formatStand } from '../format';
|
||||
|
||||
/**
|
||||
* Dokumentenliste: Dokument, Version, Stand, Größe und Aktion.
|
||||
* Ein Klick auf den Titel öffnet das Dokument zum Lesen (PDF im Portal).
|
||||
*/
|
||||
defineProps({
|
||||
entries: { type: Array, required: true },
|
||||
canManage: { type: Boolean, default: false },
|
||||
});
|
||||
|
||||
defineEmits(['edit', 'new-version', 'archive', 'remove']);
|
||||
|
||||
const actionLabel = { view: 'Lesen', download: 'Herunterladen', link: 'Öffnen', form: 'Ausfüllen' };
|
||||
const isExternal = (entry) => entry.open_kind === 'link' || entry.open_kind === 'download';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="overflow-hidden rounded-lg border bg-card">
|
||||
<div class="hidden grid-cols-[minmax(0,1fr)_6rem_7rem_6rem_9.5rem] items-center gap-4 border-b bg-muted/40 px-4 py-2 text-xs font-medium text-muted-foreground md:grid" :class="{ 'md:grid-cols-[minmax(0,1fr)_6rem_7rem_6rem_11.5rem]': canManage }">
|
||||
<span>Dokument</span>
|
||||
<span>Version</span>
|
||||
<span>Stand</span>
|
||||
<span class="text-right">Größe</span>
|
||||
<span class="sr-only">Aktion</span>
|
||||
</div>
|
||||
<ul class="divide-y">
|
||||
<li
|
||||
v-for="entry in entries"
|
||||
:key="entry.id"
|
||||
class="grid items-center gap-x-4 gap-y-1 px-4 py-2.5 hover:bg-accent/50 md:grid-cols-[minmax(0,1fr)_6rem_7rem_6rem_9.5rem]"
|
||||
:class="{ 'md:grid-cols-[minmax(0,1fr)_6rem_7rem_6rem_11.5rem]': canManage }"
|
||||
>
|
||||
<div class="flex min-w-0 items-center gap-3">
|
||||
<FileIcon v-if="entry.type === 'file'" :extension="entry.extension" size="sm" />
|
||||
<span v-else class="grid size-8 shrink-0 place-items-center rounded-md bg-muted text-muted-foreground">
|
||||
<ClipboardList v-if="entry.type === 'form'" class="size-4" />
|
||||
<ExternalLink v-else class="size-4" />
|
||||
</span>
|
||||
<div class="min-w-0">
|
||||
<component
|
||||
:is="isExternal(entry) ? 'a' : Link"
|
||||
v-if="entry.open_url"
|
||||
:href="entry.open_url"
|
||||
:target="entry.open_kind === 'link' ? '_blank' : undefined"
|
||||
:rel="entry.open_kind === 'link' ? 'noopener' : undefined"
|
||||
class="block truncate text-sm font-medium hover:underline"
|
||||
>
|
||||
{{ entry.title }}
|
||||
</component>
|
||||
<span v-else class="block truncate text-sm font-medium">{{ entry.title }}</span>
|
||||
<p v-if="entry.description" class="truncate text-xs text-muted-foreground">{{ entry.description }}</p>
|
||||
<p class="flex flex-wrap items-center gap-x-2 text-xs text-muted-foreground">
|
||||
<span class="md:hidden">{{ entry.version ? `Version ${entry.version} · ` : '' }}Stand {{ formatStand(entry.valid_from) }}</span>
|
||||
<a v-if="entry.editable" :href="entry.editable.url" class="inline-flex items-center gap-1 text-brand-text hover:underline" :title="entry.editable.name">
|
||||
<Download class="size-3" /> Vorlage ({{ entry.editable.extension }})
|
||||
</a>
|
||||
<span v-if="canManage && entry.text_status === 'needs_ocr'" class="inline-flex items-center gap-1 text-amber-700 dark:text-amber-400" title="Eingescanntes PDF – Inhalt erst nach Texterkennung durchsuchbar">
|
||||
<ScanText class="size-3" /> Scan, Inhalt nicht durchsuchbar
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<span class="hidden text-[13px] md:block">{{ entry.version || '–' }}</span>
|
||||
<span class="hidden text-[13px] tabular-nums md:block">{{ formatStand(entry.valid_from) }}</span>
|
||||
<span class="hidden text-right text-[13px] text-muted-foreground tabular-nums md:block">{{ entry.type === 'file' ? formatSize(entry.size) : '–' }}</span>
|
||||
<div class="flex items-center justify-end gap-1">
|
||||
<Button v-if="entry.open_url" size="sm" variant="outline" class="h-8 min-w-28" as-child>
|
||||
<component :is="isExternal(entry) ? 'a' : Link" :href="entry.open_url" :target="entry.open_kind === 'link' ? '_blank' : undefined" :rel="entry.open_kind === 'link' ? 'noopener' : undefined">
|
||||
<ExternalLink v-if="entry.open_kind === 'link'" /><ClipboardList v-else-if="entry.open_kind === 'form'" /><Download v-else-if="entry.open_kind === 'download'" />
|
||||
{{ actionLabel[entry.open_kind] }}
|
||||
</component>
|
||||
</Button>
|
||||
<Button v-if="entry.open_kind === 'view' && entry.download_url" size="icon" variant="ghost" class="size-8 text-muted-foreground" as-child :title="`${entry.title} herunterladen`">
|
||||
<a :href="entry.download_url" :aria-label="`${entry.title} herunterladen`"><Download /></a>
|
||||
</Button>
|
||||
<span v-else class="hidden size-8 md:block" aria-hidden="true" />
|
||||
<DropdownMenu v-if="canManage">
|
||||
<DropdownMenuTrigger as-child>
|
||||
<Button variant="ghost" size="icon" class="size-8 text-muted-foreground" :aria-label="`Aktionen für ${entry.title}`"><EllipsisVertical /></Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end" class="w-56">
|
||||
<DropdownMenuItem @select="$emit('edit', entry)"><PencilLine /> Bearbeiten</DropdownMenuItem>
|
||||
<DropdownMenuItem v-if="entry.type === 'file'" @select="$emit('new-version', entry)"><FileUp /> Neue Fassung hochladen</DropdownMenuItem>
|
||||
<DropdownMenuItem v-if="entry.type === 'file'" @select="$emit('archive', entry)"><Archive /> Archiv (frühere Fassungen)</DropdownMenuItem>
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem class="text-destructive" @select="$emit('remove', entry)"><Trash2 /> Löschen</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
38
plugins-core/qm/resources/js/components/FilePick.vue
Normal file
38
plugins-core/qm/resources/js/components/FilePick.vue
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { Paperclip, X } from '@lucide/vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
||||
/**
|
||||
* Dateiauswahl im Stil des Portals statt des Browser-Standards.
|
||||
*/
|
||||
const model = defineModel({ type: [Object, null], default: null });
|
||||
|
||||
defineProps({
|
||||
id: { type: String, required: true },
|
||||
accept: { type: String, default: '' },
|
||||
});
|
||||
|
||||
const input = ref(null);
|
||||
|
||||
function pick(event) {
|
||||
model.value = event.target.files[0] ?? null;
|
||||
}
|
||||
|
||||
function clear() {
|
||||
model.value = null;
|
||||
if (input.value) input.value.value = '';
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex min-w-0 items-center gap-2">
|
||||
<input :id="id" ref="input" type="file" class="sr-only" :accept="accept" @change="pick" />
|
||||
<Button type="button" variant="outline" size="sm" @click="input?.click()"><Paperclip /> Datei auswählen</Button>
|
||||
<span v-if="model" class="flex min-w-0 items-center gap-1 text-[13px]">
|
||||
<span class="truncate">{{ model.name }}</span>
|
||||
<button type="button" class="grid size-6 shrink-0 place-items-center rounded text-muted-foreground hover:bg-accent" aria-label="Auswahl entfernen" @click="clear"><X class="size-3.5" /></button>
|
||||
</span>
|
||||
<span v-else class="text-[13px] text-muted-foreground">Keine Datei ausgewählt</span>
|
||||
</div>
|
||||
</template>
|
||||
40
plugins-core/qm/resources/js/components/FolderTile.vue
Normal file
40
plugins-core/qm/resources/js/components/FolderTile.vue
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<script setup>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { qmColor } from '../colors';
|
||||
import QmIcon from './QmIcon.vue';
|
||||
|
||||
/**
|
||||
* Farbige Ordnerkachel.
|
||||
*/
|
||||
const props = defineProps({
|
||||
folder: { type: Object, required: true },
|
||||
small: { type: Boolean, default: false },
|
||||
});
|
||||
|
||||
const summary = () => {
|
||||
const parts = [];
|
||||
if (props.folder.folders) parts.push(`${props.folder.folders} ${props.folder.folders === 1 ? 'Ordner' : 'Ordner'}`);
|
||||
if (props.folder.entries) parts.push(`${props.folder.entries} ${props.folder.entries === 1 ? 'Dokument' : 'Dokumente'}`);
|
||||
|
||||
return parts.join(' · ') || 'Noch leer';
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Link
|
||||
:href="folder.url"
|
||||
class="group relative flex flex-col justify-between overflow-hidden rounded-lg text-white shadow-xs transition hover:shadow-md hover:brightness-110 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-none"
|
||||
:class="[qmColor(folder.color).tile, small ? 'min-h-24 p-3.5' : 'min-h-32 p-4']"
|
||||
>
|
||||
<span class="pointer-events-none absolute -right-4 -bottom-5 opacity-15 transition-transform group-hover:scale-105" aria-hidden="true">
|
||||
<QmIcon :icon="folder.icon" :class="small ? 'size-20' : 'size-24'" />
|
||||
</span>
|
||||
<span class="grid place-items-center rounded-md bg-white/15" :class="small ? 'size-9' : 'size-11'">
|
||||
<QmIcon :icon="folder.icon" :class="small ? 'size-5' : 'size-6'" />
|
||||
</span>
|
||||
<span class="relative mt-3">
|
||||
<span class="block leading-tight font-semibold" :class="small ? 'text-sm' : 'text-[15px]'">{{ folder.name }}</span>
|
||||
<span class="mt-0.5 block text-xs text-white/80">{{ summary() }}</span>
|
||||
</span>
|
||||
</Link>
|
||||
</template>
|
||||
110
plugins-core/qm/resources/js/components/PdfViewer.vue
Normal file
110
plugins-core/qm/resources/js/components/PdfViewer.vue
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
<script setup>
|
||||
import { nextTick, onBeforeUnmount, onMounted, ref, shallowRef } from 'vue';
|
||||
import { LoaderCircle, Minus, Plus } from '@lucide/vue';
|
||||
|
||||
/**
|
||||
* PDF lesen im Portal (pdf.js): Seiten werden erst gezeichnet, wenn sie ins Bild kommen.
|
||||
*/
|
||||
const props = defineProps({
|
||||
url: { type: String, required: true },
|
||||
});
|
||||
|
||||
const container = ref(null);
|
||||
const pdf = shallowRef(null);
|
||||
const pages = ref([]); // { number, width, height }
|
||||
const scale = ref(1);
|
||||
const current = ref(1);
|
||||
const error = ref(false);
|
||||
const rendered = new Map();
|
||||
let observer;
|
||||
let lib;
|
||||
|
||||
async function load() {
|
||||
try {
|
||||
const [pdfjs, worker] = await Promise.all([import('pdfjs-dist'), import('pdfjs-dist/build/pdf.worker.min.mjs?url')]);
|
||||
pdfjs.GlobalWorkerOptions.workerSrc = worker.default;
|
||||
lib = pdfjs;
|
||||
pdf.value = await pdfjs.getDocument({ url: props.url, isEvalSupported: false, enableXfa: false }).promise;
|
||||
|
||||
const first = (await pdf.value.getPage(1)).getViewport({ scale: 1 });
|
||||
const available = Math.min(container.value.clientWidth - 48, 860);
|
||||
scale.value = Math.max(0.5, available / first.width);
|
||||
pages.value = Array.from({ length: pdf.value.numPages }, (_, i) => ({ number: i + 1, width: first.width, height: first.height }));
|
||||
await nextTick();
|
||||
observe();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
error.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
function observe() {
|
||||
observer?.disconnect();
|
||||
rendered.clear();
|
||||
observer = new IntersectionObserver((entries) => {
|
||||
for (const entry of entries) {
|
||||
const number = Number(entry.target.dataset.page);
|
||||
if (entry.isIntersecting) {
|
||||
current.value = number;
|
||||
render(number, entry.target.querySelector('canvas'));
|
||||
}
|
||||
}
|
||||
}, { root: container.value, rootMargin: '400px 0px' });
|
||||
container.value.querySelectorAll('[data-page]').forEach((el) => observer.observe(el));
|
||||
}
|
||||
|
||||
async function render(number, canvas) {
|
||||
const key = `${number}@${scale.value}`;
|
||||
if (!canvas || rendered.get(number) === key) return;
|
||||
rendered.set(number, key);
|
||||
|
||||
const page = await pdf.value.getPage(number);
|
||||
const viewport = page.getViewport({ scale: scale.value });
|
||||
const ratio = window.devicePixelRatio || 1;
|
||||
canvas.width = Math.floor(viewport.width * ratio);
|
||||
canvas.height = Math.floor(viewport.height * ratio);
|
||||
canvas.style.width = `${Math.floor(viewport.width)}px`;
|
||||
canvas.style.height = `${Math.floor(viewport.height)}px`;
|
||||
await page.render({ canvasContext: canvas.getContext('2d'), viewport, transform: ratio !== 1 ? [ratio, 0, 0, ratio, 0, 0] : null }).promise;
|
||||
}
|
||||
|
||||
async function zoom(step) {
|
||||
scale.value = Math.min(3, Math.max(0.4, Math.round((scale.value + step) * 10) / 10));
|
||||
await nextTick();
|
||||
observe();
|
||||
}
|
||||
|
||||
onMounted(load);
|
||||
onBeforeUnmount(() => {
|
||||
observer?.disconnect();
|
||||
pdf.value?.destroy();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="relative flex h-full min-h-0 flex-col">
|
||||
<div class="flex items-center justify-between gap-3 border-b bg-card px-3 py-1.5 text-[13px] text-muted-foreground">
|
||||
<span class="tabular-nums">{{ pages.length ? `Seite ${current} von ${pages.length}` : '' }}</span>
|
||||
<div class="flex items-center rounded-md border">
|
||||
<button type="button" class="grid size-8 place-items-center hover:text-foreground" aria-label="Verkleinern" @click="zoom(-0.2)"><Minus class="size-4" /></button>
|
||||
<span class="w-12 text-center tabular-nums">{{ Math.round(scale * 100) }} %</span>
|
||||
<button type="button" class="grid size-8 place-items-center hover:text-foreground" aria-label="Vergrößern" @click="zoom(0.2)"><Plus class="size-4" /></button>
|
||||
</div>
|
||||
</div>
|
||||
<div ref="container" class="min-h-0 flex-1 overflow-auto bg-muted/60 px-4 py-6">
|
||||
<div v-if="error" class="mx-auto max-w-md rounded-lg border bg-card p-6 text-center text-sm">Die Datei lässt sich hier nicht anzeigen. Bitte herunterladen.</div>
|
||||
<div v-else-if="!pages.length" class="grid h-full place-items-center"><LoaderCircle class="size-6 animate-spin text-muted-foreground" /></div>
|
||||
<div v-else class="grid justify-center gap-4">
|
||||
<div
|
||||
v-for="p in pages"
|
||||
:key="p.number"
|
||||
:data-page="p.number"
|
||||
class="bg-white shadow-md"
|
||||
:style="{ width: `${Math.floor(p.width * scale)}px`, height: `${Math.floor(p.height * scale)}px` }"
|
||||
>
|
||||
<canvas :aria-label="`Seite ${p.number}`" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
24
plugins-core/qm/resources/js/components/QmIcon.vue
Normal file
24
plugins-core/qm/resources/js/components/QmIcon.vue
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<script setup>
|
||||
import AppIcon from '@/components/AppIcon.vue';
|
||||
|
||||
/**
|
||||
* Ordnersymbol: aus der Symbolauswahl ({ name }) oder hochgeladen ({ url, mono }).
|
||||
* Einfarbige eigene Symbole übernehmen die Textfarbe (CSS-Maske).
|
||||
*/
|
||||
defineProps({
|
||||
icon: { type: Object, default: () => ({ name: 'folder' }) },
|
||||
strokeWidth: { type: [Number, String], default: 1.75 },
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppIcon v-if="icon?.name" :name="icon.name" :stroke-width="strokeWidth" />
|
||||
<span
|
||||
v-else-if="icon?.url && icon.mono"
|
||||
class="inline-block bg-current"
|
||||
:style="{ maskImage: `url('${icon.url}')`, WebkitMaskImage: `url('${icon.url}')`, maskSize: 'contain', WebkitMaskSize: 'contain', maskRepeat: 'no-repeat', WebkitMaskRepeat: 'no-repeat', maskPosition: 'center', WebkitMaskPosition: 'center' }"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<img v-else-if="icon?.url" :src="icon.url" alt="" class="object-contain" />
|
||||
<AppIcon v-else name="folder" :stroke-width="strokeWidth" />
|
||||
</template>
|
||||
23
plugins-core/qm/resources/js/components/QmSearchBox.vue
Normal file
23
plugins-core/qm/resources/js/components/QmSearchBox.vue
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { router } from '@inertiajs/vue3';
|
||||
import { Search } from '@lucide/vue';
|
||||
import { Input } from '@/components/ui/input';
|
||||
|
||||
const props = defineProps({
|
||||
initial: { type: String, default: '' },
|
||||
});
|
||||
|
||||
const query = ref(props.initial);
|
||||
|
||||
function submit() {
|
||||
if (query.value.trim()) router.get('/qm/suche', { q: query.value.trim() });
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<form class="relative w-full sm:w-80" role="search" @submit.prevent="submit">
|
||||
<Search class="pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground" />
|
||||
<Input v-model="query" type="search" class="h-10 bg-card pl-9" placeholder="QM durchsuchen – auch im Text …" aria-label="Qualitätsmanagement durchsuchen" />
|
||||
</form>
|
||||
</template>
|
||||
10
plugins-core/qm/resources/js/format.js
Normal file
10
plugins-core/qm/resources/js/format.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
const dateFormat = new Intl.DateTimeFormat('de-DE', { day: '2-digit', month: '2-digit', year: 'numeric' });
|
||||
|
||||
export const formatStand = (date) => (date ? dateFormat.format(new Date(`${date}T12:00:00`)) : '–');
|
||||
|
||||
export const formatSize = (bytes) => {
|
||||
if (!bytes) return '–';
|
||||
if (bytes >= 1024 * 1024) return `${(bytes / 1024 / 1024).toFixed(1).replace('.', ',')} MB`;
|
||||
|
||||
return `${Math.max(1, Math.round(bytes / 1024))} KB`;
|
||||
};
|
||||
106
plugins-core/qm/resources/js/pages/Folder.vue
Normal file
106
plugins-core/qm/resources/js/pages/Folder.vue
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
<script setup>
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { router, usePage } from '@inertiajs/vue3';
|
||||
import { FilePlus2, Files, FolderCog, Users } from '@lucide/vue';
|
||||
import { toast } from 'vue-sonner';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import EmptyState from '@/components/EmptyState.vue';
|
||||
import PageHeader from '@/components/PageHeader.vue';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import { qmColor } from '../colors';
|
||||
import ArchiveDialog from '../components/ArchiveDialog.vue';
|
||||
import ContactCard from '../components/ContactCard.vue';
|
||||
import EntryDialog from '../components/EntryDialog.vue';
|
||||
import EntryTable from '../components/EntryTable.vue';
|
||||
import FolderTile from '../components/FolderTile.vue';
|
||||
import QmIcon from '../components/QmIcon.vue';
|
||||
import QmSearchBox from '../components/QmSearchBox.vue';
|
||||
|
||||
const props = defineProps({
|
||||
folder: { type: Object, required: true },
|
||||
breadcrumbs: { type: Array, default: () => [] },
|
||||
children: { type: Array, default: () => [] },
|
||||
entries: { type: Array, default: () => [] },
|
||||
canManage: { type: Boolean, default: false },
|
||||
forms: { type: Array, default: () => [] },
|
||||
maxUploadMb: { type: Number, default: 20 },
|
||||
adminUrl: { type: String, default: null },
|
||||
});
|
||||
|
||||
const page = usePage();
|
||||
watch(() => page.props.flash.status, (status) => status && toast.success(status), { immediate: true });
|
||||
|
||||
const color = computed(() => qmColor(props.folder.color));
|
||||
const crumbs = computed(() => [{ label: 'Qualitätsmanagement', href: '/qm' }, ...props.breadcrumbs.map((b) => ({ label: b.name, href: `/qm/ordner/${b.id}` }))]);
|
||||
const hasAside = computed(() => props.folder.contacts.length > 0);
|
||||
|
||||
// Pflege
|
||||
const dialog = ref({ open: false, mode: 'create', entry: null });
|
||||
const archive = ref({ open: false, entry: null });
|
||||
const openDialog = (mode, entry = null) => (dialog.value = { open: true, mode, entry });
|
||||
|
||||
function remove(entry) {
|
||||
if (window.confirm(`„${entry.title}“ mit allen Fassungen löschen?`)) {
|
||||
router.delete(`/qm/eintraege/${entry.id}`, { preserveScroll: true });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppLayout :title="folder.name">
|
||||
<PageHeader :title="folder.name" :breadcrumbs="crumbs">
|
||||
<template #leading>
|
||||
<span class="grid size-12 shrink-0 place-items-center rounded-lg text-white shadow-xs" :class="color.tile"><QmIcon :icon="folder.icon" class="size-6" /></span>
|
||||
</template>
|
||||
<template #actions>
|
||||
<Button v-if="adminUrl" variant="outline" class="h-10" as-child><a :href="adminUrl"><FolderCog /> Ordner bearbeiten</a></Button>
|
||||
<QmSearchBox />
|
||||
</template>
|
||||
</PageHeader>
|
||||
|
||||
<div class="grid items-start gap-6" :class="{ 'lg:grid-cols-[minmax(0,1fr)_20rem]': hasAside }">
|
||||
<div class="grid min-w-0 gap-6">
|
||||
<section v-if="folder.intro" class="relative overflow-hidden rounded-lg border bg-card p-5 pl-6">
|
||||
<span class="absolute inset-y-0 left-0 w-1.5" :class="color.tile" aria-hidden="true" />
|
||||
<div class="prose prose-sm max-w-none dark:prose-invert" v-html="folder.intro" />
|
||||
</section>
|
||||
|
||||
<section v-if="children.length">
|
||||
<h2 class="mb-3 text-sm font-semibold text-muted-foreground">Unterordner</h2>
|
||||
<div class="grid grid-cols-[repeat(auto-fill,minmax(11.5rem,1fr))] gap-3">
|
||||
<FolderTile v-for="child in children" :key="child.id" :folder="child" small />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<div class="mb-3 flex items-center justify-between gap-3">
|
||||
<h2 class="text-sm font-semibold text-muted-foreground">Dokumente <span v-if="entries.length" class="font-normal">({{ entries.length }})</span></h2>
|
||||
<Button v-if="canManage" size="sm" @click="openDialog('create')"><FilePlus2 /> Eintrag hinzufügen</Button>
|
||||
</div>
|
||||
<EntryTable
|
||||
v-if="entries.length"
|
||||
:entries="entries"
|
||||
:can-manage="canManage"
|
||||
@edit="(e) => openDialog('edit', e)"
|
||||
@new-version="(e) => openDialog('version', e)"
|
||||
@archive="(e) => (archive = { open: true, entry: e })"
|
||||
@remove="remove"
|
||||
/>
|
||||
<div v-else class="rounded-lg border border-dashed bg-card">
|
||||
<EmptyState :icon="Files" title="Noch keine Dokumente" :text="canManage ? 'Mit „Eintrag hinzufügen“ Dateien, Links oder Formulare ergänzen.' : ''" />
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<aside v-if="hasAside" class="rounded-lg border bg-card">
|
||||
<h2 class="flex items-center gap-2 border-b px-4 py-2.5 text-sm font-semibold"><Users class="size-4" :class="color.text" /> {{ folder.contacts.length === 1 ? 'Ansprechpartner*in' : 'Ansprechpartner*innen' }}</h2>
|
||||
<div class="grid gap-4 p-4">
|
||||
<ContactCard v-for="contact in folder.contacts" :key="contact.id" :contact="contact" />
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<EntryDialog v-if="canManage" v-model:open="dialog.open" :mode="dialog.mode" :entry="dialog.entry" :folder-id="folder.id" :forms="forms" :max-upload-mb="maxUploadMb" />
|
||||
<ArchiveDialog v-if="canManage" v-model:open="archive.open" :entry="archive.entry" />
|
||||
</AppLayout>
|
||||
</template>
|
||||
44
plugins-core/qm/resources/js/pages/Index.vue
Normal file
44
plugins-core/qm/resources/js/pages/Index.vue
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<script setup>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { FolderCog, ShieldCheck } from '@lucide/vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import EmptyState from '@/components/EmptyState.vue';
|
||||
import PageHeader from '@/components/PageHeader.vue';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import FolderTile from '../components/FolderTile.vue';
|
||||
import QmSearchBox from '../components/QmSearchBox.vue';
|
||||
|
||||
defineProps({
|
||||
categories: { type: Array, required: true },
|
||||
canManage: { type: Boolean, default: false },
|
||||
adminUrl: { type: String, default: null },
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppLayout title="Qualitätsmanagement">
|
||||
<PageHeader title="Qualitätsmanagement" description="Verfahrensanweisungen, Standards und Formulare – immer in der gültigen Fassung.">
|
||||
<template #actions>
|
||||
<Button v-if="adminUrl" variant="outline" class="h-10" as-child><a :href="adminUrl"><FolderCog /> Ordner verwalten</a></Button>
|
||||
<QmSearchBox />
|
||||
</template>
|
||||
</PageHeader>
|
||||
|
||||
<div v-if="categories.length" class="grid gap-8">
|
||||
<section v-for="category in categories" :key="category.id ?? 'rest'">
|
||||
<div class="mb-3 flex items-center gap-3">
|
||||
<h2 class="text-sm font-semibold tracking-wide whitespace-nowrap text-muted-foreground uppercase">{{ category.name }}</h2>
|
||||
<span class="h-px flex-1 bg-border" aria-hidden="true" />
|
||||
</div>
|
||||
<div class="grid grid-cols-[repeat(auto-fill,minmax(13rem,1fr))] gap-4">
|
||||
<FolderTile v-for="folder in category.folders" :key="folder.id" :folder="folder" />
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div v-else class="rounded-lg border bg-card">
|
||||
<EmptyState :icon="ShieldCheck" title="Noch keine Ordner" :text="canManage ? 'Legen Sie Kategorien und Ordner im Admin-Bereich unter „Qualitätsmanagement“ an.' : 'Hier erscheinen bald die QM-Dokumente.'">
|
||||
<Button v-if="adminUrl" class="mt-4" as-child><a :href="adminUrl">Ordner anlegen</a></Button>
|
||||
</EmptyState>
|
||||
</div>
|
||||
</AppLayout>
|
||||
</template>
|
||||
67
plugins-core/qm/resources/js/pages/Search.vue
Normal file
67
plugins-core/qm/resources/js/pages/Search.vue
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
<script setup>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { ClipboardList, ExternalLink, SearchX, TextSearch } from '@lucide/vue';
|
||||
import EmptyState from '@/components/EmptyState.vue';
|
||||
import FileIcon from '@/components/FileIcon.vue';
|
||||
import PageHeader from '@/components/PageHeader.vue';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import { qmColor } from '../colors';
|
||||
import QmSearchBox from '../components/QmSearchBox.vue';
|
||||
import { formatStand } from '../format';
|
||||
|
||||
defineProps({
|
||||
query: { type: String, default: '' },
|
||||
results: { type: Array, default: () => [] },
|
||||
});
|
||||
|
||||
// Lesen im Portal: Suchbegriff mitgeben
|
||||
const openUrl = (result, query) => (result.open_kind === 'view' ? `${result.open_url}?suche=${encodeURIComponent(query)}` : result.open_url);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppLayout :title="`Suche: ${query}`">
|
||||
<PageHeader :title="query ? `Suche: ${query}` : 'Suche'" :breadcrumbs="[{ label: 'Qualitätsmanagement', href: '/qm' }]" :description="query ? `${results.length} ${results.length === 1 ? 'Treffer' : 'Treffer'} im Qualitätsmanagement – in Titeln und im Text der Dokumente` : ''">
|
||||
<template #actions><QmSearchBox :key="query" :initial="query" /></template>
|
||||
</PageHeader>
|
||||
|
||||
<ul v-if="results.length" class="divide-y overflow-hidden rounded-lg border bg-card">
|
||||
<li v-for="result in results" :key="result.id" class="flex gap-3 px-4 py-3.5 hover:bg-accent/40">
|
||||
<FileIcon v-if="result.type === 'file'" :extension="result.extension" />
|
||||
<span v-else class="grid size-10 shrink-0 place-items-center rounded-md bg-muted text-muted-foreground">
|
||||
<ClipboardList v-if="result.type === 'form'" class="size-5" /><ExternalLink v-else class="size-5" />
|
||||
</span>
|
||||
<div class="min-w-0 flex-1">
|
||||
<div class="flex flex-wrap items-baseline gap-x-2">
|
||||
<component
|
||||
:is="result.open_kind === 'view' ? Link : 'a'"
|
||||
:href="openUrl(result, query)"
|
||||
:target="result.open_kind === 'link' ? '_blank' : undefined"
|
||||
class="text-[15px] font-semibold hover:underline"
|
||||
>
|
||||
{{ result.title }}
|
||||
</component>
|
||||
<span v-if="result.version" class="text-xs text-muted-foreground">Version {{ result.version }}</span>
|
||||
<span class="text-xs text-muted-foreground">Stand {{ formatStand(result.valid_from) }}</span>
|
||||
</div>
|
||||
<Link :href="result.folder.url" class="mt-0.5 inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground hover:underline">
|
||||
<span class="size-2 rounded-sm" :class="qmColor(result.folder.color).dot" />{{ result.folder.path }}
|
||||
</Link>
|
||||
<p v-if="result.snippet" class="qm-snippet mt-1.5 text-[13px] leading-relaxed text-muted-foreground" v-html="result.snippet" />
|
||||
<p v-if="result.in_content" class="mt-1 inline-flex items-center gap-1 text-[11px] font-medium text-brand-text"><TextSearch class="size-3" /> im Text gefunden</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div v-else-if="query" class="rounded-lg border bg-card">
|
||||
<EmptyState :icon="SearchX" title="Nichts gefunden" text="Gesucht wird in Titeln, Beschreibungen, Dateinamen und im Text der Dokumente. Eingescannte PDFs sind nur durchsuchbar, wenn die Texterkennung eingerichtet ist." />
|
||||
</div>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.qm-snippet mark {
|
||||
background: color-mix(in srgb, var(--brand, #f59e0b) 22%, transparent);
|
||||
color: var(--foreground);
|
||||
border-radius: 2px;
|
||||
padding: 0 1px;
|
||||
}
|
||||
</style>
|
||||
44
plugins-core/qm/resources/js/pages/Viewer.vue
Normal file
44
plugins-core/qm/resources/js/pages/Viewer.vue
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<script setup>
|
||||
import { Head, Link } from '@inertiajs/vue3';
|
||||
import { ArrowLeft, Download, ExternalLink, FileDown } from '@lucide/vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import { qmColor } from '../colors';
|
||||
import PdfViewer from '../components/PdfViewer.vue';
|
||||
import { formatSize, formatStand } from '../format';
|
||||
|
||||
defineProps({
|
||||
entry: { type: Object, required: true },
|
||||
file: { type: Object, required: true },
|
||||
query: { type: String, default: '' },
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppLayout :title="entry.title">
|
||||
<Head :title="entry.title" />
|
||||
<div class="flex h-[calc(100vh-9.5rem)] min-h-[32rem] flex-col overflow-hidden rounded-lg border bg-card">
|
||||
<header class="flex flex-wrap items-center gap-x-4 gap-y-2 border-b px-4 py-3">
|
||||
<Link :href="entry.folder.url" class="grid size-9 place-items-center rounded-md hover:bg-accent" :aria-label="`Zurück zu ${entry.folder.path}`"><ArrowLeft class="size-5" /></Link>
|
||||
<div class="min-w-0 flex-1">
|
||||
<Link :href="entry.folder.url" class="inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:underline">
|
||||
<span class="size-2 rounded-sm" :class="qmColor(entry.folder.color).dot" />{{ entry.folder.path }}
|
||||
</Link>
|
||||
<h1 class="truncate text-lg leading-tight font-semibold">{{ entry.title }}</h1>
|
||||
<p class="text-xs text-muted-foreground">
|
||||
<template v-if="entry.version">Version {{ entry.version }} · </template>Stand {{ formatStand(entry.valid_from) }} · {{ formatSize(entry.size) }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<Button v-if="entry.editable" variant="outline" size="sm" as-child><a :href="entry.editable.url"><FileDown /> Vorlage ({{ entry.editable.extension }})</a></Button>
|
||||
<Button variant="outline" size="sm" as-child><a :href="file.url" target="_blank" rel="noopener"><ExternalLink /> In neuem Tab</a></Button>
|
||||
<Button size="sm" as-child><a :href="entry.download_url"><Download /> Herunterladen</a></Button>
|
||||
</div>
|
||||
</header>
|
||||
<PdfViewer v-if="file.kind === 'pdf'" :url="file.url" class="min-h-0 flex-1" />
|
||||
<div v-else class="grid min-h-0 flex-1 place-items-center overflow-auto bg-muted/60 p-6">
|
||||
<img :src="file.url" :alt="entry.title" class="max-h-full max-w-full rounded shadow-md" />
|
||||
</div>
|
||||
</div>
|
||||
</AppLayout>
|
||||
</template>
|
||||
21
plugins-core/qm/routes/web.php
Normal file
21
plugins-core/qm/routes/web.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Inhaus\Plugins\Qm\Http\Controllers\QmController;
|
||||
use Inhaus\Plugins\Qm\Http\EnsureQmAccess;
|
||||
|
||||
Route::middleware(['auth', EnsureQmAccess::class])->prefix('qm')->name('qm.')->controller(QmController::class)
|
||||
->where(['folder' => '[0-9]+', 'entry' => '[0-9]+', 'file' => '[0-9]+'])
|
||||
->group(function () {
|
||||
Route::get('/', 'index')->name('index');
|
||||
Route::get('/suche', 'search')->name('search');
|
||||
Route::get('/ordner/{folder}', 'folder')->name('folder');
|
||||
Route::get('/lesen/{entry}', 'view')->name('view');
|
||||
Route::get('/datei/{file}/{name}', 'file')->name('file');
|
||||
|
||||
// Pflege (Recht „qm.manage“)
|
||||
Route::post('/ordner/{folder}/eintraege', 'store')->name('entries.store');
|
||||
Route::post('/eintraege/{entry}', 'update')->name('entries.update'); // POST wegen Datei-Upload
|
||||
Route::delete('/eintraege/{entry}', 'destroy')->name('entries.destroy');
|
||||
Route::get('/eintraege/{entry}/archiv', 'archive')->name('entries.archive');
|
||||
});
|
||||
43
plugins-core/qm/src/Colors.php
Normal file
43
plugins-core/qm/src/Colors.php
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm;
|
||||
|
||||
/**
|
||||
* Feste Farbpalette für QM-Ordner – abgestimmt auf gut lesbare weiße Schrift
|
||||
* (Kontrast ≥ 4,5:1) in hellem und dunklem Modus. Unterordner erben die Farbe.
|
||||
*/
|
||||
final class Colors
|
||||
{
|
||||
public const DEFAULT = 'blue';
|
||||
|
||||
/** Schlüssel => [Bezeichnung, Hex] – die Hex-Werte entsprechen den Tailwind-Klassen im Frontend. */
|
||||
public const PALETTE = [
|
||||
'blue' => ['Blau', '#2563eb'],
|
||||
'sky' => ['Himmelblau', '#0369a1'],
|
||||
'teal' => ['Petrol', '#0f766e'],
|
||||
'emerald' => ['Smaragd', '#047857'],
|
||||
'green' => ['Grün', '#15803d'],
|
||||
'amber' => ['Bernstein', '#b45309'],
|
||||
'orange' => ['Orange', '#c2410c'],
|
||||
'red' => ['Rot', '#dc2626'],
|
||||
'rose' => ['Rosé', '#e11d48'],
|
||||
'violet' => ['Violett', '#7c3aed'],
|
||||
'indigo' => ['Indigo', '#4f46e5'],
|
||||
'slate' => ['Schiefer', '#475569'],
|
||||
];
|
||||
|
||||
public static function has(?string $key): bool
|
||||
{
|
||||
return $key !== null && isset(self::PALETTE[$key]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Für Filament-Select mit ->allowHtml(): Farbfeld und Name.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function options(): array
|
||||
{
|
||||
return collect(self::PALETTE)->map(fn (array $color) => '<span style="display:inline-flex;align-items:center;gap:8px"><span style="width:16px;height:16px;border-radius:4px;background:'.$color[1].'"></span>'.e($color[0]).'</span>')->all();
|
||||
}
|
||||
}
|
||||
125
plugins-core/qm/src/Filament/Pages/QmSettings.php
Normal file
125
plugins-core/qm/src/Filament/Pages/QmSettings.php
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm\Filament\Pages;
|
||||
|
||||
use App\Models\Role;
|
||||
use App\Support\Audit;
|
||||
use App\Support\Settings;
|
||||
use BackedEnum;
|
||||
use Filament\Forms\Components\CheckboxList;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Pages\Page;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Filament\Schemas\Components\Text;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use Inhaus\Plugins\Qm\Presenter;
|
||||
use Inhaus\Plugins\Qm\QmAccess;
|
||||
use Inhaus\Plugins\Qm\Text\Ocr;
|
||||
use UnitEnum;
|
||||
|
||||
class QmSettings extends Page
|
||||
{
|
||||
protected string $view = 'filament.pages.settings-form';
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedAdjustmentsHorizontal;
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Qualitätsmanagement';
|
||||
|
||||
protected static ?int $navigationSort = 3;
|
||||
|
||||
protected static ?string $navigationLabel = 'QM-Einstellungen';
|
||||
|
||||
protected static ?string $title = 'QM-Einstellungen';
|
||||
|
||||
protected static ?string $slug = 'qm-einstellungen';
|
||||
|
||||
/** @var array<string, mixed>|null */
|
||||
public ?array $data = [];
|
||||
|
||||
public static function canAccess(): bool
|
||||
{
|
||||
return auth()->user()?->can('qm.manage') ?? false;
|
||||
}
|
||||
|
||||
public function mount(Settings $settings): void
|
||||
{
|
||||
$this->form->fill([
|
||||
'contact_fields' => (array) $settings->get(Presenter::CONTACT_FIELDS, Presenter::DEFAULT_CONTACT_FIELDS),
|
||||
'excluded_roles' => array_map('strval', (array) $settings->get(QmAccess::EXCLUDED_ROLES, [])),
|
||||
'ocr_enabled' => (bool) $settings->get(Ocr::SETTING_ENABLED, false),
|
||||
'ocr_binary' => (string) $settings->get(Ocr::SETTING_BINARY, ''),
|
||||
]);
|
||||
}
|
||||
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $schema->statePath('data')->components([
|
||||
Section::make('Ansprechpartner')
|
||||
->description('Welche Angaben aus dem Profil bei Ansprechpartnern in den QM-Ordnern erscheinen. Name und Foto werden immer gezeigt.')
|
||||
->schema([
|
||||
CheckboxList::make('contact_fields')->hiddenLabel()->columns(3)
|
||||
->options(fn () => app(Presenter::class)->contactFieldOptions()),
|
||||
]),
|
||||
|
||||
Section::make('Zugang')
|
||||
->description('Grundsätzlich sehen alle angemeldeten Personen das Qualitätsmanagement; pflegen darf nur, wer das Recht „Qualitätsmanagement pflegen“ hat (ohne Vergabe: die Administration).')
|
||||
->schema([
|
||||
Select::make('excluded_roles')->label('Ausgeschlossene Rollen')->multiple()->native(false)
|
||||
->options(fn () => Role::query()->orderBy('name')->pluck('name', 'id')->mapWithKeys(fn ($name, $id) => [(string) $id => $name])->all())
|
||||
->helperText('Wer eine dieser Rollen hat, sieht das Modul nicht – weder im Menü noch über Links (z. B. Klient*innen, Gäste). Der Ausschluss geht anderen Rollen vor.'),
|
||||
]),
|
||||
|
||||
Section::make('Texterkennung (OCR) für eingescannte PDFs')
|
||||
->description('Text aus PDF, Word, Excel und PowerPoint wird immer durchsuchbar gemacht. Eingescannte PDFs ohne Textebene brauchen dafür eine Texterkennung auf dem Server.')
|
||||
->columns(2)
|
||||
->schema([
|
||||
Text::make(fn () => $this->ocrStatus())->columnSpanFull(),
|
||||
Toggle::make('ocr_enabled')->label('Texterkennung verwenden')
|
||||
->helperText('Läuft im Hintergrund (Hintergrundaufgaben), einige Dateien je Durchgang.'),
|
||||
TextInput::make('ocr_binary')->label('Pfad zu Tesseract')->placeholder('tesseract')->maxLength(200)
|
||||
->regex('#^(/[\w./-]+|[\w.-]+)$#')
|
||||
->helperText('Nur nötig, wenn das Programm nicht im Suchpfad liegt, z. B. /usr/bin/tesseract.'),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
public function save(Settings $settings): void
|
||||
{
|
||||
$data = $this->form->getState();
|
||||
$options = app(Presenter::class)->contactFieldOptions();
|
||||
|
||||
$settings->setMany([
|
||||
Presenter::CONTACT_FIELDS => array_values(array_intersect((array) $data['contact_fields'], array_keys($options))),
|
||||
QmAccess::EXCLUDED_ROLES => array_values(array_map('intval', (array) $data['excluded_roles'])),
|
||||
Ocr::SETTING_ENABLED => (bool) $data['ocr_enabled'],
|
||||
Ocr::SETTING_BINARY => trim((string) $data['ocr_binary']),
|
||||
]);
|
||||
|
||||
Audit::log('qm.settings_saved', ['excluded_roles' => count((array) $data['excluded_roles'])]);
|
||||
Notification::make()->success()->title('Gespeichert')->send();
|
||||
}
|
||||
|
||||
private function ocrStatus(): HtmlString
|
||||
{
|
||||
$status = app(Ocr::class)->status();
|
||||
$pending = DB::table('qm_files')->where('text_status', 'needs_ocr')->whereNull('archived_at')->count();
|
||||
$ok = fn (bool $v) => $v ? '<span style="color:rgb(22 163 74)">✔</span>' : '<span style="color:rgb(220 38 38)">✘</span>';
|
||||
|
||||
return new HtmlString(
|
||||
'<div style="display:grid;gap:4px;font-size:13px">'
|
||||
.'<div>'.$ok($status['exec']).' Programme aufrufen erlaubt (PHP-Funktion proc_open)</div>'
|
||||
.'<div>'.$ok($status['tesseract'] !== null).' Tesseract: '.e($status['tesseract'] ?? 'nicht gefunden')
|
||||
.($status['languages'] ? ' · Sprachen: '.e(implode(', ', array_slice($status['languages'], 0, 8))) : '').'</div>'
|
||||
.'<div>'.$ok($status['rasterizer'] !== null).' PDF-Seiten in Bilder umwandeln: '.e($status['rasterizer'] ?? 'weder pdftoppm noch Imagick mit PDF-Unterstützung').'</div>'
|
||||
.'<div style="margin-top:4px">'.$pending.' eingescannte Datei(en) warten auf Texterkennung.</div>'
|
||||
.'<div style="margin-top:6px;opacity:.75">Einrichtung auf eigenem Server (Debian/Ubuntu): <code>apt install tesseract-ocr tesseract-ocr-deu poppler-utils</code>. Ein Apache-Modul gibt es dafür nicht; Tesseract ist ein eigenständiges Programm, das PHP aufruft.</div>'
|
||||
.'</div>'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm\Filament\Resources\QmCategories\Pages;
|
||||
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ManageRecords;
|
||||
use Inhaus\Plugins\Qm\Filament\Resources\QmCategories\QmCategoryResource;
|
||||
use Inhaus\Plugins\Qm\QmTree;
|
||||
|
||||
class ManageQmCategories extends ManageRecords
|
||||
{
|
||||
protected static string $resource = QmCategoryResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [CreateAction::make()->label('Kategorie anlegen')->after(fn () => QmTree::flush())];
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm\Filament\Resources\QmCategories;
|
||||
|
||||
use App\Filament\Components\AudienceSection;
|
||||
use BackedEnum;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
use Inhaus\Plugins\Qm\Filament\Resources\QmCategories\Pages\ManageQmCategories;
|
||||
use Inhaus\Plugins\Qm\Models\QmCategory;
|
||||
use Inhaus\Plugins\Qm\QmTree;
|
||||
use UnitEnum;
|
||||
|
||||
/**
|
||||
* Kategorien der QM-Startseite (Überschrift mit Trennlinie über den Ordnerkacheln).
|
||||
*/
|
||||
class QmCategoryResource extends Resource
|
||||
{
|
||||
protected static ?string $model = QmCategory::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Qualitätsmanagement';
|
||||
|
||||
protected static ?int $navigationSort = 2;
|
||||
|
||||
protected static ?string $modelLabel = 'QM-Kategorie';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'Kategorien';
|
||||
|
||||
protected static ?string $slug = 'qm-kategorien';
|
||||
|
||||
public static function canAccess(): bool
|
||||
{
|
||||
return auth()->user()?->can('qm.manage') ?? false;
|
||||
}
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return $schema->columns(2)->components([
|
||||
TextInput::make('name')->label('Name')->required()->maxLength(120)->placeholder('z. B. Allgemein'),
|
||||
TextInput::make('sort')->label('Reihenfolge')->numeric()->default(0),
|
||||
AudienceSection::make('qm_category', 'Wer die Kategorie samt allen Ordnern sieht. Leer lassen = alle, die das QM-Modul sehen.')->columnSpanFull()->collapsed(),
|
||||
]);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->defaultSort('sort')
|
||||
->reorderable('sort')
|
||||
->modifyQueryUsing(fn ($query) => $query->withCount('folders'))
|
||||
->columns([
|
||||
TextColumn::make('name')->label('Name')->weight('medium'),
|
||||
TextColumn::make('folders_count')->label('Ordner'),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()->after(fn () => QmTree::flush()),
|
||||
DeleteAction::make()->modalDescription('Die Ordner bleiben erhalten und erscheinen unter „Weitere“.'),
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return ['index' => ManageQmCategories::route('/')];
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm\Filament\Resources\QmFolders\Pages;
|
||||
|
||||
use App\Support\Theme\SvgSanitizer;
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
use Inhaus\Plugins\Qm\Filament\Resources\QmFolders\QmFolderResource;
|
||||
use Inhaus\Plugins\Qm\QmTree;
|
||||
|
||||
class CreateQmFolder extends CreateRecord
|
||||
{
|
||||
protected static string $resource = QmFolderResource::class;
|
||||
|
||||
protected function mutateFormDataBeforeCreate(array $data): array
|
||||
{
|
||||
$data['created_by'] = auth()->id();
|
||||
|
||||
if (filled($data['parent_id'] ?? null)) {
|
||||
$data['category_id'] = null;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function afterCreate(): void
|
||||
{
|
||||
SvgSanitizer::sanitizeFile($this->record->icon_path);
|
||||
QmTree::flush();
|
||||
}
|
||||
|
||||
protected function getRedirectUrl(): string
|
||||
{
|
||||
return QmFolderResource::getUrl('index');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm\Filament\Resources\QmFolders\Pages;
|
||||
|
||||
use App\Support\Theme\SvgSanitizer;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Inhaus\Plugins\Qm\Filament\Resources\QmFolders\QmFolderResource;
|
||||
use Inhaus\Plugins\Qm\QmTree;
|
||||
|
||||
class EditQmFolder extends EditRecord
|
||||
{
|
||||
protected static string $resource = QmFolderResource::class;
|
||||
|
||||
private ?string $previousIcon = null;
|
||||
|
||||
protected function mutateFormDataBeforeSave(array $data): array
|
||||
{
|
||||
$this->previousIcon = $this->record->icon_path;
|
||||
|
||||
if (filled($data['parent_id'] ?? null)) {
|
||||
$data['category_id'] = null;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function afterSave(): void
|
||||
{
|
||||
if ($this->previousIcon && $this->previousIcon !== $this->record->icon_path) {
|
||||
Storage::disk('uploads')->delete($this->previousIcon);
|
||||
}
|
||||
|
||||
SvgSanitizer::sanitizeFile($this->record->icon_path);
|
||||
QmTree::flush();
|
||||
}
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Action::make('open')->label('Im Portal ansehen')->icon(Heroicon::OutlinedEye)->color('gray')
|
||||
->url(fn () => route('qm.folder', $this->record))->openUrlInNewTab(),
|
||||
DeleteAction::make()->visible(fn () => ! $this->record->entries()->exists() && ! $this->record->children()->exists()),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm\Filament\Resources\QmFolders\Pages;
|
||||
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Inhaus\Plugins\Qm\Filament\Resources\QmFolders\QmFolderResource;
|
||||
use Inhaus\Plugins\Qm\QmTree;
|
||||
|
||||
class ListQmFolders extends ListRecords
|
||||
{
|
||||
protected static string $resource = QmFolderResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Action::make('portal')->label('QM im Portal')->icon(Heroicon::OutlinedEye)->color('gray')->url('/qm')->openUrlInNewTab(),
|
||||
CreateAction::make()->label('Ordner anlegen'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* In Baumreihenfolge: jeder Ordner direkt unter seinem übergeordneten.
|
||||
*/
|
||||
protected function applySortingToTableQuery(Builder $query): Builder
|
||||
{
|
||||
$order = array_keys(app(QmTree::class)->options());
|
||||
|
||||
return $order === [] ? $query : $query->orderByRaw('FIELD(id, '.implode(',', array_map('intval', $order)).')');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm\Filament\Resources\QmFolders;
|
||||
|
||||
use App\Support\Icons;
|
||||
use BackedEnum;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Forms\Components\FileUpload;
|
||||
use Filament\Forms\Components\RichEditor;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Filament\Schemas\Components\Utilities\Get;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use Inhaus\Plugins\Qm\Colors;
|
||||
use Inhaus\Plugins\Qm\Filament\Resources\QmFolders\Pages\CreateQmFolder;
|
||||
use Inhaus\Plugins\Qm\Filament\Resources\QmFolders\Pages\EditQmFolder;
|
||||
use Inhaus\Plugins\Qm\Filament\Resources\QmFolders\Pages\ListQmFolders;
|
||||
use Inhaus\Plugins\Qm\Models\QmCategory;
|
||||
use Inhaus\Plugins\Qm\Models\QmFolder;
|
||||
use Inhaus\Plugins\Qm\QmTree;
|
||||
use UnitEnum;
|
||||
|
||||
/**
|
||||
* QM-Ordner: Struktur, Farbe und Symbol (werden vererbt), Einführungstext und
|
||||
* Ansprechpartner. Dokumente pflegt das QM-Team direkt im Portal.
|
||||
*/
|
||||
class QmFolderResource extends Resource
|
||||
{
|
||||
protected static ?string $model = QmFolder::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedFolder;
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Qualitätsmanagement';
|
||||
|
||||
protected static ?int $navigationSort = 1;
|
||||
|
||||
protected static ?string $modelLabel = 'QM-Ordner';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'Ordner';
|
||||
|
||||
protected static ?string $slug = 'qm-ordner';
|
||||
|
||||
public static function canAccess(): bool
|
||||
{
|
||||
return auth()->user()?->can('qm.manage') ?? false;
|
||||
}
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return $schema->columns(1)->components([
|
||||
Section::make('Ordner')->columns(2)->schema([
|
||||
TextInput::make('name')->label('Name')->required()->maxLength(120),
|
||||
Select::make('parent_id')->label('Übergeordneter Ordner')->placeholder('– oberste Ebene –')->searchable()->native(false)->live()
|
||||
->options(fn (?QmFolder $record) => collect(app(QmTree::class)->options())
|
||||
->except($record ? [$record->id, ...app(QmTree::class)->descendantIds([$record->id])] : [])->all()),
|
||||
Select::make('category_id')->label('Kategorie auf der QM-Startseite')->native(false)
|
||||
->options(fn () => QmCategory::query()->orderBy('sort')->pluck('name', 'id')->all())
|
||||
->required(fn (Get $get) => blank($get('parent_id')))
|
||||
->visible(fn (Get $get) => blank($get('parent_id')))
|
||||
->helperText('Nur für Ordner der obersten Ebene. Kategorien legen Sie unter „Kategorien“ an.'),
|
||||
TextInput::make('sort')->label('Reihenfolge')->numeric()->default(0),
|
||||
]),
|
||||
|
||||
Section::make('Farbe und Symbol')
|
||||
->description('Unterordner übernehmen Farbe und Symbol, solange dort nichts eigenes gewählt ist.')
|
||||
->columns(2)
|
||||
->schema([
|
||||
Select::make('color')->label('Farbe')->native(false)->allowHtml()
|
||||
->options(Colors::options())
|
||||
->placeholder(fn (Get $get) => blank($get('parent_id')) ? 'Standard (Blau)' : 'Vom übergeordneten Ordner übernehmen'),
|
||||
Select::make('icon')->label('Symbol')->native(false)->allowHtml()->searchable()
|
||||
->options(Icons::options())
|
||||
->getSearchResultsUsing(fn (string $search) => Icons::search($search))
|
||||
->getOptionLabelUsing(fn (?string $value) => $value ? Icons::option($value) : null)
|
||||
->placeholder(fn (Get $get) => blank($get('parent_id')) ? 'Ordner' : 'Vom übergeordneten Ordner übernehmen')
|
||||
->helperText('Alle 1.800+ Symbole über die Suche (englische Namen).'),
|
||||
FileUpload::make('icon_path')->label('Oder eigenes Symbol hochladen')
|
||||
->disk('uploads')->directory('qm-icons')->visibility('public')
|
||||
->acceptedFileTypes(['image/svg+xml', 'image/png', 'image/webp', 'image/jpeg'])->maxSize(1024)
|
||||
->helperText('SVG (empfohlen), PNG, WebP oder JPG, quadratisch. Ersetzt das Symbol aus der Auswahl.')
|
||||
->live(),
|
||||
Toggle::make('icon_mono')->label('Eigenes Symbol einfarbig darstellen')->default(true)
|
||||
->helperText('Wie die mitgelieferten Symbole: weiß auf der Kachel. Für farbige Logos ausschalten.')
|
||||
->visible(fn (Get $get) => filled($get('icon_path'))),
|
||||
]),
|
||||
|
||||
Section::make('Einführungstext')->schema([
|
||||
RichEditor::make('intro')->hiddenLabel()
|
||||
->toolbarButtons(['bold', 'italic', 'link', 'bulletList', 'orderedList', 'h3', 'blockquote', 'undo', 'redo']),
|
||||
]),
|
||||
|
||||
Section::make('Ansprechpartner')
|
||||
->description('Welche Angaben aus dem Profil erscheinen (Telefon, E-Mail …), legen Sie unter „QM-Einstellungen“ fest.')
|
||||
->schema([
|
||||
Select::make('contacts')->hiddenLabel()->multiple()->searchable()->preload()
|
||||
->relationship('contacts', 'name', fn ($query) => $query->where('is_active', true)->orderBy('last_name'))
|
||||
->getOptionLabelFromRecordUsing(fn ($record) => $record->name.($record->job_title ? ' – '.$record->job_title : '')),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
$tree = app(QmTree::class);
|
||||
|
||||
return $table
|
||||
->modifyQueryUsing(fn ($query) => $query->withCount('entries'))
|
||||
->defaultSort('name')
|
||||
->paginated(false)
|
||||
->columns([
|
||||
TextColumn::make('name')->label('Ordner')->weight('medium')->searchable()
|
||||
->formatStateUsing(function (string $state, QmFolder $record) use ($tree) {
|
||||
$node = $tree->folder($record->id);
|
||||
$depth = max(0, count($tree->path($record->id)) - 1);
|
||||
$hex = Colors::PALETTE[$node['color'] ?? Colors::DEFAULT][1];
|
||||
|
||||
return new HtmlString(str_repeat('<span style="display:inline-block;width:20px"></span>', $depth)
|
||||
.'<span style="display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:8px;background:'.$hex.'"></span>'.e($state));
|
||||
}),
|
||||
TextColumn::make('category.name')->label('Kategorie')->placeholder('–'),
|
||||
TextColumn::make('entries_count')->label('Einträge'),
|
||||
])
|
||||
->recordActions([
|
||||
Action::make('open')->label('Im Portal')->icon(Heroicon::OutlinedArrowTopRightOnSquare)->iconButton()
|
||||
->url(fn (QmFolder $record) => route('qm.folder', $record))->openUrlInNewTab(),
|
||||
EditAction::make(),
|
||||
DeleteAction::make()->visible(fn (QmFolder $record) => $record->entries_count === 0 && ! $record->children()->exists()),
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListQmFolders::route('/'),
|
||||
'create' => CreateQmFolder::route('/neu'),
|
||||
'edit' => EditQmFolder::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
}
|
||||
253
plugins-core/qm/src/Http/Controllers/QmController.php
Normal file
253
plugins-core/qm/src/Http/Controllers/QmController.php
Normal file
|
|
@ -0,0 +1,253 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Support\Audit;
|
||||
use App\Support\RichText;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Inertia\Inertia;
|
||||
use Inertia\Response;
|
||||
use Inhaus\Plugins\Qm\Library;
|
||||
use Inhaus\Plugins\Qm\Models\QmEntry;
|
||||
use Inhaus\Plugins\Qm\Models\QmFile;
|
||||
use Inhaus\Plugins\Qm\Models\QmFolder;
|
||||
use Inhaus\Plugins\Qm\Presenter;
|
||||
use Inhaus\Plugins\Qm\QmAccess;
|
||||
use Inhaus\Plugins\Qm\QmTree;
|
||||
use Inhaus\Plugins\Qm\Search;
|
||||
use Symfony\Component\HttpFoundation\Response as HttpResponse;
|
||||
|
||||
class QmController extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
private readonly QmTree $tree,
|
||||
private readonly Presenter $presenter,
|
||||
private readonly QmAccess $access,
|
||||
) {}
|
||||
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
$counts = $this->entryCounts();
|
||||
|
||||
return Inertia::render('qm::Index', [
|
||||
'categories' => collect($this->tree->categories($request->user()))->map(fn (array $category) => [
|
||||
'id' => $category['id'],
|
||||
'name' => $category['name'],
|
||||
'folders' => array_map(fn (int $id) => $this->presenter->tile($id, $counts), $category['folders']),
|
||||
])->values(),
|
||||
'canManage' => $this->access->canManage($request->user()),
|
||||
'adminUrl' => $this->access->canManage($request->user()) ? url('/admin/qm-ordner') : null,
|
||||
]);
|
||||
}
|
||||
|
||||
public function folder(Request $request, QmFolder $folder): Response
|
||||
{
|
||||
abort_unless($this->tree->isVisible($folder->id, $request->user()), 404);
|
||||
|
||||
$counts = $this->entryCounts();
|
||||
$canManage = $this->access->canManage($request->user());
|
||||
$entries = $folder->entries()->with(['readingFile', 'editableFile'])->orderBy('sort')->orderBy('title')->get();
|
||||
$node = $this->tree->folder($folder->id);
|
||||
|
||||
return Inertia::render('qm::Folder', [
|
||||
'folder' => [
|
||||
'id' => $folder->id,
|
||||
'name' => $folder->name,
|
||||
'color' => $node['color'],
|
||||
'icon' => $node['icon'],
|
||||
'intro' => app(RichText::class)->sanitize($folder->intro),
|
||||
'contacts' => $this->presenter->contacts($folder->contacts()->get(), $request->user()),
|
||||
],
|
||||
'breadcrumbs' => array_map(fn (array $f) => ['id' => $f['id'], 'name' => $f['name'], 'color' => $f['color']], array_slice($this->tree->path($folder->id), 0, -1)),
|
||||
'children' => array_map(fn (int $id) => $this->presenter->tile($id, $counts), $this->tree->childIds($folder->id)),
|
||||
'entries' => $entries->map(fn (QmEntry $entry) => $this->presenter->entry($entry)),
|
||||
'canManage' => $canManage,
|
||||
'forms' => $canManage ? $this->formOptions() : [],
|
||||
'maxUploadMb' => (int) floor(min(Library::MAX_KB / 1024, self::phpUploadLimitMb())),
|
||||
'adminUrl' => $canManage ? url('/admin/qm-ordner/'.$folder->id.'/edit') : null,
|
||||
]);
|
||||
}
|
||||
|
||||
public function search(Request $request, Search $search): Response
|
||||
{
|
||||
$query = trim((string) $request->query('q', ''));
|
||||
|
||||
return Inertia::render('qm::Search', [
|
||||
'query' => $query,
|
||||
'results' => $query === '' ? [] : $search->run($query, $request->user())->map(fn (array $hit) => [
|
||||
...$this->presenter->entry($hit['entry'], withFolder: true),
|
||||
'snippet' => $hit['snippet'],
|
||||
'in_content' => $hit['in_content'],
|
||||
])->values(),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Datei zum Lesen im Portal (PDF-Betrachter bzw. Bild).
|
||||
*/
|
||||
public function view(Request $request, QmEntry $entry): Response|RedirectResponse
|
||||
{
|
||||
abort_unless($this->tree->isVisible($entry->folder_id, $request->user()), 404);
|
||||
|
||||
$entry->load(['readingFile', 'editableFile']);
|
||||
$file = $entry->readingFile ?? $entry->editableFile;
|
||||
abort_unless($file, 404);
|
||||
|
||||
if (! $file->isViewable()) {
|
||||
return redirect($file->url());
|
||||
}
|
||||
|
||||
return Inertia::render('qm::Viewer', [
|
||||
'entry' => $this->presenter->entry($entry, withFolder: true),
|
||||
'file' => ['url' => $file->url(inline: true), 'kind' => $file->mime === 'application/pdf' ? 'pdf' : 'image', 'name' => $file->name],
|
||||
'query' => (string) $request->query('suche', ''),
|
||||
]);
|
||||
}
|
||||
|
||||
public function file(Request $request, QmFile $file): HttpResponse
|
||||
{
|
||||
$entry = $file->entry;
|
||||
abort_unless($entry && $this->tree->isVisible($entry->folder_id, $request->user()), 404);
|
||||
// Archivierte Fassungen sieht nur das QM-Team.
|
||||
abort_if($file->archived_at && ! $this->access->canManage($request->user()), 404);
|
||||
|
||||
$headers = ['X-Content-Type-Options' => 'nosniff', 'Cache-Control' => 'private, max-age=300'];
|
||||
|
||||
if ($request->boolean('lesen') && $file->isViewable()) {
|
||||
// Bilder abgeschottet; PDFs ohne sandbox, sonst blockiert Chrome seinen PDF-Betrachter.
|
||||
return Storage::disk(QmFile::DISK)->response($file->path, $file->name, [
|
||||
...$headers,
|
||||
'Content-Type' => $file->mime,
|
||||
...($file->mime === 'application/pdf' ? [] : ['Content-Security-Policy' => "default-src 'none'; sandbox"]),
|
||||
]);
|
||||
}
|
||||
|
||||
return Storage::disk(QmFile::DISK)->download($file->path, $file->name, [...$headers, 'Content-Type' => $file->mime ?: 'application/octet-stream']);
|
||||
}
|
||||
|
||||
public function store(Request $request, QmFolder $folder, Library $library): RedirectResponse
|
||||
{
|
||||
$this->authorizeManage($request);
|
||||
$data = $this->validated($request, null);
|
||||
|
||||
$entry = $library->create($folder, $data, $request->file('reading'), $request->file('editable'), $request->user());
|
||||
Audit::log('qm.entry_created', ['entry' => $entry->id, 'title' => $entry->title, 'folder' => $folder->id]);
|
||||
|
||||
return back()->with('status', 'Eintrag „'.$entry->title.'“ angelegt.');
|
||||
}
|
||||
|
||||
public function update(Request $request, QmEntry $entry, Library $library): RedirectResponse
|
||||
{
|
||||
$this->authorizeManage($request);
|
||||
$data = $this->validated($request, $entry);
|
||||
|
||||
$library->update($entry, $data, $request->file('reading'), $request->file('editable'), $request->boolean('remove_editable'), $request->user());
|
||||
Audit::log('qm.entry_updated', ['entry' => $entry->id, 'title' => $entry->title, 'new_version' => $request->hasFile('reading') || $request->hasFile('editable')]);
|
||||
|
||||
return back()->with('status', $request->hasFile('reading') || $request->hasFile('editable') ? 'Neue Fassung gespeichert – die bisherige liegt im Archiv.' : 'Gespeichert.');
|
||||
}
|
||||
|
||||
public function destroy(Request $request, QmEntry $entry): RedirectResponse
|
||||
{
|
||||
$this->authorizeManage($request);
|
||||
$title = $entry->title;
|
||||
$entry->delete();
|
||||
Audit::log('qm.entry_deleted', ['entry' => $entry->id, 'title' => $title]);
|
||||
|
||||
return back()->with('status', '„'.$title.'“ gelöscht.');
|
||||
}
|
||||
|
||||
public function archive(Request $request, QmEntry $entry): JsonResponse
|
||||
{
|
||||
$this->authorizeManage($request);
|
||||
|
||||
return response()->json(['files' => $entry->files()->with('uploader:id,first_name,last_name,name')->orderByDesc('created_at')->orderByDesc('id')->get()
|
||||
->map(fn (QmFile $file) => [
|
||||
'id' => $file->id,
|
||||
'kind' => $file->kind,
|
||||
'name' => $file->name,
|
||||
'version' => $file->version,
|
||||
'valid_from' => $file->valid_from?->toDateString(),
|
||||
'size' => $file->size,
|
||||
'uploaded_at' => $file->created_at?->toIso8601String(),
|
||||
'uploader' => $file->uploader?->name,
|
||||
'archived' => $file->archived_at !== null,
|
||||
'url' => $file->url(),
|
||||
])]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
private function validated(Request $request, ?QmEntry $entry): array
|
||||
{
|
||||
$type = $entry?->type ?? $request->input('type');
|
||||
$fileRule = ['nullable', 'file', 'max:'.Library::MAX_KB, 'extensions:'.implode(',', Library::EXTENSIONS)];
|
||||
|
||||
return $request->validate([
|
||||
'type' => [$entry ? 'nullable' : 'required', Rule::in([QmEntry::FILE, QmEntry::LINK, QmEntry::FORM])],
|
||||
'title' => ['required', 'string', 'max:250'],
|
||||
'description' => ['nullable', 'string', 'max:1000'],
|
||||
'version' => ['nullable', 'string', 'max:30'],
|
||||
'valid_from' => ['nullable', 'date'],
|
||||
'url' => [Rule::requiredIf($type === QmEntry::LINK), 'nullable', 'string', 'max:1000', 'regex:#^(https?://|/)#i'],
|
||||
'form_id' => [Rule::requiredIf($type === QmEntry::FORM), 'nullable', 'integer', Rule::exists('forms', 'id')],
|
||||
'reading' => [...$fileRule, Rule::requiredIf($type === QmEntry::FILE && ! $entry && ! $request->hasFile('editable'))],
|
||||
'editable' => $fileRule,
|
||||
], ['url.regex' => 'Bitte eine Adresse angeben, die mit https:// oder / beginnt.', 'reading.required' => 'Bitte eine Datei auswählen.'], [
|
||||
'title' => 'Titel', 'version' => 'Version', 'valid_from' => 'Stand', 'url' => 'Adresse', 'form_id' => 'Formular',
|
||||
'reading' => 'Datei', 'editable' => 'Bearbeitbare Vorlage',
|
||||
]) + ['type' => $type];
|
||||
}
|
||||
|
||||
private function authorizeManage(Request $request): void
|
||||
{
|
||||
abort_unless($this->access->canManage($request->user()), 403);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, int> Ordner => Anzahl Einträge
|
||||
*/
|
||||
private function entryCounts(): array
|
||||
{
|
||||
return DB::table('qm_entries')->selectRaw('folder_id, count(*) as c')->groupBy('folder_id')->pluck('c', 'folder_id')->map(fn ($c) => (int) $c)->all();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<array{value: int, label: string}>
|
||||
*/
|
||||
private function formOptions(): array
|
||||
{
|
||||
if (! DB::getSchemaBuilder()->hasTable('forms')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return DB::table('forms')->orderBy('title')->get(['id', 'title'])->map(fn ($f) => ['value' => (int) $f->id, 'label' => $f->title])->all();
|
||||
}
|
||||
|
||||
private static function phpUploadLimitMb(): float
|
||||
{
|
||||
$bytes = function (string $value): float {
|
||||
$value = trim($value);
|
||||
$unit = strtolower(substr($value, -1));
|
||||
$number = (float) $value;
|
||||
|
||||
return match ($unit) {
|
||||
'g' => $number * 1024 ** 3,
|
||||
'm' => $number * 1024 ** 2,
|
||||
'k' => $number * 1024,
|
||||
default => $number,
|
||||
};
|
||||
};
|
||||
|
||||
$limits = array_filter([$bytes((string) ini_get('upload_max_filesize')), $bytes((string) ini_get('post_max_size'))]);
|
||||
|
||||
return $limits === [] ? 100 : min($limits) / 1024 / 1024;
|
||||
}
|
||||
}
|
||||
21
plugins-core/qm/src/Http/EnsureQmAccess.php
Normal file
21
plugins-core/qm/src/Http/EnsureQmAccess.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm\Http;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Inhaus\Plugins\Qm\QmAccess;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
* Ausgeschlossene Rollen (z. B. Klient*innen) sehen das QM-Modul nicht – auch nicht über Links.
|
||||
*/
|
||||
class EnsureQmAccess
|
||||
{
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
abort_unless(app(QmAccess::class)->allows($request->user()), 404);
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
55
plugins-core/qm/src/Indexer.php
Normal file
55
plugins-core/qm/src/Indexer.php
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm;
|
||||
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Inhaus\Plugins\Qm\Models\QmFile;
|
||||
use Inhaus\Plugins\Qm\Text\Ocr;
|
||||
use Inhaus\Plugins\Qm\Text\TextExtractor;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* Macht den Inhalt von QM-Dateien durchsuchbar: Textauszug beim Hochladen,
|
||||
* Texterkennung für eingescannte PDFs im Hintergrund (wenn eingerichtet).
|
||||
*/
|
||||
class Indexer
|
||||
{
|
||||
public function __construct(private readonly TextExtractor $extractor, private readonly Ocr $ocr) {}
|
||||
|
||||
public function index(QmFile $file): void
|
||||
{
|
||||
$path = Storage::disk(QmFile::DISK)->path($file->path);
|
||||
$result = $this->extractor->extract($path, pathinfo($file->name, PATHINFO_EXTENSION));
|
||||
|
||||
// PDF ohne Text: vermutlich eingescannt → Texterkennung vormerken.
|
||||
$status = $result['status'] === 'empty' && $file->mime === 'application/pdf' ? 'needs_ocr' : $result['status'];
|
||||
|
||||
$file->forceFill(['text' => $result['text'], 'text_status' => $status])->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Hintergrundaufgabe: vorgemerkte Scans erkennen. Gibt die Anzahl bearbeiteter Dateien zurück.
|
||||
*/
|
||||
public function processOcr(int $limit = 5): int
|
||||
{
|
||||
if (! $this->ocr->enabled() || ! $this->ocr->available()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$done = 0;
|
||||
|
||||
foreach (QmFile::query()->where('text_status', 'needs_ocr')->whereNull('archived_at')->limit($limit)->get() as $file) {
|
||||
try {
|
||||
$text = $this->ocr->recognize(Storage::disk(QmFile::DISK)->path($file->path));
|
||||
$file->forceFill(['text' => $text !== '' ? $text : null, 'text_status' => $text !== '' ? 'ocr' : 'empty'])->save();
|
||||
} catch (Throwable $e) {
|
||||
logger()->warning("QM-Texterkennung für {$file->name} fehlgeschlagen: ".$e->getMessage());
|
||||
$file->forceFill(['text_status' => 'failed'])->save();
|
||||
}
|
||||
|
||||
$done++;
|
||||
}
|
||||
|
||||
return $done;
|
||||
}
|
||||
}
|
||||
122
plugins-core/qm/src/Library.php
Normal file
122
plugins-core/qm/src/Library.php
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Str;
|
||||
use Inhaus\Plugins\Qm\Models\QmEntry;
|
||||
use Inhaus\Plugins\Qm\Models\QmFile;
|
||||
use Inhaus\Plugins\Qm\Models\QmFolder;
|
||||
|
||||
/**
|
||||
* Einträge anlegen, ändern und neue Fassungen hochladen. Eine neue Fassung
|
||||
* schiebt die bisherigen Dateien ins Archiv – nichts geht verloren.
|
||||
*/
|
||||
class Library
|
||||
{
|
||||
/** Erlaubte Dateitypen (Lesefassung vor allem PDF, Vorlagen Office). */
|
||||
public const EXTENSIONS = ['pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'odt', 'ods', 'odp', 'rtf', 'txt', 'csv', 'png', 'jpg', 'jpeg', 'gif', 'webp', 'zip'];
|
||||
|
||||
public const MAX_KB = 102400;
|
||||
|
||||
public function __construct(private readonly Indexer $indexer) {}
|
||||
|
||||
/**
|
||||
* @param array{type: string, title: string, description?: ?string, version?: ?string, valid_from?: ?string, url?: ?string, form_id?: ?int} $data
|
||||
*/
|
||||
public function create(QmFolder $folder, array $data, ?UploadedFile $reading, ?UploadedFile $editable, User $user): QmEntry
|
||||
{
|
||||
return DB::transaction(function () use ($folder, $data, $reading, $editable, $user) {
|
||||
$entry = $folder->entries()->create([
|
||||
...$this->attributes($data),
|
||||
'created_by' => $user->id,
|
||||
'updated_by' => $user->id,
|
||||
]);
|
||||
|
||||
if ($entry->type === QmEntry::FILE) {
|
||||
$this->storeFiles($entry, $reading, $editable, $user);
|
||||
}
|
||||
|
||||
return $entry;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Angaben ändern; mit Datei(en) = neue Fassung (bisherige ins Archiv).
|
||||
*
|
||||
* @param array<string, mixed> $data
|
||||
*/
|
||||
public function update(QmEntry $entry, array $data, ?UploadedFile $reading, ?UploadedFile $editable, bool $removeEditable, User $user): QmEntry
|
||||
{
|
||||
return DB::transaction(function () use ($entry, $data, $reading, $editable, $removeEditable, $user) {
|
||||
$entry->update([...$this->attributes([...$data, 'type' => $entry->type]), 'updated_by' => $user->id]);
|
||||
|
||||
if ($entry->type !== QmEntry::FILE) {
|
||||
return $entry;
|
||||
}
|
||||
|
||||
if ($reading || $editable) {
|
||||
$this->storeFiles($entry, $reading, $editable, $user);
|
||||
} else {
|
||||
// Nur Angaben korrigiert (z. B. Tippfehler in der Version): aktuelle Dateien anpassen.
|
||||
$entry->files()->whereNull('archived_at')->update(['version' => $entry->version, 'valid_from' => $entry->valid_from]);
|
||||
}
|
||||
|
||||
if ($removeEditable && ! $editable) {
|
||||
$entry->files()->where('kind', QmFile::EDITABLE)->whereNull('archived_at')->update(['archived_at' => now()]);
|
||||
}
|
||||
|
||||
return $entry->refresh();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $data
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
private function attributes(array $data): array
|
||||
{
|
||||
$type = $data['type'];
|
||||
|
||||
return [
|
||||
'type' => $type,
|
||||
'title' => trim((string) $data['title']),
|
||||
'description' => filled($data['description'] ?? null) ? trim((string) $data['description']) : null,
|
||||
'version' => filled($data['version'] ?? null) ? trim((string) $data['version']) : null,
|
||||
'valid_from' => filled($data['valid_from'] ?? null) ? Carbon::parse($data['valid_from'])->toDateString() : now()->toDateString(),
|
||||
'url' => $type === QmEntry::LINK ? trim((string) $data['url']) : null,
|
||||
'form_id' => $type === QmEntry::FORM ? (int) $data['form_id'] : null,
|
||||
];
|
||||
}
|
||||
|
||||
private function storeFiles(QmEntry $entry, ?UploadedFile $reading, ?UploadedFile $editable, User $user): void
|
||||
{
|
||||
foreach ([QmFile::READING => $reading, QmFile::EDITABLE => $editable] as $kind => $upload) {
|
||||
if (! $upload) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$entry->files()->where('kind', $kind)->whereNull('archived_at')->update(['archived_at' => now()]);
|
||||
|
||||
$name = Str::limit(preg_replace('/[^\pL\pN ._()\-]+/u', '_', $upload->getClientOriginalName()) ?: 'datei', 200, '');
|
||||
$extension = strtolower(pathinfo($name, PATHINFO_EXTENSION));
|
||||
|
||||
$file = $entry->files()->create([
|
||||
'kind' => $kind,
|
||||
'version' => $entry->version,
|
||||
'valid_from' => $entry->valid_from,
|
||||
'name' => $name,
|
||||
'path' => $upload->storeAs('qm/'.$entry->id, Str::random(40).($extension ? '.'.$extension : ''), QmFile::DISK),
|
||||
'mime' => $upload->getMimeType(),
|
||||
'size' => $upload->getSize(),
|
||||
'uploaded_by' => $user->id,
|
||||
'created_at' => now(),
|
||||
]);
|
||||
|
||||
$this->indexer->index($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
29
plugins-core/qm/src/Models/QmCategory.php
Normal file
29
plugins-core/qm/src/Models/QmCategory.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Inhaus\Plugins\Qm\QmTree;
|
||||
|
||||
/**
|
||||
* Kategorie auf der QM-Startseite (Überschrift mit Trennlinie über den Ordnerkacheln).
|
||||
*/
|
||||
#[Fillable(['name', 'sort'])]
|
||||
class QmCategory extends Model
|
||||
{
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::saved(fn () => QmTree::flush());
|
||||
static::deleted(fn () => QmTree::flush());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasMany<QmFolder, $this>
|
||||
*/
|
||||
public function folders(): HasMany
|
||||
{
|
||||
return $this->hasMany(QmFolder::class, 'category_id');
|
||||
}
|
||||
}
|
||||
66
plugins-core/qm/src/Models/QmEntry.php
Normal file
66
plugins-core/qm/src/Models/QmEntry.php
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
|
||||
/**
|
||||
* Ein Eintrag in einem QM-Ordner: Datei (mit Lesefassung und optional bearbeitbarer
|
||||
* Vorlage), Link oder Online-Formular. „Stand“ = valid_from.
|
||||
*/
|
||||
#[Fillable(['folder_id', 'type', 'title', 'description', 'version', 'valid_from', 'url', 'form_id', 'sort', 'created_by', 'updated_by'])]
|
||||
class QmEntry extends Model
|
||||
{
|
||||
public const FILE = 'file';
|
||||
|
||||
public const LINK = 'link';
|
||||
|
||||
public const FORM = 'form';
|
||||
|
||||
protected static function booted(): void
|
||||
{
|
||||
// Dateien mitlöschen (die Datenbank löscht die Zeilen, hier auch die Dateien).
|
||||
static::deleting(fn (QmEntry $entry) => $entry->files()->get()->each->delete());
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return ['valid_from' => 'date', 'review_due_at' => 'date', 'requires_acknowledgement' => 'boolean'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo<QmFolder, $this>
|
||||
*/
|
||||
public function folder(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(QmFolder::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasMany<QmFile, $this>
|
||||
*/
|
||||
public function files(): HasMany
|
||||
{
|
||||
return $this->hasMany(QmFile::class, 'entry_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasOne<QmFile, $this>
|
||||
*/
|
||||
public function readingFile(): HasOne
|
||||
{
|
||||
return $this->hasOne(QmFile::class, 'entry_id')->where('kind', QmFile::READING)->whereNull('archived_at');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasOne<QmFile, $this>
|
||||
*/
|
||||
public function editableFile(): HasOne
|
||||
{
|
||||
return $this->hasOne(QmFile::class, 'entry_id')->where('kind', QmFile::EDITABLE)->whereNull('archived_at');
|
||||
}
|
||||
}
|
||||
71
plugins-core/qm/src/Models/QmFile.php
Normal file
71
plugins-core/qm/src/Models/QmFile.php
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm\Models;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
/**
|
||||
* Eine Datei eines QM-Eintrags. Aktuelle Fassung: archived_at = null.
|
||||
* Frühere Fassungen bleiben im Archiv (Nachvollziehbarkeit).
|
||||
*/
|
||||
#[Fillable(['entry_id', 'kind', 'version', 'valid_from', 'name', 'path', 'mime', 'size', 'text', 'text_status', 'archived_at', 'uploaded_by', 'created_at'])]
|
||||
class QmFile extends Model
|
||||
{
|
||||
public const DISK = 'local';
|
||||
|
||||
public const READING = 'reading';
|
||||
|
||||
public const EDITABLE = 'editable';
|
||||
|
||||
public const UPDATED_AT = null;
|
||||
|
||||
/** Im Browser lesbar (eigener Betrachter). */
|
||||
public const VIEWABLE = ['application/pdf', 'image/jpeg', 'image/png', 'image/gif', 'image/webp'];
|
||||
|
||||
protected $hidden = ['text'];
|
||||
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::deleted(fn (QmFile $file) => Storage::disk(self::DISK)->delete($file->path));
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return ['valid_from' => 'date', 'archived_at' => 'datetime', 'created_at' => 'datetime'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo<QmEntry, $this>
|
||||
*/
|
||||
public function entry(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(QmEntry::class, 'entry_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo<User, $this>
|
||||
*/
|
||||
public function uploader(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'uploaded_by');
|
||||
}
|
||||
|
||||
public function extension(): string
|
||||
{
|
||||
return strtoupper(pathinfo($this->name, PATHINFO_EXTENSION));
|
||||
}
|
||||
|
||||
public function isViewable(): bool
|
||||
{
|
||||
return in_array($this->mime, self::VIEWABLE, true);
|
||||
}
|
||||
|
||||
public function url(bool $inline = false): string
|
||||
{
|
||||
return route('qm.file', ['file' => $this->id, 'name' => $this->name]).($inline ? '?lesen=1' : '');
|
||||
}
|
||||
}
|
||||
73
plugins-core/qm/src/Models/QmFolder.php
Normal file
73
plugins-core/qm/src/Models/QmFolder.php
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm\Models;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Inhaus\Plugins\Qm\QmTree;
|
||||
|
||||
#[Fillable(['category_id', 'parent_id', 'name', 'color', 'icon', 'icon_path', 'icon_mono', 'intro', 'sort', 'created_by'])]
|
||||
class QmFolder extends Model
|
||||
{
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::saved(fn () => QmTree::flush());
|
||||
static::deleted(function (QmFolder $folder) {
|
||||
if ($folder->icon_path) {
|
||||
Storage::disk('uploads')->delete($folder->icon_path);
|
||||
}
|
||||
|
||||
QmTree::flush();
|
||||
});
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return ['icon_mono' => 'boolean'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo<QmCategory, $this>
|
||||
*/
|
||||
public function category(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(QmCategory::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo<QmFolder, $this>
|
||||
*/
|
||||
public function parent(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(self::class, 'parent_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasMany<QmFolder, $this>
|
||||
*/
|
||||
public function children(): HasMany
|
||||
{
|
||||
return $this->hasMany(self::class, 'parent_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasMany<QmEntry, $this>
|
||||
*/
|
||||
public function entries(): HasMany
|
||||
{
|
||||
return $this->hasMany(QmEntry::class, 'folder_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsToMany<User, $this>
|
||||
*/
|
||||
public function contacts(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(User::class, 'qm_folder_contacts', 'folder_id', 'user_id')->withPivot('sort')->orderByPivot('sort');
|
||||
}
|
||||
}
|
||||
159
plugins-core/qm/src/Presenter.php
Normal file
159
plugins-core/qm/src/Presenter.php
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Support\ProfileFields;
|
||||
use App\Support\Settings;
|
||||
use Inhaus\Plugins\Qm\Models\QmEntry;
|
||||
|
||||
/**
|
||||
* Daten für das Portal: Ordnerkacheln, Einträge und Ansprechpartner.
|
||||
*/
|
||||
class Presenter
|
||||
{
|
||||
public const CONTACT_FIELDS = 'qm.contact_fields';
|
||||
|
||||
/** Kernfelder des Profils, die bei Ansprechpartnern erscheinen können. */
|
||||
public const CORE_FIELDS = [
|
||||
'job_title' => 'Funktion',
|
||||
'department' => 'Abteilung',
|
||||
'location' => 'Standort',
|
||||
'phone' => 'Telefon',
|
||||
'mobile' => 'Mobil',
|
||||
'email' => 'E-Mail-Adresse',
|
||||
];
|
||||
|
||||
public const DEFAULT_CONTACT_FIELDS = ['job_title', 'phone', 'email'];
|
||||
|
||||
public function __construct(private readonly QmTree $tree, private readonly Settings $settings, private readonly ProfileFields $profileFields) {}
|
||||
|
||||
/**
|
||||
* @param array<int, int> $counts Ordner => Anzahl Einträge
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function tile(int $id, array $counts = []): array
|
||||
{
|
||||
$folder = $this->tree->folder($id);
|
||||
$children = count($this->tree->childIds($id));
|
||||
|
||||
return [
|
||||
'id' => $id,
|
||||
'name' => $folder['name'],
|
||||
'color' => $folder['color'],
|
||||
'icon' => $folder['icon'],
|
||||
'folders' => $children,
|
||||
'entries' => (int) ($counts[$id] ?? 0),
|
||||
'url' => route('qm.folder', $id),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function entry(QmEntry $entry, bool $withFolder = false): array
|
||||
{
|
||||
$reading = $entry->relationLoaded('readingFile') ? $entry->readingFile : null;
|
||||
$editable = $entry->relationLoaded('editableFile') ? $entry->editableFile : null;
|
||||
$main = $reading ?? $editable;
|
||||
|
||||
$open = match ($entry->type) {
|
||||
QmEntry::LINK => ['url' => $entry->url, 'kind' => 'link'],
|
||||
QmEntry::FORM => ['url' => $entry->form_id ? $this->formUrl($entry->form_id) : null, 'kind' => 'form'],
|
||||
default => $main
|
||||
? ($main->isViewable() ? ['url' => route('qm.view', $entry), 'kind' => 'view'] : ['url' => $main->url(), 'kind' => 'download'])
|
||||
: ['url' => null, 'kind' => 'none'],
|
||||
};
|
||||
|
||||
return [
|
||||
'id' => $entry->id,
|
||||
'type' => $entry->type,
|
||||
'title' => $entry->title,
|
||||
'description' => $entry->description,
|
||||
'version' => $entry->version,
|
||||
'valid_from' => $entry->valid_from?->toDateString(),
|
||||
'size' => $main?->size,
|
||||
'extension' => $main?->extension(),
|
||||
'open_url' => $open['url'],
|
||||
'open_kind' => $open['kind'],
|
||||
'download_url' => $main?->url(),
|
||||
'editable' => $editable ? ['name' => $editable->name, 'extension' => $editable->extension(), 'url' => $editable->url(), 'size' => $editable->size] : null,
|
||||
'searchable' => $main ? in_array($main->text_status, ['ok', 'ocr'], true) : null,
|
||||
'text_status' => $main?->text_status,
|
||||
'url' => $entry->url,
|
||||
'form_id' => $entry->form_id,
|
||||
'folder' => $withFolder ? $this->folderLabel($entry->folder_id) : null,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{id: int, path: string, color: string}
|
||||
*/
|
||||
public function folderLabel(int $id): array
|
||||
{
|
||||
return [
|
||||
'id' => $id,
|
||||
'path' => implode(' › ', array_column($this->tree->path($id), 'name')),
|
||||
'color' => $this->tree->folder($id)['color'] ?? Colors::DEFAULT,
|
||||
'url' => route('qm.folder', $id),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Ansprechpartner mit den im Admin gewählten Profilfeldern.
|
||||
*
|
||||
* @param iterable<User> $people
|
||||
* @return list<array<string, mixed>>
|
||||
*/
|
||||
public function contacts(iterable $people, ?User $viewer): array
|
||||
{
|
||||
$fields = (array) $this->settings->get(self::CONTACT_FIELDS, self::DEFAULT_CONTACT_FIELDS);
|
||||
$result = [];
|
||||
|
||||
foreach ($people as $person) {
|
||||
if (! $person->is_active) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$values = [];
|
||||
$custom = collect($this->profileFields->visibleValues($person, $viewer))->keyBy('key');
|
||||
|
||||
foreach ($fields as $field) {
|
||||
if (isset(self::CORE_FIELDS[$field])) {
|
||||
$value = $person->{$field};
|
||||
|
||||
if (filled($value)) {
|
||||
$values[] = ['key' => $field, 'label' => self::CORE_FIELDS[$field], 'value' => $value, 'type' => in_array($field, ['phone', 'mobile'], true) ? 'phone' : ($field === 'email' ? 'email' : 'text')];
|
||||
}
|
||||
} elseif (str_starts_with($field, 'custom.') && ($item = $custom->get(substr($field, 7)))) {
|
||||
$values[] = ['key' => $field, 'label' => $item['label'], 'value' => $item['value'], 'type' => $item['type'] ?? 'text'];
|
||||
}
|
||||
}
|
||||
|
||||
$result[] = [
|
||||
'id' => $person->id,
|
||||
'name' => $person->name,
|
||||
'initials' => $person->initials,
|
||||
'avatar_url' => $person->avatarUrl(160),
|
||||
'fields' => $values,
|
||||
];
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string> auswählbare Felder für die Einstellungen
|
||||
*/
|
||||
public function contactFieldOptions(): array
|
||||
{
|
||||
return self::CORE_FIELDS + collect($this->profileFields->options())->mapWithKeys(fn ($label, $key) => ['custom.'.$key => $label.' (Profilfeld)'])->all();
|
||||
}
|
||||
|
||||
private function formUrl(int $id): ?string
|
||||
{
|
||||
$class = 'Inhaus\\Plugins\\Forms\\Models\\Form';
|
||||
|
||||
return class_exists($class) ? $class::query()->find($id)?->url() : null;
|
||||
}
|
||||
}
|
||||
40
plugins-core/qm/src/QmAccess.php
Normal file
40
plugins-core/qm/src/QmAccess.php
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Support\Settings;
|
||||
|
||||
/**
|
||||
* Wer das QM-Modul sehen und pflegen darf.
|
||||
*
|
||||
* - Sehen: alle angemeldeten Personen – außer Mitgliedern ausgeschlossener Rollen
|
||||
* (z. B. Klient*innen). Ausschluss geht vor; wer QM pflegen darf, sieht es immer.
|
||||
* - Pflegen: Recht „qm.manage“ (ohne Vergabe nur die Administration).
|
||||
*/
|
||||
class QmAccess
|
||||
{
|
||||
public const EXCLUDED_ROLES = 'qm.excluded_roles';
|
||||
|
||||
public function __construct(private readonly Settings $settings) {}
|
||||
|
||||
public function allows(?User $user): bool
|
||||
{
|
||||
if (! $user) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->canManage($user)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$excluded = array_map('intval', (array) $this->settings->get(self::EXCLUDED_ROLES, []));
|
||||
|
||||
return $excluded === [] || ! $user->roles()->whereIn('roles.id', $excluded)->exists();
|
||||
}
|
||||
|
||||
public function canManage(?User $user): bool
|
||||
{
|
||||
return (bool) $user?->can('qm.manage');
|
||||
}
|
||||
}
|
||||
36
plugins-core/qm/src/QmPlugin.php
Normal file
36
plugins-core/qm/src/QmPlugin.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Plugins\Plugin;
|
||||
use App\Support\Abilities;
|
||||
use App\Support\Navigation;
|
||||
use Illuminate\Support\Facades\Schedule;
|
||||
use Inhaus\Plugins\Qm\Models\QmCategory;
|
||||
use Inhaus\Plugins\Qm\Text\Ocr;
|
||||
use Inhaus\Plugins\Qm\Text\TextExtractor;
|
||||
|
||||
class QmPlugin extends Plugin
|
||||
{
|
||||
public function register(): void
|
||||
{
|
||||
foreach ([QmTree::class, QmAccess::class, Presenter::class, Search::class, Library::class, Indexer::class, TextExtractor::class, Ocr::class] as $class) {
|
||||
$this->app->singleton($class);
|
||||
}
|
||||
|
||||
$this->app->make(Navigation::class)->add('qm', 'Qualitätsmanagement', '/qm', active: 'qm.*', sort: 55,
|
||||
visible: fn (User $user) => $this->app->make(QmAccess::class)->allows($user));
|
||||
|
||||
$abilities = $this->app->make(Abilities::class);
|
||||
$abilities->define('qm.manage', 'Qualitätsmanagement pflegen (Ordner, Dokumente, Einstellungen)', 'Qualitätsmanagement');
|
||||
$abilities->resourceType('qm_category', 'QM-Kategorie', fn () => QmCategory::query()->orderBy('sort')->pluck('name', 'id')->all());
|
||||
}
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
// Eingescannte PDFs per Texterkennung durchsuchbar machen (nur wenn eingerichtet).
|
||||
Schedule::call(fn () => $this->app->make(Indexer::class)->processOcr())
|
||||
->everyTenMinutes()->name('qm-ocr')->withoutOverlapping(30);
|
||||
}
|
||||
}
|
||||
206
plugins-core/qm/src/QmTree.php
Normal file
206
plugins-core/qm/src/QmTree.php
Normal file
|
|
@ -0,0 +1,206 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Support\Icons;
|
||||
use App\Support\Permissions\Audiences;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
/**
|
||||
* Ordnerstruktur des QM-Moduls, zwischengespeichert: Kategorien, Ordner, geerbte
|
||||
* Farben und Sichtbarkeit (je Kategorie, vorbereitet über Zielgruppen).
|
||||
*/
|
||||
class QmTree
|
||||
{
|
||||
private const CACHE_KEY = 'qm.tree';
|
||||
|
||||
/** @var array<string, mixed>|null */
|
||||
private ?array $data = null;
|
||||
|
||||
public static function flush(): void
|
||||
{
|
||||
Cache::forget(self::CACHE_KEY);
|
||||
app(self::class)->data = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{id: int, parent_id: ?int, category_id: ?int, name: string, color: string, own_color: ?string, icon: array{name?: string, url?: string, mono?: bool}, sort: int}|null
|
||||
*/
|
||||
public function folder(int $id): ?array
|
||||
{
|
||||
return $this->data()['folders'][$id] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<int>
|
||||
*/
|
||||
public function childIds(?int $id): array
|
||||
{
|
||||
return $this->data()['children'][$id ?? 0] ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<array<string, mixed>> Weg von oben bis einschließlich des Ordners
|
||||
*/
|
||||
public function path(int $id): array
|
||||
{
|
||||
$path = [];
|
||||
|
||||
for ($folder = $this->folder($id); $folder && count($path) < 50; $folder = $folder['parent_id'] ? $this->folder($folder['parent_id']) : null) {
|
||||
array_unshift($path, $folder);
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<int> $ids
|
||||
* @return list<int>
|
||||
*/
|
||||
public function descendantIds(array $ids): array
|
||||
{
|
||||
$result = [];
|
||||
|
||||
foreach ($ids as $id) {
|
||||
foreach ($this->childIds($id) as $child) {
|
||||
$result[] = $child;
|
||||
array_push($result, ...$this->descendantIds([$child]));
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Kategorie eines Ordners (die des obersten Ordners im Pfad).
|
||||
*/
|
||||
public function categoryId(int $id): ?int
|
||||
{
|
||||
return $this->path($id)[0]['category_id'] ?? null;
|
||||
}
|
||||
|
||||
public function isVisible(int $id, ?User $user): bool
|
||||
{
|
||||
if (! $this->folder($id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$category = $this->categoryId($id);
|
||||
|
||||
return $category === null || $this->categoryVisible($category, $user);
|
||||
}
|
||||
|
||||
public function categoryVisible(int $category, ?User $user): bool
|
||||
{
|
||||
return Audiences::matches($this->data()['category_audiences'][$category] ?? null, $user);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<int>
|
||||
*/
|
||||
public function visibleIds(?User $user): array
|
||||
{
|
||||
return array_values(array_filter(array_keys($this->data()['folders']), fn (int $id) => $this->isVisible($id, $user)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Kategorien mit ihren obersten Ordnern – für die Startseite.
|
||||
*
|
||||
* @return list<array{id: int|null, name: string, folders: list<int>}>
|
||||
*/
|
||||
public function categories(?User $user): array
|
||||
{
|
||||
$groups = [];
|
||||
|
||||
foreach ($this->data()['categories'] as $category) {
|
||||
if (! $this->categoryVisible($category['id'], $user)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$folders = array_values(array_filter($this->childIds(null), fn (int $id) => $this->folder($id)['category_id'] === $category['id']));
|
||||
|
||||
if ($folders !== []) {
|
||||
$groups[] = ['id' => $category['id'], 'name' => $category['name'], 'folders' => $folders];
|
||||
}
|
||||
}
|
||||
|
||||
// Oberste Ordner ohne (gültige) Kategorie
|
||||
$known = array_column($this->data()['categories'], 'id');
|
||||
$rest = array_values(array_filter($this->childIds(null), fn (int $id) => ! in_array($this->folder($id)['category_id'], $known, true)));
|
||||
|
||||
if ($rest !== []) {
|
||||
$groups[] = ['id' => null, 'name' => $groups === [] ? 'Ordner' : 'Weitere', 'folders' => $rest];
|
||||
}
|
||||
|
||||
return $groups;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alle Ordner mit Einrückung – für Auswahllisten.
|
||||
*
|
||||
* @return array<int, string>
|
||||
*/
|
||||
public function options(?int $rootId = null, int $depth = 0): array
|
||||
{
|
||||
$options = [];
|
||||
|
||||
foreach ($this->childIds($rootId) as $id) {
|
||||
$options[$id] = str_repeat('— ', $depth).$this->folder($id)['name'];
|
||||
$options += $this->options($id, $depth + 1);
|
||||
}
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
private function data(): array
|
||||
{
|
||||
return $this->data ??= Cache::rememberForever(self::CACHE_KEY, function () {
|
||||
$categories = DB::table('qm_categories')->orderBy('sort')->orderBy('name')->get(['id', 'name'])
|
||||
->map(fn ($c) => ['id' => (int) $c->id, 'name' => $c->name])->all();
|
||||
$rows = DB::table('qm_folders')->orderBy('sort')->orderBy('name')->get(['id', 'parent_id', 'category_id', 'name', 'color', 'icon', 'icon_path', 'icon_mono', 'sort']);
|
||||
|
||||
$folders = [];
|
||||
$children = [];
|
||||
|
||||
foreach ($rows as $row) {
|
||||
$folders[(int) $row->id] = [
|
||||
'id' => (int) $row->id,
|
||||
'parent_id' => $row->parent_id ? (int) $row->parent_id : null,
|
||||
'category_id' => $row->category_id ? (int) $row->category_id : null,
|
||||
'name' => $row->name,
|
||||
'own_color' => Colors::has($row->color) ? $row->color : null,
|
||||
'color' => Colors::DEFAULT,
|
||||
'own_icon' => $row->icon_path
|
||||
? ['url' => Storage::disk('uploads')->url($row->icon_path), 'mono' => (bool) $row->icon_mono]
|
||||
: (Icons::has($row->icon) ? ['name' => $row->icon] : null),
|
||||
'icon' => ['name' => 'folder'],
|
||||
'sort' => (int) $row->sort,
|
||||
];
|
||||
$children[(int) ($row->parent_id ?? 0)][] = (int) $row->id;
|
||||
}
|
||||
|
||||
// Farbe und Symbol vererben: von oben nach unten auflösen.
|
||||
$resolve = function (int $parent, string $color, array $icon) use (&$resolve, &$folders, $children) {
|
||||
foreach ($children[$parent] ?? [] as $id) {
|
||||
$folders[$id]['color'] = $folders[$id]['own_color'] ?? $color;
|
||||
$folders[$id]['icon'] = $folders[$id]['own_icon'] ?? $icon;
|
||||
$resolve($id, $folders[$id]['color'], $folders[$id]['icon']);
|
||||
}
|
||||
};
|
||||
$resolve(0, Colors::DEFAULT, ['name' => 'folder']);
|
||||
|
||||
return [
|
||||
'categories' => $categories,
|
||||
'folders' => $folders,
|
||||
'children' => $children,
|
||||
'category_audiences' => Audiences::allOfType('qm_category'),
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
144
plugins-core/qm/src/Search.php
Normal file
144
plugins-core/qm/src/Search.php
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Inhaus\Plugins\Qm\Models\QmEntry;
|
||||
|
||||
/**
|
||||
* Suche nur im QM-Modul: Titel, Beschreibung, Dateiname und Inhalt der aktuellen
|
||||
* Fassungen (Volltextindex, sonst Textsuche). Treffer mit Textausschnitt.
|
||||
*/
|
||||
class Search
|
||||
{
|
||||
public const LIMIT = 50;
|
||||
|
||||
public function __construct(private readonly QmTree $tree) {}
|
||||
|
||||
/**
|
||||
* @return Collection<int, array{entry: QmEntry, snippet: ?string, in_content: bool}>
|
||||
*/
|
||||
public function run(string $query, ?User $user): Collection
|
||||
{
|
||||
$terms = $this->terms($query);
|
||||
|
||||
if ($terms === []) {
|
||||
return collect();
|
||||
}
|
||||
|
||||
$folders = $this->tree->visibleIds($user) ?: [0];
|
||||
$like = fn (string $term) => '%'.str_replace(['\\', '%', '_'], ['\\\\', '\\%', '\\_'], $term).'%';
|
||||
|
||||
// 1) Metadaten: alle Begriffe in Titel, Beschreibung, Version oder Dateiname
|
||||
$byMeta = QmEntry::query()->whereIn('folder_id', $folders)
|
||||
->where(function (Builder $q) use ($terms, $like) {
|
||||
foreach ($terms as $term) {
|
||||
$q->where(fn (Builder $w) => $w->where('title', 'like', $like($term))
|
||||
->orWhere('description', 'like', $like($term))
|
||||
->orWhere('version', 'like', $like($term))
|
||||
->orWhereHas('files', fn (Builder $f) => $f->whereNull('archived_at')->where('name', 'like', $like($term))));
|
||||
}
|
||||
})
|
||||
->limit(self::LIMIT)->pluck('id')->all();
|
||||
|
||||
// 2) Inhalt: Volltextindex (schnell, mit Gewichtung) – Rückfall auf Textsuche
|
||||
$contentHits = $this->contentMatches($terms, $folders, $like);
|
||||
|
||||
$ids = array_values(array_unique([...$byMeta, ...array_keys($contentHits)]));
|
||||
$entries = QmEntry::query()->whereIn('id', $ids ?: [0])->with(['readingFile', 'editableFile'])->get()->keyBy('id');
|
||||
|
||||
return collect($ids)
|
||||
->filter(fn (int $id) => $entries->has($id))
|
||||
->map(fn (int $id) => [
|
||||
'entry' => $entries[$id],
|
||||
'snippet' => isset($contentHits[$id]) ? $this->snippet($contentHits[$id], $terms) : null,
|
||||
'in_content' => isset($contentHits[$id]) && ! in_array($id, $byMeta, true),
|
||||
])
|
||||
->take(self::LIMIT)
|
||||
->values();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<string> $terms
|
||||
* @param list<int> $folders
|
||||
* @return array<int, string> Eintrag => Text
|
||||
*/
|
||||
private function contentMatches(array $terms, array $folders, \Closure $like): array
|
||||
{
|
||||
$base = fn () => DB::table('qm_files')->join('qm_entries', 'qm_entries.id', '=', 'qm_files.entry_id')
|
||||
->whereIn('qm_entries.folder_id', $folders)->whereNull('qm_files.archived_at')->whereNotNull('qm_files.text');
|
||||
|
||||
$rows = collect();
|
||||
|
||||
if (in_array(DB::getDriverName(), ['mysql', 'mariadb'], true) && collect($terms)->every(fn ($t) => mb_strlen($t) >= 3)) {
|
||||
$boolean = implode(' ', array_map(fn ($t) => '+'.preg_replace('/[^\p{L}\p{N}]+/u', '', $t).'*', $terms));
|
||||
$rows = $base()->whereRaw('MATCH(qm_files.text) AGAINST (? IN BOOLEAN MODE)', [$boolean])
|
||||
->orderByRaw('MATCH(qm_files.text) AGAINST (? IN BOOLEAN MODE) DESC', [$boolean])
|
||||
->limit(self::LIMIT)->get(['qm_files.entry_id', 'qm_files.kind', 'qm_files.text']);
|
||||
}
|
||||
|
||||
// Kurze Begriffe, frisch gespeicherte Zeilen oder andere Datenbanken
|
||||
if ($rows->isEmpty()) {
|
||||
$query = $base();
|
||||
|
||||
foreach ($terms as $term) {
|
||||
$query->where('qm_files.text', 'like', $like($term));
|
||||
}
|
||||
|
||||
$rows = $query->limit(self::LIMIT)->get(['qm_files.entry_id', 'qm_files.kind', 'qm_files.text']);
|
||||
}
|
||||
|
||||
// Je Eintrag ein Text – die Lesefassung vor der Vorlage.
|
||||
$texts = [];
|
||||
|
||||
foreach ($rows as $row) {
|
||||
if (! isset($texts[(int) $row->entry_id]) || $row->kind === 'reading') {
|
||||
$texts[(int) $row->entry_id] = (string) $row->text;
|
||||
}
|
||||
}
|
||||
|
||||
return $texts;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<string>
|
||||
*/
|
||||
private function terms(string $query): array
|
||||
{
|
||||
$words = preg_split('/\s+/u', mb_strtolower(trim($query)), -1, PREG_SPLIT_NO_EMPTY) ?: [];
|
||||
|
||||
return array_values(array_unique(array_filter(array_slice($words, 0, 8), fn ($w) => mb_strlen($w) >= 2)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Ausschnitt rund um den ersten Treffer, Begriffe hervorgehoben (HTML, escaped).
|
||||
*
|
||||
* @param list<string> $terms
|
||||
*/
|
||||
private function snippet(string $text, array $terms): string
|
||||
{
|
||||
$lower = mb_strtolower($text);
|
||||
$position = null;
|
||||
|
||||
foreach ($terms as $term) {
|
||||
$found = mb_strpos($lower, $term);
|
||||
|
||||
if ($found !== false && ($position === null || $found < $position)) {
|
||||
$position = $found;
|
||||
}
|
||||
}
|
||||
|
||||
$start = max(0, ($position ?? 0) - 80);
|
||||
$excerpt = str_replace("\n", ' ', mb_substr($text, $start, 240));
|
||||
$html = ($start > 0 ? '… ' : '').e($excerpt).(mb_strlen($text) > $start + 240 ? ' …' : '');
|
||||
|
||||
foreach ($terms as $term) {
|
||||
$html = preg_replace('/('.preg_quote(e($term), '/').')/iu', '<mark>$1</mark>', $html) ?? $html;
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
163
plugins-core/qm/src/Text/Ocr.php
Normal file
163
plugins-core/qm/src/Text/Ocr.php
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm\Text;
|
||||
|
||||
use App\Support\Settings;
|
||||
use Imagick;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* Texterkennung (OCR) für eingescannte PDFs – optional, wenn der Server sie kann:
|
||||
* Tesseract (Programm „tesseract“ mit deutschen Sprachdaten) und ein Umwandler für
|
||||
* PDF-Seiten in Bilder (Programm „pdftoppm“ aus poppler-utils oder PHP-Imagick mit
|
||||
* Ghostscript). Auf Shared Hosting meist nicht vorhanden – dann bleiben solche
|
||||
* Dateien in der Suche nur über ihren Titel auffindbar.
|
||||
*
|
||||
* Einrichtung (Debian/Ubuntu): apt install tesseract-ocr tesseract-ocr-deu poppler-utils
|
||||
*/
|
||||
class Ocr
|
||||
{
|
||||
public const SETTING_ENABLED = 'qm.ocr.enabled';
|
||||
|
||||
public const SETTING_BINARY = 'qm.ocr.tesseract';
|
||||
|
||||
public const MAX_PAGES = 40;
|
||||
|
||||
public function __construct(private readonly Settings $settings) {}
|
||||
|
||||
public function enabled(): bool
|
||||
{
|
||||
return (bool) $this->settings->get(self::SETTING_ENABLED, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Was auf diesem Server vorhanden ist.
|
||||
*
|
||||
* @return array{exec: bool, // Programme dürfen aufgerufen werden (proc_open)
|
||||
* tesseract: ?string, languages: list<string>, rasterizer: ?string}
|
||||
*/
|
||||
public function status(): array
|
||||
{
|
||||
$exec = function_exists('proc_open') && ! in_array('proc_open', array_map('trim', explode(',', (string) ini_get('disable_functions'))), true);
|
||||
$tesseract = null;
|
||||
$languages = [];
|
||||
|
||||
if ($exec) {
|
||||
$binary = $this->binary();
|
||||
$version = $this->run([$binary, '--version']);
|
||||
|
||||
if ($version !== null && str_contains(strtolower($version), 'tesseract')) {
|
||||
$tesseract = trim(strtok($version, "\n"));
|
||||
$languages = array_values(array_filter(array_map('trim', array_slice(explode("\n", (string) $this->run([$binary, '--list-langs'])), 1))));
|
||||
}
|
||||
}
|
||||
|
||||
return ['exec' => $exec, 'tesseract' => $tesseract, 'languages' => $languages, 'rasterizer' => $this->rasterizer($exec)];
|
||||
}
|
||||
|
||||
public function available(): bool
|
||||
{
|
||||
$status = $this->status();
|
||||
|
||||
return $status['tesseract'] !== null && $status['rasterizer'] !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Text einer PDF-Datei per Texterkennung.
|
||||
*/
|
||||
public function recognize(string $pdf): string
|
||||
{
|
||||
$dir = sys_get_temp_dir().'/inhaus-ocr-'.bin2hex(random_bytes(6));
|
||||
@mkdir($dir, 0700, true);
|
||||
|
||||
try {
|
||||
$images = $this->rasterize($pdf, $dir);
|
||||
$languages = in_array('deu', $this->status()['languages'], true) ? 'deu+eng' : 'eng';
|
||||
$text = '';
|
||||
|
||||
foreach ($images as $image) {
|
||||
$text .= $this->run([$this->binary(), $image, 'stdout', '-l', $languages, '--psm', '1'])."\n";
|
||||
}
|
||||
|
||||
return TextExtractor::normalize($text);
|
||||
} finally {
|
||||
array_map('unlink', glob($dir.'/*') ?: []);
|
||||
@rmdir($dir);
|
||||
}
|
||||
}
|
||||
|
||||
private function binary(): string
|
||||
{
|
||||
$binary = trim((string) $this->settings->get(self::SETTING_BINARY, '')) ?: 'tesseract';
|
||||
|
||||
// Nur ein Programmname oder ein absoluter Pfad – keine Parameter.
|
||||
return preg_match('#^(/[\w./-]+|[\w.-]+)$#', $binary) ? $binary : 'tesseract';
|
||||
}
|
||||
|
||||
private function rasterizer(bool $exec): ?string
|
||||
{
|
||||
if ($exec && $this->run(['pdftoppm', '-v']) !== null) {
|
||||
return 'pdftoppm';
|
||||
}
|
||||
|
||||
try {
|
||||
if (class_exists(Imagick::class) && in_array('PDF', Imagick::queryFormats('PDF'), true)) {
|
||||
return 'imagick';
|
||||
}
|
||||
} catch (Throwable) {
|
||||
// Imagick ohne PDF-Unterstützung
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<string> Bilddateien der Seiten
|
||||
*/
|
||||
private function rasterize(string $pdf, string $dir): array
|
||||
{
|
||||
if ($this->rasterizer(true) === 'pdftoppm') {
|
||||
$this->run(['pdftoppm', '-r', '300', '-gray', '-png', '-l', (string) self::MAX_PAGES, $pdf, $dir.'/seite']);
|
||||
} else {
|
||||
$imagick = new Imagick;
|
||||
$imagick->setResolution(300, 300);
|
||||
$imagick->readImage($pdf.'[0-'.(self::MAX_PAGES - 1).']');
|
||||
|
||||
foreach ($imagick as $index => $page) {
|
||||
$page->setImageFormat('png');
|
||||
$page->writeImage(sprintf('%s/seite-%03d.png', $dir, $index + 1));
|
||||
}
|
||||
|
||||
$imagick->clear();
|
||||
}
|
||||
|
||||
$images = glob($dir.'/seite*.png') ?: [];
|
||||
natsort($images);
|
||||
|
||||
return array_values($images);
|
||||
}
|
||||
|
||||
/**
|
||||
* Programm ohne Shell aufrufen; null, wenn es nicht läuft.
|
||||
*
|
||||
* @param list<string> $command
|
||||
*/
|
||||
protected function run(array $command): ?string
|
||||
{
|
||||
if (! function_exists('proc_open')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$process = @proc_open($command, [1 => ['pipe', 'w'], 2 => ['pipe', 'w']], $pipes);
|
||||
|
||||
if (! is_resource($process)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$output = stream_get_contents($pipes[1]).stream_get_contents($pipes[2]);
|
||||
fclose($pipes[1]);
|
||||
fclose($pipes[2]);
|
||||
|
||||
return proc_close($process) === 0 ? (string) $output : null;
|
||||
}
|
||||
}
|
||||
120
plugins-core/qm/src/Text/TextExtractor.php
Normal file
120
plugins-core/qm/src/Text/TextExtractor.php
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Qm\Text;
|
||||
|
||||
use Smalot\PdfParser\Parser;
|
||||
use Throwable;
|
||||
use ZipArchive;
|
||||
|
||||
/**
|
||||
* Text aus Dokumenten für die Volltextsuche – in reinem PHP, läuft also auch auf
|
||||
* Shared Hosting. Eingescannte PDFs ohne Textebene liefern nichts; die übernimmt
|
||||
* (falls eingerichtet) die Texterkennung (Ocr).
|
||||
*/
|
||||
class TextExtractor
|
||||
{
|
||||
/** Mehr Text braucht die Suche nicht. */
|
||||
public const MAX_CHARS = 2_000_000;
|
||||
|
||||
/**
|
||||
* @return array{text: ?string, status: string} status: ok | empty | unsupported | failed
|
||||
*/
|
||||
public function extract(string $path, string $extension): array
|
||||
{
|
||||
try {
|
||||
$text = match (strtolower($extension)) {
|
||||
'pdf' => $this->pdf($path),
|
||||
'docx' => $this->xmlInZip($path, ['word/document.xml', 'word/header1.xml', 'word/footer1.xml']),
|
||||
'xlsx' => $this->xmlInZip($path, ['xl/sharedStrings.xml']),
|
||||
'pptx' => $this->xmlInZip($path, $this->zipEntries($path, '#^ppt/slides/slide\d+\.xml$#')),
|
||||
'odt', 'ods', 'odp' => $this->xmlInZip($path, ['content.xml']),
|
||||
'txt', 'csv' => (string) file_get_contents($path, length: self::MAX_CHARS),
|
||||
default => null,
|
||||
};
|
||||
} catch (Throwable $e) {
|
||||
logger()->warning("QM: Text aus {$path} nicht lesbar: ".$e->getMessage());
|
||||
|
||||
return ['text' => null, 'status' => 'failed'];
|
||||
}
|
||||
|
||||
if ($text === null) {
|
||||
return ['text' => null, 'status' => 'unsupported'];
|
||||
}
|
||||
|
||||
$text = self::normalize($text);
|
||||
|
||||
return ['text' => $text === '' ? null : $text, 'status' => $text === '' ? 'empty' : 'ok'];
|
||||
}
|
||||
|
||||
public static function normalize(string $text): string
|
||||
{
|
||||
$text = mb_convert_encoding($text, 'UTF-8', 'UTF-8');
|
||||
$text = preg_replace('/[^\P{C}\n\t]+/u', ' ', $text) ?? '';
|
||||
$text = preg_replace('/[ \t\x{00A0}]+/u', ' ', $text) ?? '';
|
||||
$text = preg_replace('/\s*\n\s*/', "\n", $text) ?? '';
|
||||
|
||||
return mb_substr(trim($text), 0, self::MAX_CHARS);
|
||||
}
|
||||
|
||||
private function pdf(string $path): string
|
||||
{
|
||||
$parser = new Parser;
|
||||
|
||||
return $parser->parseFile($path)->getText();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<string> $entries
|
||||
*/
|
||||
private function xmlInZip(string $path, array $entries): string
|
||||
{
|
||||
$zip = new ZipArchive;
|
||||
|
||||
if ($zip->open($path) !== true) {
|
||||
throw new \RuntimeException('Keine gültige Office-Datei.');
|
||||
}
|
||||
|
||||
$text = '';
|
||||
|
||||
foreach ($entries as $entry) {
|
||||
$xml = $zip->getFromName($entry);
|
||||
|
||||
if ($xml !== false) {
|
||||
// Absätze und Zellen als Zeilen, dann Tags entfernen.
|
||||
$xml = preg_replace('#</(w:p|a:p|text:p|text:h|si|table:table-cell)>#', "\n", $xml);
|
||||
$text .= html_entity_decode(strip_tags((string) $xml), ENT_QUOTES | ENT_XML1, 'UTF-8')."\n";
|
||||
}
|
||||
}
|
||||
|
||||
$zip->close();
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<string>
|
||||
*/
|
||||
private function zipEntries(string $path, string $pattern): array
|
||||
{
|
||||
$zip = new ZipArchive;
|
||||
|
||||
if ($zip->open($path) !== true) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$names = [];
|
||||
|
||||
for ($i = 0; $i < $zip->numFiles; $i++) {
|
||||
$name = (string) $zip->getNameIndex($i);
|
||||
|
||||
if (preg_match($pattern, $name)) {
|
||||
$names[] = $name;
|
||||
}
|
||||
}
|
||||
|
||||
$zip->close();
|
||||
natsort($names);
|
||||
|
||||
return array_values($names);
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{_ as e,b as t,bt as n,mt as r,o as i,qt as a,v as o}from"./runtime-core.esm-bundler-B8D2lM98.js";import{t as s}from"./Panel-xPHuwfuu.js";import{t as c}from"./NewsCard-CWMFENyt.js";var l={class:`-mx-5 flex snap-x scroll-px-5 gap-4 overflow-x-auto px-5 pb-1 [scrollbar-width:none] sm:mx-0 sm:grid sm:grid-cols-2 sm:overflow-visible sm:px-0 sm:pb-0 xl:grid-cols-4 [&::-webkit-scrollbar]:hidden`},u={__name:`Areas`,props:{posts:{type:Array,required:!0}},setup(u){return(d,f)=>(r(),o(s,{title:`Aktuelles aus den Bereichen`,"action-label":`Alle`,"action-href":`/neuigkeiten`},{default:a(()=>[e(`div`,l,[(r(!0),t(i,null,n(u.posts,e=>(r(),o(c,{key:e.id,post:e,class:`w-[78%] shrink-0 snap-start sm:w-auto`},null,8,[`post`]))),128))])]),_:1}))}};export{u as default};
|
||||
import{_ as e,b as t,bt as n,mt as r,o as i,qt as a,v as o}from"./runtime-core.esm-bundler-B8D2lM98.js";import{t as s}from"./Panel-DF-wChKt.js";import{t as c}from"./NewsCard-BnbSPjUt.js";var l={class:`-mx-5 flex snap-x scroll-px-5 gap-4 overflow-x-auto px-5 pb-1 [scrollbar-width:none] sm:mx-0 sm:grid sm:grid-cols-2 sm:overflow-visible sm:px-0 sm:pb-0 xl:grid-cols-4 [&::-webkit-scrollbar]:hidden`},u={__name:`Areas`,props:{posts:{type:Array,required:!0}},setup(u){return(d,f)=>(r(),o(s,{title:`Aktuelles aus den Bereichen`,"action-label":`Alle`,"action-href":`/neuigkeiten`},{default:a(()=>[e(`div`,l,[(r(!0),t(i,null,n(u.posts,e=>(r(),o(c,{key:e.id,post:e,class:`w-[78%] shrink-0 snap-start sm:w-auto`},null,8,[`post`]))),128))])]),_:1}))}};export{u as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{D as e,On as t,Zn as n,_ as r,b as i,mt as a,qt as o,tr as s,v as c,y as l}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as u}from"./app-CIvn5Z1l.js";import{b as d,it as f}from"./AppIcon-BVHFLm12.js";var p={class:`relative shrink-0`},m={key:0,class:`absolute -right-1 -bottom-1 grid size-5 place-items-center rounded-full bg-brand text-brand-foreground ring-2 ring-card`},h={class:`min-w-0 flex-1`},g={class:`block truncate text-sm font-medium group-hover:underline`},_={class:`block truncate text-xs text-muted-foreground`},v={__name:`BirthdayItem`,props:{item:{type:Object,required:!0}},setup(v){let y=e=>new Intl.DateTimeFormat(`de-DE`,{day:`numeric`,month:`long`}).format(new Date(`${e}T12:00:00`)),b=e=>new Intl.DateTimeFormat(`de-DE`,{weekday:`short`}).format(new Date(`${e}T12:00:00`));return(x,S)=>(a(),c(t(u),{href:`/personen/${v.item.person.id}`,class:`group flex items-center gap-3 py-2.5`},{default:o(()=>[r(`span`,p,[e(d,{person:v.item.person,class:`size-10`},null,8,[`person`]),v.item.today?(a(),i(`span`,m,[e(t(f),{class:`size-3`})])):l(``,!0)]),r(`span`,h,[r(`span`,g,s(v.item.person.name),1),r(`span`,_,s(v.item.person.job_title||v.item.person.department),1)]),r(`span`,{class:n([`shrink-0 text-right text-xs`,v.item.today?`font-semibold text-brand-text`:`text-muted-foreground`])},s(v.item.today?`Heute`:`${b(v.item.date)}, ${y(v.item.date)}`),3)]),_:1},8,[`href`]))}};export{v as t};
|
||||
import{D as e,On as t,Zn as n,_ as r,b as i,mt as a,qt as o,tr as s,v as c,y as l}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as u}from"./app-Dy5FbYkt.js";import{b as d,it as f}from"./AppIcon-SVMShh8s.js";var p={class:`relative shrink-0`},m={key:0,class:`absolute -right-1 -bottom-1 grid size-5 place-items-center rounded-full bg-brand text-brand-foreground ring-2 ring-card`},h={class:`min-w-0 flex-1`},g={class:`block truncate text-sm font-medium group-hover:underline`},_={class:`block truncate text-xs text-muted-foreground`},v={__name:`BirthdayItem`,props:{item:{type:Object,required:!0}},setup(v){let y=e=>new Intl.DateTimeFormat(`de-DE`,{day:`numeric`,month:`long`}).format(new Date(`${e}T12:00:00`)),b=e=>new Intl.DateTimeFormat(`de-DE`,{weekday:`short`}).format(new Date(`${e}T12:00:00`));return(x,S)=>(a(),c(t(u),{href:`/personen/${v.item.person.id}`,class:`group flex items-center gap-3 py-2.5`},{default:o(()=>[r(`span`,p,[e(d,{person:v.item.person,class:`size-10`},null,8,[`person`]),v.item.today?(a(),i(`span`,m,[e(t(f),{class:`size-3`})])):l(``,!0)]),r(`span`,h,[r(`span`,g,s(v.item.person.name),1),r(`span`,_,s(v.item.person.job_title||v.item.person.department),1)]),r(`span`,{class:n([`shrink-0 text-right text-xs`,v.item.today?`font-semibold text-brand-text`:`text-muted-foreground`])},s(v.item.today?`Heute`:`${b(v.item.date)}, ${y(v.item.date)}`),3)]),_:1},8,[`href`]))}};export{v as t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{_ as e,b as t,bt as n,mt as r,o as i,tr as a,v as o,y as s}from"./runtime-core.esm-bundler-B8D2lM98.js";import{t as c}from"./BirthdayItem-DK6xURSZ.js";var l={key:0,class:`mb-3 text-lg font-semibold`},u={class:`divide-y rounded-lg border bg-card px-4`},d={key:0,class:`py-3 text-sm text-muted-foreground`},f={__name:`BirthdaysBlock`,props:{block:{type:Object,required:!0}},setup(f){return(p,m)=>(r(),t(`section`,null,[f.block.data.title?(r(),t(`h3`,l,a(f.block.data.title),1)):s(``,!0),e(`div`,u,[(r(!0),t(i,null,n(f.block.props?.birthdays??[],e=>(r(),o(c,{key:`${e.person.id}-${e.date}`,item:e},null,8,[`item`]))),128)),(f.block.props?.birthdays??[]).length?s(``,!0):(r(),t(`p`,d,`Keine anstehenden Geburtstage.`))])]))}};export{f as default};
|
||||
import{_ as e,b as t,bt as n,mt as r,o as i,tr as a,v as o,y as s}from"./runtime-core.esm-bundler-B8D2lM98.js";import{t as c}from"./BirthdayItem-1R7P_7L0.js";var l={key:0,class:`mb-3 text-lg font-semibold`},u={class:`divide-y rounded-lg border bg-card px-4`},d={key:0,class:`py-3 text-sm text-muted-foreground`},f={__name:`BirthdaysBlock`,props:{block:{type:Object,required:!0}},setup(f){return(p,m)=>(r(),t(`section`,null,[f.block.data.title?(r(),t(`h3`,l,a(f.block.data.title),1)):s(``,!0),e(`div`,u,[(r(!0),t(i,null,n(f.block.props?.birthdays??[],e=>(r(),o(c,{key:`${e.person.id}-${e.date}`,item:e},null,8,[`item`]))),128)),(f.block.props?.birthdays??[]).length?s(``,!0):(r(),t(`p`,d,`Keine anstehenden Geburtstage.`))])]))}};export{f as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{J as e,On as t,Zn as n,_ as r,b as i,mt as a,tr as o,v as s,wt as c,y as l}from"./runtime-core.esm-bundler-B8D2lM98.js";import{J as u,L as d}from"./AppIcon-BVHFLm12.js";import{S as f,v as p,x as m}from"./http-9R3L4KBg.js";import{t as h}from"./circle-alert-qymEjja5.js";var g=[`role`],_={class:`min-w-0 flex-1`},v={key:0,class:`mb-2 font-semibold`},y={__name:`Box`,props:{block:{type:Object,required:!0}},setup(y){let b=e(`pagebuilder:list`),x={info:{icon:m,class:`border-sky-200 bg-sky-50 text-sky-950 dark:border-sky-900 dark:bg-sky-950/40 dark:text-sky-100`,iconClass:`text-sky-600 dark:text-sky-400`},note:{icon:u,class:`border-amber-200 bg-amber-50 text-amber-950 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-100`,iconClass:`text-amber-600 dark:text-amber-400`},warning:{icon:p,class:`border-red-200 bg-red-50 text-red-950 dark:border-red-900 dark:bg-red-950/40 dark:text-red-100`,iconClass:`text-red-600 dark:text-red-400`},success:{icon:f,class:`border-emerald-200 bg-emerald-50 text-emerald-950 dark:border-emerald-900 dark:bg-emerald-950/40 dark:text-emerald-100`,iconClass:`text-emerald-600 dark:text-emerald-400`},neutral:{icon:h,class:`border-border bg-muted text-foreground`,iconClass:`text-muted-foreground`},highlight:{icon:d,class:`border-brand-200 bg-brand-soft text-foreground`,iconClass:`text-brand-text`}};return(e,u)=>(a(),i(`aside`,{class:n([`pb-box flex gap-3 rounded-lg border p-4 @xl:p-5`,x[y.block.data.variant]?.class]),role:y.block.data.variant===`warning`?`alert`:`note`},[y.block.data.show_icon?(a(),s(c(x[y.block.data.variant]?.icon),{key:0,class:n([`mt-0.5 size-5 shrink-0`,x[y.block.data.variant]?.iconClass])},null,8,[`class`])):l(``,!0),r(`div`,_,[y.block.data.title?(a(),i(`p`,v,o(y.block.data.title),1)):l(``,!0),(a(),s(c(t(b)),{item:y.block.items[0]},null,8,[`item`]))])],10,g))}};export{y as default};
|
||||
import{J as e,On as t,Zn as n,_ as r,b as i,mt as a,tr as o,v as s,wt as c,y as l}from"./runtime-core.esm-bundler-B8D2lM98.js";import{J as u,L as d}from"./AppIcon-SVMShh8s.js";import{S as f,v as p,x as m}from"./http-9R3L4KBg.js";import{t as h}from"./circle-alert-qymEjja5.js";var g=[`role`],_={class:`min-w-0 flex-1`},v={key:0,class:`mb-2 font-semibold`},y={__name:`Box`,props:{block:{type:Object,required:!0}},setup(y){let b=e(`pagebuilder:list`),x={info:{icon:m,class:`border-sky-200 bg-sky-50 text-sky-950 dark:border-sky-900 dark:bg-sky-950/40 dark:text-sky-100`,iconClass:`text-sky-600 dark:text-sky-400`},note:{icon:u,class:`border-amber-200 bg-amber-50 text-amber-950 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-100`,iconClass:`text-amber-600 dark:text-amber-400`},warning:{icon:p,class:`border-red-200 bg-red-50 text-red-950 dark:border-red-900 dark:bg-red-950/40 dark:text-red-100`,iconClass:`text-red-600 dark:text-red-400`},success:{icon:f,class:`border-emerald-200 bg-emerald-50 text-emerald-950 dark:border-emerald-900 dark:bg-emerald-950/40 dark:text-emerald-100`,iconClass:`text-emerald-600 dark:text-emerald-400`},neutral:{icon:h,class:`border-border bg-muted text-foreground`,iconClass:`text-muted-foreground`},highlight:{icon:d,class:`border-brand-200 bg-brand-soft text-foreground`,iconClass:`text-brand-text`}};return(e,u)=>(a(),i(`aside`,{class:n([`pb-box flex gap-3 rounded-lg border p-4 @xl:p-5`,x[y.block.data.variant]?.class]),role:y.block.data.variant===`warning`?`alert`:`note`},[y.block.data.show_icon?(a(),s(c(x[y.block.data.variant]?.icon),{key:0,class:n([`mt-0.5 size-5 shrink-0`,x[y.block.data.variant]?.iconClass])},null,8,[`class`])):l(``,!0),r(`div`,_,[y.block.data.title?(a(),i(`p`,v,o(y.block.data.title),1)):l(``,!0),(a(),s(c(t(b)),{item:y.block.items[0]},null,8,[`item`]))])],10,g))}};export{y as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{Zn as e,_ as t,b as n,g as r,mt as i,o as a,tr as o,y as s}from"./runtime-core.esm-bundler-B8D2lM98.js";import{i as c}from"./app-CIvn5Z1l.js";var l={class:`flex items-center gap-3`},u=[`src`,`alt`],d=[`src`,`alt`],f=[`src`,`alt`],p=[`src`,`alt`],m=[`src`],h={class:`text-[17px] font-semibold tracking-tight`},g={__name:`BrandLogo`,props:{inverted:{type:Boolean,default:!1},compact:{type:Boolean,default:!1}},setup(g){let _=g,v=r(()=>c().props.branding),y=r(()=>v.value.portal_name.trim().charAt(0).toUpperCase()),b=r(()=>v.value.logo_dark_url??v.value.logo_url);return(r,c)=>(i(),n(`span`,l,[v.value.logo_url?(i(),n(a,{key:0},[g.compact&&v.value.logo_mark_url?(i(),n(`img`,{key:0,src:v.value.logo_mark_url,alt:v.value.portal_name,class:`size-8 sm:hidden`},null,8,u)):s(``,!0),t(`span`,{class:e(g.compact&&v.value.logo_mark_url?`hidden sm:contents`:`contents`)},[_.inverted?(i(),n(`img`,{key:0,src:b.value,alt:v.value.portal_name,class:`h-8 w-auto`},null,8,d)):(i(),n(a,{key:1},[t(`img`,{src:v.value.logo_url,alt:v.value.portal_name,class:`h-8 w-auto dark:hidden`},null,8,f),t(`img`,{src:b.value,alt:v.value.portal_name,class:`hidden h-8 w-auto dark:block`},null,8,p)],64))],2)],64)):(i(),n(a,{key:1},[v.value.logo_mark_url?(i(),n(`img`,{key:0,src:v.value.logo_mark_url,alt:``,class:`size-8`},null,8,m)):(i(),n(`span`,{key:1,class:e([`grid size-8 place-items-center rounded-md text-base font-bold`,_.inverted?`bg-white/15 text-current`:`bg-brand text-brand-foreground`])},o(y.value),3)),t(`span`,h,o(v.value.portal_name),1)],64))]))}};export{g as t};
|
||||
import{Zn as e,_ as t,b as n,g as r,mt as i,o as a,tr as o,y as s}from"./runtime-core.esm-bundler-B8D2lM98.js";import{i as c}from"./app-Dy5FbYkt.js";var l={class:`flex items-center gap-3`},u=[`src`,`alt`],d=[`src`,`alt`],f=[`src`,`alt`],p=[`src`,`alt`],m=[`src`],h={class:`text-[17px] font-semibold tracking-tight`},g={__name:`BrandLogo`,props:{inverted:{type:Boolean,default:!1},compact:{type:Boolean,default:!1}},setup(g){let _=g,v=r(()=>c().props.branding),y=r(()=>v.value.portal_name.trim().charAt(0).toUpperCase()),b=r(()=>v.value.logo_dark_url??v.value.logo_url);return(r,c)=>(i(),n(`span`,l,[v.value.logo_url?(i(),n(a,{key:0},[g.compact&&v.value.logo_mark_url?(i(),n(`img`,{key:0,src:v.value.logo_mark_url,alt:v.value.portal_name,class:`size-8 sm:hidden`},null,8,u)):s(``,!0),t(`span`,{class:e(g.compact&&v.value.logo_mark_url?`hidden sm:contents`:`contents`)},[_.inverted?(i(),n(`img`,{key:0,src:b.value,alt:v.value.portal_name,class:`h-8 w-auto`},null,8,d)):(i(),n(a,{key:1},[t(`img`,{src:v.value.logo_url,alt:v.value.portal_name,class:`h-8 w-auto dark:hidden`},null,8,f),t(`img`,{src:b.value,alt:v.value.portal_name,class:`hidden h-8 w-auto dark:block`},null,8,p)],64))],2)],64)):(i(),n(a,{key:1},[v.value.logo_mark_url?(i(),n(`img`,{key:0,src:v.value.logo_mark_url,alt:``,class:`size-8`},null,8,m)):(i(),n(`span`,{key:1,class:e([`grid size-8 place-items-center rounded-md text-base font-bold`,_.inverted?`bg-white/15 text-current`:`bg-brand text-brand-foreground`])},o(y.value),3)),t(`span`,h,o(v.value.portal_name),1)],64))]))}};export{g as t};
|
||||
1
public/build/assets/Builder-ChYMgScI.js
Normal file
1
public/build/assets/Builder-ChYMgScI.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{D as e,E as t,On as n,Zn as r,_ as i,b as a,bt as o,mt as s,o as c,qt as l,tr as u,y as d}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as f}from"./app-CIvn5Z1l.js";import{K as p,b as m}from"./AppIcon-BVHFLm12.js";import{y as h}from"./http-9R3L4KBg.js";var g={key:0,class:`mb-3 text-lg font-semibold`},_={class:`min-w-0`},v={key:0,class:`truncate text-[13px] text-muted-foreground`},y={class:`mt-1.5 flex flex-wrap gap-x-4 gap-y-1 text-[13px]`},b=[`href`],x=[`href`],S={class:`truncate`},C={key:0,class:`text-sm text-muted-foreground`},w={__name:`Contacts`,props:{block:{type:Object,required:!0}},setup(w){return(T,E)=>(s(),a(`section`,null,[w.block.data.title?(s(),a(`h3`,g,u(w.block.data.title),1)):d(``,!0),i(`div`,{class:r(w.block.data.layout===`list`?`divide-y rounded-lg border bg-card`:`grid gap-4 @xl:grid-cols-2 @4xl:grid-cols-3`)},[(s(!0),a(c,null,o(w.block.props?.people??[],o=>(s(),a(`div`,{key:o.id,class:r([`flex gap-3`,w.block.data.layout===`list`?`items-center px-4 py-3`:`rounded-lg border bg-card p-4`])},[e(m,{person:o,class:`size-12 shrink-0`},null,8,[`person`]),i(`div`,_,[e(n(f),{href:`/personen/${o.id}`,class:`block truncate font-semibold hover:underline`},{default:l(()=>[t(u(o.name),1)]),_:2},1032,[`href`]),o.job_title?(s(),a(`p`,v,u(o.job_title),1)):d(``,!0),i(`div`,y,[o.phone?(s(),a(`a`,{key:0,href:`tel:${o.phone}`,class:`inline-flex items-center gap-1 text-brand-text hover:underline`},[e(n(h),{class:`size-3.5`}),t(` `+u(o.phone),1)],8,b)):d(``,!0),i(`a`,{href:`mailto:${o.email}`,class:`inline-flex min-w-0 items-center gap-1 text-brand-text hover:underline`},[e(n(p),{class:`size-3.5 shrink-0`}),E[0]||=t(),i(`span`,S,u(o.email),1)],8,x)])])],2))),128)),(w.block.props?.people??[]).length?d(``,!0):(s(),a(`p`,C,`Noch keine Personen ausgewählt.`))],2)]))}};export{w as default};
|
||||
import{D as e,E as t,On as n,Zn as r,_ as i,b as a,bt as o,mt as s,o as c,qt as l,tr as u,y as d}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as f}from"./app-Dy5FbYkt.js";import{K as p,b as m}from"./AppIcon-SVMShh8s.js";import{y as h}from"./http-9R3L4KBg.js";var g={key:0,class:`mb-3 text-lg font-semibold`},_={class:`min-w-0`},v={key:0,class:`truncate text-[13px] text-muted-foreground`},y={class:`mt-1.5 flex flex-wrap gap-x-4 gap-y-1 text-[13px]`},b=[`href`],x=[`href`],S={class:`truncate`},C={key:0,class:`text-sm text-muted-foreground`},w={__name:`Contacts`,props:{block:{type:Object,required:!0}},setup(w){return(T,E)=>(s(),a(`section`,null,[w.block.data.title?(s(),a(`h3`,g,u(w.block.data.title),1)):d(``,!0),i(`div`,{class:r(w.block.data.layout===`list`?`divide-y rounded-lg border bg-card`:`grid gap-4 @xl:grid-cols-2 @4xl:grid-cols-3`)},[(s(!0),a(c,null,o(w.block.props?.people??[],o=>(s(),a(`div`,{key:o.id,class:r([`flex gap-3`,w.block.data.layout===`list`?`items-center px-4 py-3`:`rounded-lg border bg-card p-4`])},[e(m,{person:o,class:`size-12 shrink-0`},null,8,[`person`]),i(`div`,_,[e(n(f),{href:`/personen/${o.id}`,class:`block truncate font-semibold hover:underline`},{default:l(()=>[t(u(o.name),1)]),_:2},1032,[`href`]),o.job_title?(s(),a(`p`,v,u(o.job_title),1)):d(``,!0),i(`div`,y,[o.phone?(s(),a(`a`,{key:0,href:`tel:${o.phone}`,class:`inline-flex items-center gap-1 text-brand-text hover:underline`},[e(n(h),{class:`size-3.5`}),t(` `+u(o.phone),1)],8,b)):d(``,!0),i(`a`,{href:`mailto:${o.email}`,class:`inline-flex min-w-0 items-center gap-1 text-brand-text hover:underline`},[e(n(p),{class:`size-3.5 shrink-0`}),E[0]||=t(),i(`span`,S,u(o.email),1)],8,x)])])],2))),128)),(w.block.props?.people??[]).length?d(``,!0):(s(),a(`p`,C,`Noch keine Personen ausgewählt.`))],2)]))}};export{w as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{On as e,Zn as t,_ as n,b as r,mt as i,qt as a,tr as o,v as s,wt as c,y as l}from"./runtime-core.esm-bundler-B8D2lM98.js";import{W as u}from"./AppIcon-BVHFLm12.js";import{S as d,v as f,x as p}from"./http-9R3L4KBg.js";import{t as m}from"./circle-alert-qymEjja5.js";import{t as h}from"./Panel-xPHuwfuu.js";var g=[`src`,`alt`],_={key:0,class:`block px-4 py-3 text-sm font-semibold group-hover:underline`},v={class:`min-w-0 flex-1`},y={key:0,class:`font-semibold`},b=[`innerHTML`],x=[`href`,`target`],S=[`innerHTML`],C=[`href`,`target`],w={__name:`CustomTile`,props:{tile:{type:Object,required:!0}},setup(w){let T={brand:{icon:u,class:`border-brand bg-brand text-brand-foreground`},info:{icon:p,class:`border-sky-200 bg-sky-50 text-sky-950 dark:border-sky-900 dark:bg-sky-950/40 dark:text-sky-100`},success:{icon:d,class:`border-emerald-200 bg-emerald-50 text-emerald-950 dark:border-emerald-900 dark:bg-emerald-950/40 dark:text-emerald-100`},warning:{icon:f,class:`border-red-200 bg-red-50 text-red-950 dark:border-red-900 dark:bg-red-950/40 dark:text-red-100`},neutral:{icon:m,class:`border-border bg-card text-foreground`}};return(d,f)=>w.tile.type===`image`&&w.tile.image_url?(i(),s(c(w.tile.url?`a`:`figure`),{key:0,href:w.tile.url||void 0,target:w.tile.url&&w.tile.new_tab?`_blank`:void 0,rel:w.tile.url&&w.tile.new_tab?`noopener`:void 0,class:`group block overflow-hidden rounded-lg border bg-card`},{default:a(()=>[n(`img`,{src:w.tile.image_url,alt:w.tile.alt||w.tile.title||``,loading:`lazy`,class:`w-full object-cover transition-transform duration-300 group-hover:scale-[1.02]`},null,8,g),w.tile.title?(i(),r(`span`,_,o(w.tile.title),1)):l(``,!0)]),_:1},8,[`href`,`target`,`rel`])):w.tile.type===`notice`?(i(),r(`section`,{key:1,class:t([`pb-box flex gap-3 rounded-lg border p-4 sm:p-5`,T[w.tile.variant]?.class??T.brand.class])},[(i(),s(c(T[w.tile.variant]?.icon??e(u)),{class:`mt-0.5 size-5 shrink-0`})),n(`div`,v,[w.tile.title?(i(),r(`p`,y,o(w.tile.title),1)):l(``,!0),w.tile.html?(i(),r(`div`,{key:1,class:t([`prose prose-sm max-w-none [&_a]:underline`,w.tile.title?`mt-1`:``]),innerHTML:w.tile.html},null,10,b)):l(``,!0),w.tile.url?(i(),r(`a`,{key:2,href:w.tile.url,target:w.tile.new_tab?`_blank`:void 0,class:`mt-2 inline-block text-sm font-medium underline`},`Mehr erfahren`,8,x)):l(``,!0)])],2)):(i(),s(h,{key:2,title:w.tile.title||``},{default:a(()=>[n(`div`,{class:`prose prose-sm prose-neutral max-w-none prose-img:rounded-md`,innerHTML:w.tile.html},null,8,S),w.tile.url?(i(),r(`a`,{key:0,href:w.tile.url,target:w.tile.new_tab?`_blank`:void 0,class:`mt-3 inline-block text-[13px] font-medium text-brand-text hover:underline`},`Mehr erfahren`,8,C)):l(``,!0)]),_:1},8,[`title`]))}};export{w as default};
|
||||
import{On as e,Zn as t,_ as n,b as r,mt as i,qt as a,tr as o,v as s,wt as c,y as l}from"./runtime-core.esm-bundler-B8D2lM98.js";import{W as u}from"./AppIcon-SVMShh8s.js";import{S as d,v as f,x as p}from"./http-9R3L4KBg.js";import{t as m}from"./circle-alert-qymEjja5.js";import{t as h}from"./Panel-DF-wChKt.js";var g=[`src`,`alt`],_={key:0,class:`block px-4 py-3 text-sm font-semibold group-hover:underline`},v={class:`min-w-0 flex-1`},y={key:0,class:`font-semibold`},b=[`innerHTML`],x=[`href`,`target`],S=[`innerHTML`],C=[`href`,`target`],w={__name:`CustomTile`,props:{tile:{type:Object,required:!0}},setup(w){let T={brand:{icon:u,class:`border-brand bg-brand text-brand-foreground`},info:{icon:p,class:`border-sky-200 bg-sky-50 text-sky-950 dark:border-sky-900 dark:bg-sky-950/40 dark:text-sky-100`},success:{icon:d,class:`border-emerald-200 bg-emerald-50 text-emerald-950 dark:border-emerald-900 dark:bg-emerald-950/40 dark:text-emerald-100`},warning:{icon:f,class:`border-red-200 bg-red-50 text-red-950 dark:border-red-900 dark:bg-red-950/40 dark:text-red-100`},neutral:{icon:m,class:`border-border bg-card text-foreground`}};return(d,f)=>w.tile.type===`image`&&w.tile.image_url?(i(),s(c(w.tile.url?`a`:`figure`),{key:0,href:w.tile.url||void 0,target:w.tile.url&&w.tile.new_tab?`_blank`:void 0,rel:w.tile.url&&w.tile.new_tab?`noopener`:void 0,class:`group block overflow-hidden rounded-lg border bg-card`},{default:a(()=>[n(`img`,{src:w.tile.image_url,alt:w.tile.alt||w.tile.title||``,loading:`lazy`,class:`w-full object-cover transition-transform duration-300 group-hover:scale-[1.02]`},null,8,g),w.tile.title?(i(),r(`span`,_,o(w.tile.title),1)):l(``,!0)]),_:1},8,[`href`,`target`,`rel`])):w.tile.type===`notice`?(i(),r(`section`,{key:1,class:t([`pb-box flex gap-3 rounded-lg border p-4 sm:p-5`,T[w.tile.variant]?.class??T.brand.class])},[(i(),s(c(T[w.tile.variant]?.icon??e(u)),{class:`mt-0.5 size-5 shrink-0`})),n(`div`,v,[w.tile.title?(i(),r(`p`,y,o(w.tile.title),1)):l(``,!0),w.tile.html?(i(),r(`div`,{key:1,class:t([`prose prose-sm max-w-none [&_a]:underline`,w.tile.title?`mt-1`:``]),innerHTML:w.tile.html},null,10,b)):l(``,!0),w.tile.url?(i(),r(`a`,{key:2,href:w.tile.url,target:w.tile.new_tab?`_blank`:void 0,class:`mt-2 inline-block text-sm font-medium underline`},`Mehr erfahren`,8,x)):l(``,!0)])],2)):(i(),s(h,{key:2,title:w.tile.title||``},{default:a(()=>[n(`div`,{class:`prose prose-sm prose-neutral max-w-none prose-img:rounded-md`,innerHTML:w.tile.html},null,8,S),w.tile.url?(i(),r(`a`,{key:0,href:w.tile.url,target:w.tile.new_tab?`_blank`:void 0,class:`mt-3 inline-block text-[13px] font-medium text-brand-text hover:underline`},`Mehr erfahren`,8,C)):l(``,!0)]),_:1},8,[`title`]))}};export{w as default};
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CustomTile-rpvbUDGX.js","assets/runtime-core.esm-bundler-B8D2lM98.js","assets/AppIcon-BVHFLm12.js","assets/usePrimitiveElement-BOk1PFhF.js","assets/runtime-dom.esm-bundler-BEWGoe8n.js","assets/dist-CleIz2GP.js","assets/app-CIvn5Z1l.js","assets/app-BZMCjaRn.css","assets/RovingFocusGroup-NIVUjBd5.js","assets/http-9R3L4KBg.js","assets/circle-alert-qymEjja5.js","assets/Panel-xPHuwfuu.js","assets/chevron-right-DR4LjgDm.js","assets/Greeting-B05GQpKd.js","assets/AppLayout-Cy38OwfZ.js","assets/BrandLogo-TGGJyC1K.js","assets/NewColleagues-DMxyPHNm.js","assets/PeopleSearch-lOnxyLDv.js","assets/arrow-right-CdMsByuI.js","assets/ProfileIncomplete-D_-55Kim.js","assets/QuickLinks-DD-ribbK.js","assets/chevron-left-CfNljcKt.js","assets/dist-BRRmd-wM.js","assets/Greeting-BNtvUzyI.js","assets/Upcoming-2G8rjb71.js","assets/BirthdayItem-DK6xURSZ.js","assets/MyDownloads-C3KvafhB.js","assets/FileIcon-BHQ0ftg2.js","assets/Upcoming-DpyMBhkM.js","assets/EmptyState-Ceq4v8mE.js","assets/EventListItem-C_pDZ4ur.js","assets/EventDateBlock-Cxz_hY6g.js","assets/Areas-Bzac5pwG.js","assets/NewsCard-CWMFENyt.js","assets/NewsImage-31QS1JbU.js","assets/Hero-OPvK6LV0.js","assets/play-_hM1KTvn.js","assets/Latest-CZZxoFB3.js","assets/NewsListItem-DmR535f5.js"])))=>i.map(i=>d[i]);
|
||||
import{O as e,On as t,_ as n,b as r,bt as i,et as a,g as o,mt as s,o as c,qt as l,v as u,wt as d,y as f}from"./runtime-core.esm-bundler-B8D2lM98.js";import{o as p}from"./app-CIvn5Z1l.js";import{t as m}from"./AppLayout-Cy38OwfZ.js";import{n as h}from"./dist-BRRmd-wM.js";var g=Object.assign({"../widgets/CustomTile.vue":()=>p(()=>import(`./CustomTile-rpvbUDGX.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])),"../widgets/Greeting.vue":()=>p(()=>import(`./Greeting-B05GQpKd.js`),__vite__mapDeps([13,1,6,4,7,2,3,5,8,9,14,15])),"../widgets/NewColleagues.vue":()=>p(()=>import(`./NewColleagues-DMxyPHNm.js`),__vite__mapDeps([16,1,6,4,7,2,3,5,8,9,11,12])),"../widgets/PeopleSearch.vue":()=>p(()=>import(`./PeopleSearch-lOnxyLDv.js`),__vite__mapDeps([17,1,6,4,7,2,3,5,8,9,18,11,12])),"../widgets/ProfileIncomplete.vue":()=>p(()=>import(`./ProfileIncomplete-D_-55Kim.js`),__vite__mapDeps([19,1,6,4,7,14,3,5,2,8,9,15])),"../widgets/QuickLinks.vue":()=>p(()=>import(`./QuickLinks-DD-ribbK.js`),__vite__mapDeps([20,1,6,4,7,2,3,5,8,9,21,12,22]))}),_=Object.assign({"../../../plugins-core/birthdays/resources/js/widgets/Greeting.vue":()=>p(()=>import(`./Greeting-BNtvUzyI.js`),__vite__mapDeps([23,1,2,3,4,5,6,7,8,9])),"../../../plugins-core/birthdays/resources/js/widgets/Upcoming.vue":()=>p(()=>import(`./Upcoming-2G8rjb71.js`),__vite__mapDeps([24,1,25,6,4,7,2,3,5,8,9,11,12])),"../../../plugins-core/downloads/resources/js/widgets/MyDownloads.vue":()=>p(()=>import(`./MyDownloads-C3KvafhB.js`),__vite__mapDeps([26,1,2,3,4,5,6,7,8,9,27,11,12])),"../../../plugins-core/events/resources/js/widgets/Upcoming.vue":()=>p(()=>import(`./Upcoming-DpyMBhkM.js`),__vite__mapDeps([28,1,2,3,4,5,6,7,8,9,29,11,12,30,31])),"../../../plugins-core/news/resources/js/widgets/Areas.vue":()=>p(()=>import(`./Areas-Bzac5pwG.js`),__vite__mapDeps([32,1,11,6,4,7,12,5,33,2,3,8,9,34])),"../../../plugins-core/news/resources/js/widgets/Hero.vue":()=>p(()=>import(`./Hero-OPvK6LV0.js`),__vite__mapDeps([35,1,4,6,7,5,18,21,12,36])),"../../../plugins-core/news/resources/js/widgets/Latest.vue":()=>p(()=>import(`./Latest-CZZxoFB3.js`),__vite__mapDeps([37,1,2,3,4,5,6,7,8,9,29,11,12,38,34]))}),v={};for(let[t,n]of Object.entries(g))v[`core::${t.split(`/`).pop().replace(`.vue`,``)}`]=e(n);for(let[t,n]of Object.entries(_)){let[,r]=t.match(/plugins-core\/([^/]+)\//);v[`${r}::${t.split(`/`).pop().replace(`.vue`,``)}`]=e(n)}function y(e){return v[e]??null}var b={key:0,class:`mb-6 grid gap-6`},x={key:1,class:`grid grid-cols-12 gap-6`},S={class:`col-span-8 grid min-w-0 grid-cols-1 content-start gap-6 xl:col-span-9 xl:grid-cols-3`},C={class:`col-span-4 grid min-w-0 grid-cols-1 content-start gap-6 xl:col-span-3`},w={key:2,class:`grid min-w-0 grid-cols-1 gap-6`},T={__name:`Dashboard`,props:{widgets:{type:Array,required:!0}},setup(e){let p=e,g=h(`(min-width: 1024px)`),_=o(()=>p.widgets.filter(e=>y(e.component))),v=e=>_.value.filter(t=>t.area===e),T=o(()=>v(`hero`)[0]??null),E=o(()=>[..._.value].sort((e,t)=>e.mobileSort-t.mobileSort));return(e,o)=>(s(),u(m,{title:`Startseite`},{default:l(()=>[t(g)&&v(`top`).length?(s(),r(`div`,b,[(s(!0),r(c,null,i(v(`top`),e=>(s(),u(d(t(y)(e.component)),a({key:e.key},{ref_for:!0},e.props),null,16))),128))])):f(``,!0),t(g)?(s(),r(`div`,x,[n(`div`,S,[T.value?(s(),u(d(t(y)(T.value.component)),a({key:0},T.value.props,{class:`xl:col-span-2`}),null,16)):f(``,!0),(s(!0),r(c,null,i(v(`feed`),e=>(s(),u(d(t(y)(e.component)),a({key:e.key},{ref_for:!0},e.props,{wide:!T.value,class:T.value?`xl:col-span-1`:`xl:col-span-3`}),null,16,[`wide`,`class`]))),128)),(s(!0),r(c,null,i(v(`main`),e=>(s(),u(d(t(y)(e.component)),a({key:e.key},{ref_for:!0},e.props,{class:`xl:col-span-3`}),null,16))),128))]),n(`aside`,C,[(s(!0),r(c,null,i(v(`aside`),e=>(s(),u(d(t(y)(e.component)),a({key:e.key},{ref_for:!0},e.props),null,16))),128))])])):(s(),r(`div`,w,[(s(!0),r(c,null,i(E.value,e=>(s(),u(d(t(y)(e.component)),a({key:e.key},{ref_for:!0},e.props),null,16))),128))]))]),_:1}))}};export{T as default};
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CustomTile-BUG7m3MU.js","assets/runtime-core.esm-bundler-B8D2lM98.js","assets/AppIcon-SVMShh8s.js","assets/usePrimitiveElement-BOk1PFhF.js","assets/runtime-dom.esm-bundler-BEWGoe8n.js","assets/dist-CleIz2GP.js","assets/app-Dy5FbYkt.js","assets/app-BXGstlVh.css","assets/RovingFocusGroup-NIVUjBd5.js","assets/http-9R3L4KBg.js","assets/circle-alert-qymEjja5.js","assets/Panel-DF-wChKt.js","assets/chevron-right-DR4LjgDm.js","assets/Greeting-BOnbAa6o.js","assets/AppLayout-X0y7XSjx.js","assets/BrandLogo-DRGdNySk.js","assets/NewColleagues-DQMglEr-.js","assets/PeopleSearch-C2eKM9Kj.js","assets/arrow-right-CdMsByuI.js","assets/ProfileIncomplete-BXGHcWOo.js","assets/QuickLinks-DTert53x.js","assets/chevron-left-CfNljcKt.js","assets/dist-BRRmd-wM.js","assets/Greeting-DVG_w5Qo.js","assets/Upcoming-B9CELbEG.js","assets/BirthdayItem-1R7P_7L0.js","assets/MyDownloads-CCohgsaT.js","assets/FileIcon-LA1rFyBK.js","assets/Upcoming-BI7F0wE_.js","assets/EmptyState-Ceq4v8mE.js","assets/EventListItem-CtMhLvQC.js","assets/EventDateBlock-DzdXYi61.js","assets/Areas-pbtOL7ox.js","assets/NewsCard-BnbSPjUt.js","assets/NewsImage-BzxvsZoE.js","assets/Hero-CEjML8k5.js","assets/play-_hM1KTvn.js","assets/Latest-DyQlf2fO.js","assets/NewsListItem-Bak5OcQP.js"])))=>i.map(i=>d[i]);
|
||||
import{O as e,On as t,_ as n,b as r,bt as i,et as a,g as o,mt as s,o as c,qt as l,v as u,wt as d,y as f}from"./runtime-core.esm-bundler-B8D2lM98.js";import{o as p}from"./app-Dy5FbYkt.js";import{t as m}from"./AppLayout-X0y7XSjx.js";import{n as h}from"./dist-BRRmd-wM.js";var g=Object.assign({"../widgets/CustomTile.vue":()=>p(()=>import(`./CustomTile-BUG7m3MU.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])),"../widgets/Greeting.vue":()=>p(()=>import(`./Greeting-BOnbAa6o.js`),__vite__mapDeps([13,1,6,4,7,2,3,5,8,9,14,15])),"../widgets/NewColleagues.vue":()=>p(()=>import(`./NewColleagues-DQMglEr-.js`),__vite__mapDeps([16,1,6,4,7,2,3,5,8,9,11,12])),"../widgets/PeopleSearch.vue":()=>p(()=>import(`./PeopleSearch-C2eKM9Kj.js`),__vite__mapDeps([17,1,6,4,7,2,3,5,8,9,18,11,12])),"../widgets/ProfileIncomplete.vue":()=>p(()=>import(`./ProfileIncomplete-BXGHcWOo.js`),__vite__mapDeps([19,1,6,4,7,14,3,5,2,8,9,15])),"../widgets/QuickLinks.vue":()=>p(()=>import(`./QuickLinks-DTert53x.js`),__vite__mapDeps([20,1,6,4,7,2,3,5,8,9,21,12,22]))}),_=Object.assign({"../../../plugins-core/birthdays/resources/js/widgets/Greeting.vue":()=>p(()=>import(`./Greeting-DVG_w5Qo.js`),__vite__mapDeps([23,1,2,3,4,5,6,7,8,9])),"../../../plugins-core/birthdays/resources/js/widgets/Upcoming.vue":()=>p(()=>import(`./Upcoming-B9CELbEG.js`),__vite__mapDeps([24,1,25,6,4,7,2,3,5,8,9,11,12])),"../../../plugins-core/downloads/resources/js/widgets/MyDownloads.vue":()=>p(()=>import(`./MyDownloads-CCohgsaT.js`),__vite__mapDeps([26,1,2,3,4,5,6,7,8,9,27,11,12])),"../../../plugins-core/events/resources/js/widgets/Upcoming.vue":()=>p(()=>import(`./Upcoming-BI7F0wE_.js`),__vite__mapDeps([28,1,2,3,4,5,6,7,8,9,29,11,12,30,31])),"../../../plugins-core/news/resources/js/widgets/Areas.vue":()=>p(()=>import(`./Areas-pbtOL7ox.js`),__vite__mapDeps([32,1,11,6,4,7,12,5,33,2,3,8,9,34])),"../../../plugins-core/news/resources/js/widgets/Hero.vue":()=>p(()=>import(`./Hero-CEjML8k5.js`),__vite__mapDeps([35,1,4,6,7,5,18,21,12,36])),"../../../plugins-core/news/resources/js/widgets/Latest.vue":()=>p(()=>import(`./Latest-DyQlf2fO.js`),__vite__mapDeps([37,1,2,3,4,5,6,7,8,9,29,11,12,38,34]))}),v={};for(let[t,n]of Object.entries(g))v[`core::${t.split(`/`).pop().replace(`.vue`,``)}`]=e(n);for(let[t,n]of Object.entries(_)){let[,r]=t.match(/plugins-core\/([^/]+)\//);v[`${r}::${t.split(`/`).pop().replace(`.vue`,``)}`]=e(n)}function y(e){return v[e]??null}var b={key:0,class:`mb-6 grid gap-6`},x={key:1,class:`grid grid-cols-12 gap-6`},S={class:`col-span-8 grid min-w-0 grid-cols-1 content-start gap-6 xl:col-span-9 xl:grid-cols-3`},C={class:`col-span-4 grid min-w-0 grid-cols-1 content-start gap-6 xl:col-span-3`},w={key:2,class:`grid min-w-0 grid-cols-1 gap-6`},T={__name:`Dashboard`,props:{widgets:{type:Array,required:!0}},setup(e){let p=e,g=h(`(min-width: 1024px)`),_=o(()=>p.widgets.filter(e=>y(e.component))),v=e=>_.value.filter(t=>t.area===e),T=o(()=>v(`hero`)[0]??null),E=o(()=>[..._.value].sort((e,t)=>e.mobileSort-t.mobileSort));return(e,o)=>(s(),u(m,{title:`Startseite`},{default:l(()=>[t(g)&&v(`top`).length?(s(),r(`div`,b,[(s(!0),r(c,null,i(v(`top`),e=>(s(),u(d(t(y)(e.component)),a({key:e.key},{ref_for:!0},e.props),null,16))),128))])):f(``,!0),t(g)?(s(),r(`div`,x,[n(`div`,S,[T.value?(s(),u(d(t(y)(T.value.component)),a({key:0},T.value.props,{class:`xl:col-span-2`}),null,16)):f(``,!0),(s(!0),r(c,null,i(v(`feed`),e=>(s(),u(d(t(y)(e.component)),a({key:e.key},{ref_for:!0},e.props,{wide:!T.value,class:T.value?`xl:col-span-1`:`xl:col-span-3`}),null,16,[`wide`,`class`]))),128)),(s(!0),r(c,null,i(v(`main`),e=>(s(),u(d(t(y)(e.component)),a({key:e.key},{ref_for:!0},e.props,{class:`xl:col-span-3`}),null,16))),128))]),n(`aside`,C,[(s(!0),r(c,null,i(v(`aside`),e=>(s(),u(d(t(y)(e.component)),a({key:e.key},{ref_for:!0},e.props),null,16))),128))])])):(s(),r(`div`,w,[(s(!0),r(c,null,i(E.value,e=>(s(),u(d(t(y)(e.component)),a({key:e.key},{ref_for:!0},e.props),null,16))),128))]))]),_:1}))}};export{T as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{a as e}from"./usePrimitiveElement-BOk1PFhF.js";import{On as t,Zn as n,b as r,et as i,k as a,mt as o,qt as s,v as c,xt as l}from"./runtime-core.esm-bundler-B8D2lM98.js";import{d as u,h as d,o as f,p}from"./dist-CleIz2GP.js";import{j as m}from"./AppIcon-BVHFLm12.js";var h=a({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let n=e;d();let r=m();return(e,a)=>(o(),c(t(p),i(n,{id:t(r).descriptionId}),{default:s(()=>[l(e.$slots,`default`)]),_:3},16,[`id`]))}}),g=a({__name:`DialogDescription`,props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(n){let r=n,a=f(r,`class`),d=e(a);return(e,n)=>(o(),c(t(h),i({"data-slot":`dialog-description`},t(d),{class:t(u)(`text-muted-foreground text-sm`,r.class)}),{default:s(()=>[l(e.$slots,`default`)]),_:3},16,[`class`]))}}),_=a({__name:`DialogHeader`,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){let i=e;return(e,a)=>(o(),r(`div`,{"data-slot":`dialog-header`,class:n(t(u)(`flex flex-col gap-2 text-center sm:text-left`,i.class))},[l(e.$slots,`default`)],2))}});export{g as n,_ as t};
|
||||
import{a as e}from"./usePrimitiveElement-BOk1PFhF.js";import{On as t,Zn as n,b as r,et as i,k as a,mt as o,qt as s,v as c,xt as l}from"./runtime-core.esm-bundler-B8D2lM98.js";import{d as u,h as d,o as f,p}from"./dist-CleIz2GP.js";import{j as m}from"./AppIcon-SVMShh8s.js";var h=a({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let n=e;d();let r=m();return(e,a)=>(o(),c(t(p),i(n,{id:t(r).descriptionId}),{default:s(()=>[l(e.$slots,`default`)]),_:3},16,[`id`]))}}),g=a({__name:`DialogDescription`,props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(n){let r=n,a=f(r,`class`),d=e(a);return(e,n)=>(o(),c(t(h),i({"data-slot":`dialog-description`},t(d),{class:t(u)(`text-muted-foreground text-sm`,r.class)}),{default:s(()=>[l(e.$slots,`default`)]),_:3},16,[`class`]))}}),_=a({__name:`DialogHeader`,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){let i=e;return(e,a)=>(o(),r(`div`,{"data-slot":`dialog-header`,class:n(t(u)(`flex flex-col gap-2 text-center sm:text-left`,i.class))},[l(e.$slots,`default`)],2))}});export{g as n,_ as t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{D as e,E as t,On as n,_ as r,mt as i,qt as a,v as o,vn as s,y as c}from"./runtime-core.esm-bundler-B8D2lM98.js";import{w as l}from"./runtime-dom.esm-bundler-BEWGoe8n.js";import{n as u,r as d}from"./app-CIvn5Z1l.js";import{A as f}from"./dist-CleIz2GP.js";import{t as p}from"./arrow-left-nZZEveo4.js";import{t as m}from"./eye-off-DWbaLHNt.js";import{t as h}from"./eye-DcTo_il4.js";import{t as g}from"./FormField-BcJMyuzX.js";import{t as _}from"./button-SRYY3-ko.js";import{t as v}from"./Input-CgjHXzkf.js";import{t as y}from"./GuestLayout-DAusAB2K.js";var b={class:`relative`},x=[`aria-label`],S={__name:`DirectoryLogin`,props:{provider:{type:Object,required:!0}},setup(S){let C=S,w=s(!1),T=d({username:``,password:``});function E(){T.post(C.provider.action,{onFinish:()=>T.reset(`password`)})}return(s,d)=>(i(),o(y,{title:S.provider.label,description:`Mit dem Benutzernamen und Passwort, mit dem Sie sich auch am Arbeitsplatz anmelden.`},{default:a(()=>[r(`form`,{class:`grid gap-5`,onSubmit:l(E,[`prevent`])},[e(g,{id:`username`,label:S.provider.username_label,error:n(T).errors.username},{default:a(()=>[e(n(v),{id:`username`,modelValue:n(T).username,"onUpdate:modelValue":d[0]||=e=>n(T).username=e,autocomplete:`username`,autocapitalize:`none`,spellcheck:`false`,autofocus:``,class:`h-10`,"aria-invalid":!!n(T).errors.username},null,8,[`modelValue`,`aria-invalid`])]),_:1},8,[`label`,`error`]),e(g,{id:`password`,label:`Passwort`,error:n(T).errors.password},{default:a(()=>[r(`div`,b,[e(n(v),{id:`password`,modelValue:n(T).password,"onUpdate:modelValue":d[1]||=e=>n(T).password=e,type:w.value?`text`:`password`,autocomplete:`current-password`,class:`h-10 pr-10`,"aria-invalid":!!n(T).errors.password},null,8,[`modelValue`,`type`,`aria-invalid`]),r(`button`,{type:`button`,class:`absolute inset-y-0 right-0 grid w-10 place-items-center text-muted-foreground hover:text-foreground`,"aria-label":w.value?`Passwort verbergen`:`Passwort anzeigen`,onClick:d[2]||=e=>w.value=!w.value},[w.value?(i(),o(n(m),{key:0,class:`size-4`})):(i(),o(n(h),{key:1,class:`size-4`}))],8,x)])]),_:1},8,[`error`]),e(n(_),{type:`submit`,size:`lg`,class:`mt-2 h-10 w-full`,disabled:n(T).processing},{default:a(()=>[n(T).processing?(i(),o(n(f),{key:0,class:`animate-spin`})):c(``,!0),d[3]||=t(` Anmelden `,-1)]),_:1},8,[`disabled`]),e(n(u),{href:`/login`,class:`inline-flex items-center justify-center gap-1.5 text-sm text-muted-foreground hover:text-foreground`},{default:a(()=>[e(n(p),{class:`size-4`}),d[4]||=t(` Andere Anmeldung wählen `,-1)]),_:1})],32)]),_:1},8,[`title`]))}};export{S as default};
|
||||
import{D as e,E as t,On as n,_ as r,mt as i,qt as a,v as o,vn as s,y as c}from"./runtime-core.esm-bundler-B8D2lM98.js";import{w as l}from"./runtime-dom.esm-bundler-BEWGoe8n.js";import{n as u,r as d}from"./app-Dy5FbYkt.js";import{A as f}from"./dist-CleIz2GP.js";import{t as p}from"./arrow-left-nZZEveo4.js";import{t as m}from"./eye-off-DWbaLHNt.js";import{t as h}from"./eye-DcTo_il4.js";import{t as g}from"./FormField-BcJMyuzX.js";import{t as _}from"./button-SRYY3-ko.js";import{t as v}from"./Input-CgjHXzkf.js";import{t as y}from"./GuestLayout-DxnnRWk6.js";var b={class:`relative`},x=[`aria-label`],S={__name:`DirectoryLogin`,props:{provider:{type:Object,required:!0}},setup(S){let C=S,w=s(!1),T=d({username:``,password:``});function E(){T.post(C.provider.action,{onFinish:()=>T.reset(`password`)})}return(s,d)=>(i(),o(y,{title:S.provider.label,description:`Mit dem Benutzernamen und Passwort, mit dem Sie sich auch am Arbeitsplatz anmelden.`},{default:a(()=>[r(`form`,{class:`grid gap-5`,onSubmit:l(E,[`prevent`])},[e(g,{id:`username`,label:S.provider.username_label,error:n(T).errors.username},{default:a(()=>[e(n(v),{id:`username`,modelValue:n(T).username,"onUpdate:modelValue":d[0]||=e=>n(T).username=e,autocomplete:`username`,autocapitalize:`none`,spellcheck:`false`,autofocus:``,class:`h-10`,"aria-invalid":!!n(T).errors.username},null,8,[`modelValue`,`aria-invalid`])]),_:1},8,[`label`,`error`]),e(g,{id:`password`,label:`Passwort`,error:n(T).errors.password},{default:a(()=>[r(`div`,b,[e(n(v),{id:`password`,modelValue:n(T).password,"onUpdate:modelValue":d[1]||=e=>n(T).password=e,type:w.value?`text`:`password`,autocomplete:`current-password`,class:`h-10 pr-10`,"aria-invalid":!!n(T).errors.password},null,8,[`modelValue`,`type`,`aria-invalid`]),r(`button`,{type:`button`,class:`absolute inset-y-0 right-0 grid w-10 place-items-center text-muted-foreground hover:text-foreground`,"aria-label":w.value?`Passwort verbergen`:`Passwort anzeigen`,onClick:d[2]||=e=>w.value=!w.value},[w.value?(i(),o(n(m),{key:0,class:`size-4`})):(i(),o(n(h),{key:1,class:`size-4`}))],8,x)])]),_:1},8,[`error`]),e(n(_),{type:`submit`,size:`lg`,class:`mt-2 h-10 w-full`,disabled:n(T).processing},{default:a(()=>[n(T).processing?(i(),o(n(f),{key:0,class:`animate-spin`})):c(``,!0),d[3]||=t(` Anmelden `,-1)]),_:1},8,[`disabled`]),e(n(u),{href:`/login`,class:`inline-flex items-center justify-center gap-1.5 text-sm text-muted-foreground hover:text-foreground`},{default:a(()=>[e(n(p),{class:`size-4`}),d[4]||=t(` Andere Anmeldung wählen `,-1)]),_:1})],32)]),_:1},8,[`title`]))}};export{S as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{D as e,On as t,_ as n,b as r,bt as i,mt as a,o,tr as s,y as c}from"./runtime-core.esm-bundler-B8D2lM98.js";import{$ as l}from"./AppIcon-BVHFLm12.js";import{t as u}from"./download-cH_7CRKx.js";var d={key:0,class:`mb-3 text-lg font-semibold`},f={class:`divide-y rounded-lg border bg-card`},p=[`href`],m={class:`grid size-10 shrink-0 place-items-center rounded-md bg-brand-soft text-brand-text`},h={class:`min-w-0 flex-1`},g={class:`block truncate text-sm font-medium group-hover:underline`},_={class:`block text-xs text-muted-foreground`},v={key:0,class:`px-4 py-3 text-sm text-muted-foreground`},y={__name:`Downloads`,props:{block:{type:Object,required:!0}},setup(y){let b=e=>e>1048576?`${(e/1024/1024).toFixed(1).replace(`.`,`,`)} MB`:`${Math.max(1,Math.round(e/1024))} KB`;return(x,S)=>(a(),r(`section`,null,[y.block.data.title?(a(),r(`h3`,d,s(y.block.data.title),1)):c(``,!0),n(`ul`,f,[(a(!0),r(o,null,i(y.block.props?.files??[],i=>(a(),r(`li`,{key:i.id},[n(`a`,{href:i.url,class:`group flex items-center gap-3 px-4 py-3 hover:bg-accent/50`},[n(`span`,m,[e(t(l),{class:`size-5`})]),n(`span`,h,[n(`span`,g,s(i.name),1),n(`span`,_,s(i.extension||`Datei`)+` · `+s(b(i.size)),1)]),e(t(u),{class:`size-4 shrink-0 text-muted-foreground`})],8,p)]))),128)),(y.block.props?.files??[]).length?c(``,!0):(a(),r(`li`,v,`Noch keine Dateien.`))])]))}};export{y as default};
|
||||
import{D as e,On as t,_ as n,b as r,bt as i,mt as a,o,tr as s,y as c}from"./runtime-core.esm-bundler-B8D2lM98.js";import{$ as l}from"./AppIcon-SVMShh8s.js";import{t as u}from"./download-cH_7CRKx.js";var d={key:0,class:`mb-3 text-lg font-semibold`},f={class:`divide-y rounded-lg border bg-card`},p=[`href`],m={class:`grid size-10 shrink-0 place-items-center rounded-md bg-brand-soft text-brand-text`},h={class:`min-w-0 flex-1`},g={class:`block truncate text-sm font-medium group-hover:underline`},_={class:`block text-xs text-muted-foreground`},v={key:0,class:`px-4 py-3 text-sm text-muted-foreground`},y={__name:`Downloads`,props:{block:{type:Object,required:!0}},setup(y){let b=e=>e>1048576?`${(e/1024/1024).toFixed(1).replace(`.`,`,`)} MB`:`${Math.max(1,Math.round(e/1024))} KB`;return(x,S)=>(a(),r(`section`,null,[y.block.data.title?(a(),r(`h3`,d,s(y.block.data.title),1)):c(``,!0),n(`ul`,f,[(a(!0),r(o,null,i(y.block.props?.files??[],i=>(a(),r(`li`,{key:i.id},[n(`a`,{href:i.url,class:`group flex items-center gap-3 px-4 py-3 hover:bg-accent/50`},[n(`span`,m,[e(t(l),{class:`size-5`})]),n(`span`,h,[n(`span`,g,s(i.name),1),n(`span`,_,s(i.extension||`Datei`)+` · `+s(b(i.size)),1)]),e(t(u),{class:`size-4 shrink-0 text-muted-foreground`})],8,p)]))),128)),(y.block.props?.files??[]).length?c(``,!0):(a(),r(`li`,v,`Noch keine Dateien.`))])]))}};export{y as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
public/build/assets/Editor-C9VQdhzX.js
Normal file
1
public/build/assets/Editor-C9VQdhzX.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{D as e,E as t,On as n,_ as r,b as i,bt as a,mt as o,o as s,qt as c,tr as l,v as u,y as d}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as f}from"./app-CIvn5Z1l.js";import{t as p}from"./download-cH_7CRKx.js";import{t as m}from"./pencil-line-Cp-EHBoW.js";import{t as h}from"./plus-cKZvz4wH.js";import{t as g}from"./table-properties-B82lvC7D.js";import{t as _}from"./button-SRYY3-ko.js";import{t as v}from"./Panel-xPHuwfuu.js";var y=[`href`],b={key:0,class:`-mx-5 divide-y border-t`},x={class:`min-w-0 flex-1`},S={class:`text-xs text-muted-foreground`},C={class:`font-medium text-brand-text`},w=[`href`],T=[`href`],E={key:1,class:`text-sm text-muted-foreground`},D={__name:`EditorialForms`,props:{forms:{type:Array,required:!0},createUrl:{type:String,default:null}},setup(D){return(O,k)=>(o(),u(v,{title:`Formulare`},{actions:c(()=>[D.createUrl?(o(),u(n(_),{key:0,size:`sm`,variant:`outline`,"as-child":``},{default:c(()=>[r(`a`,{href:D.createUrl},[e(n(h)),k[0]||=t(` Neues Formular`,-1)],8,y)]),_:1})):d(``,!0)]),default:c(()=>[D.forms.length?(o(),i(`ul`,b,[(o(!0),i(s,null,a(D.forms,a=>(o(),i(`li`,{key:a.id,class:`flex items-center gap-3 px-5 py-2.5`},[r(`div`,x,[e(n(f),{href:a.url,class:`block truncate text-sm font-medium hover:underline`},{default:c(()=>[t(l(a.title),1)]),_:2},1032,[`href`]),r(`p`,S,[t(l(a.open?`offen`:`geschlossen`)+` · `+l(a.submissions)+` Einsendungen`,1),a.unread?(o(),i(s,{key:0},[k[1]||=t(`, `,-1),r(`span`,C,l(a.unread)+` neu`,1)],64)):d(``,!0)])]),a.builder_url?(o(),u(n(_),{key:0,size:`icon`,variant:`ghost`,"as-child":``,title:`Felder bearbeiten`},{default:c(()=>[e(n(f),{href:a.builder_url},{default:c(()=>[e(n(m))]),_:1},8,[`href`])]),_:2},1024)):d(``,!0),a.results_url?(o(),u(n(_),{key:1,size:`icon`,variant:`ghost`,"as-child":``,title:`Ergebnisse`},{default:c(()=>[r(`a`,{href:a.results_url},[e(n(g))],8,w)]),_:2},1024)):d(``,!0),a.csv_url?(o(),u(n(_),{key:2,size:`icon`,variant:`ghost`,"as-child":``,title:`Ergebnisse als CSV herunterladen`},{default:c(()=>[r(`a`,{href:a.csv_url},[e(n(p))],8,T)]),_:2},1024)):d(``,!0)]))),128))])):(o(),i(`p`,E,`Noch keine Formulare.`))]),_:1}))}};export{D as default};
|
||||
import{D as e,E as t,On as n,_ as r,b as i,bt as a,mt as o,o as s,qt as c,tr as l,v as u,y as d}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as f}from"./app-Dy5FbYkt.js";import{t as p}from"./download-cH_7CRKx.js";import{t as m}from"./pencil-line-Cp-EHBoW.js";import{t as h}from"./plus-cKZvz4wH.js";import{t as g}from"./table-properties-B82lvC7D.js";import{t as _}from"./button-SRYY3-ko.js";import{t as v}from"./Panel-DF-wChKt.js";var y=[`href`],b={key:0,class:`-mx-5 divide-y border-t`},x={class:`min-w-0 flex-1`},S={class:`text-xs text-muted-foreground`},C={class:`font-medium text-brand-text`},w=[`href`],T=[`href`],E={key:1,class:`text-sm text-muted-foreground`},D={__name:`EditorialForms`,props:{forms:{type:Array,required:!0},createUrl:{type:String,default:null}},setup(D){return(O,k)=>(o(),u(v,{title:`Formulare`},{actions:c(()=>[D.createUrl?(o(),u(n(_),{key:0,size:`sm`,variant:`outline`,"as-child":``},{default:c(()=>[r(`a`,{href:D.createUrl},[e(n(h)),k[0]||=t(` Neues Formular`,-1)],8,y)]),_:1})):d(``,!0)]),default:c(()=>[D.forms.length?(o(),i(`ul`,b,[(o(!0),i(s,null,a(D.forms,a=>(o(),i(`li`,{key:a.id,class:`flex items-center gap-3 px-5 py-2.5`},[r(`div`,x,[e(n(f),{href:a.url,class:`block truncate text-sm font-medium hover:underline`},{default:c(()=>[t(l(a.title),1)]),_:2},1032,[`href`]),r(`p`,S,[t(l(a.open?`offen`:`geschlossen`)+` · `+l(a.submissions)+` Einsendungen`,1),a.unread?(o(),i(s,{key:0},[k[1]||=t(`, `,-1),r(`span`,C,l(a.unread)+` neu`,1)],64)):d(``,!0)])]),a.builder_url?(o(),u(n(_),{key:0,size:`icon`,variant:`ghost`,"as-child":``,title:`Felder bearbeiten`},{default:c(()=>[e(n(f),{href:a.builder_url},{default:c(()=>[e(n(m))]),_:1},8,[`href`])]),_:2},1024)):d(``,!0),a.results_url?(o(),u(n(_),{key:1,size:`icon`,variant:`ghost`,"as-child":``,title:`Ergebnisse`},{default:c(()=>[r(`a`,{href:a.results_url},[e(n(g))],8,w)]),_:2},1024)):d(``,!0),a.csv_url?(o(),u(n(_),{key:2,size:`icon`,variant:`ghost`,"as-child":``,title:`Ergebnisse als CSV herunterladen`},{default:c(()=>[r(`a`,{href:a.csv_url},[e(n(p))],8,T)]),_:2},1024)):d(``,!0)]))),128))])):(o(),i(`p`,E,`Noch keine Formulare.`))]),_:1}))}};export{D as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{D as e,E as t,On as n,Zn as r,_ as i,b as a,bt as o,mt as s,o as c,qt as l,tr as u,v as d,y as f}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as p}from"./app-CIvn5Z1l.js";import{c as m}from"./AppIcon-BVHFLm12.js";import{t as h}from"./message-square-warning-CUD7Iy66.js";import{t as g}from"./plus-cKZvz4wH.js";import{t as _}from"./button-SRYY3-ko.js";import{t as v}from"./Panel-xPHuwfuu.js";var y={class:`grid gap-5`},b={class:`mb-1 text-xs font-semibold tracking-wide text-muted-foreground uppercase`},x={key:0,class:`ml-1 rounded-full bg-brand px-1.5 py-0.5 text-[10px] text-brand-foreground`},S={key:0,class:`-mx-5 divide-y border-y`},C={class:`min-w-0 flex-1`},w={class:`truncate text-xs text-muted-foreground`},T={key:1,class:`text-sm text-muted-foreground`},E={__name:`EditorialNews`,props:{review:{type:Array,required:!0},mine:{type:Array,required:!0},scheduled:{type:Array,required:!0},canCreate:{type:Boolean,default:!1}},setup(E){let D=e=>({pending:`bg-amber-100 text-amber-800 dark:bg-amber-900/50 dark:text-amber-200`,published:`bg-emerald-100 text-emerald-800 dark:bg-emerald-900/50 dark:text-emerald-200`,draft:`bg-muted text-muted-foreground`})[e.status];return(O,k)=>(s(),d(v,{title:`Neuigkeiten`},{actions:l(()=>[E.canCreate?(s(),d(n(_),{key:0,size:`sm`,"as-child":``},{default:l(()=>[e(n(p),{href:`/redaktion/neuigkeiten/neu`},{default:l(()=>[e(n(g)),k[0]||=t(` Neuer Beitrag`,-1)]),_:1})]),_:1})):f(``,!0)]),default:l(()=>[i(`div`,y,[(s(!0),a(c,null,o([{key:`review`,title:`Zur Freigabe`,items:E.review,empty:null},{key:`mine`,title:`Meine Entwürfe`,items:E.mine,empty:`Keine offenen Entwürfe.`},{key:`scheduled`,title:`Geplant`,items:E.scheduled,empty:null}].filter(e=>e.items.length||e.empty),g=>(s(),a(`section`,{key:g.key},[i(`h3`,b,[t(u(g.title)+` `,1),g.key===`review`?(s(),a(`span`,x,u(g.items.length),1)):f(``,!0)]),g.items.length?(s(),a(`ul`,S,[(s(!0),a(c,null,o(g.items,o=>(s(),a(`li`,{key:o.id,class:`flex items-center gap-3 px-5 py-2.5`},[i(`div`,C,[e(n(p),{href:o.edit_url,class:`block truncate text-sm font-medium hover:underline`},{default:l(()=>[t(u(o.title),1)]),_:2},1032,[`href`]),i(`p`,w,[t(u(o.category??`Ohne Kategorie`),1),g.key!==`mine`&&o.author?(s(),a(c,{key:0},[t(` · `+u(o.author),1)],64)):f(``,!0),o.date?(s(),a(c,{key:1},[t(` · `+u(n(m)(o.date)),1)],64)):f(``,!0)])]),o.review_note?(s(),d(n(h),{key:0,class:`size-4 shrink-0 text-amber-600`,title:`Mit Anmerkung zurückgegeben`})):f(``,!0),i(`span`,{class:r([`shrink-0 rounded px-1.5 py-0.5 text-[11px] font-medium`,D(o)])},u(o.status_label),3)]))),128))])):(s(),a(`p`,T,u(g.empty),1))]))),128))])]),_:1}))}};export{E as default};
|
||||
import{D as e,E as t,On as n,Zn as r,_ as i,b as a,bt as o,mt as s,o as c,qt as l,tr as u,v as d,y as f}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as p}from"./app-Dy5FbYkt.js";import{c as m}from"./AppIcon-SVMShh8s.js";import{t as h}from"./message-square-warning-CUD7Iy66.js";import{t as g}from"./plus-cKZvz4wH.js";import{t as _}from"./button-SRYY3-ko.js";import{t as v}from"./Panel-DF-wChKt.js";var y={class:`grid gap-5`},b={class:`mb-1 text-xs font-semibold tracking-wide text-muted-foreground uppercase`},x={key:0,class:`ml-1 rounded-full bg-brand px-1.5 py-0.5 text-[10px] text-brand-foreground`},S={key:0,class:`-mx-5 divide-y border-y`},C={class:`min-w-0 flex-1`},w={class:`truncate text-xs text-muted-foreground`},T={key:1,class:`text-sm text-muted-foreground`},E={__name:`EditorialNews`,props:{review:{type:Array,required:!0},mine:{type:Array,required:!0},scheduled:{type:Array,required:!0},canCreate:{type:Boolean,default:!1}},setup(E){let D=e=>({pending:`bg-amber-100 text-amber-800 dark:bg-amber-900/50 dark:text-amber-200`,published:`bg-emerald-100 text-emerald-800 dark:bg-emerald-900/50 dark:text-emerald-200`,draft:`bg-muted text-muted-foreground`})[e.status];return(O,k)=>(s(),d(v,{title:`Neuigkeiten`},{actions:l(()=>[E.canCreate?(s(),d(n(_),{key:0,size:`sm`,"as-child":``},{default:l(()=>[e(n(p),{href:`/redaktion/neuigkeiten/neu`},{default:l(()=>[e(n(g)),k[0]||=t(` Neuer Beitrag`,-1)]),_:1})]),_:1})):f(``,!0)]),default:l(()=>[i(`div`,y,[(s(!0),a(c,null,o([{key:`review`,title:`Zur Freigabe`,items:E.review,empty:null},{key:`mine`,title:`Meine Entwürfe`,items:E.mine,empty:`Keine offenen Entwürfe.`},{key:`scheduled`,title:`Geplant`,items:E.scheduled,empty:null}].filter(e=>e.items.length||e.empty),g=>(s(),a(`section`,{key:g.key},[i(`h3`,b,[t(u(g.title)+` `,1),g.key===`review`?(s(),a(`span`,x,u(g.items.length),1)):f(``,!0)]),g.items.length?(s(),a(`ul`,S,[(s(!0),a(c,null,o(g.items,o=>(s(),a(`li`,{key:o.id,class:`flex items-center gap-3 px-5 py-2.5`},[i(`div`,C,[e(n(p),{href:o.edit_url,class:`block truncate text-sm font-medium hover:underline`},{default:l(()=>[t(u(o.title),1)]),_:2},1032,[`href`]),i(`p`,w,[t(u(o.category??`Ohne Kategorie`),1),g.key!==`mine`&&o.author?(s(),a(c,{key:0},[t(` · `+u(o.author),1)],64)):f(``,!0),o.date?(s(),a(c,{key:1},[t(` · `+u(n(m)(o.date)),1)],64)):f(``,!0)])]),o.review_note?(s(),d(n(h),{key:0,class:`size-4 shrink-0 text-amber-600`,title:`Mit Anmerkung zurückgegeben`})):f(``,!0),i(`span`,{class:r([`shrink-0 rounded px-1.5 py-0.5 text-[11px] font-medium`,D(o)])},u(o.status_label),3)]))),128))])):(s(),a(`p`,T,u(g.empty),1))]))),128))])]),_:1}))}};export{E as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{D as e,E as t,On as n,Zn as r,_ as i,b as a,bt as o,er as s,mt as c,o as l,qt as u,tr as d,v as f,vn as p,y as m}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as h}from"./app-CIvn5Z1l.js";import{c as g}from"./AppIcon-BVHFLm12.js";import{t as _}from"./lock-4X8Kfof0.js";import{t as v}from"./plus-cKZvz4wH.js";import{t as y}from"./button-SRYY3-ko.js";import{t as b}from"./Panel-xPHuwfuu.js";import{t as x}from"./NewPageDialog-BbIzQTb2.js";var S={key:0,class:`-mx-5 divide-y border-t`},C={class:`text-xs text-muted-foreground`},w=[`title`],T={key:1,class:`text-sm text-muted-foreground`},E={__name:`EditorialPages`,props:{pages:{type:Array,required:!0},canCreate:{type:Boolean,default:!1}},setup(E){let D=p(!1),O={published:{label:`Veröffentlicht`,class:`bg-emerald-100 text-emerald-800 dark:bg-emerald-900/50 dark:text-emerald-200`},draft:{label:`Entwurf`,class:`bg-brand-soft text-brand-soft-foreground`},scheduled:{label:`Geplant`,class:`bg-amber-100 text-amber-800 dark:bg-amber-900/50 dark:text-amber-200`},new:{label:`Neu`,class:`bg-muted text-muted-foreground`}};return(p,k)=>(c(),f(b,{title:`Seiten`},{actions:u(()=>[E.canCreate?(c(),f(n(y),{key:0,size:`sm`,variant:`outline`,onClick:k[0]||=e=>D.value=!0},{default:u(()=>[e(n(v)),k[2]||=t(` Neue Seite`,-1)]),_:1})):m(``,!0)]),default:u(()=>[E.pages.length?(c(),a(`ul`,S,[(c(!0),a(l,null,o(E.pages,o=>(c(),a(`li`,{key:o.id,class:`flex items-center gap-3 py-2.5 pr-5`,style:s({paddingLeft:`${1.25+Math.min(o.depth,4)*1.25}rem`})},[i(`div`,{class:r([`min-w-0 flex-1`,o.depth?`border-l pl-3`:``])},[e(n(h),{href:o.edit_url,class:`block truncate text-sm font-medium hover:underline`},{default:u(()=>[t(d(o.title),1)]),_:2},1032,[`href`]),i(`p`,C,[t(d(o.url),1),o.changed_at?(c(),a(l,{key:0},[t(` · `+d(n(g)(o.changed_at)),1)],64)):m(``,!0)])],2),o.locked_by?(c(),a(`span`,{key:0,class:`inline-flex items-center gap-1 text-xs text-muted-foreground`,title:`${o.locked_by} bearbeitet gerade`},[e(n(_),{class:`size-3.5`}),t(` `+d(o.locked_by),1)],8,w)):m(``,!0),i(`span`,{class:r([`shrink-0 rounded px-1.5 py-0.5 text-[11px] font-medium`,O[o.status].class])},d(O[o.status].label),3)],4))),128))])):(c(),a(`p`,T,`Sie dürfen noch keine Seiten bearbeiten.`)),e(x,{open:D.value,"onUpdate:open":k[1]||=e=>D.value=e},null,8,[`open`])]),_:1}))}};export{E as default};
|
||||
import{D as e,E as t,On as n,Zn as r,_ as i,b as a,bt as o,er as s,mt as c,o as l,qt as u,tr as d,v as f,vn as p,y as m}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as h}from"./app-Dy5FbYkt.js";import{c as g}from"./AppIcon-SVMShh8s.js";import{t as _}from"./lock-4X8Kfof0.js";import{t as v}from"./plus-cKZvz4wH.js";import{t as y}from"./button-SRYY3-ko.js";import{t as b}from"./Panel-DF-wChKt.js";import{t as x}from"./NewPageDialog-B5SW-nak.js";var S={key:0,class:`-mx-5 divide-y border-t`},C={class:`text-xs text-muted-foreground`},w=[`title`],T={key:1,class:`text-sm text-muted-foreground`},E={__name:`EditorialPages`,props:{pages:{type:Array,required:!0},canCreate:{type:Boolean,default:!1}},setup(E){let D=p(!1),O={published:{label:`Veröffentlicht`,class:`bg-emerald-100 text-emerald-800 dark:bg-emerald-900/50 dark:text-emerald-200`},draft:{label:`Entwurf`,class:`bg-brand-soft text-brand-soft-foreground`},scheduled:{label:`Geplant`,class:`bg-amber-100 text-amber-800 dark:bg-amber-900/50 dark:text-amber-200`},new:{label:`Neu`,class:`bg-muted text-muted-foreground`}};return(p,k)=>(c(),f(b,{title:`Seiten`},{actions:u(()=>[E.canCreate?(c(),f(n(y),{key:0,size:`sm`,variant:`outline`,onClick:k[0]||=e=>D.value=!0},{default:u(()=>[e(n(v)),k[2]||=t(` Neue Seite`,-1)]),_:1})):m(``,!0)]),default:u(()=>[E.pages.length?(c(),a(`ul`,S,[(c(!0),a(l,null,o(E.pages,o=>(c(),a(`li`,{key:o.id,class:`flex items-center gap-3 py-2.5 pr-5`,style:s({paddingLeft:`${1.25+Math.min(o.depth,4)*1.25}rem`})},[i(`div`,{class:r([`min-w-0 flex-1`,o.depth?`border-l pl-3`:``])},[e(n(h),{href:o.edit_url,class:`block truncate text-sm font-medium hover:underline`},{default:u(()=>[t(d(o.title),1)]),_:2},1032,[`href`]),i(`p`,C,[t(d(o.url),1),o.changed_at?(c(),a(l,{key:0},[t(` · `+d(n(g)(o.changed_at)),1)],64)):m(``,!0)])],2),o.locked_by?(c(),a(`span`,{key:0,class:`inline-flex items-center gap-1 text-xs text-muted-foreground`,title:`${o.locked_by} bearbeitet gerade`},[e(n(_),{class:`size-3.5`}),t(` `+d(o.locked_by),1)],8,w)):m(``,!0),i(`span`,{class:r([`shrink-0 rounded px-1.5 py-0.5 text-[11px] font-medium`,O[o.status].class])},d(O[o.status].label),3)],4))),128))])):(c(),a(`p`,T,`Sie dürfen noch keine Seiten bearbeiten.`)),e(x,{open:D.value,"onUpdate:open":k[1]||=e=>D.value=e},null,8,[`open`])]),_:1}))}};export{E as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{_ as e,b as t,g as n,mt as r,tr as i}from"./runtime-core.esm-bundler-B8D2lM98.js";import{i as a}from"./AppIcon-BVHFLm12.js";var o={class:`grid w-12 shrink-0 place-items-center rounded-md bg-muted py-1.5 leading-none`},s={class:`text-xl font-semibold`},c={class:`mt-1 text-[10px] font-semibold tracking-wide text-accent2-text`},l={__name:`EventDateBlock`,props:{date:{type:String,required:!0}},setup(l){let u=l,d=n(()=>a(u.date));return(n,a)=>(r(),t(`div`,o,[e(`span`,s,i(d.value.day),1),e(`span`,c,i(d.value.month),1)]))}};export{l as t};
|
||||
import{_ as e,b as t,g as n,mt as r,tr as i}from"./runtime-core.esm-bundler-B8D2lM98.js";import{i as a}from"./AppIcon-SVMShh8s.js";var o={class:`grid w-12 shrink-0 place-items-center rounded-md bg-muted py-1.5 leading-none`},s={class:`text-xl font-semibold`},c={class:`mt-1 text-[10px] font-semibold tracking-wide text-accent2-text`},l={__name:`EventDateBlock`,props:{date:{type:String,required:!0}},setup(l){let u=l,d=n(()=>a(u.date));return(n,a)=>(r(),t(`div`,o,[e(`span`,s,i(d.value.day),1),e(`span`,c,i(d.value.month),1)]))}};export{l as t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{D as e,On as t,_ as n,b as r,mt as i,qt as a,tr as o,v as s,y as c}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as l}from"./app-CIvn5Z1l.js";import{o as u}from"./AppIcon-BVHFLm12.js";import{t as d}from"./EventDateBlock-Cxz_hY6g.js";var f={class:`min-w-0 pt-0.5`},p={class:`line-clamp-2 text-sm leading-snug font-semibold group-hover:underline`},m={class:`mt-0.5 text-xs text-muted-foreground`},h={key:0,class:`truncate text-xs text-muted-foreground`},g={__name:`EventListItem`,props:{event:{type:Object,required:!0}},setup(g){return(_,v)=>(i(),s(t(l),{href:`/termine/${g.event.id}`,class:`group flex items-start gap-3.5 py-3`},{default:a(()=>[e(d,{date:g.event.starts_at},null,8,[`date`]),n(`div`,f,[n(`h3`,p,o(g.event.title),1),n(`p`,m,o(t(u)(g.event)),1),g.event.location?(i(),r(`p`,h,o(g.event.location),1)):c(``,!0)])]),_:1},8,[`href`]))}};export{g as t};
|
||||
import{D as e,On as t,_ as n,b as r,mt as i,qt as a,tr as o,v as s,y as c}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as l}from"./app-Dy5FbYkt.js";import{o as u}from"./AppIcon-SVMShh8s.js";import{t as d}from"./EventDateBlock-DzdXYi61.js";var f={class:`min-w-0 pt-0.5`},p={class:`line-clamp-2 text-sm leading-snug font-semibold group-hover:underline`},m={class:`mt-0.5 text-xs text-muted-foreground`},h={key:0,class:`truncate text-xs text-muted-foreground`},g={__name:`EventListItem`,props:{event:{type:Object,required:!0}},setup(g){return(_,v)=>(i(),s(t(l),{href:`/termine/${g.event.id}`,class:`group flex items-start gap-3.5 py-3`},{default:a(()=>[e(d,{date:g.event.starts_at},null,8,[`date`]),n(`div`,f,[n(`h3`,p,o(g.event.title),1),n(`p`,m,o(t(u)(g.event)),1),g.event.location?(i(),r(`p`,h,o(g.event.location),1)):c(``,!0)])]),_:1},8,[`href`]))}};export{g as t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{Zn as e,b as t,g as n,mt as r,tr as i,v as a,wt as o,y as s}from"./runtime-core.esm-bundler-B8D2lM98.js";import{j as c}from"./dist-CleIz2GP.js";import{$ as l}from"./AppIcon-BVHFLm12.js";var u=c({name:`file-archive`,size:24,node:[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]}),d=c({name:`file-image`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]}),f=c({name:`file-spreadsheet`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]}),p=c({name:`file`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]}),m=c({name:`presentation`,size:24,node:[[`path`,{d:`M2 3h20`,key:`91anmk`}],[`path`,{d:`M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3`,key:`2k9sn8`}],[`path`,{d:`m7 21 5-5 5 5`,key:`bip4we`}]]}),h=[`title`],g={key:0,class:`absolute -bottom-1.5 rounded-[3px] bg-card px-1 text-[9px] leading-tight font-bold tracking-wide text-current ring-1 ring-border`},_={__name:`FileIcon`,props:{extension:{type:String,default:``},size:{type:String,default:`md`}},setup(c){let _=c,v={icon:l},y={icon:f},b={PDF:{...v,class:`bg-red-50 text-red-700 dark:bg-red-950/50 dark:text-red-300`},DOC:{...v,class:`bg-sky-50 text-sky-700 dark:bg-sky-950/50 dark:text-sky-300`},DOCX:{...v,class:`bg-sky-50 text-sky-700 dark:bg-sky-950/50 dark:text-sky-300`},ODT:{...v,class:`bg-sky-50 text-sky-700 dark:bg-sky-950/50 dark:text-sky-300`},RTF:{...v,class:`bg-sky-50 text-sky-700 dark:bg-sky-950/50 dark:text-sky-300`},TXT:{...v,class:`bg-muted text-muted-foreground`},XLS:{...y,class:`bg-emerald-50 text-emerald-700 dark:bg-emerald-950/50 dark:text-emerald-300`},XLSX:{...y,class:`bg-emerald-50 text-emerald-700 dark:bg-emerald-950/50 dark:text-emerald-300`},CSV:{...y,class:`bg-emerald-50 text-emerald-700 dark:bg-emerald-950/50 dark:text-emerald-300`},ODS:{...y,class:`bg-emerald-50 text-emerald-700 dark:bg-emerald-950/50 dark:text-emerald-300`},PPT:{icon:m,class:`bg-orange-50 text-orange-700 dark:bg-orange-950/50 dark:text-orange-300`},PPTX:{icon:m,class:`bg-orange-50 text-orange-700 dark:bg-orange-950/50 dark:text-orange-300`},JPG:{icon:d,class:`bg-violet-50 text-violet-700 dark:bg-violet-950/50 dark:text-violet-300`},JPEG:{icon:d,class:`bg-violet-50 text-violet-700 dark:bg-violet-950/50 dark:text-violet-300`},PNG:{icon:d,class:`bg-violet-50 text-violet-700 dark:bg-violet-950/50 dark:text-violet-300`},ZIP:{icon:u,class:`bg-amber-50 text-amber-700 dark:bg-amber-950/50 dark:text-amber-300`}},x=n(()=>b[_.extension?.toUpperCase()]??{icon:p,class:`bg-muted text-muted-foreground`}),S=n(()=>({sm:`size-8 rounded-md`,md:`size-10 rounded-md`,lg:`size-14 rounded-lg`})[_.size]),C=n(()=>({sm:`size-4`,md:`size-5`,lg:`size-7`})[_.size]);return(n,l)=>(r(),t(`span`,{class:e([`relative grid shrink-0 place-items-center`,[S.value,x.value.class]]),title:c.extension||void 0},[(r(),a(o(x.value.icon),{class:e(C.value),"stroke-width":1.75},null,8,[`class`])),c.extension&&c.size!==`sm`?(r(),t(`span`,g,i(c.extension),1)):s(``,!0)],10,h))}};export{_ as t};
|
||||
import{Zn as e,b as t,g as n,mt as r,tr as i,v as a,wt as o,y as s}from"./runtime-core.esm-bundler-B8D2lM98.js";import{j as c}from"./dist-CleIz2GP.js";import{$ as l}from"./AppIcon-SVMShh8s.js";var u=c({name:`file-archive`,size:24,node:[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]}),d=c({name:`file-image`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]}),f=c({name:`file-spreadsheet`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]}),p=c({name:`file`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]}),m=c({name:`presentation`,size:24,node:[[`path`,{d:`M2 3h20`,key:`91anmk`}],[`path`,{d:`M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3`,key:`2k9sn8`}],[`path`,{d:`m7 21 5-5 5 5`,key:`bip4we`}]]}),h=[`title`],g={key:0,class:`absolute -bottom-1.5 rounded-[3px] bg-card px-1 text-[9px] leading-tight font-bold tracking-wide text-current ring-1 ring-border`},_={__name:`FileIcon`,props:{extension:{type:String,default:``},size:{type:String,default:`md`}},setup(c){let _=c,v={icon:l},y={icon:f},b={PDF:{...v,class:`bg-red-50 text-red-700 dark:bg-red-950/50 dark:text-red-300`},DOC:{...v,class:`bg-sky-50 text-sky-700 dark:bg-sky-950/50 dark:text-sky-300`},DOCX:{...v,class:`bg-sky-50 text-sky-700 dark:bg-sky-950/50 dark:text-sky-300`},ODT:{...v,class:`bg-sky-50 text-sky-700 dark:bg-sky-950/50 dark:text-sky-300`},RTF:{...v,class:`bg-sky-50 text-sky-700 dark:bg-sky-950/50 dark:text-sky-300`},TXT:{...v,class:`bg-muted text-muted-foreground`},XLS:{...y,class:`bg-emerald-50 text-emerald-700 dark:bg-emerald-950/50 dark:text-emerald-300`},XLSX:{...y,class:`bg-emerald-50 text-emerald-700 dark:bg-emerald-950/50 dark:text-emerald-300`},CSV:{...y,class:`bg-emerald-50 text-emerald-700 dark:bg-emerald-950/50 dark:text-emerald-300`},ODS:{...y,class:`bg-emerald-50 text-emerald-700 dark:bg-emerald-950/50 dark:text-emerald-300`},PPT:{icon:m,class:`bg-orange-50 text-orange-700 dark:bg-orange-950/50 dark:text-orange-300`},PPTX:{icon:m,class:`bg-orange-50 text-orange-700 dark:bg-orange-950/50 dark:text-orange-300`},JPG:{icon:d,class:`bg-violet-50 text-violet-700 dark:bg-violet-950/50 dark:text-violet-300`},JPEG:{icon:d,class:`bg-violet-50 text-violet-700 dark:bg-violet-950/50 dark:text-violet-300`},PNG:{icon:d,class:`bg-violet-50 text-violet-700 dark:bg-violet-950/50 dark:text-violet-300`},ZIP:{icon:u,class:`bg-amber-50 text-amber-700 dark:bg-amber-950/50 dark:text-amber-300`}},x=n(()=>b[_.extension?.toUpperCase()]??{icon:p,class:`bg-muted text-muted-foreground`}),S=n(()=>({sm:`size-8 rounded-md`,md:`size-10 rounded-md`,lg:`size-14 rounded-lg`})[_.size]),C=n(()=>({sm:`size-4`,md:`size-5`,lg:`size-7`})[_.size]);return(n,l)=>(r(),t(`span`,{class:e([`relative grid shrink-0 place-items-center`,[S.value,x.value.class]]),title:c.extension||void 0},[(r(),a(o(x.value.icon),{class:e(C.value),"stroke-width":1.75},null,8,[`class`])),c.extension&&c.size!==`sm`?(r(),t(`span`,g,i(c.extension),1)):s(``,!0)],10,h))}};export{_ as t};
|
||||
1
public/build/assets/Folder-BP6hnAoY.js
Normal file
1
public/build/assets/Folder-BP6hnAoY.js
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{D as e,E as t,On as n,_ as r,b as i,bt as a,mt as o,o as s,qt as c,tr as l,y as u}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as d}from"./app-CIvn5Z1l.js";import{t as f}from"./chevron-right-DR4LjgDm.js";import{t as p}from"./download-cH_7CRKx.js";import{t as m}from"./FileIcon-BHQ0ftg2.js";var h={key:0},g={key:0,class:`mb-3 flex items-center justify-between gap-4`},_={class:`text-lg font-semibold`},v={class:`divide-y rounded-lg border bg-card`},y=[`href`],b={class:`min-w-0 flex-1`},x={class:`block truncate text-sm font-medium group-hover:underline`},S={key:0,class:`block truncate text-[13px] text-muted-foreground`},C={class:`block text-xs text-muted-foreground`},w={key:0,class:`px-4 py-3 text-sm text-muted-foreground`},T={__name:`FolderBlock`,props:{block:{type:Object,required:!0}},setup(T){let E=e=>e>=1048576?`${(e/1024/1024).toFixed(1).replace(`.`,`,`)} MB`:`${Math.max(1,Math.round(e/1024))} KB`;return(D,O)=>T.block.props?(o(),i(`section`,h,[T.block.data.title?(o(),i(`div`,g,[r(`h3`,_,l(T.block.data.title),1),e(n(d),{href:T.block.props.folder_url,class:`inline-flex items-center gap-0.5 text-[13px] font-medium text-brand-text hover:underline`},{default:c(()=>[O[0]||=t(`Zum Ordner `,-1),e(n(f),{class:`size-3.5`})]),_:1},8,[`href`])])):u(``,!0),r(`ul`,v,[(o(!0),i(s,null,a(T.block.props.downloads,t=>(o(),i(`li`,{key:t.id},[r(`a`,{href:t.download_url,class:`group flex items-center gap-3 px-4 py-3 hover:bg-accent/50`},[e(m,{extension:t.extension},null,8,[`extension`]),r(`span`,b,[r(`span`,x,l(t.title),1),T.block.data.show_description&&t.description?(o(),i(`span`,S,l(t.description),1)):u(``,!0),r(`span`,C,l(t.extension)+` · `+l(E(t.size)),1)]),e(n(p),{class:`size-4 shrink-0 text-muted-foreground`})],8,y)]))),128)),T.block.props.downloads.length?u(``,!0):(o(),i(`li`,w,`Keine Dateien in diesem Ordner.`))])])):u(``,!0)}};export{T as default};
|
||||
import{D as e,E as t,On as n,_ as r,b as i,bt as a,mt as o,o as s,qt as c,tr as l,y as u}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as d}from"./app-Dy5FbYkt.js";import{t as f}from"./chevron-right-DR4LjgDm.js";import{t as p}from"./download-cH_7CRKx.js";import{t as m}from"./FileIcon-LA1rFyBK.js";var h={key:0},g={key:0,class:`mb-3 flex items-center justify-between gap-4`},_={class:`text-lg font-semibold`},v={class:`divide-y rounded-lg border bg-card`},y=[`href`],b={class:`min-w-0 flex-1`},x={class:`block truncate text-sm font-medium group-hover:underline`},S={key:0,class:`block truncate text-[13px] text-muted-foreground`},C={class:`block text-xs text-muted-foreground`},w={key:0,class:`px-4 py-3 text-sm text-muted-foreground`},T={__name:`FolderBlock`,props:{block:{type:Object,required:!0}},setup(T){let E=e=>e>=1048576?`${(e/1024/1024).toFixed(1).replace(`.`,`,`)} MB`:`${Math.max(1,Math.round(e/1024))} KB`;return(D,O)=>T.block.props?(o(),i(`section`,h,[T.block.data.title?(o(),i(`div`,g,[r(`h3`,_,l(T.block.data.title),1),e(n(d),{href:T.block.props.folder_url,class:`inline-flex items-center gap-0.5 text-[13px] font-medium text-brand-text hover:underline`},{default:c(()=>[O[0]||=t(`Zum Ordner `,-1),e(n(f),{class:`size-3.5`})]),_:1},8,[`href`])])):u(``,!0),r(`ul`,v,[(o(!0),i(s,null,a(T.block.props.downloads,t=>(o(),i(`li`,{key:t.id},[r(`a`,{href:t.download_url,class:`group flex items-center gap-3 px-4 py-3 hover:bg-accent/50`},[e(m,{extension:t.extension},null,8,[`extension`]),r(`span`,b,[r(`span`,x,l(t.title),1),T.block.data.show_description&&t.description?(o(),i(`span`,S,l(t.description),1)):u(``,!0),r(`span`,C,l(t.extension)+` · `+l(E(t.size)),1)]),e(n(p),{class:`size-4 shrink-0 text-muted-foreground`})],8,y)]))),128)),T.block.props.downloads.length?u(``,!0):(o(),i(`li`,w,`Keine Dateien in diesem Ordner.`))])])):u(``,!0)}};export{T as default};
|
||||
1
public/build/assets/FolderTile-CFCj9eng.js
Normal file
1
public/build/assets/FolderTile-CFCj9eng.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
import{D as e,On as t,Zn as n,_ as r,b as i,er as a,mt as o,qt as s,tr as c,v as l}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as u}from"./app-Dy5FbYkt.js";import{j as d}from"./dist-CleIz2GP.js";import{t as f}from"./AppIcon-SVMShh8s.js";import{t as p}from"./colors-RDOJqd57.js";var m=d({name:`folder-cog`,size:24,node:[[`path`,{d:`M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3`,key:`128dxu`}],[`path`,{d:`m14.305 19.53.923-.382`,key:`3m78fa`}],[`path`,{d:`m15.228 16.852-.923-.383`,key:`npixar`}],[`path`,{d:`m16.852 15.228-.383-.923`,key:`5xggr7`}],[`path`,{d:`m16.852 20.772-.383.924`,key:`dpfhf9`}],[`path`,{d:`m19.148 15.228.383-.923`,key:`1reyyz`}],[`path`,{d:`m19.53 21.696-.382-.924`,key:`1goivc`}],[`path`,{d:`m20.772 16.852.924-.383`,key:`htqkph`}],[`path`,{d:`m20.772 19.148.924.383`,key:`9w9pjp`}],[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}]],aliases:[`folder-cog-2`]}),h=[`src`],g={__name:`QmIcon`,props:{icon:{type:Object,default:()=>({name:`folder`})},strokeWidth:{type:[Number,String],default:1.75}},setup(e){return(t,n)=>e.icon?.name?(o(),l(f,{key:0,name:e.icon.name,"stroke-width":e.strokeWidth},null,8,[`name`,`stroke-width`])):e.icon?.url&&e.icon.mono?(o(),i(`span`,{key:1,class:`inline-block bg-current`,style:a({maskImage:`url('${e.icon.url}')`,WebkitMaskImage:`url('${e.icon.url}')`,maskSize:`contain`,WebkitMaskSize:`contain`,maskRepeat:`no-repeat`,WebkitMaskRepeat:`no-repeat`,maskPosition:`center`,WebkitMaskPosition:`center`}),"aria-hidden":`true`},null,4)):e.icon?.url?(o(),i(`img`,{key:2,src:e.icon.url,alt:``,class:`object-contain`},null,8,h)):(o(),l(f,{key:3,name:`folder`,"stroke-width":e.strokeWidth},null,8,[`stroke-width`]))}},_={class:`pointer-events-none absolute -right-4 -bottom-5 opacity-15 transition-transform group-hover:scale-105`,"aria-hidden":`true`},v={class:`relative mt-3`},y={class:`mt-0.5 block text-xs text-white/80`},b={__name:`FolderTile`,props:{folder:{type:Object,required:!0},small:{type:Boolean,default:!1}},setup(i){let a=i,d=()=>{let e=[];return a.folder.folders&&e.push(`${a.folder.folders} ${a.folder.folders,`Ordner`}`),a.folder.entries&&e.push(`${a.folder.entries} ${a.folder.entries===1?`Dokument`:`Dokumente`}`),e.join(` · `)||`Noch leer`};return(a,f)=>(o(),l(t(u),{href:i.folder.url,class:n([`group relative flex flex-col justify-between overflow-hidden rounded-lg text-white shadow-xs transition hover:shadow-md hover:brightness-110 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-none`,[t(p)(i.folder.color).tile,i.small?`min-h-24 p-3.5`:`min-h-32 p-4`]])},{default:s(()=>[r(`span`,_,[e(g,{icon:i.folder.icon,class:n(i.small?`size-20`:`size-24`)},null,8,[`icon`,`class`])]),r(`span`,{class:n([`grid place-items-center rounded-md bg-white/15`,i.small?`size-9`:`size-11`])},[e(g,{icon:i.folder.icon,class:n(i.small?`size-5`:`size-6`)},null,8,[`icon`,`class`])],2),r(`span`,v,[r(`span`,{class:n([`block leading-tight font-semibold`,i.small?`text-sm`:`text-[15px]`])},c(i.folder.name),3),r(`span`,y,c(d()),1)])]),_:1},8,[`href`,`class`]))}};export{g as n,m as r,b as t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{D as e,E as t,On as n,_ as r,b as i,mt as a,qt as o,tr as s,v as c,y as l}from"./runtime-core.esm-bundler-B8D2lM98.js";import{w as u}from"./runtime-dom.esm-bundler-BEWGoe8n.js";import{n as d,r as f}from"./app-CIvn5Z1l.js";import{A as p}from"./dist-CleIz2GP.js";import{t as m}from"./arrow-left-nZZEveo4.js";import{t as h}from"./FormField-BcJMyuzX.js";import{t as g}from"./button-SRYY3-ko.js";import{t as _}from"./Input-CgjHXzkf.js";import{t as v}from"./GuestLayout-DAusAB2K.js";var y={key:0,class:`mb-6 rounded-md border border-brand-200 bg-brand-soft px-4 py-3 text-sm text-brand-soft-foreground`},b={__name:`ForgotPassword`,props:{status:{type:String,default:null}},setup(b){let x=f({email:``});return(f,S)=>(a(),c(v,{title:`Passwort vergessen`,description:`Wir senden Ihnen einen Link, mit dem Sie ein neues Passwort festlegen können.`},{default:o(()=>[b.status?(a(),i(`div`,y,s(b.status),1)):l(``,!0),r(`form`,{class:`grid gap-5`,onSubmit:S[1]||=u(e=>n(x).post(`/forgot-password`),[`prevent`])},[e(h,{id:`email`,label:`E-Mail-Adresse`,error:n(x).errors.email},{default:o(()=>[e(n(_),{id:`email`,modelValue:n(x).email,"onUpdate:modelValue":S[0]||=e=>n(x).email=e,type:`email`,autocomplete:`username`,autofocus:``,class:`h-10`},null,8,[`modelValue`])]),_:1},8,[`error`]),e(n(g),{type:`submit`,size:`lg`,class:`h-10 w-full`,disabled:n(x).processing},{default:o(()=>[n(x).processing?(a(),c(n(p),{key:0,class:`animate-spin`})):l(``,!0),S[2]||=t(` Link senden `,-1)]),_:1},8,[`disabled`]),e(n(d),{href:`/login`,class:`inline-flex items-center justify-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground`},{default:o(()=>[e(n(m),{class:`size-4`}),S[3]||=t(` Zurück zur Anmeldung `,-1)]),_:1})],32)]),_:1}))}};export{b as default};
|
||||
import{D as e,E as t,On as n,_ as r,b as i,mt as a,qt as o,tr as s,v as c,y as l}from"./runtime-core.esm-bundler-B8D2lM98.js";import{w as u}from"./runtime-dom.esm-bundler-BEWGoe8n.js";import{n as d,r as f}from"./app-Dy5FbYkt.js";import{A as p}from"./dist-CleIz2GP.js";import{t as m}from"./arrow-left-nZZEveo4.js";import{t as h}from"./FormField-BcJMyuzX.js";import{t as g}from"./button-SRYY3-ko.js";import{t as _}from"./Input-CgjHXzkf.js";import{t as v}from"./GuestLayout-DxnnRWk6.js";var y={key:0,class:`mb-6 rounded-md border border-brand-200 bg-brand-soft px-4 py-3 text-sm text-brand-soft-foreground`},b={__name:`ForgotPassword`,props:{status:{type:String,default:null}},setup(b){let x=f({email:``});return(f,S)=>(a(),c(v,{title:`Passwort vergessen`,description:`Wir senden Ihnen einen Link, mit dem Sie ein neues Passwort festlegen können.`},{default:o(()=>[b.status?(a(),i(`div`,y,s(b.status),1)):l(``,!0),r(`form`,{class:`grid gap-5`,onSubmit:S[1]||=u(e=>n(x).post(`/forgot-password`),[`prevent`])},[e(h,{id:`email`,label:`E-Mail-Adresse`,error:n(x).errors.email},{default:o(()=>[e(n(_),{id:`email`,modelValue:n(x).email,"onUpdate:modelValue":S[0]||=e=>n(x).email=e,type:`email`,autocomplete:`username`,autofocus:``,class:`h-10`},null,8,[`modelValue`])]),_:1},8,[`error`]),e(n(g),{type:`submit`,size:`lg`,class:`h-10 w-full`,disabled:n(x).processing},{default:o(()=>[n(x).processing?(a(),c(n(p),{key:0,class:`animate-spin`})):l(``,!0),S[2]||=t(` Link senden `,-1)]),_:1},8,[`disabled`]),e(n(d),{href:`/login`,class:`inline-flex items-center justify-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground`},{default:o(()=>[e(n(m),{class:`size-4`}),S[3]||=t(` Zurück zur Anmeldung `,-1)]),_:1})],32)]),_:1}))}};export{b as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{J as e,On as t,Zn as n,_ as r,b as i,mt as a,o,tr as s,v as c,y as l}from"./runtime-core.esm-bundler-B8D2lM98.js";import{t as u}from"./FormRenderer-nT5JUcxg.js";var d={key:0,class:`rounded-lg border bg-card p-5 @3xl:p-8`},f={class:`text-xl font-semibold tracking-tight`},p={key:0,class:`mt-2 mb-6 text-sm leading-relaxed whitespace-pre-line text-muted-foreground`},m={key:1,class:`rounded-lg border border-dashed p-4 text-sm text-muted-foreground`},h={__name:`FormBlock`,props:{block:{type:Object,required:!0}},setup(h){let g=e(`pagebuilder:editing`,!1);return(e,_)=>h.block.props?(a(),i(`section`,d,[h.block.data.show_title?(a(),i(o,{key:0},[r(`h3`,f,s(h.block.props.title),1),h.block.props.description?(a(),i(`p`,p,s(h.block.props.description),1)):l(``,!0)],64)):l(``,!0),r(`div`,{class:n({"pointer-events-none opacity-80":t(g)})},[(a(),c(u,{key:h.block.props.id,form:h.block.props},null,8,[`form`]))],2)])):t(g)?(a(),i(`p`,m,`Bitte rechts ein Formular auswählen.`)):l(``,!0)}};export{h as default};
|
||||
import{J as e,On as t,Zn as n,_ as r,b as i,mt as a,o,tr as s,v as c,y as l}from"./runtime-core.esm-bundler-B8D2lM98.js";import{t as u}from"./FormRenderer-BI08HA0r.js";var d={key:0,class:`rounded-lg border bg-card p-5 @3xl:p-8`},f={class:`text-xl font-semibold tracking-tight`},p={key:0,class:`mt-2 mb-6 text-sm leading-relaxed whitespace-pre-line text-muted-foreground`},m={key:1,class:`rounded-lg border border-dashed p-4 text-sm text-muted-foreground`},h={__name:`FormBlock`,props:{block:{type:Object,required:!0}},setup(h){let g=e(`pagebuilder:editing`,!1);return(e,_)=>h.block.props?(a(),i(`section`,d,[h.block.data.show_title?(a(),i(o,{key:0},[r(`h3`,f,s(h.block.props.title),1),h.block.props.description?(a(),i(`p`,p,s(h.block.props.description),1)):l(``,!0)],64)):l(``,!0),r(`div`,{class:n({"pointer-events-none opacity-80":t(g)})},[(a(),c(u,{key:h.block.props.id,form:h.block.props},null,8,[`form`]))],2)])):t(g)?(a(),i(`p`,m,`Bitte rechts ein Formular auswählen.`)):l(``,!0)}};export{h as default};
|
||||
1
public/build/assets/FormRenderer-BI08HA0r.js
Normal file
1
public/build/assets/FormRenderer-BI08HA0r.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{D as e,E as t,On as n,Zn as r,_ as i,b as a,bt as o,g as s,mt as c,o as l,qt as u,tr as d,vn as f,y as p}from"./runtime-core.esm-bundler-B8D2lM98.js";import{X as m}from"./AppIcon-BVHFLm12.js";import{i as h,r as g,t as _}from"./dialog-bBqX5pN5.js";var v=[`onClick`],y=[`src`,`alt`],b={key:1,class:`grid aspect-[4/3] place-items-center rounded-lg border border-dashed bg-muted text-muted-foreground`},x={key:2,class:`mt-1.5 text-xs text-muted-foreground`},S={key:0,class:`col-span-full text-sm text-muted-foreground`},C=[`src`,`alt`],w={key:1,class:`px-2 pb-1 text-sm text-muted-foreground`},T={__name:`Gallery`,props:{block:{type:Object,required:!0}},setup(T){let E=T,D={2:`@xl:grid-cols-2`,3:`@xl:grid-cols-2 @3xl:grid-cols-3`,4:`@xl:grid-cols-3 @3xl:grid-cols-4`},O=s(()=>E.block.data.images.map((e,t)=>({...e,url:E.block.props?.urls?.[t]??null}))),k=f(null);return(s,f)=>(c(),a(l,null,[i(`div`,{class:r([`grid grid-cols-2 gap-3`,D[T.block.data.columns]])},[(c(!0),a(l,null,o(O.value,(t,r)=>(c(),a(`figure`,{key:r},[t.url?(c(),a(`button`,{key:0,type:`button`,class:`block w-full overflow-hidden rounded-lg focus-visible:ring-3 focus-visible:ring-ring/40 focus-visible:outline-none`,onClick:e=>k.value=t},[i(`img`,{src:t.url,alt:t.alt,loading:`lazy`,class:`aspect-[4/3] w-full object-cover transition-transform hover:scale-[1.02]`},null,8,y)],8,v)):(c(),a(`div`,b,[e(n(m),{class:`size-6`})])),t.caption?(c(),a(`figcaption`,x,d(t.caption),1)):p(``,!0)]))),128)),O.value.length?p(``,!0):(c(),a(`p`,S,`Noch keine Bilder.`))],2),e(n(h),{open:!!k.value,"onUpdate:open":f[0]||=e=>!e&&(k.value=null)},{default:u(()=>[e(n(g),{class:`max-w-5xl p-2 sm:max-w-5xl`},{default:u(()=>[e(n(_),{class:`sr-only`},{default:u(()=>[t(d(k.value?.alt||`Bild`),1)]),_:1}),k.value?(c(),a(`img`,{key:0,src:k.value.url,alt:k.value.alt,class:`max-h-[80vh] w-full rounded-md object-contain`},null,8,C)):p(``,!0),k.value?.caption?(c(),a(`p`,w,d(k.value.caption),1)):p(``,!0)]),_:1})]),_:1},8,[`open`])],64))}};export{T as default};
|
||||
import{D as e,E as t,On as n,Zn as r,_ as i,b as a,bt as o,g as s,mt as c,o as l,qt as u,tr as d,vn as f,y as p}from"./runtime-core.esm-bundler-B8D2lM98.js";import{X as m}from"./AppIcon-SVMShh8s.js";import{i as h,r as g,t as _}from"./dialog-DrnG5a9r.js";var v=[`onClick`],y=[`src`,`alt`],b={key:1,class:`grid aspect-[4/3] place-items-center rounded-lg border border-dashed bg-muted text-muted-foreground`},x={key:2,class:`mt-1.5 text-xs text-muted-foreground`},S={key:0,class:`col-span-full text-sm text-muted-foreground`},C=[`src`,`alt`],w={key:1,class:`px-2 pb-1 text-sm text-muted-foreground`},T={__name:`Gallery`,props:{block:{type:Object,required:!0}},setup(T){let E=T,D={2:`@xl:grid-cols-2`,3:`@xl:grid-cols-2 @3xl:grid-cols-3`,4:`@xl:grid-cols-3 @3xl:grid-cols-4`},O=s(()=>E.block.data.images.map((e,t)=>({...e,url:E.block.props?.urls?.[t]??null}))),k=f(null);return(s,f)=>(c(),a(l,null,[i(`div`,{class:r([`grid grid-cols-2 gap-3`,D[T.block.data.columns]])},[(c(!0),a(l,null,o(O.value,(t,r)=>(c(),a(`figure`,{key:r},[t.url?(c(),a(`button`,{key:0,type:`button`,class:`block w-full overflow-hidden rounded-lg focus-visible:ring-3 focus-visible:ring-ring/40 focus-visible:outline-none`,onClick:e=>k.value=t},[i(`img`,{src:t.url,alt:t.alt,loading:`lazy`,class:`aspect-[4/3] w-full object-cover transition-transform hover:scale-[1.02]`},null,8,y)],8,v)):(c(),a(`div`,b,[e(n(m),{class:`size-6`})])),t.caption?(c(),a(`figcaption`,x,d(t.caption),1)):p(``,!0)]))),128)),O.value.length?p(``,!0):(c(),a(`p`,S,`Noch keine Bilder.`))],2),e(n(h),{open:!!k.value,"onUpdate:open":f[0]||=e=>!e&&(k.value=null)},{default:u(()=>[e(n(g),{class:`max-w-5xl p-2 sm:max-w-5xl`},{default:u(()=>[e(n(_),{class:`sr-only`},{default:u(()=>[t(d(k.value?.alt||`Bild`),1)]),_:1}),k.value?(c(),a(`img`,{key:0,src:k.value.url,alt:k.value.alt,class:`max-h-[80vh] w-full rounded-md object-contain`},null,8,C)):p(``,!0),k.value?.caption?(c(),a(`p`,w,d(k.value.caption),1)):p(``,!0)]),_:1})]),_:1},8,[`open`])],64))}};export{T as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{D as e,E as t,On as n,_ as r,b as i,g as a,mt as o,qt as s,tr as c,v as l}from"./runtime-core.esm-bundler-B8D2lM98.js";import{i as u,n as d}from"./app-CIvn5Z1l.js";import{F as f,R as p,b as m}from"./AppIcon-BVHFLm12.js";import{n as h,r as g}from"./AppLayout-Cy38OwfZ.js";var _={class:`overflow-hidden rounded-lg border bg-card`},v={class:`flex items-center justify-between gap-4 bg-brand px-6 py-6 text-brand-foreground`},y={class:`min-w-0`},b={class:`text-sm opacity-85`},x={class:`mt-0.5 text-[22px] leading-tight font-semibold tracking-tight break-words`},S={class:`mt-1.5 line-clamp-2 text-[13px] opacity-85`},C={class:`grid grid-cols-3 divide-x`,"aria-label":`Mein Bereich`},w={key:0,href:`/admin`,class:`flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground`},T={__name:`GreetingCard`,props:{user:{type:Object,required:!0},profile:{type:Object,required:!0},greeting:{type:String,required:!0}},setup(a){return(u,T)=>(o(),i(`section`,_,[r(`div`,v,[r(`div`,y,[r(`div`,b,c(a.greeting)+`,`,1),r(`div`,x,c(a.user.name),1),r(`div`,S,c(a.profile.job_title||`Schön, dass Sie da sind!`),1)]),e(m,{person:a.user,class:`size-16 shrink-0 text-lg ring-4 ring-white/25 xl:size-20 xl:text-xl`},null,8,[`person`])]),r(`nav`,C,[e(n(d),{href:`/personen/${a.user.id}`,class:`flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground`},{default:s(()=>[e(n(f),{class:`size-5 text-brand-text`,"stroke-width":1.75}),T[0]||=t(` Mein Profil `,-1)]),_:1},8,[`href`]),e(n(d),{href:`/profil/bearbeiten`,class:`flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground`},{default:s(()=>[e(n(h),{class:`size-5 text-brand-text`,"stroke-width":1.75}),T[1]||=t(` Profil bearbeiten `,-1)]),_:1}),a.user.can_admin?(o(),i(`a`,w,[e(n(p),{class:`size-5 text-brand-text`,"stroke-width":1.75}),T[2]||=t(` Administration `,-1)])):(o(),l(n(d),{key:1,href:`/logout`,method:`post`,as:`button`,class:`flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground`},{default:s(()=>[e(n(g),{class:`size-5 text-brand-text`,"stroke-width":1.75}),T[3]||=t(` Abmelden `,-1)]),_:1}))])]))}},E={__name:`Greeting`,props:{profile:{type:Object,required:!0}},setup(e){let t=e,n=u(),r=a(()=>({...n.props.auth.user,avatar_url:t.profile.avatar_url})),i=a(()=>{let e=new Date().getHours();return e<11?`Guten Morgen`:e<18?`Guten Tag`:`Guten Abend`});return(t,n)=>(o(),l(T,{user:r.value,profile:e.profile,greeting:i.value},null,8,[`user`,`profile`,`greeting`]))}};export{E as default};
|
||||
import{D as e,E as t,On as n,_ as r,b as i,g as a,mt as o,qt as s,tr as c,v as l}from"./runtime-core.esm-bundler-B8D2lM98.js";import{i as u,n as d}from"./app-Dy5FbYkt.js";import{F as f,R as p,b as m}from"./AppIcon-SVMShh8s.js";import{n as h,r as g}from"./AppLayout-X0y7XSjx.js";var _={class:`overflow-hidden rounded-lg border bg-card`},v={class:`flex items-center justify-between gap-4 bg-brand px-6 py-6 text-brand-foreground`},y={class:`min-w-0`},b={class:`text-sm opacity-85`},x={class:`mt-0.5 text-[22px] leading-tight font-semibold tracking-tight break-words`},S={class:`mt-1.5 line-clamp-2 text-[13px] opacity-85`},C={class:`grid grid-cols-3 divide-x`,"aria-label":`Mein Bereich`},w={key:0,href:`/admin`,class:`flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground`},T={__name:`GreetingCard`,props:{user:{type:Object,required:!0},profile:{type:Object,required:!0},greeting:{type:String,required:!0}},setup(a){return(u,T)=>(o(),i(`section`,_,[r(`div`,v,[r(`div`,y,[r(`div`,b,c(a.greeting)+`,`,1),r(`div`,x,c(a.user.name),1),r(`div`,S,c(a.profile.job_title||`Schön, dass Sie da sind!`),1)]),e(m,{person:a.user,class:`size-16 shrink-0 text-lg ring-4 ring-white/25 xl:size-20 xl:text-xl`},null,8,[`person`])]),r(`nav`,C,[e(n(d),{href:`/personen/${a.user.id}`,class:`flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground`},{default:s(()=>[e(n(f),{class:`size-5 text-brand-text`,"stroke-width":1.75}),T[0]||=t(` Mein Profil `,-1)]),_:1},8,[`href`]),e(n(d),{href:`/profil/bearbeiten`,class:`flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground`},{default:s(()=>[e(n(h),{class:`size-5 text-brand-text`,"stroke-width":1.75}),T[1]||=t(` Profil bearbeiten `,-1)]),_:1}),a.user.can_admin?(o(),i(`a`,w,[e(n(p),{class:`size-5 text-brand-text`,"stroke-width":1.75}),T[2]||=t(` Administration `,-1)])):(o(),l(n(d),{key:1,href:`/logout`,method:`post`,as:`button`,class:`flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground`},{default:s(()=>[e(n(g),{class:`size-5 text-brand-text`,"stroke-width":1.75}),T[3]||=t(` Abmelden `,-1)]),_:1}))])]))}},E={__name:`Greeting`,props:{profile:{type:Object,required:!0}},setup(e){let t=e,n=u(),r=a(()=>({...n.props.auth.user,avatar_url:t.profile.avatar_url})),i=a(()=>{let e=new Date().getHours();return e<11?`Guten Morgen`:e<18?`Guten Tag`:`Guten Abend`});return(t,n)=>(o(),l(T,{user:r.value,profile:e.profile,greeting:i.value},null,8,[`user`,`profile`,`greeting`]))}};export{E as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{D as e,On as t,T as n,_ as r,b as i,mt as a,tr as o,vn as s,y as c}from"./runtime-core.esm-bundler-B8D2lM98.js";import{it as l}from"./AppIcon-BVHFLm12.js";import{_ as u}from"./http-9R3L4KBg.js";var d={key:0,class:`relative overflow-hidden rounded-lg bg-brand text-brand-foreground`,role:`status`},f={class:`relative flex items-center gap-4 px-5 py-5 sm:px-8`},p={class:`grid size-12 shrink-0 place-items-center rounded-full bg-white/15`},m={class:`min-w-0 flex-1`},h={class:`text-xl font-semibold tracking-tight`},g={__name:`Greeting`,props:{name:{type:String,required:!0}},setup(g){let _=g,v=`inhaus.birthday-greeting.${new Date().toISOString().slice(0,10)}`,y=s(!1);try{y.value=localStorage.getItem(v)===`1`}catch{}function b(){y.value=!0;try{localStorage.setItem(v,`1`)}catch{}}return(s,g)=>y.value?c(``,!0):(a(),i(`section`,d,[g[1]||=n(`<svg class="pointer-events-none absolute inset-0 size-full opacity-25" aria-hidden="true"><circle cx="8%" cy="30%" r="4" fill="currentColor"></circle><circle cx="15%" cy="75%" r="3" fill="currentColor"></circle><rect x="24%" y="18%" width="7" height="7" transform="rotate(20)" fill="currentColor"></rect><circle cx="62%" cy="20%" r="3" fill="currentColor"></circle><circle cx="78%" cy="70%" r="5" fill="currentColor"></circle><rect x="88%" y="30%" width="8" height="8" fill="currentColor"></rect><circle cx="94%" cy="80%" r="3" fill="currentColor"></circle></svg>`,1),r(`div`,f,[r(`span`,p,[e(t(l),{class:`size-6`})]),r(`div`,m,[r(`p`,h,`Alles Gute zum Geburtstag, `+o(_.name)+`!`,1),g[0]||=r(`p`,{class:`mt-0.5 text-sm opacity-90`},`Wir wünschen Ihnen einen schönen Tag.`,-1)]),r(`button`,{type:`button`,class:`grid size-9 shrink-0 place-items-center rounded-md hover:bg-white/15`,"aria-label":`Glückwunsch ausblenden`,onClick:b},[e(t(u),{class:`size-5`})])])]))}};export{g as default};
|
||||
import{D as e,On as t,T as n,_ as r,b as i,mt as a,tr as o,vn as s,y as c}from"./runtime-core.esm-bundler-B8D2lM98.js";import{it as l}from"./AppIcon-SVMShh8s.js";import{_ as u}from"./http-9R3L4KBg.js";var d={key:0,class:`relative overflow-hidden rounded-lg bg-brand text-brand-foreground`,role:`status`},f={class:`relative flex items-center gap-4 px-5 py-5 sm:px-8`},p={class:`grid size-12 shrink-0 place-items-center rounded-full bg-white/15`},m={class:`min-w-0 flex-1`},h={class:`text-xl font-semibold tracking-tight`},g={__name:`Greeting`,props:{name:{type:String,required:!0}},setup(g){let _=g,v=`inhaus.birthday-greeting.${new Date().toISOString().slice(0,10)}`,y=s(!1);try{y.value=localStorage.getItem(v)===`1`}catch{}function b(){y.value=!0;try{localStorage.setItem(v,`1`)}catch{}}return(s,g)=>y.value?c(``,!0):(a(),i(`section`,d,[g[1]||=n(`<svg class="pointer-events-none absolute inset-0 size-full opacity-25" aria-hidden="true"><circle cx="8%" cy="30%" r="4" fill="currentColor"></circle><circle cx="15%" cy="75%" r="3" fill="currentColor"></circle><rect x="24%" y="18%" width="7" height="7" transform="rotate(20)" fill="currentColor"></rect><circle cx="62%" cy="20%" r="3" fill="currentColor"></circle><circle cx="78%" cy="70%" r="5" fill="currentColor"></circle><rect x="88%" y="30%" width="8" height="8" fill="currentColor"></rect><circle cx="94%" cy="80%" r="3" fill="currentColor"></circle></svg>`,1),r(`div`,f,[r(`span`,p,[e(t(l),{class:`size-6`})]),r(`div`,m,[r(`p`,h,`Alles Gute zum Geburtstag, `+o(_.name)+`!`,1),g[0]||=r(`p`,{class:`mt-0.5 text-sm opacity-90`},`Wir wünschen Ihnen einen schönen Tag.`,-1)]),r(`button`,{type:`button`,class:`grid size-9 shrink-0 place-items-center rounded-md hover:bg-white/15`,"aria-label":`Glückwunsch ausblenden`,onClick:b},[e(t(u),{class:`size-5`})])])]))}};export{g as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{D as e,On as t,Zn as n,_ as r,b as i,g as a,mt as o,o as s,tr as c,xt as l,y as u}from"./runtime-core.esm-bundler-B8D2lM98.js";import{i as d,t as f}from"./app-CIvn5Z1l.js";import{t as p}from"./BrandLogo-TGGJyC1K.js";var m={key:0,class:`bg-amber-400 px-4 py-1.5 text-center text-[13px] font-medium text-amber-950`},h={key:1,class:`relative grid min-h-screen place-items-center bg-brand px-4 py-12`},g=[`src`],_={key:1,class:`absolute inset-0 bg-black/35`},v={class:`relative w-full max-w-[440px]`},y={class:`rounded-xl border bg-card p-8 text-card-foreground shadow-xl sm:p-10`},b={class:`mb-8`},x={class:`text-2xl font-semibold tracking-tight`},S={key:0,class:`mt-2 text-sm text-muted-foreground`},C={class:`mt-8`},w={key:0,class:`mt-6 text-center text-sm text-white/90 [text-shadow:0_1px_2px_rgb(0_0_0/0.4)]`},T={key:2,class:`grid min-h-screen lg:grid-cols-[minmax(0,5fr)_minmax(0,6fr)]`},E={class:`relative hidden overflow-hidden bg-brand text-brand-foreground lg:flex lg:flex-col lg:justify-between lg:p-12`},D=[`src`],O={key:1,class:`pointer-events-none absolute inset-0 opacity-[0.12]`,style:{"background-image":`radial-gradient(circle at 20% 20%, white 0, transparent 45%), radial-gradient(circle at 90% 80%, white 0, transparent 40%)`}},k={key:0,class:`text-3xl leading-tight font-semibold tracking-tight`},A={class:`mt-4 text-[15px] opacity-85`},j={class:`flex items-center justify-center bg-background px-4 py-12 sm:px-8`},M={class:`w-full max-w-[400px]`},N={class:`mb-10 lg:hidden`},P={class:`text-2xl font-semibold tracking-tight`},F={key:0,class:`mt-2 text-sm text-muted-foreground`},I={class:`mt-8`},L={__name:`GuestLayout`,props:{title:{type:String,default:``},description:{type:String,default:``}},setup(L){let R=L,z=a(()=>d().props.branding),B=a(()=>z.value.login??{layout:`split`});return(a,d)=>(o(),i(s,null,[e(t(f),{title:R.title},null,8,[`title`]),z.value.preview?(o(),i(`div`,m,`Vorschau des Entwurfs`)):u(``,!0),B.value.layout===`centered`?(o(),i(`div`,h,[B.value.image_url?(o(),i(`img`,{key:0,src:B.value.image_url,alt:``,class:`absolute inset-0 size-full object-cover`},null,8,g)):u(``,!0),B.value.image_url?(o(),i(`div`,_)):u(``,!0),r(`div`,v,[r(`div`,y,[r(`div`,b,[e(p)]),r(`h1`,x,c(R.title),1),R.description?(o(),i(`p`,S,c(R.description),1)):u(``,!0),r(`div`,C,[l(a.$slots,`default`)])]),B.value.title?(o(),i(`p`,w,c(B.value.title),1)):u(``,!0)])])):(o(),i(`div`,T,[r(`aside`,E,[B.value.image_url?(o(),i(s,{key:0},[r(`img`,{src:B.value.image_url,alt:``,class:`absolute inset-0 size-full object-cover`},null,8,D),d[0]||=r(`div`,{class:`absolute inset-0 bg-gradient-to-t from-black/70 via-black/25 to-black/10`},null,-1)],64)):(o(),i(`div`,O)),e(p,{inverted:``,class:n([`relative`,B.value.image_url?`text-white`:``])},null,8,[`class`]),r(`div`,{class:n([`relative max-w-md`,B.value.image_url?`text-white`:``])},[B.value.title?(o(),i(`p`,k,c(B.value.title),1)):u(``,!0),r(`p`,A,c(B.value.text||`Neuigkeiten, Ansprechpartner und Anwendungen von ${z.value.portal_name}.`),1)],2),r(`p`,{class:n([`relative text-xs opacity-70`,B.value.image_url?`text-white`:``])},`© `+c(new Date().getFullYear())+` `+c(z.value.portal_name),3)]),r(`main`,j,[r(`div`,M,[r(`div`,N,[e(p)]),r(`h1`,P,c(R.title),1),R.description?(o(),i(`p`,F,c(R.description),1)):u(``,!0),r(`div`,I,[l(a.$slots,`default`)])])])]))],64))}};export{L as t};
|
||||
import{D as e,On as t,Zn as n,_ as r,b as i,g as a,mt as o,o as s,tr as c,xt as l,y as u}from"./runtime-core.esm-bundler-B8D2lM98.js";import{i as d,t as f}from"./app-Dy5FbYkt.js";import{t as p}from"./BrandLogo-DRGdNySk.js";var m={key:0,class:`bg-amber-400 px-4 py-1.5 text-center text-[13px] font-medium text-amber-950`},h={key:1,class:`relative grid min-h-screen place-items-center bg-brand px-4 py-12`},g=[`src`],_={key:1,class:`absolute inset-0 bg-black/35`},v={class:`relative w-full max-w-[440px]`},y={class:`rounded-xl border bg-card p-8 text-card-foreground shadow-xl sm:p-10`},b={class:`mb-8`},x={class:`text-2xl font-semibold tracking-tight`},S={key:0,class:`mt-2 text-sm text-muted-foreground`},C={class:`mt-8`},w={key:0,class:`mt-6 text-center text-sm text-white/90 [text-shadow:0_1px_2px_rgb(0_0_0/0.4)]`},T={key:2,class:`grid min-h-screen lg:grid-cols-[minmax(0,5fr)_minmax(0,6fr)]`},E={class:`relative hidden overflow-hidden bg-brand text-brand-foreground lg:flex lg:flex-col lg:justify-between lg:p-12`},D=[`src`],O={key:1,class:`pointer-events-none absolute inset-0 opacity-[0.12]`,style:{"background-image":`radial-gradient(circle at 20% 20%, white 0, transparent 45%), radial-gradient(circle at 90% 80%, white 0, transparent 40%)`}},k={key:0,class:`text-3xl leading-tight font-semibold tracking-tight`},A={class:`mt-4 text-[15px] opacity-85`},j={class:`flex items-center justify-center bg-background px-4 py-12 sm:px-8`},M={class:`w-full max-w-[400px]`},N={class:`mb-10 lg:hidden`},P={class:`text-2xl font-semibold tracking-tight`},F={key:0,class:`mt-2 text-sm text-muted-foreground`},I={class:`mt-8`},L={__name:`GuestLayout`,props:{title:{type:String,default:``},description:{type:String,default:``}},setup(L){let R=L,z=a(()=>d().props.branding),B=a(()=>z.value.login??{layout:`split`});return(a,d)=>(o(),i(s,null,[e(t(f),{title:R.title},null,8,[`title`]),z.value.preview?(o(),i(`div`,m,`Vorschau des Entwurfs`)):u(``,!0),B.value.layout===`centered`?(o(),i(`div`,h,[B.value.image_url?(o(),i(`img`,{key:0,src:B.value.image_url,alt:``,class:`absolute inset-0 size-full object-cover`},null,8,g)):u(``,!0),B.value.image_url?(o(),i(`div`,_)):u(``,!0),r(`div`,v,[r(`div`,y,[r(`div`,b,[e(p)]),r(`h1`,x,c(R.title),1),R.description?(o(),i(`p`,S,c(R.description),1)):u(``,!0),r(`div`,C,[l(a.$slots,`default`)])]),B.value.title?(o(),i(`p`,w,c(B.value.title),1)):u(``,!0)])])):(o(),i(`div`,T,[r(`aside`,E,[B.value.image_url?(o(),i(s,{key:0},[r(`img`,{src:B.value.image_url,alt:``,class:`absolute inset-0 size-full object-cover`},null,8,D),d[0]||=r(`div`,{class:`absolute inset-0 bg-gradient-to-t from-black/70 via-black/25 to-black/10`},null,-1)],64)):(o(),i(`div`,O)),e(p,{inverted:``,class:n([`relative`,B.value.image_url?`text-white`:``])},null,8,[`class`]),r(`div`,{class:n([`relative max-w-md`,B.value.image_url?`text-white`:``])},[B.value.title?(o(),i(`p`,k,c(B.value.title),1)):u(``,!0),r(`p`,A,c(B.value.text||`Neuigkeiten, Ansprechpartner und Anwendungen von ${z.value.portal_name}.`),1)],2),r(`p`,{class:n([`relative text-xs opacity-70`,B.value.image_url?`text-white`:``])},`© `+c(new Date().getFullYear())+` `+c(z.value.portal_name),3)]),r(`main`,j,[r(`div`,M,[r(`div`,N,[e(p)]),r(`h1`,P,c(R.title),1),R.description?(o(),i(`p`,F,c(R.description),1)):u(``,!0),r(`div`,I,[l(a.$slots,`default`)])])])]))],64))}};export{L as t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{D as e,E as t,On as n,Yt as r,Zn as i,_ as a,b as o,bt as s,ct as c,g as l,it as u,mt as d,o as f,qt as p,tr as m,v as h,vn as g,y as _}from"./runtime-core.esm-bundler-B8D2lM98.js";import{S as v,n as y}from"./runtime-dom.esm-bundler-BEWGoe8n.js";import{n as b}from"./app-CIvn5Z1l.js";import{j as x}from"./dist-CleIz2GP.js";import{t as S}from"./arrow-right-CdMsByuI.js";import{t as C}from"./chevron-left-CfNljcKt.js";import{t as w}from"./chevron-right-DR4LjgDm.js";import{t as T}from"./play-_hM1KTvn.js";var E=x({name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]}),D=[`src`],O={class:`flex h-full flex-col justify-end p-6 sm:max-w-[65%] sm:justify-center sm:p-10`,"aria-live":`polite`},k={key:0,class:`mb-3 w-fit rounded-sm bg-brand px-2 py-0.5 text-[11px] font-semibold tracking-wide text-brand-foreground uppercase`},A={class:`text-2xl leading-tight font-semibold tracking-tight sm:text-[32px]`},j={key:1,class:`mt-3 line-clamp-3 hidden text-[15px] text-white/85 sm:block`},M={key:0,class:`absolute right-4 bottom-4 flex items-center gap-2 sm:right-6 sm:bottom-6`},N={class:`flex items-center gap-1.5 px-1`},P=[`aria-label`,`aria-current`,`onClick`],F=[`aria-label`],I={__name:`HeroSlider`,props:{posts:{type:Array,required:!0}},setup(x){let I=x,L=g(0),R=g(!1),z=l(()=>I.posts[L.value]),B=null;function V(e){L.value=(e+I.posts.length)%I.posts.length}function H(){U(),I.posts.length>1&&!R.value&&!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches&&(B=setInterval(()=>V(L.value+1),7e3))}function U(){clearInterval(B)}function W(){R.value=!R.value,H()}return c(H),u(U),(c,l)=>(d(),o(`section`,{class:`relative isolate aspect-[16/10] overflow-hidden rounded-lg bg-brand-950 text-white sm:aspect-[16/9] lg:aspect-auto lg:h-full lg:min-h-[400px]`,"aria-roledescription":`Karussell`,"aria-label":`Hervorgehobene Neuigkeiten`,onMouseenter:U,onMouseleave:H,onFocusin:U,onFocusout:H},[e(y,{"enter-active-class":`transition-opacity duration-700`,"leave-active-class":`transition-opacity duration-700 absolute inset-0`,"enter-from-class":`opacity-0`,"leave-to-class":`opacity-0`},{default:p(()=>[(d(!0),o(f,null,s(x.posts,(e,t)=>r((d(),o(`img`,{key:e.id,src:e.cover_url,alt:``,class:`absolute inset-0 -z-10 size-full object-cover`},null,8,D)),[[v,t===L.value]])),128))]),_:1}),l[3]||=a(`div`,{class:`absolute inset-0 -z-10 bg-gradient-to-t from-black/80 via-black/35 to-black/5 sm:bg-gradient-to-r sm:from-black/75 sm:via-black/40 sm:to-transparent`},null,-1),a(`div`,O,[z.value.category?(d(),o(`span`,k,m(z.value.category.name),1)):_(``,!0),a(`h2`,A,m(z.value.title),1),z.value.teaser?(d(),o(`p`,j,m(z.value.teaser),1)):_(``,!0),e(n(b),{href:`/neuigkeiten/${z.value.slug}`,class:`mt-5 inline-flex w-fit items-center gap-2 rounded-md bg-brand px-4 py-2.5 text-sm font-medium text-brand-foreground transition-colors hover:bg-brand-700`},{default:p(()=>[l[2]||=t(` Mehr erfahren `,-1),e(n(S),{class:`size-4`})]),_:1},8,[`href`])]),x.posts.length>1?(d(),o(`div`,M,[a(`button`,{type:`button`,class:`grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55`,"aria-label":`Vorheriger Beitrag`,onClick:l[0]||=e=>V(L.value-1)},[e(n(C),{class:`size-5`})]),a(`div`,N,[(d(!0),o(f,null,s(x.posts,(e,t)=>(d(),o(`button`,{key:e.id,type:`button`,class:i([`h-1.5 rounded-full transition-all`,t===L.value?`w-6 bg-white`:`w-1.5 bg-white/50 hover:bg-white/80`]),"aria-label":`Beitrag ${t+1} von ${x.posts.length}`,"aria-current":t===L.value,onClick:e=>V(t)},null,10,P))),128))]),a(`button`,{type:`button`,class:`grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55`,"aria-label":`Nächster Beitrag`,onClick:l[1]||=e=>V(L.value+1)},[e(n(w),{class:`size-5`})]),a(`button`,{type:`button`,class:`grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55`,"aria-label":R.value?`Automatisch weiterblättern`:`Anhalten`,onClick:W},[R.value?(d(),h(n(T),{key:0,class:`size-4`})):(d(),h(n(E),{key:1,class:`size-4`}))],8,F)])):_(``,!0)],32))}},L={__name:`Hero`,props:{posts:{type:Array,required:!0}},setup(e){return(t,n)=>(d(),h(I,{posts:e.posts,class:`h-full`},null,8,[`posts`]))}};export{L as default};
|
||||
import{D as e,E as t,On as n,Yt as r,Zn as i,_ as a,b as o,bt as s,ct as c,g as l,it as u,mt as d,o as f,qt as p,tr as m,v as h,vn as g,y as _}from"./runtime-core.esm-bundler-B8D2lM98.js";import{S as v,n as y}from"./runtime-dom.esm-bundler-BEWGoe8n.js";import{n as b}from"./app-Dy5FbYkt.js";import{j as x}from"./dist-CleIz2GP.js";import{t as S}from"./arrow-right-CdMsByuI.js";import{t as C}from"./chevron-left-CfNljcKt.js";import{t as w}from"./chevron-right-DR4LjgDm.js";import{t as T}from"./play-_hM1KTvn.js";var E=x({name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]}),D=[`src`],O={class:`flex h-full flex-col justify-end p-6 sm:max-w-[65%] sm:justify-center sm:p-10`,"aria-live":`polite`},k={key:0,class:`mb-3 w-fit rounded-sm bg-brand px-2 py-0.5 text-[11px] font-semibold tracking-wide text-brand-foreground uppercase`},A={class:`text-2xl leading-tight font-semibold tracking-tight sm:text-[32px]`},j={key:1,class:`mt-3 line-clamp-3 hidden text-[15px] text-white/85 sm:block`},M={key:0,class:`absolute right-4 bottom-4 flex items-center gap-2 sm:right-6 sm:bottom-6`},N={class:`flex items-center gap-1.5 px-1`},P=[`aria-label`,`aria-current`,`onClick`],F=[`aria-label`],I={__name:`HeroSlider`,props:{posts:{type:Array,required:!0}},setup(x){let I=x,L=g(0),R=g(!1),z=l(()=>I.posts[L.value]),B=null;function V(e){L.value=(e+I.posts.length)%I.posts.length}function H(){U(),I.posts.length>1&&!R.value&&!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches&&(B=setInterval(()=>V(L.value+1),7e3))}function U(){clearInterval(B)}function W(){R.value=!R.value,H()}return c(H),u(U),(c,l)=>(d(),o(`section`,{class:`relative isolate aspect-[16/10] overflow-hidden rounded-lg bg-brand-950 text-white sm:aspect-[16/9] lg:aspect-auto lg:h-full lg:min-h-[400px]`,"aria-roledescription":`Karussell`,"aria-label":`Hervorgehobene Neuigkeiten`,onMouseenter:U,onMouseleave:H,onFocusin:U,onFocusout:H},[e(y,{"enter-active-class":`transition-opacity duration-700`,"leave-active-class":`transition-opacity duration-700 absolute inset-0`,"enter-from-class":`opacity-0`,"leave-to-class":`opacity-0`},{default:p(()=>[(d(!0),o(f,null,s(x.posts,(e,t)=>r((d(),o(`img`,{key:e.id,src:e.cover_url,alt:``,class:`absolute inset-0 -z-10 size-full object-cover`},null,8,D)),[[v,t===L.value]])),128))]),_:1}),l[3]||=a(`div`,{class:`absolute inset-0 -z-10 bg-gradient-to-t from-black/80 via-black/35 to-black/5 sm:bg-gradient-to-r sm:from-black/75 sm:via-black/40 sm:to-transparent`},null,-1),a(`div`,O,[z.value.category?(d(),o(`span`,k,m(z.value.category.name),1)):_(``,!0),a(`h2`,A,m(z.value.title),1),z.value.teaser?(d(),o(`p`,j,m(z.value.teaser),1)):_(``,!0),e(n(b),{href:`/neuigkeiten/${z.value.slug}`,class:`mt-5 inline-flex w-fit items-center gap-2 rounded-md bg-brand px-4 py-2.5 text-sm font-medium text-brand-foreground transition-colors hover:bg-brand-700`},{default:p(()=>[l[2]||=t(` Mehr erfahren `,-1),e(n(S),{class:`size-4`})]),_:1},8,[`href`])]),x.posts.length>1?(d(),o(`div`,M,[a(`button`,{type:`button`,class:`grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55`,"aria-label":`Vorheriger Beitrag`,onClick:l[0]||=e=>V(L.value-1)},[e(n(C),{class:`size-5`})]),a(`div`,N,[(d(!0),o(f,null,s(x.posts,(e,t)=>(d(),o(`button`,{key:e.id,type:`button`,class:i([`h-1.5 rounded-full transition-all`,t===L.value?`w-6 bg-white`:`w-1.5 bg-white/50 hover:bg-white/80`]),"aria-label":`Beitrag ${t+1} von ${x.posts.length}`,"aria-current":t===L.value,onClick:e=>V(t)},null,10,P))),128))]),a(`button`,{type:`button`,class:`grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55`,"aria-label":`Nächster Beitrag`,onClick:l[1]||=e=>V(L.value+1)},[e(n(w),{class:`size-5`})]),a(`button`,{type:`button`,class:`grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55`,"aria-label":R.value?`Automatisch weiterblättern`:`Anhalten`,onClick:W},[R.value?(d(),h(n(T),{key:0,class:`size-4`})):(d(),h(n(E),{key:1,class:`size-4`}))],8,F)])):_(``,!0)],32))}},L={__name:`Hero`,props:{posts:{type:Array,required:!0}},setup(e){return(t,n)=>(d(),h(I,{posts:e.posts,class:`h-full`},null,8,[`posts`]))}};export{L as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{D as e,Zn as t,_ as n,b as r,bt as i,mt as a,o,qt as s,tr as c,v as l,wt as u,y as d}from"./runtime-core.esm-bundler-B8D2lM98.js";import{t as f}from"./AppIcon-BVHFLm12.js";var p={class:`grid size-10 shrink-0 place-items-center rounded-lg bg-brand-soft text-brand-text`},m={class:`min-w-0`},h={key:0,class:`mt-0.5 block text-sm leading-relaxed whitespace-pre-line text-muted-foreground`},g={__name:`IconList`,props:{block:{type:Object,required:!0}},setup(g){return(_,v)=>(a(),r(`ul`,{class:t(g.block.data.layout===`grid`?`grid gap-4 @xl:grid-cols-2 @4xl:grid-cols-3`:`grid gap-4`)},[(a(!0),r(o,null,i(g.block.data.items,(i,o)=>(a(),r(`li`,{key:o},[(a(),l(u(i.url?`a`:`div`),{href:i.url||void 0,class:t([`flex gap-4`,[g.block.data.layout===`grid`?`h-full rounded-lg border bg-card p-4`:``,i.url?`group`:``]])},{default:s(()=>[n(`span`,p,[e(f,{name:i.icon||`link`,class:`size-5`},null,8,[`name`])]),n(`span`,m,[n(`span`,{class:t([`block font-medium`,{"group-hover:underline":i.url}])},c(i.title),3),i.text?(a(),r(`span`,h,c(i.text),1)):d(``,!0)])]),_:2},1032,[`href`,`class`]))]))),128))],2))}};export{g as default};
|
||||
import{D as e,Zn as t,_ as n,b as r,bt as i,mt as a,o,qt as s,tr as c,v as l,wt as u,y as d}from"./runtime-core.esm-bundler-B8D2lM98.js";import{t as f}from"./AppIcon-SVMShh8s.js";var p={class:`grid size-10 shrink-0 place-items-center rounded-lg bg-brand-soft text-brand-text`},m={class:`min-w-0`},h={key:0,class:`mt-0.5 block text-sm leading-relaxed whitespace-pre-line text-muted-foreground`},g={__name:`IconList`,props:{block:{type:Object,required:!0}},setup(g){return(_,v)=>(a(),r(`ul`,{class:t(g.block.data.layout===`grid`?`grid gap-4 @xl:grid-cols-2 @4xl:grid-cols-3`:`grid gap-4`)},[(a(!0),r(o,null,i(g.block.data.items,(i,o)=>(a(),r(`li`,{key:o},[(a(),l(u(i.url?`a`:`div`),{href:i.url||void 0,class:t([`flex gap-4`,[g.block.data.layout===`grid`?`h-full rounded-lg border bg-card p-4`:``,i.url?`group`:``]])},{default:s(()=>[n(`span`,p,[e(f,{name:i.icon||`link`,class:`size-5`},null,8,[`name`])]),n(`span`,m,[n(`span`,{class:t([`block font-medium`,{"group-hover:underline":i.url}])},c(i.title),3),i.text?(a(),r(`span`,h,c(i.text),1)):d(``,!0)])]),_:2},1032,[`href`,`class`]))]))),128))],2))}};export{g as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{D as e,On as t,Zn as n,_ as r,b as i,mt as a,qt as o,tr as s,v as c,wt as l,y as u}from"./runtime-core.esm-bundler-B8D2lM98.js";import{X as d}from"./AppIcon-BVHFLm12.js";var f=[`src`,`alt`],p={key:1,class:`grid aspect-video place-items-center rounded-lg border border-dashed bg-muted text-muted-foreground`},m={key:2,class:`mt-2 text-sm text-muted-foreground`},h={__name:`Image`,props:{block:{type:Object,required:!0}},setup(h){let g={full:`w-full`,medium:`mx-auto w-full @3xl:w-2/3`,small:`mx-auto w-full @xl:w-1/2 @3xl:w-1/3`};return(_,v)=>(a(),i(`figure`,{class:n(g[h.block.data.size])},[h.block.props?.url?(a(),c(l(h.block.data.url?`a`:`div`),{key:0,href:h.block.data.url||void 0},{default:o(()=>[r(`img`,{src:h.block.props.url,alt:h.block.data.alt,loading:`lazy`,class:`w-full rounded-lg`},null,8,f)]),_:1},8,[`href`])):(a(),i(`div`,p,[e(t(d),{class:`size-8`})])),h.block.data.caption?(a(),i(`figcaption`,m,s(h.block.data.caption),1)):u(``,!0)],2))}};export{h as default};
|
||||
import{D as e,On as t,Zn as n,_ as r,b as i,mt as a,qt as o,tr as s,v as c,wt as l,y as u}from"./runtime-core.esm-bundler-B8D2lM98.js";import{X as d}from"./AppIcon-SVMShh8s.js";var f=[`src`,`alt`],p={key:1,class:`grid aspect-video place-items-center rounded-lg border border-dashed bg-muted text-muted-foreground`},m={key:2,class:`mt-2 text-sm text-muted-foreground`},h={__name:`Image`,props:{block:{type:Object,required:!0}},setup(h){let g={full:`w-full`,medium:`mx-auto w-full @3xl:w-2/3`,small:`mx-auto w-full @xl:w-1/2 @3xl:w-1/3`};return(_,v)=>(a(),i(`figure`,{class:n(g[h.block.data.size])},[h.block.props?.url?(a(),c(l(h.block.data.url?`a`:`div`),{key:0,href:h.block.data.url||void 0},{default:o(()=>[r(`img`,{src:h.block.props.url,alt:h.block.data.alt,loading:`lazy`,class:`w-full rounded-lg`},null,8,f)]),_:1},8,[`href`])):(a(),i(`div`,p,[e(t(d),{class:`size-8`})])),h.block.data.caption?(a(),i(`figcaption`,m,s(h.block.data.caption),1)):u(``,!0)],2))}};export{h as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{D as e,E as t,On as n,_ as r,b as i,bt as a,g as o,mt as s,o as c,qt as l,tr as u,v as d,y as f}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as p}from"./app-CIvn5Z1l.js";import{G as m,N as h,o as g,rt as _,s as v}from"./AppIcon-BVHFLm12.js";import{t as y}from"./AppLayout-Cy38OwfZ.js";import{t as b}from"./EmptyState-Ceq4v8mE.js";import{t as x}from"./PageHeader-CWL5ThBH.js";import{t as S}from"./EventDateBlock-Cxz_hY6g.js";var C={key:0,class:`grid max-w-4xl gap-8`},w={class:`mb-3 text-sm font-semibold text-muted-foreground`},T={class:`divide-y rounded-lg border bg-card`},E={class:`min-w-0 flex-1`},D={class:`text-[15px] font-semibold group-hover:underline`},O={class:`mt-0.5 text-[13px] text-muted-foreground`},k={key:0,class:`mt-0.5 flex items-center gap-1.5 text-[13px] text-muted-foreground`},A=[`src`],j={key:1,class:`max-w-4xl rounded-lg border border-dashed bg-card`},M={__name:`Index`,props:{events:{type:Object,required:!0}},setup(M){let N=M,P=o(()=>{let e=[];for(let t of N.events.data){let n=new Date(t.starts_at),r=v((n<new Date?new Date:n).toISOString()),i=e[e.length-1];i?.label===r?i.events.push(t):e.push({label:r,events:[t]})}return e});return(o,v)=>(s(),d(y,{title:`Termine`},{default:l(()=>[e(x,{title:`Termine`,description:`Veranstaltungen, Fortbildungen und Treffen.`}),P.value.length?(s(),i(`div`,C,[(s(!0),i(c,null,a(P.value,o=>(s(),i(`section`,{key:o.label},[r(`h2`,w,u(o.label),1),r(`ul`,T,[(s(!0),i(c,null,a(o.events,a=>(s(),i(`li`,{key:a.id},[e(n(p),{href:`/termine/${a.id}`,class:`group flex items-center gap-4 p-4 transition-colors hover:bg-accent/60`},{default:l(()=>[e(S,{date:a.starts_at,class:`w-14`},null,8,[`date`]),r(`div`,E,[r(`h3`,D,u(a.title),1),r(`p`,O,u(n(g)(a)),1),a.location||a.online_url?(s(),i(`p`,k,[a.location?(s(),d(n(m),{key:0,class:`size-3.5`})):(s(),d(n(h),{key:1,class:`size-3.5`})),t(` `+u(a.location||`Online`),1)])):f(``,!0)]),a.thumb_url?(s(),i(`img`,{key:0,src:a.thumb_url,alt:``,loading:`lazy`,class:`hidden h-16 w-28 shrink-0 rounded-md object-cover sm:block`},null,8,A)):f(``,!0)]),_:2},1032,[`href`])]))),128))])]))),128))])):(s(),i(`div`,j,[e(b,{icon:n(_),title:`Keine anstehenden Termine`,text:`Neue Termine erscheinen hier, sobald sie eingetragen sind.`},null,8,[`icon`])]))]),_:1}))}};export{M as default};
|
||||
import{D as e,E as t,On as n,_ as r,b as i,bt as a,g as o,mt as s,o as c,qt as l,tr as u,v as d,y as f}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as p}from"./app-Dy5FbYkt.js";import{G as m,N as h,o as g,rt as _,s as v}from"./AppIcon-SVMShh8s.js";import{t as y}from"./AppLayout-X0y7XSjx.js";import{t as b}from"./EmptyState-Ceq4v8mE.js";import{t as x}from"./PageHeader-Dcr3nLVu.js";import{t as S}from"./EventDateBlock-DzdXYi61.js";var C={key:0,class:`grid max-w-4xl gap-8`},w={class:`mb-3 text-sm font-semibold text-muted-foreground`},T={class:`divide-y rounded-lg border bg-card`},E={class:`min-w-0 flex-1`},D={class:`text-[15px] font-semibold group-hover:underline`},O={class:`mt-0.5 text-[13px] text-muted-foreground`},k={key:0,class:`mt-0.5 flex items-center gap-1.5 text-[13px] text-muted-foreground`},A=[`src`],j={key:1,class:`max-w-4xl rounded-lg border border-dashed bg-card`},M={__name:`Index`,props:{events:{type:Object,required:!0}},setup(M){let N=M,P=o(()=>{let e=[];for(let t of N.events.data){let n=new Date(t.starts_at),r=v((n<new Date?new Date:n).toISOString()),i=e[e.length-1];i?.label===r?i.events.push(t):e.push({label:r,events:[t]})}return e});return(o,v)=>(s(),d(y,{title:`Termine`},{default:l(()=>[e(x,{title:`Termine`,description:`Veranstaltungen, Fortbildungen und Treffen.`}),P.value.length?(s(),i(`div`,C,[(s(!0),i(c,null,a(P.value,o=>(s(),i(`section`,{key:o.label},[r(`h2`,w,u(o.label),1),r(`ul`,T,[(s(!0),i(c,null,a(o.events,a=>(s(),i(`li`,{key:a.id},[e(n(p),{href:`/termine/${a.id}`,class:`group flex items-center gap-4 p-4 transition-colors hover:bg-accent/60`},{default:l(()=>[e(S,{date:a.starts_at,class:`w-14`},null,8,[`date`]),r(`div`,E,[r(`h3`,D,u(a.title),1),r(`p`,O,u(n(g)(a)),1),a.location||a.online_url?(s(),i(`p`,k,[a.location?(s(),d(n(m),{key:0,class:`size-3.5`})):(s(),d(n(h),{key:1,class:`size-3.5`})),t(` `+u(a.location||`Online`),1)])):f(``,!0)]),a.thumb_url?(s(),i(`img`,{key:0,src:a.thumb_url,alt:``,loading:`lazy`,class:`hidden h-16 w-28 shrink-0 rounded-md object-cover sm:block`},null,8,A)):f(``,!0)]),_:2},1032,[`href`])]))),128))])]))),128))])):(s(),i(`div`,j,[e(b,{icon:n(_),title:`Keine anstehenden Termine`,text:`Neue Termine erscheinen hier, sobald sie eingetragen sind.`},null,8,[`icon`])]))]),_:1}))}};export{M as default};
|
||||
File diff suppressed because one or more lines are too long
1
public/build/assets/Index-BjHFR2Wc.js
Normal file
1
public/build/assets/Index-BjHFR2Wc.js
Normal file
File diff suppressed because one or more lines are too long
1
public/build/assets/Index-CX11WxUX.js
Normal file
1
public/build/assets/Index-CX11WxUX.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
import{D as e,E as t,On as n,_ as r,b as i,bt as a,mt as o,o as s,qt as c,tr as l,v as u,y as d}from"./runtime-core.esm-bundler-B8D2lM98.js";import"./app-Dy5FbYkt.js";import{s as f}from"./RovingFocusGroup-NIVUjBd5.js";import{t as p}from"./AppLayout-X0y7XSjx.js";import{r as m,t as h}from"./FolderTile-CFCj9eng.js";import{t as g}from"./EmptyState-Ceq4v8mE.js";import{t as _}from"./PageHeader-Dcr3nLVu.js";import{t as v}from"./button-SRYY3-ko.js";import{t as y}from"./QmSearchBox-DmD7IrDS.js";var b=[`href`],x={key:0,class:`grid gap-8`},S={class:`mb-3 flex items-center gap-3`},C={class:`text-sm font-semibold tracking-wide whitespace-nowrap text-muted-foreground uppercase`},w={class:`grid grid-cols-[repeat(auto-fill,minmax(13rem,1fr))] gap-4`},T={key:1,class:`rounded-lg border bg-card`},E=[`href`],D={__name:`Index`,props:{categories:{type:Array,required:!0},canManage:{type:Boolean,default:!1},adminUrl:{type:String,default:null}},setup(D){return(O,k)=>(o(),u(p,{title:`Qualitätsmanagement`},{default:c(()=>[e(_,{title:`Qualitätsmanagement`,description:`Verfahrensanweisungen, Standards und Formulare – immer in der gültigen Fassung.`},{actions:c(()=>[D.adminUrl?(o(),u(n(v),{key:0,variant:`outline`,class:`h-10`,"as-child":``},{default:c(()=>[r(`a`,{href:D.adminUrl},[e(n(m)),k[0]||=t(` Ordner verwalten`,-1)],8,b)]),_:1})):d(``,!0),e(y)]),_:1}),D.categories.length?(o(),i(`div`,x,[(o(!0),i(s,null,a(D.categories,e=>(o(),i(`section`,{key:e.id??`rest`},[r(`div`,S,[r(`h2`,C,l(e.name),1),k[1]||=r(`span`,{class:`h-px flex-1 bg-border`,"aria-hidden":`true`},null,-1)]),r(`div`,w,[(o(!0),i(s,null,a(e.folders,e=>(o(),u(h,{key:e.id,folder:e},null,8,[`folder`]))),128))])]))),128))])):(o(),i(`div`,T,[e(g,{icon:n(f),title:`Noch keine Ordner`,text:D.canManage?`Legen Sie Kategorien und Ordner im Admin-Bereich unter „Qualitätsmanagement“ an.`:`Hier erscheinen bald die QM-Dokumente.`},{default:c(()=>[D.adminUrl?(o(),u(n(v),{key:0,class:`mt-4`,"as-child":``},{default:c(()=>[r(`a`,{href:D.adminUrl},`Ordner anlegen`,8,E)]),_:1})):d(``,!0)]),_:1},8,[`icon`,`text`])]))]),_:1}))}};export{D as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{D as e,E as t,On as n,Zn as r,_ as i,b as a,bt as o,mt as s,o as c,qt as l,tr as u,v as d,w as f,y as p}from"./runtime-core.esm-bundler-B8D2lM98.js";import{a as m,n as h}from"./app-CIvn5Z1l.js";import{B as g}from"./AppIcon-BVHFLm12.js";import{t as _}from"./AppLayout-Cy38OwfZ.js";import{t as v}from"./chevron-left-CfNljcKt.js";import{t as y}from"./chevron-right-DR4LjgDm.js";import{t as b}from"./pen-line-AST4G_M5.js";import{t as x}from"./EmptyState-Ceq4v8mE.js";import{t as S}from"./PageHeader-CWL5ThBH.js";import{t as C}from"./button-SRYY3-ko.js";import{t as w}from"./NewsCard-CWMFENyt.js";var T={key:0,class:`mb-6 flex flex-wrap gap-2`,"aria-label":`Kategorien`},E={key:1,class:`grid gap-5 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4`},D={key:2,class:`rounded-lg border border-dashed bg-card`},O={key:3,class:`mt-8 flex items-center justify-between`,"aria-label":`Seiten`},k={class:`text-sm text-muted-foreground`},A={class:`flex gap-2`},j={__name:`Index`,props:{posts:{type:Object,required:!0},categories:{type:Array,required:!0},activeCategory:{type:String,default:null},canWrite:{type:Boolean,default:!1}},setup(j){return(M,N)=>(s(),d(_,{title:`Neuigkeiten`},{default:l(()=>[e(S,{title:`Neuigkeiten`,description:`Aktuelles aus dem Unternehmen und den Bereichen.`},f({_:2},[j.canWrite?{name:`actions`,fn:l(()=>[e(n(C),{"as-child":``},{default:l(()=>[e(n(h),{href:`/redaktion/neuigkeiten/neu`},{default:l(()=>[e(n(b)),N[2]||=t(` Beitrag schreiben`,-1)]),_:1})]),_:1})]),key:`0`}:void 0]),1024),j.categories.length?(s(),a(`nav`,T,[e(n(h),{href:`/neuigkeiten`,class:r([`rounded-full border px-3.5 py-1.5 text-[13px] font-medium transition-colors`,j.activeCategory?`bg-card hover:bg-accent`:`border-brand bg-brand text-brand-foreground`]),"preserve-scroll":``},{default:l(()=>[...N[3]||=[t(` Alle `,-1)]]),_:1},8,[`class`]),(s(!0),a(c,null,o(j.categories,e=>(s(),d(n(h),{key:e.slug,href:`/neuigkeiten?kategorie=${e.slug}`,class:r([`rounded-full border px-3.5 py-1.5 text-[13px] font-medium transition-colors`,j.activeCategory===e.slug?`border-brand bg-brand text-brand-foreground`:`bg-card hover:bg-accent`]),"preserve-scroll":``},{default:l(()=>[t(u(e.name),1)]),_:2},1032,[`href`,`class`]))),128))])):p(``,!0),j.posts.data.length?(s(),a(`div`,E,[(s(!0),a(c,null,o(j.posts.data,e=>(s(),d(w,{key:e.id,post:e},null,8,[`post`]))),128))])):(s(),a(`div`,D,[e(x,{icon:n(g),title:`Keine Beiträge`,text:`In dieser Kategorie ist noch nichts veröffentlicht.`},null,8,[`icon`])])),j.posts.meta.last_page>1?(s(),a(`nav`,O,[i(`p`,k,`Seite `+u(j.posts.meta.current_page)+` von `+u(j.posts.meta.last_page),1),i(`div`,A,[e(n(C),{variant:`outline`,size:`sm`,disabled:!j.posts.links.prev,onClick:N[0]||=e=>n(m).get(j.posts.links.prev)},{default:l(()=>[e(n(v)),N[4]||=t(` Neuere`,-1)]),_:1},8,[`disabled`]),e(n(C),{variant:`outline`,size:`sm`,disabled:!j.posts.links.next,onClick:N[1]||=e=>n(m).get(j.posts.links.next)},{default:l(()=>[N[5]||=t(`Ältere `,-1),e(n(y))]),_:1},8,[`disabled`])])])):p(``,!0)]),_:1}))}};export{j as default};
|
||||
import{D as e,E as t,On as n,Zn as r,_ as i,b as a,bt as o,mt as s,o as c,qt as l,tr as u,v as d,w as f,y as p}from"./runtime-core.esm-bundler-B8D2lM98.js";import{a as m,n as h}from"./app-Dy5FbYkt.js";import{B as g}from"./AppIcon-SVMShh8s.js";import{t as _}from"./AppLayout-X0y7XSjx.js";import{t as v}from"./chevron-left-CfNljcKt.js";import{t as y}from"./chevron-right-DR4LjgDm.js";import{t as b}from"./pen-line-AST4G_M5.js";import{t as x}from"./EmptyState-Ceq4v8mE.js";import{t as S}from"./PageHeader-Dcr3nLVu.js";import{t as C}from"./button-SRYY3-ko.js";import{t as w}from"./NewsCard-BnbSPjUt.js";var T={key:0,class:`mb-6 flex flex-wrap gap-2`,"aria-label":`Kategorien`},E={key:1,class:`grid gap-5 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4`},D={key:2,class:`rounded-lg border border-dashed bg-card`},O={key:3,class:`mt-8 flex items-center justify-between`,"aria-label":`Seiten`},k={class:`text-sm text-muted-foreground`},A={class:`flex gap-2`},j={__name:`Index`,props:{posts:{type:Object,required:!0},categories:{type:Array,required:!0},activeCategory:{type:String,default:null},canWrite:{type:Boolean,default:!1}},setup(j){return(M,N)=>(s(),d(_,{title:`Neuigkeiten`},{default:l(()=>[e(S,{title:`Neuigkeiten`,description:`Aktuelles aus dem Unternehmen und den Bereichen.`},f({_:2},[j.canWrite?{name:`actions`,fn:l(()=>[e(n(C),{"as-child":``},{default:l(()=>[e(n(h),{href:`/redaktion/neuigkeiten/neu`},{default:l(()=>[e(n(b)),N[2]||=t(` Beitrag schreiben`,-1)]),_:1})]),_:1})]),key:`0`}:void 0]),1024),j.categories.length?(s(),a(`nav`,T,[e(n(h),{href:`/neuigkeiten`,class:r([`rounded-full border px-3.5 py-1.5 text-[13px] font-medium transition-colors`,j.activeCategory?`bg-card hover:bg-accent`:`border-brand bg-brand text-brand-foreground`]),"preserve-scroll":``},{default:l(()=>[...N[3]||=[t(` Alle `,-1)]]),_:1},8,[`class`]),(s(!0),a(c,null,o(j.categories,e=>(s(),d(n(h),{key:e.slug,href:`/neuigkeiten?kategorie=${e.slug}`,class:r([`rounded-full border px-3.5 py-1.5 text-[13px] font-medium transition-colors`,j.activeCategory===e.slug?`border-brand bg-brand text-brand-foreground`:`bg-card hover:bg-accent`]),"preserve-scroll":``},{default:l(()=>[t(u(e.name),1)]),_:2},1032,[`href`,`class`]))),128))])):p(``,!0),j.posts.data.length?(s(),a(`div`,E,[(s(!0),a(c,null,o(j.posts.data,e=>(s(),d(w,{key:e.id,post:e},null,8,[`post`]))),128))])):(s(),a(`div`,D,[e(x,{icon:n(g),title:`Keine Beiträge`,text:`In dieser Kategorie ist noch nichts veröffentlicht.`},null,8,[`icon`])])),j.posts.meta.last_page>1?(s(),a(`nav`,O,[i(`p`,k,`Seite `+u(j.posts.meta.current_page)+` von `+u(j.posts.meta.last_page),1),i(`div`,A,[e(n(C),{variant:`outline`,size:`sm`,disabled:!j.posts.links.prev,onClick:N[0]||=e=>n(m).get(j.posts.links.prev)},{default:l(()=>[e(n(v)),N[4]||=t(` Neuere`,-1)]),_:1},8,[`disabled`]),e(n(C),{variant:`outline`,size:`sm`,disabled:!j.posts.links.next,onClick:N[1]||=e=>n(m).get(j.posts.links.next)},{default:l(()=>[N[5]||=t(`Ältere `,-1),e(n(y))]),_:1},8,[`disabled`])])])):p(``,!0)]),_:1}))}};export{j as default};
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/EditorialForms-Di1_sGWd.js","assets/runtime-core.esm-bundler-B8D2lM98.js","assets/app-CIvn5Z1l.js","assets/runtime-dom.esm-bundler-BEWGoe8n.js","assets/app-BZMCjaRn.css","assets/download-cH_7CRKx.js","assets/dist-CleIz2GP.js","assets/pencil-line-Cp-EHBoW.js","assets/plus-cKZvz4wH.js","assets/table-properties-B82lvC7D.js","assets/button-SRYY3-ko.js","assets/Panel-xPHuwfuu.js","assets/chevron-right-DR4LjgDm.js","assets/EditorialNews-B8R4_r-1.js","assets/AppIcon-BVHFLm12.js","assets/usePrimitiveElement-BOk1PFhF.js","assets/RovingFocusGroup-NIVUjBd5.js","assets/http-9R3L4KBg.js","assets/message-square-warning-CUD7Iy66.js","assets/EditorialPages-CIn86wBI.js","assets/lock-4X8Kfof0.js","assets/NewPageDialog-BbIzQTb2.js","assets/DialogHeader-ByFe3nCF.js","assets/Input-CgjHXzkf.js","assets/dist-BRRmd-wM.js","assets/dialog-bBqX5pN5.js"])))=>i.map(i=>d[i]);
|
||||
import{D as e,O as t,_ as n,b as r,bt as i,et as a,mt as o,o as s,qt as c,v as l,wt as u}from"./runtime-core.esm-bundler-B8D2lM98.js";import{o as d}from"./app-CIvn5Z1l.js";import{t as f}from"./AppLayout-Cy38OwfZ.js";import{t as p}from"./PageHeader-CWL5ThBH.js";var m={class:`grid items-start gap-6 xl:grid-cols-2`},h={__name:`Index`,props:{sections:{type:Array,required:!0}},setup(h){let g=Object.assign({"../../../../plugins-core/forms/resources/js/editorial/EditorialForms.vue":()=>d(()=>import(`./EditorialForms-Di1_sGWd.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])),"../../../../plugins-core/news/resources/js/editorial/EditorialNews.vue":()=>d(()=>import(`./EditorialNews-B8R4_r-1.js`),__vite__mapDeps([13,1,2,3,4,14,15,6,16,17,18,8,10,11,12])),"../../../../plugins-core/pages/resources/js/editorial/EditorialPages.vue":()=>d(()=>import(`./EditorialPages-CIn86wBI.js`),__vite__mapDeps([19,1,2,3,4,14,15,6,16,17,20,8,10,11,12,21,22,23,24,25]))}),_={};for(let[e,n]of Object.entries(g)){let[,r]=e.match(/plugins-core\/([^/]+)\//);_[`${r}::${e.split(`/`).pop().replace(`.vue`,``)}`]=t(n)}return(t,d)=>(o(),l(f,{title:`Redaktion`},{default:c(()=>[e(p,{title:`Redaktion`,description:`Ihre Seiten und Beiträge – Entwürfe, Freigaben und Geplantes.`}),n(`div`,m,[(o(!0),r(s,null,i(h.sections,e=>(o(),l(u(_[e.component]),a({key:e.key},{ref_for:!0},e.props),null,16))),128))])]),_:1}))}};export{h as default};
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/EditorialForms-DKd7Ncoz.js","assets/runtime-core.esm-bundler-B8D2lM98.js","assets/app-Dy5FbYkt.js","assets/runtime-dom.esm-bundler-BEWGoe8n.js","assets/app-BXGstlVh.css","assets/download-cH_7CRKx.js","assets/dist-CleIz2GP.js","assets/pencil-line-Cp-EHBoW.js","assets/plus-cKZvz4wH.js","assets/table-properties-B82lvC7D.js","assets/button-SRYY3-ko.js","assets/Panel-DF-wChKt.js","assets/chevron-right-DR4LjgDm.js","assets/EditorialNews-C9f0OExj.js","assets/AppIcon-SVMShh8s.js","assets/usePrimitiveElement-BOk1PFhF.js","assets/RovingFocusGroup-NIVUjBd5.js","assets/http-9R3L4KBg.js","assets/message-square-warning-CUD7Iy66.js","assets/EditorialPages-DcM9sgTM.js","assets/lock-4X8Kfof0.js","assets/NewPageDialog-B5SW-nak.js","assets/DialogHeader-UfXa7NWq.js","assets/Input-CgjHXzkf.js","assets/dist-BRRmd-wM.js","assets/dialog-DrnG5a9r.js"])))=>i.map(i=>d[i]);
|
||||
import{D as e,O as t,_ as n,b as r,bt as i,et as a,mt as o,o as s,qt as c,v as l,wt as u}from"./runtime-core.esm-bundler-B8D2lM98.js";import{o as d}from"./app-Dy5FbYkt.js";import{t as f}from"./AppLayout-X0y7XSjx.js";import{t as p}from"./PageHeader-Dcr3nLVu.js";var m={class:`grid items-start gap-6 xl:grid-cols-2`},h={__name:`Index`,props:{sections:{type:Array,required:!0}},setup(h){let g=Object.assign({"../../../../plugins-core/forms/resources/js/editorial/EditorialForms.vue":()=>d(()=>import(`./EditorialForms-DKd7Ncoz.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])),"../../../../plugins-core/news/resources/js/editorial/EditorialNews.vue":()=>d(()=>import(`./EditorialNews-C9f0OExj.js`),__vite__mapDeps([13,1,2,3,4,14,15,6,16,17,18,8,10,11,12])),"../../../../plugins-core/pages/resources/js/editorial/EditorialPages.vue":()=>d(()=>import(`./EditorialPages-DcM9sgTM.js`),__vite__mapDeps([19,1,2,3,4,14,15,6,16,17,20,8,10,11,12,21,22,23,24,25]))}),_={};for(let[e,n]of Object.entries(g)){let[,r]=e.match(/plugins-core\/([^/]+)\//);_[`${r}::${e.split(`/`).pop().replace(`.vue`,``)}`]=t(n)}return(t,d)=>(o(),l(f,{title:`Redaktion`},{default:c(()=>[e(p,{title:`Redaktion`,description:`Ihre Seiten und Beiträge – Entwürfe, Freigaben und Geplantes.`}),n(`div`,m,[(o(!0),r(s,null,i(h.sections,e=>(o(),l(u(_[e.component]),a({key:e.key},{ref_for:!0},e.props),null,16))),128))])]),_:1}))}};export{h as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{D as e,E as t,On as n,Zn as r,_ as i,b as a,bt as o,g as s,mt as c,o as l,qt as u,tr as d,v as f,y as p}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as m}from"./app-CIvn5Z1l.js";import{it as h}from"./AppIcon-BVHFLm12.js";import{t as g}from"./AppLayout-Cy38OwfZ.js";import{t as _}from"./BirthdayItem-DK6xURSZ.js";import{t as v}from"./EmptyState-Ceq4v8mE.js";import{t as y}from"./PageHeader-CWL5ThBH.js";var b={class:`mx-auto max-w-3xl`},x={key:0,class:`mb-6 rounded-lg border bg-card px-4 py-3 text-sm`},S={key:1,class:`grid gap-5`},C={class:`divide-y px-5`},w={key:2,class:`rounded-lg border bg-card`},T={__name:`Index`,props:{birthdays:{type:Array,required:!0},scope:{type:String,required:!0},registered:{type:Boolean,default:!1}},setup(T){let E=T,D=s(()=>{let e=[];for(let t of E.birthdays){let n=e.at(-1);n&&n.date===t.date?n.items.push(t):e.push({date:t.date,today:t.today,items:[t]})}return e}),O=e=>e.today?`Heute`:new Intl.DateTimeFormat(`de-DE`,{weekday:`long`,day:`numeric`,month:`long`}).format(new Date(`${e.date}T12:00:00`));return(s,E)=>(c(),f(g,{title:`Geburtstage`},{default:u(()=>[i(`div`,b,[e(y,{title:`Geburtstage`,description:`Die nächsten 30 Tage · ${T.scope}`},null,8,[`description`]),T.registered?p(``,!0):(c(),a(`p`,x,[E[1]||=t(` Sie möchten auch in der Liste stehen? Tragen Sie Tag und Monat unter `,-1),e(n(m),{href:`/profil/bearbeiten`,class:`font-medium text-brand-text hover:underline`},{default:u(()=>[...E[0]||=[t(`Profil bearbeiten`,-1)]]),_:1}),E[2]||=t(` ein. `,-1)])),D.value.length?(c(),a(`div`,S,[(c(!0),a(l,null,o(D.value,e=>(c(),a(`section`,{key:e.date,class:`rounded-lg border bg-card`},[i(`h2`,{class:r([`border-b px-5 py-3 text-sm font-semibold`,e.today?`text-brand-text`:``])},d(O(e)),3),i(`div`,C,[(c(!0),a(l,null,o(e.items,e=>(c(),f(_,{key:e.person.id,item:e},null,8,[`item`]))),128))])]))),128))])):(c(),a(`div`,w,[e(v,{icon:n(h),title:`Keine Geburtstage in den nächsten 30 Tagen`},null,8,[`icon`])]))])]),_:1}))}};export{T as default};
|
||||
import{D as e,E as t,On as n,Zn as r,_ as i,b as a,bt as o,g as s,mt as c,o as l,qt as u,tr as d,v as f,y as p}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as m}from"./app-Dy5FbYkt.js";import{it as h}from"./AppIcon-SVMShh8s.js";import{t as g}from"./AppLayout-X0y7XSjx.js";import{t as _}from"./BirthdayItem-1R7P_7L0.js";import{t as v}from"./EmptyState-Ceq4v8mE.js";import{t as y}from"./PageHeader-Dcr3nLVu.js";var b={class:`mx-auto max-w-3xl`},x={key:0,class:`mb-6 rounded-lg border bg-card px-4 py-3 text-sm`},S={key:1,class:`grid gap-5`},C={class:`divide-y px-5`},w={key:2,class:`rounded-lg border bg-card`},T={__name:`Index`,props:{birthdays:{type:Array,required:!0},scope:{type:String,required:!0},registered:{type:Boolean,default:!1}},setup(T){let E=T,D=s(()=>{let e=[];for(let t of E.birthdays){let n=e.at(-1);n&&n.date===t.date?n.items.push(t):e.push({date:t.date,today:t.today,items:[t]})}return e}),O=e=>e.today?`Heute`:new Intl.DateTimeFormat(`de-DE`,{weekday:`long`,day:`numeric`,month:`long`}).format(new Date(`${e.date}T12:00:00`));return(s,E)=>(c(),f(g,{title:`Geburtstage`},{default:u(()=>[i(`div`,b,[e(y,{title:`Geburtstage`,description:`Die nächsten 30 Tage · ${T.scope}`},null,8,[`description`]),T.registered?p(``,!0):(c(),a(`p`,x,[E[1]||=t(` Sie möchten auch in der Liste stehen? Tragen Sie Tag und Monat unter `,-1),e(n(m),{href:`/profil/bearbeiten`,class:`font-medium text-brand-text hover:underline`},{default:u(()=>[...E[0]||=[t(`Profil bearbeiten`,-1)]]),_:1}),E[2]||=t(` ein. `,-1)])),D.value.length?(c(),a(`div`,S,[(c(!0),a(l,null,o(D.value,e=>(c(),a(`section`,{key:e.date,class:`rounded-lg border bg-card`},[i(`h2`,{class:r([`border-b px-5 py-3 text-sm font-semibold`,e.today?`text-brand-text`:``])},d(O(e)),3),i(`div`,C,[(c(!0),a(l,null,o(e.items,e=>(c(),f(_,{key:e.person.id,item:e},null,8,[`item`]))),128))])]))),128))])):(c(),a(`div`,w,[e(v,{icon:n(h),title:`Keine Geburtstage in den nächsten 30 Tagen`},null,8,[`icon`])]))])]),_:1}))}};export{T as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{D as e,E as t,On as n,_ as r,b as i,bt as a,mt as o,o as s,qt as c,tr as l,v as u,vn as d,w as f,y as p}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as m}from"./app-CIvn5Z1l.js";import{$ as h,Q as g}from"./AppIcon-BVHFLm12.js";import{t as _}from"./AppLayout-Cy38OwfZ.js";import{t as v}from"./chevron-right-DR4LjgDm.js";import{t as y}from"./plus-cKZvz4wH.js";import{t as b}from"./EmptyState-Ceq4v8mE.js";import{t as x}from"./PageHeader-CWL5ThBH.js";import{t as S}from"./button-SRYY3-ko.js";import{t as C}from"./NewPageDialog-BbIzQTb2.js";var w={key:0,class:`grid gap-5 md:grid-cols-2 xl:grid-cols-3`},T={class:`grid size-10 shrink-0 place-items-center rounded-lg bg-brand-soft text-brand-text`},E={class:`min-w-0 flex-1 truncate font-semibold`},D={key:0,class:`grid p-2`},O={class:`truncate`},k={key:0,class:`text-xs text-muted-foreground`},A={key:0,class:`px-3 py-1.5 text-[13px]`},j={key:1,class:`rounded-lg border bg-card`},M={__name:`Index`,props:{tree:{type:Array,required:!0},canCreate:{type:Boolean,default:!1}},setup(M){let N=d(!1);return(d,P)=>(o(),u(_,{title:`Seiten`},{default:c(()=>[e(x,{title:`Seiten`,description:`Informationen der Bereiche, Abteilungen und Gremien.`},f({_:2},[M.canCreate?{name:`actions`,fn:c(()=>[e(n(S),{onClick:P[0]||=e=>N.value=!0},{default:c(()=>[e(n(y)),P[2]||=t(` Neue Seite`,-1)]),_:1})]),key:`0`}:void 0]),1024),M.tree.length?(o(),i(`div`,w,[(o(!0),i(s,null,a(M.tree,d=>(o(),i(`section`,{key:d.id,class:`rounded-lg border bg-card`},[e(n(m),{href:d.url,class:`flex items-center gap-3 border-b px-5 py-4 hover:bg-accent/50`},{default:c(()=>[r(`span`,T,[d.children.length?(o(),u(n(g),{key:0,class:`size-5`})):(o(),u(n(h),{key:1,class:`size-5`}))]),r(`span`,E,l(d.title),1),e(n(v),{class:`size-4 text-muted-foreground`})]),_:2},1032,[`href`]),d.children.length?(o(),i(`ul`,D,[(o(!0),i(s,null,a(d.children.slice(0,8),t=>(o(),i(`li`,{key:t.id},[e(n(m),{href:t.url,class:`flex items-center justify-between rounded-md px-3 py-2 text-sm hover:bg-accent`},{default:c(()=>[r(`span`,O,l(t.title),1),t.children.length?(o(),i(`span`,k,l(t.children.length),1)):p(``,!0)]),_:2},1032,[`href`])]))),128)),d.children.length>8?(o(),i(`li`,A,[e(n(m),{href:d.url,class:`font-medium text-brand-text hover:underline`},{default:c(()=>[t(`Alle `+l(d.children.length)+` Seiten`,1)]),_:2},1032,[`href`])])):p(``,!0)])):p(``,!0)]))),128))])):(o(),i(`div`,j,[e(b,{icon:n(h),title:`Noch keine Seiten`,text:`Hier erscheinen Seiten, sobald sie veröffentlicht sind.`},null,8,[`icon`])])),e(C,{open:N.value,"onUpdate:open":P[1]||=e=>N.value=e},null,8,[`open`])]),_:1}))}};export{M as default};
|
||||
import{D as e,E as t,On as n,_ as r,b as i,bt as a,mt as o,o as s,qt as c,tr as l,v as u,vn as d,w as f,y as p}from"./runtime-core.esm-bundler-B8D2lM98.js";import{n as m}from"./app-Dy5FbYkt.js";import{$ as h,Q as g}from"./AppIcon-SVMShh8s.js";import{t as _}from"./AppLayout-X0y7XSjx.js";import{t as v}from"./chevron-right-DR4LjgDm.js";import{t as y}from"./plus-cKZvz4wH.js";import{t as b}from"./EmptyState-Ceq4v8mE.js";import{t as x}from"./PageHeader-Dcr3nLVu.js";import{t as S}from"./button-SRYY3-ko.js";import{t as C}from"./NewPageDialog-B5SW-nak.js";var w={key:0,class:`grid gap-5 md:grid-cols-2 xl:grid-cols-3`},T={class:`grid size-10 shrink-0 place-items-center rounded-lg bg-brand-soft text-brand-text`},E={class:`min-w-0 flex-1 truncate font-semibold`},D={key:0,class:`grid p-2`},O={class:`truncate`},k={key:0,class:`text-xs text-muted-foreground`},A={key:0,class:`px-3 py-1.5 text-[13px]`},j={key:1,class:`rounded-lg border bg-card`},M={__name:`Index`,props:{tree:{type:Array,required:!0},canCreate:{type:Boolean,default:!1}},setup(M){let N=d(!1);return(d,P)=>(o(),u(_,{title:`Seiten`},{default:c(()=>[e(x,{title:`Seiten`,description:`Informationen der Bereiche, Abteilungen und Gremien.`},f({_:2},[M.canCreate?{name:`actions`,fn:c(()=>[e(n(S),{onClick:P[0]||=e=>N.value=!0},{default:c(()=>[e(n(y)),P[2]||=t(` Neue Seite`,-1)]),_:1})]),key:`0`}:void 0]),1024),M.tree.length?(o(),i(`div`,w,[(o(!0),i(s,null,a(M.tree,d=>(o(),i(`section`,{key:d.id,class:`rounded-lg border bg-card`},[e(n(m),{href:d.url,class:`flex items-center gap-3 border-b px-5 py-4 hover:bg-accent/50`},{default:c(()=>[r(`span`,T,[d.children.length?(o(),u(n(g),{key:0,class:`size-5`})):(o(),u(n(h),{key:1,class:`size-5`}))]),r(`span`,E,l(d.title),1),e(n(v),{class:`size-4 text-muted-foreground`})]),_:2},1032,[`href`]),d.children.length?(o(),i(`ul`,D,[(o(!0),i(s,null,a(d.children.slice(0,8),t=>(o(),i(`li`,{key:t.id},[e(n(m),{href:t.url,class:`flex items-center justify-between rounded-md px-3 py-2 text-sm hover:bg-accent`},{default:c(()=>[r(`span`,O,l(t.title),1),t.children.length?(o(),i(`span`,k,l(t.children.length),1)):p(``,!0)]),_:2},1032,[`href`])]))),128)),d.children.length>8?(o(),i(`li`,A,[e(n(m),{href:d.url,class:`font-medium text-brand-text hover:underline`},{default:c(()=>[t(`Alle `+l(d.children.length)+` Seiten`,1)]),_:2},1032,[`href`])])):p(``,!0)])):p(``,!0)]))),128))])):(o(),i(`div`,j,[e(b,{icon:n(h),title:`Noch keine Seiten`,text:`Hier erscheinen Seiten, sobald sie veröffentlicht sind.`},null,8,[`icon`])])),e(C,{open:N.value,"onUpdate:open":P[1]||=e=>N.value=e},null,8,[`open`])]),_:1}))}};export{M as default};
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue