Phase 6 (Teil 1): Dokumente und Organigramm

- Dokumente-Plugin: Ordnerbaum mit vererbten Rechten und Sichtbarkeit,
  Hochladen per Ziehen und Ablegen, Versionen, Suche, Pagebuilder-Block
- Organigramm aus den Vorgesetzten, Vorgesetzte im Admin pflegbar
- Personensuche im Kopf übernimmt nur noch Suchbegriffe des Verzeichnisses

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-26 11:37:59 +00:00
parent 21c706e5f5
commit d6d5d4b0fe
110 changed files with 2209 additions and 208 deletions

View file

@ -0,0 +1,32 @@
<script setup>
import { Link } from '@inertiajs/vue3';
import { ChevronRight, Download } from '@lucide/vue';
import FileIcon from '../components/FileIcon.vue';
defineProps({ block: { type: Object, required: true } });
const formatSize = (bytes) => (bytes >= 1024 * 1024 ? `${(bytes / 1024 / 1024).toFixed(1).replace('.', ',')} MB` : `${Math.max(1, Math.round(bytes / 1024))} KB`);
</script>
<template>
<section v-if="block.props">
<div v-if="block.data.title" class="mb-3 flex items-center justify-between gap-4">
<h3 class="text-lg font-semibold">{{ block.data.title }}</h3>
<Link :href="block.props.folder_url" class="inline-flex items-center gap-0.5 text-[13px] font-medium text-brand-text hover:underline">Zum Ordner <ChevronRight class="size-3.5" /></Link>
</div>
<ul class="divide-y rounded-lg border bg-card">
<li v-for="doc in block.props.documents" :key="doc.id">
<a :href="doc.download_url" class="group flex items-center gap-3 px-4 py-3 hover:bg-accent/50">
<FileIcon :extension="doc.extension" />
<span class="min-w-0 flex-1">
<span class="block truncate text-sm font-medium group-hover:underline">{{ doc.title }}</span>
<span v-if="block.data.show_description && doc.description" class="block truncate text-[13px] text-muted-foreground">{{ doc.description }}</span>
<span class="block text-xs text-muted-foreground">{{ doc.extension }} · {{ formatSize(doc.size) }}</span>
</span>
<Download class="size-4 shrink-0 text-muted-foreground" />
</a>
</li>
<li v-if="!block.props.documents.length" class="px-4 py-3 text-sm text-muted-foreground">Keine Dokumente in diesem Ordner.</li>
</ul>
</section>
</template>