Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9d44e11b75 | |||
| 4fc163e93e | |||
| dea1c7061a | |||
| dce39774a2 |
18 changed files with 64 additions and 76 deletions
|
|
@ -4,7 +4,7 @@ Verleihsystem für das Mitarbeiterportal **Inhaus** – gebaut für die Bilder d
|
|||
aber für alles nutzbar, was verliehen wird (Bezeichnungen im Backend einstellbar).
|
||||
|
||||
- **Übersicht** `/verleih`: alle Bilder mit Status (verfügbar / verliehen) und aktuellem Standort,
|
||||
verfügbare zuerst, Filter und Suche. Kunstwerke werden nie beschnitten.
|
||||
verfügbare zuerst, Filter und Suche. Die Vorschau füllt die Kachel, die Detailseite zeigt das ganze Bild.
|
||||
- **Anfragen im Portal** statt E-Mail-Links: „Bild anfragen“ mit Wunschort, optionalem Zeitraum und
|
||||
Nachricht. Das Team bekommt eine Benachrichtigung im Portal und eine E-Mail (Antworten gehen direkt
|
||||
an die anfragende Person).
|
||||
|
|
|
|||
2
dist/assets/style-BGA_ZYPJ.css
vendored
Normal file
2
dist/assets/style-BGA_ZYPJ.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/assets/style-DpnhOE_3.css
vendored
2
dist/assets/style-DpnhOE_3.css
vendored
File diff suppressed because one or more lines are too long
1
dist/chunks/loader-circle-DBP4Qhm5.js
vendored
1
dist/chunks/loader-circle-DBP4Qhm5.js
vendored
|
|
@ -1 +0,0 @@
|
|||
import{t as e}from"./createLucideIcon-CYyWUN7r.js";var t=e({name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]}),n=e({name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]});export{t as n,n as t};
|
||||
1
dist/chunks/loader-circle-km1SveWx.js
vendored
Normal file
1
dist/chunks/loader-circle-km1SveWx.js
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
import{t as e}from"./createLucideIcon-CYyWUN7r.js";var t=e({name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]});export{t};
|
||||
2
dist/editorial/EditorialRequests.js
vendored
2
dist/editorial/EditorialRequests.js
vendored
|
|
@ -1 +1 @@
|
|||
import{Fragment as e,createBlock as t,createCommentVNode as n,createElementBlock as r,createElementVNode as i,createTextVNode as a,createVNode as o,openBlock as s,renderList as c,toDisplayString as l,unref as u,withCtx as d}from"vue";import{Link as f}from"@inertiajs/vue3";import{Panel as p,formatRelative as m}from"@inhaus/ui";var h={key:0,class:`ih:-mx-5 ih:divide-y ih:border-t`},g=[`src`],_={class:`ih:min-w-0 ih:flex-1`},v={class:`ih:truncate ih:text-xs ih:text-muted-foreground`},y={class:`ih:shrink-0 ih:text-xs ih:text-muted-foreground`},b={key:1,class:`ih:text-sm ih:text-muted-foreground`},x={__name:`EditorialRequests`,props:{pending:{type:Array,required:!0}},setup(x){return(S,C)=>(s(),t(u(p),{title:`Verleih – offene Anfragen`,"action-label":`Zu den Anfragen`,"action-href":`/verleih/anfragen`},{default:d(()=>[x.pending.length?(s(),r(`ul`,h,[(s(!0),r(e,null,c(x.pending,e=>(s(),r(`li`,{key:e.id,class:`ih:flex ih:items-center ih:gap-3 ih:px-5 ih:py-2.5`},[e.item?.thumb_url?(s(),r(`img`,{key:0,src:e.item.thumb_url,alt:``,class:`ih:size-10 ih:rounded ih:bg-muted ih:object-contain`},null,8,g)):n(``,!0),i(`div`,_,[o(u(f),{href:e.item?.url??`/verleih/anfragen`,class:`ih:block ih:truncate ih:text-sm ih:font-medium ih:hover:underline`},{default:d(()=>[a(l(e.item?.title),1)]),_:2},1032,[`href`]),i(`p`,v,l(e.user?.name)+` · nach `+l(e.location),1)]),i(`span`,y,l(u(m)(e.created_at)),1)]))),128))])):(s(),r(`p`,b,`Keine offenen Anfragen.`))]),_:1}))}};export{x as default};
|
||||
import{Fragment as e,createBlock as t,createCommentVNode as n,createElementBlock as r,createElementVNode as i,createTextVNode as a,createVNode as o,openBlock as s,renderList as c,toDisplayString as l,unref as u,withCtx as d}from"vue";import{Link as f}from"@inertiajs/vue3";import{Panel as p,formatRelative as m}from"@inhaus/ui";var h={key:0,class:`ih:-mx-5 ih:divide-y ih:border-t`},g=[`src`],_={class:`ih:min-w-0 ih:flex-1`},v={class:`ih:truncate ih:text-xs ih:text-muted-foreground`},y={class:`ih:shrink-0 ih:text-xs ih:text-muted-foreground`},b={key:1,class:`ih:text-sm ih:text-muted-foreground`},x={__name:`EditorialRequests`,props:{pending:{type:Array,required:!0}},setup(x){return(S,C)=>(s(),t(u(p),{title:`Verleih – offene Anfragen`,"action-label":`Zu den Anfragen`,"action-href":`/verleih/anfragen`},{default:d(()=>[x.pending.length?(s(),r(`ul`,h,[(s(!0),r(e,null,c(x.pending,e=>(s(),r(`li`,{key:e.id,class:`ih:flex ih:items-center ih:gap-3 ih:px-5 ih:py-2.5`},[e.item?.thumb_url?(s(),r(`img`,{key:0,src:e.item.thumb_url,alt:``,class:`ih:size-10 ih:rounded ih:bg-muted ih:object-contain ih:p-0.5`},null,8,g)):n(``,!0),i(`div`,_,[o(u(f),{href:e.item?.url??`/verleih/anfragen`,class:`ih:block ih:truncate ih:text-sm ih:font-medium ih:hover:underline`},{default:d(()=>[a(l(e.item?.title),1)]),_:2},1032,[`href`]),i(`p`,v,l(e.user?.name)+` · nach `+l(e.location),1)]),i(`span`,y,l(u(m)(e.created_at)),1)]))),128))])):(s(),r(`p`,b,`Keine offenen Anfragen.`))]),_:1}))}};export{x as default};
|
||||
2
dist/inhaus.json
vendored
2
dist/inhaus.json
vendored
|
|
@ -7,6 +7,6 @@
|
|||
"pages/Show": "pages/Show.js"
|
||||
},
|
||||
"css": [
|
||||
"assets/style-DpnhOE_3.css"
|
||||
"assets/style-BGA_ZYPJ.css"
|
||||
]
|
||||
}
|
||||
2
dist/pages/Editor.js
vendored
2
dist/pages/Editor.js
vendored
File diff suppressed because one or more lines are too long
2
dist/pages/Index.js
vendored
2
dist/pages/Index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/pages/Requests.js
vendored
2
dist/pages/Requests.js
vendored
File diff suppressed because one or more lines are too long
2
dist/pages/Show.js
vendored
2
dist/pages/Show.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"slug": "verleih",
|
||||
"name": "Verleih",
|
||||
"version": "1.0.0",
|
||||
"version": "1.2.0",
|
||||
"description": "Verleihsystem, z. B. für die Bilder des Künstlerteams: Übersicht mit Status und aktuellem Standort, Anfragen im Portal mit Zusage oder Absage, Import aus dem bisherigen WordPress-Verleihsystem.",
|
||||
"author": "Loheide",
|
||||
"namespace": "Inhaus\\Plugins\\Verleih\\",
|
||||
"class": "Inhaus\\Plugins\\Verleih\\VerleihPlugin",
|
||||
"requires": {
|
||||
"core": ">=0.42.0",
|
||||
"core": ">=0.61.0",
|
||||
"php": ">=8.3"
|
||||
},
|
||||
"update_url": "https://git.loheide.cloud/api/v1/repos/friloo/inhaus-plugin-verleih/releases/latest"
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ defineProps({
|
|||
|
||||
<template>
|
||||
<article class="ih:group ih:flex ih:flex-col ih:overflow-hidden ih:rounded-lg ih:border ih:bg-card ih:shadow-xs ih:transition-shadow ih:hover:shadow-md">
|
||||
<!-- Kunstwerke nicht beschneiden: ganzes Bild auf ruhigem Grund -->
|
||||
<Link :href="item.url" prefetch class="ih:relative ih:grid ih:aspect-[4/3] ih:place-items-center ih:overflow-hidden ih:bg-muted ih:p-3">
|
||||
<img v-if="item.thumb_url" :src="item.thumb_url" :alt="item.title" loading="lazy" class="ih:max-h-full ih:max-w-full ih:object-contain ih:shadow-sm ih:transition-transform ih:duration-300 ih:group-hover:scale-[1.02]" />
|
||||
<ImageOff v-else class="ih:size-8 ih:text-muted-foreground" :stroke-width="1.5" />
|
||||
<!-- Immer das ganze Bild: in die Fläche eingepasst, mit Rand – nie ein Ausschnitt -->
|
||||
<Link :href="item.url" prefetch class="ih:relative ih:block ih:aspect-[4/3] ih:overflow-hidden ih:bg-muted ih:p-3 ih:pt-9">
|
||||
<img v-if="item.thumb_url" :src="item.thumb_url" :alt="item.title" loading="lazy" class="ih:size-full ih:object-contain ih:transition-transform ih:duration-300 ih:group-hover:scale-[1.02]" />
|
||||
<span v-else class="ih:grid ih:size-full ih:place-items-center"><ImageOff class="ih:size-8 ih:text-muted-foreground" :stroke-width="1.5" /></span>
|
||||
<StatusBadge :lent="item.lent" class="ih:absolute ih:top-2 ih:left-2" />
|
||||
</Link>
|
||||
<div class="ih:flex ih:flex-1 ih:flex-col ih:gap-1 ih:p-3">
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ defineProps({ pending: { type: Array, required: true } });
|
|||
<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" />
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { Link, useForm } from '@inertiajs/vue3';
|
||||
import { ChevronLeft, ImagePlus, LoaderCircle, Trash2 } from '@lucide/vue';
|
||||
import { useForm } from '@inertiajs/vue3';
|
||||
import { ImagePlus, LoaderCircle, Trash2 } from '@lucide/vue';
|
||||
import { AppLayout, Button, FormField, Input, PageHeader, Panel, RichTextEditor } from '@inhaus/ui';
|
||||
|
||||
const props = defineProps({
|
||||
|
|
@ -48,10 +48,7 @@ function submit() {
|
|||
|
||||
<template>
|
||||
<AppLayout :title="title">
|
||||
<Link :href="it ? it.url : '/verleih'" class="ih:mb-4 ih:inline-flex ih:items-center ih:gap-1 ih:text-sm ih:font-medium ih:text-muted-foreground ih:hover:text-foreground">
|
||||
<ChevronLeft class="ih:size-4" /> {{ it ? it.title : labels.title }}
|
||||
</Link>
|
||||
<PageHeader :title="title" />
|
||||
<PageHeader :title="title" :breadcrumbs="it ? [{ label: labels.title, href: '/verleih' }, { label: it.title, href: it.url }] : [{ label: labels.title, href: '/verleih' }]" icon="images" />
|
||||
|
||||
<form class="ih:grid ih:gap-6 ih:lg:grid-cols-[minmax(0,1fr)_20rem]" @submit.prevent="submit">
|
||||
<div class="ih:grid ih:min-w-0 ih:content-start ih:gap-6">
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { watch } from 'vue';
|
||||
import { Link, router, usePage } from '@inertiajs/vue3';
|
||||
import { Images, Inbox, Plus, Search, Settings2 } from '@lucide/vue';
|
||||
import { AppLayout, Button, EmptyState, PageHeader, formatDate, toast } from '@inhaus/ui';
|
||||
import { Images, Inbox, Plus, Settings2 } from '@lucide/vue';
|
||||
import { AppLayout, Button, EmptyState, ListToolbar, PageHeader, formatDate, toast, useListView } from '@inhaus/ui';
|
||||
import ItemCard from '../components/ItemCard.vue';
|
||||
import StatusBadge from '../components/StatusBadge.vue';
|
||||
|
||||
const props = defineProps({
|
||||
items: { type: Array, required: true },
|
||||
|
|
@ -18,12 +19,7 @@ const props = defineProps({
|
|||
const page = usePage();
|
||||
watch(() => page.props.flash?.status, (status) => status && toast.success(status), { immediate: true });
|
||||
|
||||
const query = ref(props.filters.q);
|
||||
let timer;
|
||||
watch(query, (value) => {
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(() => apply({ q: value }), 300);
|
||||
});
|
||||
const view = useListView('verleih', 'grid');
|
||||
|
||||
function apply(changes) {
|
||||
const params = { ...props.filters, ...changes };
|
||||
|
|
@ -41,7 +37,7 @@ const cancel = (request) => window.confirm('Anfrage zurückziehen?') && router.d
|
|||
|
||||
<template>
|
||||
<AppLayout :title="labels.title">
|
||||
<PageHeader :title="labels.title" :description="`Alle ${labels.plural} auf einen Blick – verfügbar oder verliehen, und wo sie gerade sind.`">
|
||||
<PageHeader :title="labels.title" icon="images" :description="`Alle ${labels.plural} auf einen Blick – verfügbar oder verliehen, und wo sie gerade sind.`">
|
||||
<template #actions>
|
||||
<template v-if="canManage">
|
||||
<Button variant="outline" as-child>
|
||||
|
|
@ -70,35 +66,35 @@ const cancel = (request) => window.confirm('Anfrage zurückziehen?') && router.d
|
|||
</ul>
|
||||
</section>
|
||||
|
||||
<div class="ih:mb-5 ih:flex ih:flex-wrap ih:items-center ih:gap-3">
|
||||
<nav class="ih:flex ih:flex-wrap ih:gap-1.5" aria-label="Status">
|
||||
<button
|
||||
v-for="tab in tabs"
|
||||
:key="tab.label"
|
||||
type="button"
|
||||
class="ih:inline-flex ih:items-center ih:gap-1.5 ih:rounded-full ih:border ih:px-3 ih:py-1 ih:text-[13px]"
|
||||
:class="filters.status === tab.value ? 'ih:border-brand ih:bg-brand ih:text-brand-foreground' : 'ih:bg-card ih:hover:bg-accent'"
|
||||
:aria-pressed="filters.status === tab.value"
|
||||
@click="apply({ status: tab.value })"
|
||||
>
|
||||
{{ tab.label }} <span class="ih:tabular-nums ih:opacity-75">{{ counts[tab.count] }}</span>
|
||||
</button>
|
||||
</nav>
|
||||
<div class="ih:relative ih:ml-auto ih:w-full ih:sm:w-64">
|
||||
<Search class="ih:pointer-events-none ih:absolute ih:top-1/2 ih:left-2.5 ih:size-4 ih:-translate-y-1/2 ih:text-muted-foreground" />
|
||||
<input
|
||||
v-model="query"
|
||||
type="search"
|
||||
:placeholder="`${labels.plural} oder Orte suchen`"
|
||||
:aria-label="`${labels.plural} durchsuchen`"
|
||||
class="ih:h-9 ih:w-full ih:rounded-md ih:border ih:border-input ih:bg-card ih:pr-3 ih:pl-8 ih:text-sm ih:shadow-xs ih:focus-visible:ring-3 ih:focus-visible:ring-ring/30 ih:focus-visible:outline-none"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<ListToolbar
|
||||
:filters="tabs.map((tab) => ({ value: tab.value, label: tab.label, count: counts[tab.count] }))"
|
||||
:filter="filters.status || null"
|
||||
filter-label="Status"
|
||||
:search="filters.q ?? ''"
|
||||
:search-placeholder="`${labels.plural} oder Orte suchen`"
|
||||
v-model:view="view"
|
||||
@update:filter="(value) => apply({ status: value })"
|
||||
@update:search="(value) => apply({ q: value })"
|
||||
/>
|
||||
|
||||
<div v-if="items.length" class="ih:grid ih:grid-cols-2 ih:gap-3 ih:sm:gap-4 ih:md:grid-cols-3 ih:xl:grid-cols-4">
|
||||
<div v-if="items.length && view === 'grid'" class="ih:grid ih:grid-cols-2 ih:gap-3 ih:sm:gap-4 ih:md:grid-cols-3 ih:xl:grid-cols-4">
|
||||
<ItemCard v-for="item in items" :key="item.id" :item="item" />
|
||||
</div>
|
||||
<ul v-else-if="items.length" class="ih:divide-y ih:rounded-lg ih:border ih:bg-card">
|
||||
<li v-for="item in items" :key="item.id">
|
||||
<Link :href="item.url" class="ih:flex ih:items-center ih:gap-3 ih:px-4 ih:py-2.5 ih:hover:bg-accent/60">
|
||||
<span class="ih:grid ih:size-12 ih:shrink-0 ih:place-items-center ih:overflow-hidden ih:rounded-md ih:bg-muted">
|
||||
<img v-if="item.thumb_url" :src="item.thumb_url" alt="" class="ih:max-h-full ih:max-w-full ih:object-contain" />
|
||||
<Images v-else class="ih:size-5 ih:text-muted-foreground" />
|
||||
</span>
|
||||
<span class="ih:grid ih:min-w-0 ih:flex-1">
|
||||
<span class="ih:truncate ih:font-medium">{{ item.title }}</span>
|
||||
<span v-if="item.location" class="ih:truncate ih:text-xs ih:text-muted-foreground">{{ item.location }}</span>
|
||||
</span>
|
||||
<StatusBadge :lent="item.lent" class="ih:shrink-0 ih:border" />
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
<div v-else class="ih:rounded-lg ih:border ih:bg-card">
|
||||
<EmptyState
|
||||
:icon="Images"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { Link, useForm, usePage } from '@inertiajs/vue3';
|
||||
import { CalendarDays, Check, ChevronLeft, ImageOff, Inbox, LoaderCircle, MapPin, MessageSquareText, X } from '@lucide/vue';
|
||||
import { CalendarDays, Check, ImageOff, Inbox, LoaderCircle, MapPin, MessageSquareText, X } from '@lucide/vue';
|
||||
import {
|
||||
AppLayout,
|
||||
Button,
|
||||
|
|
@ -51,15 +51,14 @@ const period = (r) => [r.from ? `ab ${formatDate(r.from)}` : null, r.until ? `bi
|
|||
|
||||
<template>
|
||||
<AppLayout title="Anfragen">
|
||||
<Link href="/verleih" class="ih:mb-4 ih:inline-flex ih:items-center ih:gap-1 ih:text-sm ih:font-medium ih:text-muted-foreground ih:hover:text-foreground"><ChevronLeft class="ih:size-4" /> {{ labels.title }}</Link>
|
||||
<PageHeader title="Anfragen" :description="`Zusagen trägt das ${labels.singular} gleich als verliehen ein – mit Wunschort und Person. Die anfragende Person wird benachrichtigt.`" />
|
||||
<PageHeader title="Anfragen" icon="images" :breadcrumbs="[{ label: labels.title, href: '/verleih' }]" :description="`Zusagen trägt das ${labels.singular} gleich als verliehen ein – mit Wunschort und Person. Die anfragende Person wird benachrichtigt.`" />
|
||||
|
||||
<section aria-labelledby="offen" class="ih:mb-8">
|
||||
<h2 id="offen" class="ih:mb-3 ih:text-sm ih:font-semibold">Offen <span class="ih:text-muted-foreground">({{ pending.length }})</span></h2>
|
||||
<div v-if="pending.length" class="ih:grid ih:gap-3">
|
||||
<article v-for="request in pending" :key="request.id" class="ih:grid ih:gap-4 ih:rounded-lg ih:border ih:bg-card ih:p-4 ih:sm:grid-cols-[7rem_minmax(0,1fr)_auto] ih:sm:items-center">
|
||||
<Link :href="request.item?.url ?? '#'" class="ih:grid ih:aspect-[4/3] ih:w-28 ih:place-items-center ih:overflow-hidden ih:rounded-md ih:bg-muted">
|
||||
<img v-if="request.item?.thumb_url" :src="request.item.thumb_url" :alt="request.item.title" class="ih:max-h-full ih:max-w-full ih:object-contain" />
|
||||
<Link :href="request.item?.url ?? '#'" class="ih:grid ih:aspect-[4/3] ih:w-28 ih:place-items-center ih:overflow-hidden ih:rounded-md ih:bg-muted ih:p-1.5">
|
||||
<img v-if="request.item?.thumb_url" :src="request.item.thumb_url" :alt="request.item.title" class="ih:size-full ih:object-contain" />
|
||||
<ImageOff v-else class="ih:size-6 ih:text-muted-foreground" />
|
||||
</Link>
|
||||
<div class="ih:grid ih:min-w-0 ih:gap-1.5">
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<script setup>
|
||||
import { computed, onBeforeUnmount, ref, watch } from 'vue';
|
||||
import { Link, router, useForm, usePage } from '@inertiajs/vue3';
|
||||
import { CalendarDays, ChevronLeft, Clock, ImageOff, LoaderCircle, MapPin, PencilLine, Send, Trash2, Undo2, UserRound, X } from '@lucide/vue';
|
||||
import { AppLayout, Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, FormField, Input, PersonAvatar, formatDate, toast } from '@inhaus/ui';
|
||||
import { CalendarDays, Clock, ImageOff, LoaderCircle, MapPin, PencilLine, Send, Trash2, Undo2, UserRound, X } from '@lucide/vue';
|
||||
import { AppLayout, Button, PageHeader, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, FormField, Input, PersonAvatar, formatDate, toast } from '@inhaus/ui';
|
||||
import RequestDialog from '../components/RequestDialog.vue';
|
||||
import StatusBadge from '../components/StatusBadge.vue';
|
||||
|
||||
|
|
@ -39,13 +39,13 @@ const period = (from, until) =>
|
|||
|
||||
<template>
|
||||
<AppLayout :title="item.title">
|
||||
<div class="ih:mb-4 ih:flex ih:flex-wrap ih:items-center ih:justify-between ih:gap-3">
|
||||
<Link href="/verleih" class="ih:inline-flex ih:items-center ih:gap-1 ih:text-sm ih:font-medium ih:text-muted-foreground ih:hover:text-foreground"><ChevronLeft class="ih:size-4" /> {{ labels.title }}</Link>
|
||||
<div v-if="canManage" class="ih:flex ih:gap-2">
|
||||
<PageHeader :title="item.title" :breadcrumbs="[{ label: labels.title, href: '/verleih' }]">
|
||||
<template #description><StatusBadge :lent="item.lent" class="ih:mt-1 ih:w-fit ih:border" /></template>
|
||||
<template v-if="canManage" #actions>
|
||||
<Button variant="outline" size="sm" as-child><Link :href="`/verleih/${item.id}/bearbeiten`"><PencilLine /> Bearbeiten</Link></Button>
|
||||
<Button variant="ghost" size="sm" class="ih:text-destructive ih:hover:text-destructive" @click="remove"><Trash2 /> Löschen</Button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</PageHeader>
|
||||
|
||||
<div class="ih:grid ih:gap-6 ih:lg:grid-cols-[minmax(0,1fr)_22rem]">
|
||||
<!-- Bild: ganz, ohne Zuschnitt -->
|
||||
|
|
@ -71,10 +71,6 @@ const period = (from, until) =>
|
|||
|
||||
<aside class="ih:grid ih:content-start ih:gap-4 ih:lg:sticky ih:lg:top-24">
|
||||
<section class="ih:grid ih:gap-4 ih:rounded-lg ih:border ih:bg-card ih:p-5">
|
||||
<div class="ih:grid ih:gap-2">
|
||||
<StatusBadge :lent="item.lent" class="ih:w-fit ih:border" />
|
||||
<h1 class="ih:text-xl ih:leading-snug ih:font-semibold">{{ item.title }}</h1>
|
||||
</div>
|
||||
<dl class="ih:grid ih:gap-2 ih:text-sm">
|
||||
<div class="ih:flex ih:gap-2">
|
||||
<dt class="ih:sr-only">Aktueller Standort</dt>
|
||||
|
|
@ -142,7 +138,7 @@ const period = (from, until) =>
|
|||
|
||||
<!-- Vergrößerung -->
|
||||
<div v-if="zoom" class="ih:fixed ih:inset-0 ih:z-50 ih:grid ih:place-items-center ih:bg-black/85 ih:p-4" role="dialog" aria-modal="true" :aria-label="item.title" @click="zoom = false">
|
||||
<img :src="item.image_url" :alt="item.title" class="ih:max-h-full ih:max-w-full ih:object-contain" />
|
||||
<img :src="item.image_url" :alt="item.title" class="ih:size-full ih:object-contain" />
|
||||
<button type="button" class="ih:absolute ih:top-4 ih:right-4 ih:grid ih:size-10 ih:place-items-center ih:rounded-full ih:bg-white/15 ih:text-white" aria-label="Schließen" @click.stop="zoom = false"><X /></button>
|
||||
</div>
|
||||
</AppLayout>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue