QM-Startseite: Einführungstext, Hauptansprechpartner, QM-Beauftragte
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 2m42s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m47s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 3m6s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 3m7s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 4m3s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 3m56s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 3m26s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 3m34s
CI / Build-Artefakte aktuell (pull_request) Successful in 54s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 2m42s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m47s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 3m6s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 3m7s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 4m3s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 3m56s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 3m26s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 3m34s
CI / Build-Artefakte aktuell (pull_request) Successful in 54s
- Pflege unter QM-Einstellungen → „Startseite des Qualitätsmanagements“ - QM-Beauftragte mit Zuständigkeit und optionalem Ordner-Link, Kontaktangaben wie bei den Ansprechpartnern Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b3a057e27c
commit
5a360d3cc7
95 changed files with 550 additions and 373 deletions
|
|
@ -1,14 +1,19 @@
|
|||
<script setup>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { FolderCog, ShieldCheck } from '@lucide/vue';
|
||||
import { FolderCog, ShieldCheck, Users } 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 { qmColor } from '../colors';
|
||||
import ContactCard from '../components/ContactCard.vue';
|
||||
import FolderTile from '../components/FolderTile.vue';
|
||||
import QmSearchBox from '../components/QmSearchBox.vue';
|
||||
|
||||
defineProps({
|
||||
intro: { type: String, default: '' },
|
||||
contacts: { type: Array, default: () => [] },
|
||||
officers: { type: Array, default: () => [] },
|
||||
categories: { type: Array, required: true },
|
||||
canManage: { type: Boolean, default: false },
|
||||
adminUrl: { type: String, default: null },
|
||||
|
|
@ -24,6 +29,19 @@ defineProps({
|
|||
</template>
|
||||
</PageHeader>
|
||||
|
||||
<div v-if="intro || contacts.length" class="mb-8 grid items-start gap-6" :class="{ 'lg:grid-cols-[minmax(0,1fr)_20rem]': intro && contacts.length }">
|
||||
<section v-if="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 bg-brand" aria-hidden="true" />
|
||||
<div class="prose prose-sm max-w-none dark:prose-invert" v-html="intro" />
|
||||
</section>
|
||||
<aside v-if="contacts.length" 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 text-brand-text" /> {{ contacts.length === 1 ? 'Ansprechpartner*in QM' : 'Ansprechpartner*innen QM' }}</h2>
|
||||
<div class="grid gap-4 p-4" :class="{ 'sm:grid-cols-2 lg:grid-cols-1': !intro }">
|
||||
<ContactCard v-for="contact in contacts" :key="contact.id" :contact="contact" />
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<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">
|
||||
|
|
@ -35,7 +53,25 @@ defineProps({
|
|||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div v-else class="rounded-lg border bg-card">
|
||||
<section v-if="officers.length" class="mt-10">
|
||||
<div class="mb-3 flex items-center gap-3">
|
||||
<h2 class="text-sm font-semibold tracking-wide whitespace-nowrap text-muted-foreground uppercase">QM-Beauftragte</h2>
|
||||
<span class="h-px flex-1 bg-border" aria-hidden="true" />
|
||||
</div>
|
||||
<ul class="grid gap-3 sm:grid-cols-2 xl:grid-cols-3">
|
||||
<li v-for="(officer, index) in officers" :key="`${officer.id}-${index}`" class="rounded-lg border bg-card p-4">
|
||||
<div class="mb-3 flex flex-wrap items-center gap-2">
|
||||
<span v-if="officer.area" class="rounded bg-brand-soft px-2 py-0.5 text-xs font-medium text-brand-soft-foreground">{{ officer.area }}</span>
|
||||
<Link v-if="officer.folder" :href="officer.folder.url" class="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(officer.folder.color).dot" />{{ officer.folder.path }}
|
||||
</Link>
|
||||
</div>
|
||||
<ContactCard :contact="officer" />
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<div v-if="!categories.length" 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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue