Menü-Editor, farbige Initialen, Seitenköpfe, Favoriten, Vorschaubilder
All checks were successful
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 2m55s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m44s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 3m25s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 3m39s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 3m47s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 3m51s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 3m16s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 3m25s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m10s

- Admin → Portal → Menü: Bereiche, Seiten (mit Unterseiten), Links und
  Gruppen mit Unterpunkten, sortierbar, je Rolle einschränkbar;
  Kopfzeile misst den Platz und legt Überzähliges unter „Mehr“
- Initialen in fester Farbe je Person, Abteilungsfarben im Organigramm
- PageHeader für alle Übersichtsseiten
- Dokumente: Favoriten (auch als Startseiten-Kachel), „Häufig genutzt“,
  Vorschaubilder (Bilder, erste PDF-Seite per pdf.js im Browser)
- Platzhalter beim Nachladen

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-26 13:56:57 +00:00
parent 114811e6c5
commit dda250aaad
140 changed files with 1993 additions and 427 deletions

View file

@ -0,0 +1,33 @@
<script setup>
import { Link } from '@inertiajs/vue3';
import { ChevronRight } from '@lucide/vue';
/**
* Einheitlicher Seitenkopf: Pfad, Titel, Unterzeile und Aktionen rechts.
*/
defineProps({
title: { type: String, required: true },
description: { type: String, default: '' },
breadcrumbs: { type: Array, default: () => [] }, // [{ label, href }]
});
</script>
<template>
<header class="mb-6 flex flex-wrap items-end justify-between gap-x-6 gap-y-4">
<div class="min-w-0">
<nav v-if="breadcrumbs.length" class="mb-1 flex flex-wrap items-center gap-1 text-[13px] text-muted-foreground" aria-label="Brotkrumen">
<template v-for="(crumb, index) in breadcrumbs" :key="crumb.href">
<ChevronRight v-if="index" class="size-3.5" />
<Link :href="crumb.href" class="hover:text-foreground hover:underline">{{ crumb.label }}</Link>
</template>
</nav>
<h1 class="text-2xl leading-tight font-semibold tracking-tight">{{ title }}</h1>
<p v-if="description || $slots.description" class="mt-1 max-w-3xl text-sm text-muted-foreground">
<slot name="description">{{ description }}</slot>
</p>
</div>
<div v-if="$slots.actions" class="flex w-full flex-wrap items-center gap-2 sm:w-auto">
<slot name="actions" />
</div>
</header>
</template>

View file

