22 lines
1.2 KiB
Vue
22 lines
1.2 KiB
Vue
<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>
|