Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 3m42s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 4m3s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 4m32s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 4m9s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 5m41s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 6m5s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 4m57s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 4m59s
CI / Build-Artefakte aktuell (pull_request) Failing after 1m35s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
35 lines
1.9 KiB
Vue
35 lines
1.9 KiB
Vue
<script setup>
|
|
import { inject } from 'vue';
|
|
import { Link } from '@inertiajs/vue3';
|
|
import { Mail, Phone } from '@lucide/vue';
|
|
import PersonAvatar from '@/components/PersonAvatar.vue';
|
|
|
|
defineProps({ block: { type: Object, required: true } });
|
|
|
|
const editing = inject('pagebuilder:editing', false);
|
|
</script>
|
|
|
|
<template>
|
|
<section>
|
|
<h3 v-if="block.data.title" class="mb-3 text-lg font-semibold">{{ block.data.title }}</h3>
|
|
<div :class="block.data.layout === 'list' ? 'divide-y rounded-lg border bg-card' : 'grid gap-4 @xl:grid-cols-2 @4xl:grid-cols-3'">
|
|
<div
|
|
v-for="person in block.props?.people ?? []"
|
|
:key="person.id"
|
|
class="flex gap-3"
|
|
:class="block.data.layout === 'list' ? 'items-center px-4 py-3' : 'rounded-lg border bg-card p-4'"
|
|
>
|
|
<PersonAvatar :person="person" class="size-12 shrink-0" />
|
|
<div class="min-w-0">
|
|
<Link :href="`/personen/${person.id}`" class="block truncate font-semibold hover:underline">{{ person.name }}</Link>
|
|
<p v-if="person.job_title" class="truncate text-[13px] text-muted-foreground">{{ person.job_title }}</p>
|
|
<div class="mt-1.5 flex flex-wrap gap-x-4 gap-y-1 text-[13px]">
|
|
<a v-if="person.phone" :href="`tel:${person.phone}`" class="inline-flex items-center gap-1 text-brand-text hover:underline"><Phone class="size-3.5" /> {{ person.phone }}</a>
|
|
<a :href="`mailto:${person.email}`" class="inline-flex min-w-0 items-center gap-1 text-brand-text hover:underline"><Mail class="size-3.5 shrink-0" /> <span class="truncate">{{ person.email }}</span></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<p v-if="editing && !(block.props?.people ?? []).length" class="text-sm text-muted-foreground">Noch keine Personen ausgewählt.</p>
|
|
</div>
|
|
</section>
|
|
</template>
|