Loheide-eu-mitarbeiterplatt.../resources/js/pages/Profile/Show.vue
Friederich Loheide 5a3f1f34c7
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 1m3s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m7s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 1m16s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 1m20s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m29s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m33s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 1m28s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m33s
CI / Build-Artefakte aktuell (pull_request) Failing after 52s
Neues Design: Tailwind + shadcn-vue statt Vuetify/Material 3
- Nüchterne, professionelle Optik: neutrale Flächen, Markenfarbe nur als Akzent, Inter-Schrift (lokal)
- Zweizeiliger Header mit Suche, Hauptnavigation und Avatar-Menü
- Startseite mit Begrüßungskarte, Schnellzugriffen und „Neu im Team“
- Personenverzeichnis mit Suche, Abteilungsfilter und Seitenaufteilung
- Markenfarbe exakt übernommen, Abstufungen serverseitig in OKLCH (ColorPalette) –
  gemeinsam für Portal und Admin, keine Farbberechnung im Browser
- Schnellzugriffe im Admin pflegbar
- Filament-Avatare lokal statt über ui-avatars.com (DSGVO)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 20:51:53 +00:00

69 lines
3.6 KiB
Vue

<script setup>
import { computed } from 'vue';
import { Link } from '@inertiajs/vue3';
import { Building2, Mail, MapPin, Phone, Smartphone, UserRoundPen } from '@lucide/vue';
import { Button } from '@/components/ui/button';
import Panel from '@/components/Panel.vue';
import PersonAvatar from '@/components/PersonAvatar.vue';
import AppLayout from '@/layouts/AppLayout.vue';
const props = defineProps({
person: { type: Object, required: true },
isOwnProfile: { type: Boolean, default: false },
});
const contact = computed(() => [
{ icon: Mail, label: 'E-Mail', value: props.person.email, href: `mailto:${props.person.email}` },
{ icon: Phone, label: 'Telefon', value: props.person.phone, href: props.person.phone && `tel:${props.person.phone}` },
{ icon: Smartphone, label: 'Mobil', value: props.person.mobile, href: props.person.mobile && `tel:${props.person.mobile}` },
{ icon: Building2, label: 'Abteilung', value: props.person.department },
{ icon: MapPin, label: 'Standort', value: props.person.location },
].filter((item) => item.value));
</script>
<template>
<AppLayout :title="person.name">
<section class="overflow-hidden rounded-lg border bg-card">
<div class="h-28 bg-brand sm:h-32" style="background-image: linear-gradient(120deg, transparent 40%, rgb(255 255 255 / 0.08))" />
<div class="flex flex-col gap-4 px-6 pb-6 sm:flex-row sm:items-end sm:justify-between">
<div class="flex flex-col gap-4 sm:flex-row sm:items-end">
<PersonAvatar :person="person" class="-mt-14 size-28 text-2xl ring-4 ring-card" />
<div class="sm:pb-1">
<h1 class="text-2xl font-semibold tracking-tight">{{ person.name }}</h1>
<p v-if="person.job_title" class="mt-0.5 text-[15px] text-muted-foreground">{{ person.job_title }}</p>
</div>
</div>
<div class="flex gap-2 sm:pb-1">
<Button v-if="isOwnProfile" variant="outline" as-child>
<Link href="/profil/bearbeiten"><UserRoundPen /> Profil bearbeiten</Link>
</Button>
<Button v-else as-child>
<a :href="`mailto:${person.email}`"><Mail /> E-Mail schreiben</a>
</Button>
</div>
</div>
</section>
<div class="mt-6 grid gap-6 lg:grid-cols-12">
<Panel title="Kontakt" class="lg:col-span-5">
<dl class="grid gap-4">
<div v-for="item in contact" :key="item.label" class="flex items-start gap-3">
<component :is="item.icon" class="mt-0.5 size-4 shrink-0 text-muted-foreground" />
<div class="min-w-0">
<dt class="text-xs text-muted-foreground">{{ item.label }}</dt>
<dd class="truncate text-sm">
<a v-if="item.href" :href="item.href" class="text-brand-text hover:underline">{{ item.value }}</a>
<template v-else>{{ item.value }}</template>
</dd>
</div>
</div>
</dl>
</Panel>
<Panel title="Über mich" class="lg:col-span-7">
<p v-if="person.about" class="text-sm leading-relaxed whitespace-pre-line">{{ person.about }}</p>
<p v-else class="text-sm text-muted-foreground">Noch keine Angaben.</p>
</Panel>
</div>
</AppLayout>
</template>