inhaus-plugin-verleih/resources/js/editorial/EditorialRequests.vue
Friederich Loheide dce39774a2 Vorschau zeigt immer das ganze Bild, eingepasst mit Rand (1.0.1)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 16:39:16 +00:00

22 lines
1.2 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script setup>
import { Link } from '@inertiajs/vue3';
import { Panel, formatRelative } from '@inhaus/ui';
defineProps({ pending: { type: Array, required: true } });
</script>
<template>
<Panel title="Verleih – offene Anfragen" action-label="Zu den Anfragen" action-href="/verleih/anfragen">
<ul v-if="pending.length" class="ih:-mx-5 ih:divide-y ih:border-t">
<li v-for="r in pending" :key="r.id" class="ih:flex ih:items-center ih:gap-3 ih:px-5 ih:py-2.5">
<img v-if="r.item?.thumb_url" :src="r.item.thumb_url" alt="" class="ih:size-10 ih:rounded ih:bg-muted ih:object-contain ih:p-0.5" />
<div class="ih:min-w-0 ih:flex-1">
<Link :href="r.item?.url ?? '/verleih/anfragen'" class="ih:block ih:truncate ih:text-sm ih:font-medium ih:hover:underline">{{ r.item?.title }}</Link>
<p class="ih:truncate ih:text-xs ih:text-muted-foreground">{{ r.user?.name }} · nach {{ r.location }}</p>
</div>
<span class="ih:shrink-0 ih:text-xs ih:text-muted-foreground">{{ formatRelative(r.created_at) }}</span>
</li>
</ul>
<p v-else class="ih:text-sm ih:text-muted-foreground">Keine offenen Anfragen.</p>
</Panel>
</template>