@ -1,17 +1,22 @@
<script setup>
import { computed } from 'vue';
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
import { colorFor } from '@/lib/colors';
import { cn } from '@/lib/utils';
defineProps({
const props = defineProps({
person: { type: Object, required: true },
class: { type: [String, Array, Object], default: '' },
});
// Ohne Foto: Initialen in einer festen Farbe je Person.
const color = computed(() => colorFor(props.person.id ?? props.person.name));
</script>
<template>
<Avatar :class="cn('size-10', $props.class)">
<AvatarImage v-if="person.avatar_url" :src="person.avatar_url" :alt="person.name" />
<AvatarFallback class="bg-brand-soft font-semibold text-brand-soft-foreground">
<AvatarFallback class="font-semibold" :class="color.soft">
{{ person.initials }}
</AvatarFallback>
</Avatar>

View file

@ -0,0 +1,15 @@
<script setup>
import { Link } from '@inertiajs/vue3';
/**
* Menülink: Portal-Adressen über Inertia, externe bzw. „neuer Tab“ als normaler Link.
*/
defineProps({
item: { type: Object, required: true },
});
</script>
<template>
<a v-if="item.new_tab || !item.href.startsWith('/')" :href="item.href" :target="item.new_tab ? '_blank' : undefined" :rel="item.new_tab ? 'noopener' : undefined"><slot /></a>
<Link v-else :href="item.href"><slot /></Link>
</template>

View file

@ -1,12 +1,14 @@
<script setup>
import { computed } from 'vue';
import { Link } from '@inertiajs/vue3';
import { ChevronDown, ChevronUp, LoaderCircle, ScanSearch } from '@lucide/vue';
import PersonAvatar from '@/components/PersonAvatar.vue';
import { colorFor } from '@/lib/colors';
/**
* Person im Organigramm. „compact“ für Mitarbeitende ohne eigenes Team.
*/
defineProps({
const props = defineProps({
person: { type: Object, required: true },
compact: { type: Boolean, default: false },
highlighted: { type: Boolean, default: false },
@ -15,18 +17,22 @@ defineProps({
});
defineEmits(['toggle', 'focus']);
// Farbe der Abteilung – als Streifen links und für die Beschriftung.
const color = computed(() => colorFor(props.person.department));
</script>
<template>
<div
:id="`person-${person.id}`"
class="group/card relative rounded-lg border bg-card text-left shadow-xs transition-shadow hover:shadow-sm"
class="group/card relative overflow-hidden rounded-lg border bg-card text-left shadow-xs transition-shadow hover:shadow-sm"
:class="[compact ? 'w-54' : 'w-56', highlighted ? 'border-brand-400 ring-3 ring-brand-300/50' : '']"
>
<span class="absolute inset-y-0 left-0 w-1 rounded-l-lg" :class="color.bar" aria-hidden="true" />
<div class="flex items-center gap-3" :class="compact ? 'px-3 py-2' : 'px-3.5 pt-3 pb-2.5'">
<PersonAvatar :person="person" :class="compact ? 'size-7 text-[10px]' : 'size-10'" />
<div class="min-w-0 flex-1">
<p v-if="person.department && !compact" class="truncate text-[10.5px] font-semibold tracking-wide text-brand-text uppercase">{{ person.department }}</p>
<p v-if="person.department && !compact" class="truncate text-[10.5px] font-semibold tracking-wide uppercase" :class="color.text">{{ person.department }}</p>
<Link :href="`/personen/${person.id}`" class="block truncate text-sm leading-tight font-semibold hover:underline">{{ person.name }}</Link>
<p class="truncate text-xs leading-tight text-muted-foreground" :title="person.job_title">{{ person.job_title || '–' }}</p>
</div>

View file

@ -1,5 +1,6 @@
<script setup>
import { computed, ref, watch } from 'vue';
import { Skeleton } from '@/components/ui/skeleton';
import { http } from '@/lib/http';
import OrgCard from './OrgCard.vue';
@ -49,7 +50,17 @@ async function toggle() {
<template>
<li>
<OrgCard :person="person" :highlighted="person.id === focus" :open="expanded" :loading="loading" @toggle="toggle" @focus="$emit('focus', $event)" />
<ul v-if="expanded && team?.length">
<ul v-if="expanded && loading" aria-busy="true">
<li>
<div class="org-members">
<div v-for="n in 3" :key="n" class="flex w-54 items-center gap-3 rounded-lg border bg-card px-3 py-2">
<Skeleton class="size-7 rounded-full" />
<div class="grid flex-1 gap-1.5"><Skeleton class="h-3 w-3/4" /><Skeleton class="h-2.5 w-1/2" /></div>
</div>
</div>
</li>
</ul>
<ul v-else-if="expanded && team?.length">
<OrgChartNode v-for="child in managers" :key="child.id" :person="child" :teams="teams" :open="open" :focus="focus" @focus="$emit('focus', $event)" />
<li v-if="members.length">
<div class="org-members" :class="{ 'org-members-wide': members.length > 8 }">

View file

@ -4,6 +4,7 @@ import { Link } from '@inertiajs/vue3';
import { ChevronUp, Mail, MapPin, Network, Phone, Smartphone, UserRound, Users } from '@lucide/vue';
import { Button } from '@/components/ui/button';
import PersonAvatar from '@/components/PersonAvatar.vue';
import { colorFor } from '@/lib/colors';
/**
* Fokus-Ansicht: eine Person mit Kontakt, rechts die Kette der Vorgesetzten und
@ -41,11 +42,12 @@ const contact = computed(() => [
<div class="grid items-start gap-5" :class="{ 'lg:grid-cols-[minmax(0,1fr)_19rem]': chain.length || peers.length }">
<div class="grid gap-5">
<!-- Person im Fokus -->
<section class="overflow-hidden rounded-lg border bg-card">
<section class="relative overflow-hidden rounded-lg border bg-card">
<span class="absolute inset-y-0 left-0 w-1" :class="colorFor(details.department).bar" aria-hidden="true" />
<div class="flex flex-col gap-5 p-5 sm:flex-row sm:items-center">
<PersonAvatar :person="details" class="size-20 text-xl ring-4 ring-brand-soft" />
<div class="min-w-0 flex-1">
<p v-if="details.department" class="text-[11px] font-semibold tracking-wide text-brand-text uppercase">{{ details.department }}</p>
<p v-if="details.department" class="text-[11px] font-semibold tracking-wide uppercase" :class="colorFor(details.department).text">{{ details.department }}</p>
<h2 class="text-xl leading-tight font-semibold tracking-tight">{{ details.name }}</h2>
<p v-if="details.job_title" class="text-sm text-muted-foreground">{{ details.job_title }}</p>
<ul class="mt-2 flex flex-wrap gap-x-4 gap-y-1 text-[13px]">

View file

@ -0,0 +1,11 @@
<script setup>
import { cn } from '@/lib/utils';
const props = defineProps({
class: { type: [String, Array, Object], default: '' },
});
</script>
<template>
<div :class="cn('animate-pulse rounded-md bg-muted', props.class)" aria-hidden="true" />
</template>

View file

@ -0,0 +1 @@
export { default as Skeleton } from './Skeleton.vue';