Einheitliche Listen (0.61.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 9m26s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 9m11s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 9m4s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 9m31s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 13m3s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 13m1s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 10m30s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 46s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m10s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 11m28s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 9m26s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 9m11s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 9m4s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 9m31s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 13m3s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 13m1s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 10m30s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 46s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m10s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 11m28s
Gemeinsame Werkzeugleiste ListToolbar (Filter-Chips, Suche, Sortierung, Kacheln/Liste) für Neuigkeiten, Stellen, Ideen und Personen; im SDK für Plugins. Neuigkeiten durchsuchbar. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8fbe32ed5c
commit
9cb34635bc
167 changed files with 644 additions and 482 deletions
|
|
@ -1,10 +1,11 @@
|
|||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { Link, router } from '@inertiajs/vue3';
|
||||
import { useDebounceFn } from '@vueuse/core';
|
||||
import { ChevronLeft, ChevronRight, Mail, Phone, Search, SearchX } from '@lucide/vue';
|
||||
import { ChevronLeft, ChevronRight, Mail, Phone, SearchX } from '@lucide/vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import ListToolbar from '@/components/ListToolbar.vue';
|
||||
import PersonAvatar from '@/components/PersonAvatar.vue';
|
||||
import { useListView } from '@/lib/listView';
|
||||
import PageHeader from '@/components/PageHeader.vue';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
|
||||
|
|
@ -14,6 +15,7 @@ const props = defineProps({
|
|||
departments: { type: Array, required: true },
|
||||
});
|
||||
|
||||
const view = useListView('personen', 'grid');
|
||||
const search = ref(props.filters.q ?? '');
|
||||
const department = ref(props.filters.abteilung ?? '');
|
||||
|
||||
|
|
@ -26,7 +28,7 @@ function apply() {
|
|||
router.get('/personen', query, { preserveState: true, preserveScroll: true, replace: true });
|
||||
}
|
||||
|
||||
watch(search, useDebounceFn(apply, 300));
|
||||
watch(search, apply);
|
||||
watch(department, apply);
|
||||
</script>
|
||||
|
||||
|
|
@ -38,31 +40,34 @@ watch(department, apply);
|
|||
{{ people.meta.total === 1 ? 'Person' : 'Personen' }}{{ filters.q || filters.abteilung ? ' gefunden' : ' im Verzeichnis' }}
|
||||
· <Link href="/personen/organigramm" class="font-medium text-brand-text hover:underline">Organigramm</Link>
|
||||
</template>
|
||||
<template #actions>
|
||||
<div class="flex w-full flex-col gap-3 sm:w-auto sm:flex-row">
|
||||
<label class="relative block sm:w-80">
|
||||
<span class="sr-only">Suchen</span>
|
||||
<Search class="pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground" />
|
||||
<input
|
||||
v-model="search"
|
||||
type="search"
|
||||
placeholder="Name, Funktion, Standort …"
|
||||
class="h-10 w-full rounded-md border border-input bg-card pr-3 pl-9 text-sm placeholder:text-muted-foreground focus-visible:border-brand-400 focus-visible:ring-3 focus-visible:ring-ring/30 focus-visible:outline-none"
|
||||
/>
|
||||
</label>
|
||||
<select
|
||||
v-model="department"
|
||||
class="h-10 rounded-md border border-input bg-card px-3 text-sm focus-visible:border-brand-400 focus-visible:ring-3 focus-visible:ring-ring/30 focus-visible:outline-none sm:w-56"
|
||||
aria-label="Abteilung"
|
||||
>
|
||||
<option value="">Alle Abteilungen</option>
|
||||
<option v-for="item in departments" :key="item" :value="item">{{ item }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</template>
|
||||
</PageHeader>
|
||||
|
||||
<ul v-if="people.data.length" class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4">
|
||||
<ListToolbar v-model:search="search" search-placeholder="Name, Funktion, Standort …" v-model:view="view">
|
||||
<select
|
||||
v-model="department"
|
||||
class="h-9 rounded-pill border border-input bg-card px-3 text-sm focus-visible:ring-3 focus-visible:ring-ring/30 focus-visible:outline-none sm:w-56"
|
||||
aria-label="Abteilung"
|
||||
>
|
||||
<option value="">Alle Abteilungen</option>
|
||||
<option v-for="item in departments" :key="item" :value="item">{{ item }}</option>
|
||||
</select>
|
||||
</ListToolbar>
|
||||
|
||||
<ul v-if="people.data.length && view === 'list'" class="divide-y rounded-lg border bg-card">
|
||||
<li v-for="person in people.data" :key="person.id" class="flex items-center gap-3 px-4 py-2.5">
|
||||
<Link :href="`/personen/${person.id}`" class="flex min-w-0 flex-1 items-center gap-3">
|
||||
<PersonAvatar :person="person" class="size-9" />
|
||||
<span class="grid min-w-0">
|
||||
<span class="truncate text-sm font-semibold hover:underline">{{ person.name }}</span>
|
||||
<span class="truncate text-xs text-muted-foreground">{{ [person.job_title, person.department, person.location].filter(Boolean).join(' · ') }}</span>
|
||||
</span>
|
||||
</Link>
|
||||
<a v-if="person.phone" :href="`tel:${person.phone}`" class="hidden shrink-0 items-center gap-1.5 text-[13px] text-muted-foreground hover:text-foreground sm:inline-flex"><Phone class="size-3.5" /> {{ person.phone }}</a>
|
||||
<a :href="`mailto:${person.email}`" class="grid size-8 shrink-0 place-items-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground" :aria-label="`E-Mail an ${person.name}`"><Mail class="size-4" /></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul v-else-if="people.data.length" class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4">
|
||||
<li v-for="person in people.data" :key="person.id" class="flex flex-col rounded-lg border bg-card">
|
||||
<Link :href="`/personen/${person.id}`" class="flex items-center gap-3 p-4 pb-3">
|
||||
<PersonAvatar :person="person" class="size-12" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue