diff --git a/dist/assets/style-BGA_ZYPJ.css b/dist/assets/style-BGA_ZYPJ.css new file mode 100644 index 0000000..da489f8 --- /dev/null +++ b/dist/assets/style-BGA_ZYPJ.css @@ -0,0 +1,2 @@ +/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */ +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}::backdrop{--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}@layer theme{:root,:host{--ih-color-black:#000;--ih-color-white:#fff;--ih-spacing:.25rem;--ih-container-md:28rem;--ih-container-lg:32rem;--ih-text-xs:.75rem;--ih-text-xs--line-height:calc(1 / .75);--ih-text-sm:.875rem;--ih-text-sm--line-height:calc(1.25 / .875);--ih-font-weight-medium:500;--ih-font-weight-semibold:600;--ih-leading-snug:1.375;--ih-leading-relaxed:1.625;--ih-animate-spin:spin 1s linear infinite;--ih-default-transition-duration:.15s;--ih-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}}@layer utilities{.ih\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.ih\:absolute{position:absolute}.ih\:fixed{position:fixed}.ih\:relative{position:relative}.ih\:inset-0{inset:0}.ih\:top-2{top:calc(var(--ih-spacing) * 2)}.ih\:top-4{top:calc(var(--ih-spacing) * 4)}.ih\:right-4{right:calc(var(--ih-spacing) * 4)}.ih\:left-2{left:calc(var(--ih-spacing) * 2)}.ih\:z-50{z-index:50}.ih\:-mx-5{margin-inline:calc(var(--ih-spacing) * -5)}.ih\:mt-0\.5{margin-top:calc(var(--ih-spacing) * .5)}.ih\:mt-1{margin-top:var(--ih-spacing)}.ih\:mt-3{margin-top:calc(var(--ih-spacing) * 3)}.ih\:mt-6{margin-top:calc(var(--ih-spacing) * 6)}.ih\:mt-auto{margin-top:auto}.ih\:mb-2{margin-bottom:calc(var(--ih-spacing) * 2)}.ih\:mb-3{margin-bottom:calc(var(--ih-spacing) * 3)}.ih\:mb-6{margin-bottom:calc(var(--ih-spacing) * 6)}.ih\:mb-8{margin-bottom:calc(var(--ih-spacing) * 8)}.ih\:ml-auto{margin-left:auto}.ih\:line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.ih\:block{display:block}.ih\:flex{display:flex}.ih\:grid{display:grid}.ih\:hidden{display:none}.ih\:inline-block{display:inline-block}.ih\:inline-flex{display:inline-flex}.ih\:aspect-\[4\/3\]{aspect-ratio:4/3}.ih\:size-1\.5{width:calc(var(--ih-spacing) * 1.5);height:calc(var(--ih-spacing) * 1.5)}.ih\:size-3\.5{width:calc(var(--ih-spacing) * 3.5);height:calc(var(--ih-spacing) * 3.5)}.ih\:size-4{width:calc(var(--ih-spacing) * 4);height:calc(var(--ih-spacing) * 4)}.ih\:size-5{width:calc(var(--ih-spacing) * 5);height:calc(var(--ih-spacing) * 5)}.ih\:size-6{width:calc(var(--ih-spacing) * 6);height:calc(var(--ih-spacing) * 6)}.ih\:size-8{width:calc(var(--ih-spacing) * 8);height:calc(var(--ih-spacing) * 8)}.ih\:size-10{width:calc(var(--ih-spacing) * 10);height:calc(var(--ih-spacing) * 10)}.ih\:size-12{width:calc(var(--ih-spacing) * 12);height:calc(var(--ih-spacing) * 12)}.ih\:size-full{width:100%;height:100%}.ih\:max-h-\[70vh\]{max-height:70vh}.ih\:max-h-full{max-height:100%}.ih\:w-28{width:calc(var(--ih-spacing) * 28)}.ih\:w-auto{width:auto}.ih\:w-fit{width:-moz-fit-content;width:fit-content}.ih\:w-full{width:100%}.ih\:max-w-full{max-width:100%}.ih\:min-w-0{min-width:0}.ih\:flex-1{flex:1}.ih\:shrink-0{flex-shrink:0}.ih\:animate-spin{animation:var(--ih-animate-spin)}.ih\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.ih\:flex-col{flex-direction:column}.ih\:flex-wrap{flex-wrap:wrap}.ih\:place-items-center{place-items:center}.ih\:content-start{align-content:flex-start}.ih\:items-center{align-items:center}.ih\:justify-items-center{justify-items:center}.ih\:gap-1{gap:var(--ih-spacing)}.ih\:gap-1\.5{gap:calc(var(--ih-spacing) * 1.5)}.ih\:gap-2{gap:calc(var(--ih-spacing) * 2)}.ih\:gap-3{gap:calc(var(--ih-spacing) * 3)}.ih\:gap-4{gap:calc(var(--ih-spacing) * 4)}.ih\:gap-5{gap:calc(var(--ih-spacing) * 5)}.ih\:gap-6{gap:calc(var(--ih-spacing) * 6)}.ih\:gap-x-3{column-gap:calc(var(--ih-spacing) * 3)}.ih\:gap-x-4{column-gap:calc(var(--ih-spacing) * 4)}.ih\:gap-y-1{row-gap:var(--ih-spacing)}:where(.ih\:divide-y.ih\:divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}.ih\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ih\:overflow-hidden{overflow:hidden}.ih\:rounded{border-radius:.25rem}.ih\:rounded-full{border-radius:2147483647px}.ih\:rounded-lg{border-radius:var(--radius)}.ih\:rounded-md{border-radius:calc(var(--radius) - 2px)}.ih\:border{border-style:var(--tw-border-style);border-width:1px}.ih\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.ih\:border-dashed{--tw-border-style:dashed;border-style:dashed}.ih\:border-brand{border-color:var(--brand)}.ih\:bg-black\/85{background-color:var(--ih-color-black)}@supports (color:color-mix(in lab, red, red)){.ih\:bg-black\/85.ih\:bg-black\/85{background-color:color-mix(in oklab, var(--ih-color-black) 85%, transparent)}}.ih\:bg-brand{background-color:var(--brand)}.ih\:bg-brand-foreground{background-color:var(--brand-foreground)}.ih\:bg-brand-soft{background-color:var(--brand-soft)}.ih\:bg-card{background-color:var(--card)}.ih\:bg-muted{background-color:var(--muted)}.ih\:bg-muted-foreground{background-color:var(--muted-foreground)}.ih\:bg-white\/15{background-color:var(--ih-color-white)}@supports (color:color-mix(in lab, red, red)){.ih\:bg-white\/15.ih\:bg-white\/15{background-color:color-mix(in oklab, var(--ih-color-white) 15%, transparent)}}.ih\:object-contain{object-fit:contain}.ih\:p-0\.5{padding:calc(var(--ih-spacing) * .5)}.ih\:p-1{padding:var(--ih-spacing)}.ih\:p-1\.5{padding:calc(var(--ih-spacing) * 1.5)}.ih\:p-2{padding:calc(var(--ih-spacing) * 2)}.ih\:p-3{padding:calc(var(--ih-spacing) * 3)}.ih\:p-4{padding:calc(var(--ih-spacing) * 4)}.ih\:p-5{padding:calc(var(--ih-spacing) * 5)}.ih\:px-1\.5{padding-inline:calc(var(--ih-spacing) * 1.5)}.ih\:px-2{padding-inline:calc(var(--ih-spacing) * 2)}.ih\:px-4{padding-inline:calc(var(--ih-spacing) * 4)}.ih\:px-5{padding-inline:calc(var(--ih-spacing) * 5)}.ih\:py-0\.5{padding-block:calc(var(--ih-spacing) * .5)}.ih\:py-1\.5{padding-block:calc(var(--ih-spacing) * 1.5)}.ih\:py-2{padding-block:calc(var(--ih-spacing) * 2)}.ih\:py-2\.5{padding-block:calc(var(--ih-spacing) * 2.5)}.ih\:pt-1{padding-top:var(--ih-spacing)}.ih\:pt-9{padding-top:calc(var(--ih-spacing) * 9)}.ih\:text-sm{font-size:var(--ih-text-sm);line-height:var(--tw-leading,var(--ih-text-sm--line-height))}.ih\:text-xs{font-size:var(--ih-text-xs);line-height:var(--tw-leading,var(--ih-text-xs--line-height))}.ih\:text-\[11px\]{font-size:11px}.ih\:text-\[13px\]{font-size:13px}.ih\:text-\[15px\]{font-size:15px}.ih\:leading-relaxed{--tw-leading:var(--ih-leading-relaxed);line-height:var(--ih-leading-relaxed)}.ih\:leading-snug{--tw-leading:var(--ih-leading-snug);line-height:var(--ih-leading-snug)}.ih\:font-medium{--tw-font-weight:var(--ih-font-weight-medium);font-weight:var(--ih-font-weight-medium)}.ih\:font-semibold{--tw-font-weight:var(--ih-font-weight-semibold);font-weight:var(--ih-font-weight-semibold)}.ih\:text-brand-foreground{color:var(--brand-foreground)}.ih\:text-brand-text{color:var(--brand-text)}.ih\:text-destructive{color:var(--destructive)}.ih\:text-muted-foreground{color:var(--muted-foreground)}.ih\:text-white{color:var(--ih-color-white)}.ih\:underline{text-decoration-line:underline}.ih\:shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ih\:shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ih\:transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--ih-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ih-default-transition-duration))}.ih\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--ih-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ih-default-transition-duration))}.ih\:duration-300{--tw-duration:.3s;transition-duration:.3s}@media (hover:hover){.ih\:group-hover\:scale-\[1\.02\].ih\:group-hover\:scale-\[1\.02\]:is(:where(.ih\:group):hover *){scale:1.02}.ih\:hover\:bg-accent\/60.ih\:hover\:bg-accent\/60:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.ih\:hover\:bg-accent\/60.ih\:hover\:bg-accent\/60:hover{background-color:color-mix(in oklab, var(--accent) 60%, transparent)}}.ih\:hover\:text-destructive.ih\:hover\:text-destructive:hover{color:var(--destructive)}.ih\:hover\:underline.ih\:hover\:underline:hover{text-decoration-line:underline}.ih\:hover\:shadow-md.ih\:hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}@media (min-width:40rem){.ih\:sm\:max-w-lg.ih\:sm\:max-w-lg{max-width:var(--ih-container-lg)}.ih\:sm\:max-w-md.ih\:sm\:max-w-md{max-width:var(--ih-container-md)}.ih\:sm\:grid-cols-2.ih\:sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.ih\:sm\:grid-cols-\[7rem_minmax\(0\,1fr\)_auto\].ih\:sm\:grid-cols-\[7rem_minmax\(0\,1fr\)_auto\]{grid-template-columns:7rem minmax(0,1fr) auto}.ih\:sm\:flex-col.ih\:sm\:flex-col{flex-direction:column}.ih\:sm\:items-center.ih\:sm\:items-center{align-items:center}.ih\:sm\:gap-4.ih\:sm\:gap-4{gap:calc(var(--ih-spacing) * 4)}.ih\:sm\:p-8.ih\:sm\:p-8{padding:calc(var(--ih-spacing) * 8)}}@media (min-width:48rem){.ih\:md\:grid-cols-3.ih\:md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:64rem){.ih\:lg\:sticky.ih\:lg\:sticky{position:sticky}.ih\:lg\:top-24.ih\:lg\:top-24{top:calc(var(--ih-spacing) * 24)}.ih\:lg\:grid-cols-\[minmax\(0\,1fr\)_20rem\].ih\:lg\:grid-cols-\[minmax\(0\,1fr\)_20rem\]{grid-template-columns:minmax(0,1fr) 20rem}.ih\:lg\:grid-cols-\[minmax\(0\,1fr\)_22rem\].ih\:lg\:grid-cols-\[minmax\(0\,1fr\)_22rem\]{grid-template-columns:minmax(0,1fr) 22rem}}@media (min-width:80rem){.ih\:xl\:grid-cols-4.ih\:xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}}.verleih-text p{margin:.5rem 0}.verleih-text.verleih-text p:first-child{margin-top:0}.verleih-text.verleih-text p:last-child{margin-bottom:0}.verleih-text ul{margin:.5rem 0;padding-left:1.25rem;list-style:outside}.verleih-text ol{margin:.5rem 0;padding-left:1.25rem;list-style:decimal}.verleih-text h2,.verleih-text h3{margin:1rem 0 .5rem;font-weight:600}.verleih-text a{color:var(--color-brand-text);text-decoration:underline}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}} diff --git a/dist/assets/style-HFzXm6mv.css b/dist/assets/style-HFzXm6mv.css deleted file mode 100644 index f4c1a5b..0000000 --- a/dist/assets/style-HFzXm6mv.css +++ /dev/null @@ -1,2 +0,0 @@ -/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */ -@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}@layer theme{:root,:host{--ih-color-black:#000;--ih-color-white:#fff;--ih-spacing:.25rem;--ih-container-md:28rem;--ih-container-lg:32rem;--ih-text-xs:.75rem;--ih-text-xs--line-height:calc(1 / .75);--ih-text-sm:.875rem;--ih-text-sm--line-height:calc(1.25 / .875);--ih-text-xl:1.25rem;--ih-text-xl--line-height:calc(1.75 / 1.25);--ih-font-weight-medium:500;--ih-font-weight-semibold:600;--ih-leading-snug:1.375;--ih-leading-relaxed:1.625;--ih-animate-spin:spin 1s linear infinite;--ih-default-transition-duration:.15s;--ih-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}}@layer utilities{.ih\:pointer-events-none{pointer-events:none}.ih\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.ih\:absolute{position:absolute}.ih\:fixed{position:fixed}.ih\:relative{position:relative}.ih\:inset-0{inset:0}.ih\:top-1\/2{top:50%}.ih\:top-2{top:calc(var(--ih-spacing) * 2)}.ih\:top-4{top:calc(var(--ih-spacing) * 4)}.ih\:right-4{right:calc(var(--ih-spacing) * 4)}.ih\:left-2{left:calc(var(--ih-spacing) * 2)}.ih\:left-2\.5{left:calc(var(--ih-spacing) * 2.5)}.ih\:z-50{z-index:50}.ih\:-mx-5{margin-inline:calc(var(--ih-spacing) * -5)}.ih\:mt-0\.5{margin-top:calc(var(--ih-spacing) * .5)}.ih\:mt-3{margin-top:calc(var(--ih-spacing) * 3)}.ih\:mt-6{margin-top:calc(var(--ih-spacing) * 6)}.ih\:mt-auto{margin-top:auto}.ih\:mb-2{margin-bottom:calc(var(--ih-spacing) * 2)}.ih\:mb-3{margin-bottom:calc(var(--ih-spacing) * 3)}.ih\:mb-4{margin-bottom:calc(var(--ih-spacing) * 4)}.ih\:mb-5{margin-bottom:calc(var(--ih-spacing) * 5)}.ih\:mb-6{margin-bottom:calc(var(--ih-spacing) * 6)}.ih\:mb-8{margin-bottom:calc(var(--ih-spacing) * 8)}.ih\:ml-auto{margin-left:auto}.ih\:line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.ih\:block{display:block}.ih\:flex{display:flex}.ih\:grid{display:grid}.ih\:hidden{display:none}.ih\:inline-block{display:inline-block}.ih\:inline-flex{display:inline-flex}.ih\:aspect-\[4\/3\]{aspect-ratio:4/3}.ih\:size-1\.5{width:calc(var(--ih-spacing) * 1.5);height:calc(var(--ih-spacing) * 1.5)}.ih\:size-3\.5{width:calc(var(--ih-spacing) * 3.5);height:calc(var(--ih-spacing) * 3.5)}.ih\:size-4{width:calc(var(--ih-spacing) * 4);height:calc(var(--ih-spacing) * 4)}.ih\:size-6{width:calc(var(--ih-spacing) * 6);height:calc(var(--ih-spacing) * 6)}.ih\:size-8{width:calc(var(--ih-spacing) * 8);height:calc(var(--ih-spacing) * 8)}.ih\:size-10{width:calc(var(--ih-spacing) * 10);height:calc(var(--ih-spacing) * 10)}.ih\:size-full{width:100%;height:100%}.ih\:h-9{height:calc(var(--ih-spacing) * 9)}.ih\:max-h-\[70vh\]{max-height:70vh}.ih\:max-h-full{max-height:100%}.ih\:w-28{width:calc(var(--ih-spacing) * 28)}.ih\:w-auto{width:auto}.ih\:w-fit{width:-moz-fit-content;width:fit-content}.ih\:w-full{width:100%}.ih\:max-w-full{max-width:100%}.ih\:min-w-0{min-width:0}.ih\:flex-1{flex:1}.ih\:shrink-0{flex-shrink:0}.ih\:-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.ih\:animate-spin{animation:var(--ih-animate-spin)}.ih\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.ih\:flex-col{flex-direction:column}.ih\:flex-wrap{flex-wrap:wrap}.ih\:place-items-center{place-items:center}.ih\:content-start{align-content:flex-start}.ih\:items-center{align-items:center}.ih\:justify-between{justify-content:space-between}.ih\:justify-items-center{justify-items:center}.ih\:gap-1{gap:var(--ih-spacing)}.ih\:gap-1\.5{gap:calc(var(--ih-spacing) * 1.5)}.ih\:gap-2{gap:calc(var(--ih-spacing) * 2)}.ih\:gap-3{gap:calc(var(--ih-spacing) * 3)}.ih\:gap-4{gap:calc(var(--ih-spacing) * 4)}.ih\:gap-5{gap:calc(var(--ih-spacing) * 5)}.ih\:gap-6{gap:calc(var(--ih-spacing) * 6)}.ih\:gap-x-3{column-gap:calc(var(--ih-spacing) * 3)}.ih\:gap-x-4{column-gap:calc(var(--ih-spacing) * 4)}.ih\:gap-y-1{row-gap:var(--ih-spacing)}:where(.ih\:divide-y.ih\:divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}.ih\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ih\:overflow-hidden{overflow:hidden}.ih\:rounded{border-radius:.25rem}.ih\:rounded-full{border-radius:2147483647px}.ih\:rounded-lg{border-radius:var(--radius)}.ih\:rounded-md{border-radius:calc(var(--radius) - 2px)}.ih\:border{border-style:var(--tw-border-style);border-width:1px}.ih\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.ih\:border-dashed{--tw-border-style:dashed;border-style:dashed}.ih\:border-brand{border-color:var(--brand)}.ih\:border-input{border-color:var(--input)}.ih\:bg-black\/85{background-color:var(--ih-color-black)}@supports (color:color-mix(in lab, red, red)){.ih\:bg-black\/85.ih\:bg-black\/85{background-color:color-mix(in oklab, var(--ih-color-black) 85%, transparent)}}.ih\:bg-brand{background-color:var(--brand)}.ih\:bg-brand-foreground{background-color:var(--brand-foreground)}.ih\:bg-brand-soft{background-color:var(--brand-soft)}.ih\:bg-card{background-color:var(--card)}.ih\:bg-muted{background-color:var(--muted)}.ih\:bg-muted-foreground{background-color:var(--muted-foreground)}.ih\:bg-white\/15{background-color:var(--ih-color-white)}@supports (color:color-mix(in lab, red, red)){.ih\:bg-white\/15.ih\:bg-white\/15{background-color:color-mix(in oklab, var(--ih-color-white) 15%, transparent)}}.ih\:object-contain{object-fit:contain}.ih\:p-0\.5{padding:calc(var(--ih-spacing) * .5)}.ih\:p-1{padding:var(--ih-spacing)}.ih\:p-1\.5{padding:calc(var(--ih-spacing) * 1.5)}.ih\:p-2{padding:calc(var(--ih-spacing) * 2)}.ih\:p-3{padding:calc(var(--ih-spacing) * 3)}.ih\:p-4{padding:calc(var(--ih-spacing) * 4)}.ih\:p-5{padding:calc(var(--ih-spacing) * 5)}.ih\:px-1\.5{padding-inline:calc(var(--ih-spacing) * 1.5)}.ih\:px-2{padding-inline:calc(var(--ih-spacing) * 2)}.ih\:px-3{padding-inline:calc(var(--ih-spacing) * 3)}.ih\:px-4{padding-inline:calc(var(--ih-spacing) * 4)}.ih\:px-5{padding-inline:calc(var(--ih-spacing) * 5)}.ih\:py-0\.5{padding-block:calc(var(--ih-spacing) * .5)}.ih\:py-1{padding-block:var(--ih-spacing)}.ih\:py-1\.5{padding-block:calc(var(--ih-spacing) * 1.5)}.ih\:py-2{padding-block:calc(var(--ih-spacing) * 2)}.ih\:py-2\.5{padding-block:calc(var(--ih-spacing) * 2.5)}.ih\:pt-1{padding-top:var(--ih-spacing)}.ih\:pt-9{padding-top:calc(var(--ih-spacing) * 9)}.ih\:pr-3{padding-right:calc(var(--ih-spacing) * 3)}.ih\:pl-8{padding-left:calc(var(--ih-spacing) * 8)}.ih\:text-sm{font-size:var(--ih-text-sm);line-height:var(--tw-leading,var(--ih-text-sm--line-height))}.ih\:text-xl{font-size:var(--ih-text-xl);line-height:var(--tw-leading,var(--ih-text-xl--line-height))}.ih\:text-xs{font-size:var(--ih-text-xs);line-height:var(--tw-leading,var(--ih-text-xs--line-height))}.ih\:text-\[11px\]{font-size:11px}.ih\:text-\[13px\]{font-size:13px}.ih\:text-\[15px\]{font-size:15px}.ih\:leading-relaxed{--tw-leading:var(--ih-leading-relaxed);line-height:var(--ih-leading-relaxed)}.ih\:leading-snug{--tw-leading:var(--ih-leading-snug);line-height:var(--ih-leading-snug)}.ih\:font-medium{--tw-font-weight:var(--ih-font-weight-medium);font-weight:var(--ih-font-weight-medium)}.ih\:font-semibold{--tw-font-weight:var(--ih-font-weight-semibold);font-weight:var(--ih-font-weight-semibold)}.ih\:text-brand-foreground{color:var(--brand-foreground)}.ih\:text-brand-text{color:var(--brand-text)}.ih\:text-destructive{color:var(--destructive)}.ih\:text-muted-foreground{color:var(--muted-foreground)}.ih\:text-white{color:var(--ih-color-white)}.ih\:tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ih\:underline{text-decoration-line:underline}.ih\:opacity-75{opacity:.75}.ih\:shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ih\:shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ih\:transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--ih-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ih-default-transition-duration))}.ih\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--ih-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ih-default-transition-duration))}.ih\:duration-300{--tw-duration:.3s;transition-duration:.3s}@media (hover:hover){.ih\:group-hover\:scale-\[1\.02\].ih\:group-hover\:scale-\[1\.02\]:is(:where(.ih\:group):hover *){scale:1.02}.ih\:hover\:bg-accent.ih\:hover\:bg-accent:hover{background-color:var(--accent)}.ih\:hover\:text-destructive.ih\:hover\:text-destructive:hover{color:var(--destructive)}.ih\:hover\:text-foreground.ih\:hover\:text-foreground:hover{color:var(--foreground)}.ih\:hover\:underline.ih\:hover\:underline:hover{text-decoration-line:underline}.ih\:hover\:shadow-md.ih\:hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.ih\:focus-visible\:ring-3.ih\:focus-visible\:ring-3:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ih\:focus-visible\:ring-ring\/30.ih\:focus-visible\:ring-ring\/30:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.ih\:focus-visible\:ring-ring\/30.ih\:focus-visible\:ring-ring\/30:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 30%, transparent)}}.ih\:focus-visible\:outline-none.ih\:focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}@media (min-width:40rem){.ih\:sm\:w-64.ih\:sm\:w-64{width:calc(var(--ih-spacing) * 64)}.ih\:sm\:max-w-lg.ih\:sm\:max-w-lg{max-width:var(--ih-container-lg)}.ih\:sm\:max-w-md.ih\:sm\:max-w-md{max-width:var(--ih-container-md)}.ih\:sm\:grid-cols-2.ih\:sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.ih\:sm\:grid-cols-\[7rem_minmax\(0\,1fr\)_auto\].ih\:sm\:grid-cols-\[7rem_minmax\(0\,1fr\)_auto\]{grid-template-columns:7rem minmax(0,1fr) auto}.ih\:sm\:flex-col.ih\:sm\:flex-col{flex-direction:column}.ih\:sm\:items-center.ih\:sm\:items-center{align-items:center}.ih\:sm\:gap-4.ih\:sm\:gap-4{gap:calc(var(--ih-spacing) * 4)}.ih\:sm\:p-8.ih\:sm\:p-8{padding:calc(var(--ih-spacing) * 8)}}@media (min-width:48rem){.ih\:md\:grid-cols-3.ih\:md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:64rem){.ih\:lg\:sticky.ih\:lg\:sticky{position:sticky}.ih\:lg\:top-24.ih\:lg\:top-24{top:calc(var(--ih-spacing) * 24)}.ih\:lg\:grid-cols-\[minmax\(0\,1fr\)_20rem\].ih\:lg\:grid-cols-\[minmax\(0\,1fr\)_20rem\]{grid-template-columns:minmax(0,1fr) 20rem}.ih\:lg\:grid-cols-\[minmax\(0\,1fr\)_22rem\].ih\:lg\:grid-cols-\[minmax\(0\,1fr\)_22rem\]{grid-template-columns:minmax(0,1fr) 22rem}}@media (min-width:80rem){.ih\:xl\:grid-cols-4.ih\:xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}}.verleih-text p{margin:.5rem 0}.verleih-text.verleih-text p:first-child{margin-top:0}.verleih-text.verleih-text p:last-child{margin-bottom:0}.verleih-text ul{margin:.5rem 0;padding-left:1.25rem;list-style:outside}.verleih-text ol{margin:.5rem 0;padding-left:1.25rem;list-style:decimal}.verleih-text h2,.verleih-text h3{margin:1rem 0 .5rem;font-weight:600}.verleih-text a{color:var(--color-brand-text);text-decoration:underline}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}} diff --git a/dist/chunks/loader-circle-DBP4Qhm5.js b/dist/chunks/loader-circle-DBP4Qhm5.js deleted file mode 100644 index b891360..0000000 --- a/dist/chunks/loader-circle-DBP4Qhm5.js +++ /dev/null @@ -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}; \ No newline at end of file diff --git a/dist/chunks/loader-circle-km1SveWx.js b/dist/chunks/loader-circle-km1SveWx.js new file mode 100644 index 0000000..0d6d36c --- /dev/null +++ b/dist/chunks/loader-circle-km1SveWx.js @@ -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}; \ No newline at end of file diff --git a/dist/inhaus.json b/dist/inhaus.json index a2b5c79..c139258 100644 --- a/dist/inhaus.json +++ b/dist/inhaus.json @@ -7,6 +7,6 @@ "pages/Show": "pages/Show.js" }, "css": [ - "assets/style-HFzXm6mv.css" + "assets/style-BGA_ZYPJ.css" ] } \ No newline at end of file diff --git a/dist/pages/Editor.js b/dist/pages/Editor.js index d77c438..1a33e4b 100644 --- a/dist/pages/Editor.js +++ b/dist/pages/Editor.js @@ -1 +1 @@ -import{t as e}from"../chunks/createLucideIcon-CYyWUN7r.js";import{n as t,t as n}from"../chunks/loader-circle-DBP4Qhm5.js";import{t as r}from"../chunks/trash-COMUOW6h.js";import{Fragment as i,computed as a,createBlock as o,createCommentVNode as s,createElementBlock as c,createElementVNode as l,createTextVNode as u,createVNode as d,normalizeClass as f,openBlock as p,ref as m,renderList as h,toDisplayString as g,unref as _,withCtx as v,withModifiers as y}from"vue";import{Link as b,useForm as x}from"@inertiajs/vue3";import{AppLayout as S,Button as C,FormField as w,Input as T,PageHeader as E,Panel as D,RichTextEditor as O}from"@inhaus/ui";var k=e({name:`image-plus`,size:24,node:[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]}),A={class:`ih:grid ih:min-w-0 ih:content-start ih:gap-6`},j={class:`ih:grid ih:gap-5`},M={class:`ih:grid ih:content-start ih:gap-6`},N={class:`ih:grid ih:gap-3`},P=[`src`],F={key:0,class:`ih:flex ih:gap-2`},I={key:1,class:`ih:text-[13px] ih:text-destructive`},L={key:2,class:`ih:text-[13px] ih:text-muted-foreground`},R={class:`ih:grid ih:gap-4`},z={class:`ih:grid ih:grid-cols-2 ih:gap-1 ih:rounded-md ih:bg-muted ih:p-1`,role:`radiogroup`,"aria-label":`Verleihstatus`},B=[`aria-checked`,`onClick`],V={__name:`Editor`,props:{item:{type:Object,default:null},labels:{type:Object,required:!0}},setup(e){let V=e,H=V.item,U=x({title:H?.title??``,description:H?.description??``,lent:H?.lent??!1,location:H?.location??``,image:null,remove_image:!1}),W=m(H?.image_url??null),G=m(null),K=m(!1);function q(e){let t=[...e].find(e=>e.type.startsWith(`image/`));t&&(U.image=t,U.remove_image=!1,W.value=URL.createObjectURL(t))}function J(){U.image=null,U.remove_image=!0,W.value=null}let Y=a(()=>H?`${V.labels.singular} bearbeiten`:`${V.labels.singular} erfassen`);function X(){U.transform(e=>({...e,lent:+!!e.lent,remove_image:+!!e.remove_image})).post(H?`/verleih/${H.id}`:`/verleih`,{forceFormData:!0})}return(a,m)=>(p(),o(_(S),{title:Y.value},{default:v(()=>[d(_(b),{href:_(H)?_(H).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`},{default:v(()=>[d(_(t),{class:`ih:size-4`}),u(` `+g(_(H)?_(H).title:e.labels.title),1)]),_:1},8,[`href`]),d(_(E),{title:Y.value},null,8,[`title`]),l(`form`,{class:`ih:grid ih:gap-6 ih:lg:grid-cols-[minmax(0,1fr)_20rem]`,onSubmit:y(X,[`prevent`])},[l(`div`,A,[d(_(D),null,{default:v(()=>[l(`div`,j,[d(_(w),{id:`vl-title`,label:`Titel`,error:_(U).errors.title},{default:v(()=>[d(_(T),{id:`vl-title`,modelValue:_(U).title,"onUpdate:modelValue":m[0]||=e=>_(U).title=e,maxlength:`200`,required:``,placeholder:`z. B. „Sommerwiese“, Acryl auf Leinwand`},null,8,[`modelValue`])]),_:1},8,[`error`]),d(_(w),{id:`vl-description`,label:`Beschreibung`,error:_(U).errors.description,hint:`Z. B. Künstlerin oder Künstler, Maße, Technik – alles, was bei der Auswahl hilft.`},{default:v(()=>[d(_(O),{id:`vl-description`,modelValue:_(U).description,"onUpdate:modelValue":m[1]||=e=>_(U).description=e,bordered:``,"min-height":`12rem`,headings:[2,3],placeholder:`Beschreibung …`},null,8,[`modelValue`])]),_:1},8,[`error`])])]),_:1})]),l(`aside`,M,[d(_(D),null,{default:v(()=>[l(`div`,N,[m[12]||=l(`p`,{class:`ih:text-[13px] ih:font-medium`},`Foto`,-1),l(`div`,{class:f([`ih:relative ih:grid ih:aspect-[4/3] ih:place-items-center ih:overflow-hidden ih:rounded-md ih:border ih:border-dashed ih:bg-muted ih:p-2`,K.value?`ih:border-brand ih:bg-brand-soft`:``]),onDragover:m[3]||=y(e=>K.value=!0,[`prevent`]),onDragleave:m[4]||=e=>K.value=!1,onDrop:m[5]||=y(e=>{K.value=!1,q(e.dataTransfer.files)},[`prevent`])},[W.value?(p(),c(`img`,{key:0,src:W.value,alt:`Vorschau`,class:`ih:max-h-full ih:max-w-full ih:object-contain`},null,8,P)):(p(),c(`button`,{key:1,type:`button`,class:`ih:grid ih:justify-items-center ih:gap-1 ih:text-sm ih:text-muted-foreground`,onClick:m[2]||=e=>G.value.click()},[d(_(k),{class:`ih:size-8`,"stroke-width":1.5}),m[9]||=u(` Foto wählen oder hierher ziehen `,-1)]))],34),l(`input`,{ref_key:`fileInput`,ref:G,type:`file`,accept:`image/jpeg,image/png,image/webp`,class:`ih:hidden`,onChange:m[6]||=e=>q(e.target.files)},null,544),W.value?(p(),c(`div`,F,[d(_(C),{type:`button`,variant:`outline`,size:`sm`,onClick:m[7]||=e=>G.value.click()},{default:v(()=>[d(_(k)),m[10]||=u(` Anderes Foto`,-1)]),_:1}),d(_(C),{type:`button`,variant:`ghost`,size:`sm`,class:`ih:text-destructive`,onClick:J},{default:v(()=>[d(_(r)),m[11]||=u(` Entfernen`,-1)]),_:1})])):s(``,!0),_(U).errors.image?(p(),c(`p`,I,g(_(U).errors.image),1)):s(``,!0),_(U).progress?(p(),c(`p`,L,`Wird hochgeladen … `+g(_(U).progress.percentage)+` %`,1)):s(``,!0)])]),_:1}),d(_(D),null,{default:v(()=>[l(`fieldset`,R,[m[13]||=l(`legend`,{class:`ih:mb-2 ih:text-[13px] ih:font-medium`},`Verleihstatus`,-1),l(`div`,z,[(p(),c(i,null,h([{value:!1,label:`Verfügbar`},{value:!0,label:`Verliehen`}],e=>l(`button`,{key:e.label,type:`button`,role:`radio`,"aria-checked":_(U).lent===e.value,class:f([`ih:rounded ih:py-1.5 ih:text-sm ih:font-medium`,_(U).lent===e.value?`ih:bg-card ih:shadow-xs`:`ih:text-muted-foreground`]),onClick:t=>_(U).lent=e.value},g(e.label),11,B)),64))]),d(_(w),{id:`vl-location`,label:_(U).lent?`Verliehen an / Ort`:`Aktueller Standort`,error:_(U).errors.location},{default:v(()=>[d(_(T),{id:`vl-location`,modelValue:_(U).location,"onUpdate:modelValue":m[8]||=e=>_(U).location=e,maxlength:`200`,placeholder:_(U).lent?`z. B. Verwaltung, Flur 1. OG`:`z. B. Lager Künstlerteam`},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`label`,`error`])])]),_:1}),d(_(C),{type:`submit`,size:`lg`,disabled:_(U).processing||!_(U).title.trim()},{default:v(()=>[_(U).processing?(p(),o(_(n),{key:0,class:`ih:animate-spin`})):s(``,!0),m[14]||=u(` Speichern `,-1)]),_:1},8,[`disabled`])])],32)]),_:1},8,[`title`]))}};export{V as default}; \ No newline at end of file +import{t as e}from"../chunks/createLucideIcon-CYyWUN7r.js";import{t}from"../chunks/loader-circle-km1SveWx.js";import{t as n}from"../chunks/trash-COMUOW6h.js";import{Fragment as r,computed as i,createBlock as a,createCommentVNode as o,createElementBlock as s,createElementVNode as c,createTextVNode as l,createVNode as u,normalizeClass as d,openBlock as f,ref as p,renderList as m,toDisplayString as h,unref as g,withCtx as _,withModifiers as v}from"vue";import{useForm as y}from"@inertiajs/vue3";import{AppLayout as b,Button as x,FormField as S,Input as C,PageHeader as w,Panel as T,RichTextEditor as E}from"@inhaus/ui";var D=e({name:`image-plus`,size:24,node:[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]}),O={class:`ih:grid ih:min-w-0 ih:content-start ih:gap-6`},k={class:`ih:grid ih:gap-5`},A={class:`ih:grid ih:content-start ih:gap-6`},j={class:`ih:grid ih:gap-3`},M=[`src`],N={key:0,class:`ih:flex ih:gap-2`},P={key:1,class:`ih:text-[13px] ih:text-destructive`},F={key:2,class:`ih:text-[13px] ih:text-muted-foreground`},I={class:`ih:grid ih:gap-4`},L={class:`ih:grid ih:grid-cols-2 ih:gap-1 ih:rounded-md ih:bg-muted ih:p-1`,role:`radiogroup`,"aria-label":`Verleihstatus`},R=[`aria-checked`,`onClick`],z={__name:`Editor`,props:{item:{type:Object,default:null},labels:{type:Object,required:!0}},setup(e){let z=e,B=z.item,V=y({title:B?.title??``,description:B?.description??``,lent:B?.lent??!1,location:B?.location??``,image:null,remove_image:!1}),H=p(B?.image_url??null),U=p(null),W=p(!1);function G(e){let t=[...e].find(e=>e.type.startsWith(`image/`));t&&(V.image=t,V.remove_image=!1,H.value=URL.createObjectURL(t))}function K(){V.image=null,V.remove_image=!0,H.value=null}let q=i(()=>B?`${z.labels.singular} bearbeiten`:`${z.labels.singular} erfassen`);function J(){V.transform(e=>({...e,lent:+!!e.lent,remove_image:+!!e.remove_image})).post(B?`/verleih/${B.id}`:`/verleih`,{forceFormData:!0})}return(i,p)=>(f(),a(g(b),{title:q.value},{default:_(()=>[u(g(w),{title:q.value,breadcrumbs:g(B)?[{label:e.labels.title,href:`/verleih`},{label:g(B).title,href:g(B).url}]:[{label:e.labels.title,href:`/verleih`}],icon:`images`},null,8,[`title`,`breadcrumbs`]),c(`form`,{class:`ih:grid ih:gap-6 ih:lg:grid-cols-[minmax(0,1fr)_20rem]`,onSubmit:v(J,[`prevent`])},[c(`div`,O,[u(g(T),null,{default:_(()=>[c(`div`,k,[u(g(S),{id:`vl-title`,label:`Titel`,error:g(V).errors.title},{default:_(()=>[u(g(C),{id:`vl-title`,modelValue:g(V).title,"onUpdate:modelValue":p[0]||=e=>g(V).title=e,maxlength:`200`,required:``,placeholder:`z. B. „Sommerwiese“, Acryl auf Leinwand`},null,8,[`modelValue`])]),_:1},8,[`error`]),u(g(S),{id:`vl-description`,label:`Beschreibung`,error:g(V).errors.description,hint:`Z. B. Künstlerin oder Künstler, Maße, Technik – alles, was bei der Auswahl hilft.`},{default:_(()=>[u(g(E),{id:`vl-description`,modelValue:g(V).description,"onUpdate:modelValue":p[1]||=e=>g(V).description=e,bordered:``,"min-height":`12rem`,headings:[2,3],placeholder:`Beschreibung …`},null,8,[`modelValue`])]),_:1},8,[`error`])])]),_:1})]),c(`aside`,A,[u(g(T),null,{default:_(()=>[c(`div`,j,[p[12]||=c(`p`,{class:`ih:text-[13px] ih:font-medium`},`Foto`,-1),c(`div`,{class:d([`ih:relative ih:grid ih:aspect-[4/3] ih:place-items-center ih:overflow-hidden ih:rounded-md ih:border ih:border-dashed ih:bg-muted ih:p-2`,W.value?`ih:border-brand ih:bg-brand-soft`:``]),onDragover:p[3]||=v(e=>W.value=!0,[`prevent`]),onDragleave:p[4]||=e=>W.value=!1,onDrop:p[5]||=v(e=>{W.value=!1,G(e.dataTransfer.files)},[`prevent`])},[H.value?(f(),s(`img`,{key:0,src:H.value,alt:`Vorschau`,class:`ih:max-h-full ih:max-w-full ih:object-contain`},null,8,M)):(f(),s(`button`,{key:1,type:`button`,class:`ih:grid ih:justify-items-center ih:gap-1 ih:text-sm ih:text-muted-foreground`,onClick:p[2]||=e=>U.value.click()},[u(g(D),{class:`ih:size-8`,"stroke-width":1.5}),p[9]||=l(` Foto wählen oder hierher ziehen `,-1)]))],34),c(`input`,{ref_key:`fileInput`,ref:U,type:`file`,accept:`image/jpeg,image/png,image/webp`,class:`ih:hidden`,onChange:p[6]||=e=>G(e.target.files)},null,544),H.value?(f(),s(`div`,N,[u(g(x),{type:`button`,variant:`outline`,size:`sm`,onClick:p[7]||=e=>U.value.click()},{default:_(()=>[u(g(D)),p[10]||=l(` Anderes Foto`,-1)]),_:1}),u(g(x),{type:`button`,variant:`ghost`,size:`sm`,class:`ih:text-destructive`,onClick:K},{default:_(()=>[u(g(n)),p[11]||=l(` Entfernen`,-1)]),_:1})])):o(``,!0),g(V).errors.image?(f(),s(`p`,P,h(g(V).errors.image),1)):o(``,!0),g(V).progress?(f(),s(`p`,F,`Wird hochgeladen … `+h(g(V).progress.percentage)+` %`,1)):o(``,!0)])]),_:1}),u(g(T),null,{default:_(()=>[c(`fieldset`,I,[p[13]||=c(`legend`,{class:`ih:mb-2 ih:text-[13px] ih:font-medium`},`Verleihstatus`,-1),c(`div`,L,[(f(),s(r,null,m([{value:!1,label:`Verfügbar`},{value:!0,label:`Verliehen`}],e=>c(`button`,{key:e.label,type:`button`,role:`radio`,"aria-checked":g(V).lent===e.value,class:d([`ih:rounded ih:py-1.5 ih:text-sm ih:font-medium`,g(V).lent===e.value?`ih:bg-card ih:shadow-xs`:`ih:text-muted-foreground`]),onClick:t=>g(V).lent=e.value},h(e.label),11,R)),64))]),u(g(S),{id:`vl-location`,label:g(V).lent?`Verliehen an / Ort`:`Aktueller Standort`,error:g(V).errors.location},{default:_(()=>[u(g(C),{id:`vl-location`,modelValue:g(V).location,"onUpdate:modelValue":p[8]||=e=>g(V).location=e,maxlength:`200`,placeholder:g(V).lent?`z. B. Verwaltung, Flur 1. OG`:`z. B. Lager Künstlerteam`},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`label`,`error`])])]),_:1}),u(g(x),{type:`submit`,size:`lg`,disabled:g(V).processing||!g(V).title.trim()},{default:_(()=>[g(V).processing?(f(),a(g(t),{key:0,class:`ih:animate-spin`})):o(``,!0),p[14]||=l(` Speichern `,-1)]),_:1},8,[`disabled`])])],32)]),_:1},8,[`title`]))}};export{z as default}; \ No newline at end of file diff --git a/dist/pages/Index.js b/dist/pages/Index.js index 603c5ce..91ed38d 100644 --- a/dist/pages/Index.js +++ b/dist/pages/Index.js @@ -1 +1 @@ -import{t as e}from"../chunks/createLucideIcon-CYyWUN7r.js";import{n as t,r as n,t as r}from"../chunks/StatusBadge-CZaj6wAi.js";import{t as i}from"../chunks/inbox-CWQqWjak.js";import{Fragment as a,createBlock as o,createCommentVNode as s,createElementBlock as c,createElementVNode as l,createTextVNode as u,createVNode as d,normalizeClass as f,openBlock as p,ref as m,renderList as h,toDisplayString as g,unref as _,vModelText as v,watch as y,withCtx as b,withDirectives as x}from"vue";import{Link as S,router as C,usePage as w}from"@inertiajs/vue3";import{AppLayout as T,Button as E,EmptyState as D,PageHeader as O,formatDate as k,toast as A}from"@inhaus/ui";var j=e({name:`images`,size:24,node:[[`path`,{d:`m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16`,key:`9kzy35`}],[`path`,{d:`M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2`,key:`1t0f0t`}],[`circle`,{cx:`13`,cy:`7`,r:`1`,fill:`currentColor`,key:`1obus6`}],[`rect`,{x:`8`,y:`2`,width:`14`,height:`14`,rx:`2`,key:`1gvhby`}]]}),M=e({name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]}),N=e({name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]}),P=e({name:`settings-2`,size:24,node:[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]}),F={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`},I=[`src`,`alt`],L={key:1,class:`ih:grid ih:size-full ih:place-items-center`},R={class:`ih:flex ih:flex-1 ih:flex-col ih:gap-1 ih:p-3`},z={key:0,class:`ih:mt-auto ih:flex ih:items-center ih:gap-1 ih:pt-1 ih:text-xs ih:text-muted-foreground`},B={class:`ih:truncate`},V={__name:`ItemCard`,props:{item:{type:Object,required:!0}},setup(e){return(i,a)=>(p(),c(`article`,F,[d(_(S),{href:e.item.url,prefetch:``,class:`ih:relative ih:block ih:aspect-[4/3] ih:overflow-hidden ih:bg-muted ih:p-3 ih:pt-9`},{default:b(()=>[e.item.thumb_url?(p(),c(`img`,{key:0,src:e.item.thumb_url,alt:e.item.title,loading:`lazy`,class:`ih:size-full ih:object-contain ih:transition-transform ih:duration-300 ih:group-hover:scale-[1.02]`},null,8,I)):(p(),c(`span`,L,[d(_(n),{class:`ih:size-8 ih:text-muted-foreground`,"stroke-width":1.5})])),d(r,{lent:e.item.lent,class:`ih:absolute ih:top-2 ih:left-2`},null,8,[`lent`])]),_:1},8,[`href`]),l(`div`,R,[d(_(S),{href:e.item.url,prefetch:``,class:`ih:line-clamp-2 ih:text-[15px] ih:leading-snug ih:font-semibold ih:hover:underline`},{default:b(()=>[u(g(e.item.title),1)]),_:1},8,[`href`]),e.item.location?(p(),c(`p`,z,[d(_(t),{class:`ih:size-3.5 ih:shrink-0`}),l(`span`,B,g(e.item.location),1)])):s(``,!0)])]))}},ee={key:0,class:`ih:rounded-full ih:bg-brand ih:px-1.5 ih:text-[11px] ih:text-brand-foreground`},H={key:0,class:`ih:mb-6 ih:rounded-lg ih:border ih:bg-card ih:p-4`,"aria-labelledby":`meine-anfragen`},U={class:`ih:divide-y`},W={class:`ih:text-muted-foreground`},G={key:0,class:`ih:text-muted-foreground`},K={class:`ih:ml-auto ih:text-xs ih:text-muted-foreground`},q=[`onClick`],J={class:`ih:mb-5 ih:flex ih:flex-wrap ih:items-center ih:gap-3`},Y={class:`ih:flex ih:flex-wrap ih:gap-1.5`,"aria-label":`Status`},X=[`aria-pressed`,`onClick`],Z={class:`ih:tabular-nums ih:opacity-75`},Q={class:`ih:relative ih:ml-auto ih:w-full ih:sm:w-64`},$=[`placeholder`,`aria-label`],te={key:1,class:`ih:grid ih:grid-cols-2 ih:gap-3 ih:sm:gap-4 ih:md:grid-cols-3 ih:xl:grid-cols-4`},ne={key:2,class:`ih:rounded-lg ih:border ih:bg-card`},re={key:3,class:`ih:mt-6 ih:flex ih:items-center ih:gap-1.5 ih:text-xs ih:text-muted-foreground`},ie={__name:`Index`,props:{items:{type:Array,required:!0},filters:{type:Object,required:!0},counts:{type:Object,required:!0},labels:{type:Object,required:!0},canManage:{type:Boolean,default:!1},pendingRequests:{type:Number,default:null},myRequests:{type:Array,default:()=>[]}},setup(e){let t=e,n=w();y(()=>n.props.flash?.status,e=>e&&A.success(e),{immediate:!0});let r=m(t.filters.q),F;y(r,e=>{clearTimeout(F),F=setTimeout(()=>I({q:e}),300)});function I(e){let n={...t.filters,...e};C.get(`/verleih`,Object.fromEntries(Object.entries(n).filter(([,e])=>e)),{preserveState:!0,preserveScroll:!0,replace:!0})}let L=[{value:null,label:`Alle`,count:`all`},{value:`verfuegbar`,label:`Verfügbar`,count:`available`},{value:`verliehen`,label:`Verliehen`,count:`lent`}],R=e=>window.confirm(`Anfrage zurückziehen?`)&&C.delete(`/verleih/anfragen/${e.id}`,{preserveScroll:!0});return(t,n)=>(p(),o(_(T),{title:e.labels.title},{default:b(()=>[d(_(O),{title:e.labels.title,description:`Alle ${e.labels.plural} auf einen Blick – verfügbar oder verliehen, und wo sie gerade sind.`},{actions:b(()=>[e.canManage?(p(),c(a,{key:0},[d(_(E),{variant:`outline`,"as-child":``},{default:b(()=>[d(_(S),{href:`/verleih/anfragen`},{default:b(()=>[d(_(i)),n[1]||=u(` Anfragen`,-1),e.pendingRequests?(p(),c(`span`,ee,g(e.pendingRequests),1)):s(``,!0)]),_:1})]),_:1}),d(_(E),{"as-child":``},{default:b(()=>[d(_(S),{href:`/verleih/neu`},{default:b(()=>[d(_(M)),u(` `+g(e.labels.singular)+` erfassen`,1)]),_:1})]),_:1})],64)):s(``,!0)]),_:1},8,[`title`,`description`]),e.myRequests.length?(p(),c(`section`,H,[n[2]||=l(`h2`,{id:`meine-anfragen`,class:`ih:mb-2 ih:text-sm ih:font-semibold`},`Ihre Anfragen`,-1),l(`ul`,U,[(p(!0),c(a,null,h(e.myRequests,e=>(p(),c(`li`,{key:e.id,class:`ih:flex ih:flex-wrap ih:items-center ih:gap-x-3 ih:gap-y-1 ih:py-2 ih:text-sm`},[d(_(S),{href:e.item.url,class:`ih:font-medium ih:hover:underline`},{default:b(()=>[u(g(e.item.title),1)]),_:2},1032,[`href`]),l(`span`,W,`nach `+g(e.location),1),l(`span`,{class:f([`ih:rounded-full ih:px-2 ih:py-0.5 ih:text-xs ih:font-medium`,e.status===`accepted`?`ih:bg-brand ih:text-brand-foreground`:e.status===`pending`?`ih:bg-brand-soft ih:text-brand-text`:`ih:bg-muted ih:text-muted-foreground`])},g(e.status_label),3),e.note?(p(),c(`span`,G,`„`+g(e.note)+`“`,1)):s(``,!0),l(`span`,K,g(_(k)(e.created_at)),1),e.status===`pending`?(p(),c(`button`,{key:1,type:`button`,class:`ih:text-xs ih:font-medium ih:text-muted-foreground ih:hover:text-destructive`,onClick:t=>R(e)},`Zurückziehen`,8,q)):s(``,!0)]))),128))])])):s(``,!0),l(`div`,J,[l(`nav`,Y,[(p(),c(a,null,h(L,t=>l(`button`,{key:t.label,type:`button`,class:f([`ih:inline-flex ih:items-center ih:gap-1.5 ih:rounded-full ih:border ih:px-3 ih:py-1 ih:text-[13px]`,e.filters.status===t.value?`ih:border-brand ih:bg-brand ih:text-brand-foreground`:`ih:bg-card ih:hover:bg-accent`]),"aria-pressed":e.filters.status===t.value,onClick:e=>I({status:t.value})},[u(g(t.label)+` `,1),l(`span`,Z,g(e.counts[t.count]),1)],10,X)),64))]),l(`div`,Q,[d(_(N),{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`}),x(l(`input`,{"onUpdate:modelValue":n[0]||=e=>r.value=e,type:`search`,placeholder:`${e.labels.plural} oder Orte suchen`,"aria-label":`${e.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`},null,8,$),[[v,r.value]])])]),e.items.length?(p(),c(`div`,te,[(p(!0),c(a,null,h(e.items,e=>(p(),o(V,{key:e.id,item:e},null,8,[`item`]))),128))])):(p(),c(`div`,ne,[d(_(D),{icon:_(j),title:e.filters.q||e.filters.status?`Keine passenden ${e.labels.plural}`:`Noch keine ${e.labels.plural}`,text:e.canManage&&!e.filters.q&&!e.filters.status?`Legen Sie mit „${e.labels.singular} erfassen“ los – oder übernehmen Sie den Bestand aus WordPress (Administration → Portal → Verleih).`:``},null,8,[`icon`,`title`,`text`])])),e.canManage?(p(),c(`p`,re,[d(_(P),{class:`ih:size-3.5`}),n[3]||=u(` Bezeichnungen und Übernahme aus WordPress: Administration → Portal → Verleih `,-1)])):s(``,!0)]),_:1},8,[`title`]))}};export{ie as default}; \ No newline at end of file +import{t as e}from"../chunks/createLucideIcon-CYyWUN7r.js";import{n as t,r as n,t as r}from"../chunks/StatusBadge-CZaj6wAi.js";import{t as i}from"../chunks/inbox-CWQqWjak.js";import{Fragment as a,createBlock as o,createCommentVNode as s,createElementBlock as c,createElementVNode as l,createTextVNode as u,createVNode as d,isRef as f,normalizeClass as p,openBlock as m,renderList as h,toDisplayString as g,unref as _,watch as v,withCtx as y}from"vue";import{Link as b,router as x,usePage as S}from"@inertiajs/vue3";import{AppLayout as C,Button as w,EmptyState as T,ListToolbar as E,PageHeader as D,formatDate as O,toast as k,useListView as A}from"@inhaus/ui";var j=e({name:`images`,size:24,node:[[`path`,{d:`m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16`,key:`9kzy35`}],[`path`,{d:`M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2`,key:`1t0f0t`}],[`circle`,{cx:`13`,cy:`7`,r:`1`,fill:`currentColor`,key:`1obus6`}],[`rect`,{x:`8`,y:`2`,width:`14`,height:`14`,rx:`2`,key:`1gvhby`}]]}),M=e({name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]}),N=e({name:`settings-2`,size:24,node:[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]}),P={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`},F=[`src`,`alt`],I={key:1,class:`ih:grid ih:size-full ih:place-items-center`},L={class:`ih:flex ih:flex-1 ih:flex-col ih:gap-1 ih:p-3`},R={key:0,class:`ih:mt-auto ih:flex ih:items-center ih:gap-1 ih:pt-1 ih:text-xs ih:text-muted-foreground`},z={class:`ih:truncate`},B={__name:`ItemCard`,props:{item:{type:Object,required:!0}},setup(e){return(i,a)=>(m(),c(`article`,P,[d(_(b),{href:e.item.url,prefetch:``,class:`ih:relative ih:block ih:aspect-[4/3] ih:overflow-hidden ih:bg-muted ih:p-3 ih:pt-9`},{default:y(()=>[e.item.thumb_url?(m(),c(`img`,{key:0,src:e.item.thumb_url,alt:e.item.title,loading:`lazy`,class:`ih:size-full ih:object-contain ih:transition-transform ih:duration-300 ih:group-hover:scale-[1.02]`},null,8,F)):(m(),c(`span`,I,[d(_(n),{class:`ih:size-8 ih:text-muted-foreground`,"stroke-width":1.5})])),d(r,{lent:e.item.lent,class:`ih:absolute ih:top-2 ih:left-2`},null,8,[`lent`])]),_:1},8,[`href`]),l(`div`,L,[d(_(b),{href:e.item.url,prefetch:``,class:`ih:line-clamp-2 ih:text-[15px] ih:leading-snug ih:font-semibold ih:hover:underline`},{default:y(()=>[u(g(e.item.title),1)]),_:1},8,[`href`]),e.item.location?(m(),c(`p`,R,[d(_(t),{class:`ih:size-3.5 ih:shrink-0`}),l(`span`,z,g(e.item.location),1)])):s(``,!0)])]))}},ee={key:0,class:`ih:rounded-full ih:bg-brand ih:px-1.5 ih:text-[11px] ih:text-brand-foreground`},V={key:0,class:`ih:mb-6 ih:rounded-lg ih:border ih:bg-card ih:p-4`,"aria-labelledby":`meine-anfragen`},H={class:`ih:divide-y`},U={class:`ih:text-muted-foreground`},W={key:0,class:`ih:text-muted-foreground`},G={class:`ih:ml-auto ih:text-xs ih:text-muted-foreground`},K=[`onClick`],q={key:1,class:`ih:grid ih:grid-cols-2 ih:gap-3 ih:sm:gap-4 ih:md:grid-cols-3 ih:xl:grid-cols-4`},J={key:2,class:`ih:divide-y ih:rounded-lg ih:border ih:bg-card`},Y={class:`ih:grid ih:size-12 ih:shrink-0 ih:place-items-center ih:overflow-hidden ih:rounded-md ih:bg-muted`},X=[`src`],Z={class:`ih:grid ih:min-w-0 ih:flex-1`},Q={class:`ih:truncate ih:font-medium`},$={key:0,class:`ih:truncate ih:text-xs ih:text-muted-foreground`},te={key:3,class:`ih:rounded-lg ih:border ih:bg-card`},ne={key:4,class:`ih:mt-6 ih:flex ih:items-center ih:gap-1.5 ih:text-xs ih:text-muted-foreground`},re={__name:`Index`,props:{items:{type:Array,required:!0},filters:{type:Object,required:!0},counts:{type:Object,required:!0},labels:{type:Object,required:!0},canManage:{type:Boolean,default:!1},pendingRequests:{type:Number,default:null},myRequests:{type:Array,default:()=>[]}},setup(e){let t=e,n=S();v(()=>n.props.flash?.status,e=>e&&k.success(e),{immediate:!0});let P=A(`verleih`,`grid`);function F(e){let n={...t.filters,...e};x.get(`/verleih`,Object.fromEntries(Object.entries(n).filter(([,e])=>e)),{preserveState:!0,preserveScroll:!0,replace:!0})}let I=[{value:null,label:`Alle`,count:`all`},{value:`verfuegbar`,label:`Verfügbar`,count:`available`},{value:`verliehen`,label:`Verliehen`,count:`lent`}],L=e=>window.confirm(`Anfrage zurückziehen?`)&&x.delete(`/verleih/anfragen/${e.id}`,{preserveScroll:!0});return(t,n)=>(m(),o(_(C),{title:e.labels.title},{default:y(()=>[d(_(D),{title:e.labels.title,icon:`images`,description:`Alle ${e.labels.plural} auf einen Blick – verfügbar oder verliehen, und wo sie gerade sind.`},{actions:y(()=>[e.canManage?(m(),c(a,{key:0},[d(_(w),{variant:`outline`,"as-child":``},{default:y(()=>[d(_(b),{href:`/verleih/anfragen`},{default:y(()=>[d(_(i)),n[3]||=u(` Anfragen`,-1),e.pendingRequests?(m(),c(`span`,ee,g(e.pendingRequests),1)):s(``,!0)]),_:1})]),_:1}),d(_(w),{"as-child":``},{default:y(()=>[d(_(b),{href:`/verleih/neu`},{default:y(()=>[d(_(M)),u(` `+g(e.labels.singular)+` erfassen`,1)]),_:1})]),_:1})],64)):s(``,!0)]),_:1},8,[`title`,`description`]),e.myRequests.length?(m(),c(`section`,V,[n[4]||=l(`h2`,{id:`meine-anfragen`,class:`ih:mb-2 ih:text-sm ih:font-semibold`},`Ihre Anfragen`,-1),l(`ul`,H,[(m(!0),c(a,null,h(e.myRequests,e=>(m(),c(`li`,{key:e.id,class:`ih:flex ih:flex-wrap ih:items-center ih:gap-x-3 ih:gap-y-1 ih:py-2 ih:text-sm`},[d(_(b),{href:e.item.url,class:`ih:font-medium ih:hover:underline`},{default:y(()=>[u(g(e.item.title),1)]),_:2},1032,[`href`]),l(`span`,U,`nach `+g(e.location),1),l(`span`,{class:p([`ih:rounded-full ih:px-2 ih:py-0.5 ih:text-xs ih:font-medium`,e.status===`accepted`?`ih:bg-brand ih:text-brand-foreground`:e.status===`pending`?`ih:bg-brand-soft ih:text-brand-text`:`ih:bg-muted ih:text-muted-foreground`])},g(e.status_label),3),e.note?(m(),c(`span`,W,`„`+g(e.note)+`“`,1)):s(``,!0),l(`span`,G,g(_(O)(e.created_at)),1),e.status===`pending`?(m(),c(`button`,{key:1,type:`button`,class:`ih:text-xs ih:font-medium ih:text-muted-foreground ih:hover:text-destructive`,onClick:t=>L(e)},`Zurückziehen`,8,K)):s(``,!0)]))),128))])])):s(``,!0),d(_(E),{filters:I.map(t=>({value:t.value,label:t.label,count:e.counts[t.count]})),filter:e.filters.status||null,"filter-label":`Status`,search:e.filters.q??``,"search-placeholder":`${e.labels.plural} oder Orte suchen`,view:_(P),"onUpdate:view":n[0]||=e=>f(P)?P.value=e:null,"onUpdate:filter":n[1]||=e=>F({status:e}),"onUpdate:search":n[2]||=e=>F({q:e})},null,8,[`filters`,`filter`,`search`,`search-placeholder`,`view`]),e.items.length&&_(P)===`grid`?(m(),c(`div`,q,[(m(!0),c(a,null,h(e.items,e=>(m(),o(B,{key:e.id,item:e},null,8,[`item`]))),128))])):e.items.length?(m(),c(`ul`,J,[(m(!0),c(a,null,h(e.items,e=>(m(),c(`li`,{key:e.id},[d(_(b),{href:e.url,class:`ih:flex ih:items-center ih:gap-3 ih:px-4 ih:py-2.5 ih:hover:bg-accent/60`},{default:y(()=>[l(`span`,Y,[e.thumb_url?(m(),c(`img`,{key:0,src:e.thumb_url,alt:``,class:`ih:max-h-full ih:max-w-full ih:object-contain`},null,8,X)):(m(),o(_(j),{key:1,class:`ih:size-5 ih:text-muted-foreground`}))]),l(`span`,Z,[l(`span`,Q,g(e.title),1),e.location?(m(),c(`span`,$,g(e.location),1)):s(``,!0)]),d(r,{lent:e.lent,class:`ih:shrink-0 ih:border`},null,8,[`lent`])]),_:2},1032,[`href`])]))),128))])):(m(),c(`div`,te,[d(_(T),{icon:_(j),title:e.filters.q||e.filters.status?`Keine passenden ${e.labels.plural}`:`Noch keine ${e.labels.plural}`,text:e.canManage&&!e.filters.q&&!e.filters.status?`Legen Sie mit „${e.labels.singular} erfassen“ los – oder übernehmen Sie den Bestand aus WordPress (Administration → Portal → Verleih).`:``},null,8,[`icon`,`title`,`text`])])),e.canManage?(m(),c(`p`,ne,[d(_(N),{class:`ih:size-3.5`}),n[5]||=u(` Bezeichnungen und Übernahme aus WordPress: Administration → Portal → Verleih `,-1)])):s(``,!0)]),_:1},8,[`title`]))}};export{re as default}; \ No newline at end of file diff --git a/dist/pages/Requests.js b/dist/pages/Requests.js index 38e24ec..69e6b2a 100644 --- a/dist/pages/Requests.js +++ b/dist/pages/Requests.js @@ -1 +1 @@ -import{t as e}from"../chunks/createLucideIcon-CYyWUN7r.js";import{n as t,t as n}from"../chunks/x-CV132X1X.js";import{n as ee,t as te}from"../chunks/loader-circle-DBP4Qhm5.js";import{n as ne,r as re,t as ie}from"../chunks/StatusBadge-CZaj6wAi.js";import{t as r}from"../chunks/inbox-CWQqWjak.js";import{Fragment as i,createBlock as a,createCommentVNode as o,createElementBlock as s,createElementVNode as c,createTextVNode as l,createVNode as u,normalizeClass as d,openBlock as f,ref as p,renderList as m,toDisplayString as h,unref as g,watch as _,withCtx as v,withModifiers as y}from"vue";import{Link as b,useForm as x,usePage as S}from"@inertiajs/vue3";import{AppLayout as C,Button as w,Dialog as T,DialogContent as E,DialogDescription as D,DialogFooter as O,DialogHeader as k,DialogTitle as A,EmptyState as j,FormField as M,PageHeader as N,PersonAvatar as P,Textarea as F,formatDate as I,formatRelative as L,toast as R}from"@inhaus/ui";var z=e({name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]}),B=e({name:`message-square-text`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]}),V={"aria-labelledby":`offen`,class:`ih:mb-8`},H={id:`offen`,class:`ih:mb-3 ih:text-sm ih:font-semibold`},ae={class:`ih:text-muted-foreground`},U={key:0,class:`ih:grid ih:gap-3`},W=[`src`,`alt`],G={class:`ih:grid ih:min-w-0 ih:gap-1.5`},K={class:`ih:flex ih:flex-wrap ih:items-center ih:gap-2`},q={class:`ih:flex ih:items-center ih:gap-2 ih:text-sm`},J={class:`ih:font-medium`},oe={key:0,class:`ih:text-muted-foreground`},se={class:`ih:text-xs ih:text-muted-foreground`},ce={class:`ih:flex ih:flex-wrap ih:gap-x-4 ih:gap-y-1 ih:text-sm ih:text-muted-foreground`},le={class:`ih:inline-flex ih:items-center ih:gap-1`},ue={key:0,class:`ih:inline-flex ih:items-center ih:gap-1`},de={key:0,class:`ih:flex ih:gap-1.5 ih:text-sm`},fe={key:1,class:`ih:text-xs ih:text-muted-foreground`},pe={class:`ih:flex ih:gap-2 ih:sm:flex-col`},me={key:1,class:`ih:rounded-lg ih:border ih:bg-card`},he={key:0,"aria-labelledby":`zuletzt`},ge={class:`ih:divide-y ih:rounded-lg ih:border ih:bg-card`},_e={class:`ih:text-muted-foreground`},ve={class:`ih:ml-auto ih:text-xs ih:text-muted-foreground`},Y={__name:`Requests`,props:{pending:{type:Array,required:!0},recent:{type:Array,default:()=>[]},labels:{type:Object,required:!0}},setup(e){let Y=S();_(()=>Y.props.flash?.status,e=>e&&R.success(e),{immediate:!0});let X=p(null),Z=x({note:``});function Q(e,t){Z.reset(),Z.clearErrors(),X.value={request:e,accept:t}}function ye(){let{request:e,accept:t}=X.value;Z.post(`/verleih/anfragen/${e.id}/${t?`zusagen`:`absagen`}`,{preserveScroll:!0,onSuccess:()=>X.value=null})}let $=e=>[e.from?`ab ${I(e.from)}`:null,e.until?`bis ${I(e.until)}`:null].filter(Boolean).join(` `);return(p,_)=>(f(),a(g(C),{title:`Anfragen`},{default:v(()=>[u(g(b),{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`},{default:v(()=>[u(g(ee),{class:`ih:size-4`}),l(` `+h(e.labels.title),1)]),_:1}),u(g(N),{title:`Anfragen`,description:`Zusagen trägt das ${e.labels.singular} gleich als verliehen ein – mit Wunschort und Person. Die anfragende Person wird benachrichtigt.`},null,8,[`description`]),c(`section`,V,[c(`h2`,H,[_[3]||=l(`Offen `,-1),c(`span`,ae,`(`+h(e.pending.length)+`)`,1)]),e.pending.length?(f(),s(`div`,U,[(f(!0),s(i,null,m(e.pending,e=>(f(),s(`article`,{key:e.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`},[u(g(b),{href:e.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`},{default:v(()=>[e.item?.thumb_url?(f(),s(`img`,{key:0,src:e.item.thumb_url,alt:e.item.title,class:`ih:size-full ih:object-contain`},null,8,W)):(f(),a(g(re),{key:1,class:`ih:size-6 ih:text-muted-foreground`}))]),_:2},1032,[`href`]),c(`div`,G,[c(`div`,K,[u(g(b),{href:e.item?.url??`#`,class:`ih:font-semibold ih:hover:underline`},{default:v(()=>[l(h(e.item?.title),1)]),_:2},1032,[`href`]),e.item?(f(),a(ie,{key:0,lent:e.item.lent,class:`ih:border`},null,8,[`lent`])):o(``,!0)]),c(`p`,q,[u(g(P),{person:e.user,class:`ih:size-6`},null,8,[`person`]),c(`span`,null,[c(`span`,J,h(e.user?.name),1),e.user?.department?(f(),s(`span`,oe,` · `+h(e.user.department),1)):o(``,!0)]),c(`span`,se,h(g(L)(e.created_at)),1)]),c(`p`,ce,[c(`span`,le,[u(g(ne),{class:`ih:size-3.5`}),l(` `+h(e.location),1)]),$(e)?(f(),s(`span`,ue,[u(g(t),{class:`ih:size-3.5`}),l(` `+h($(e)),1)])):o(``,!0)]),e.message?(f(),s(`p`,de,[u(g(B),{class:`ih:mt-0.5 ih:size-3.5 ih:shrink-0 ih:text-muted-foreground`}),l(` „`+h(e.message)+`“`,1)])):o(``,!0),e.item?.lent?(f(),s(`p`,fe,`Gerade verliehen`+h(e.item.location?` (${e.item.location})`:``)+` – eine Zusage trägt den neuen Ort ein.`,1)):o(``,!0)]),c(`div`,pe,[u(g(w),{onClick:t=>Q(e,!0)},{default:v(()=>[u(g(z)),_[4]||=l(` Zusagen`,-1)]),_:1},8,[`onClick`]),u(g(w),{variant:`outline`,onClick:t=>Q(e,!1)},{default:v(()=>[u(g(n)),_[5]||=l(` Absagen`,-1)]),_:1},8,[`onClick`])])]))),128))])):(f(),s(`div`,me,[u(g(j),{icon:g(r),title:`Keine offenen Anfragen`,text:`Neue Anfragen kommen im Portal und per E-Mail.`},null,8,[`icon`])]))]),e.recent.length?(f(),s(`section`,he,[_[6]||=c(`h2`,{id:`zuletzt`,class:`ih:mb-3 ih:text-sm ih:font-semibold`},`Zuletzt beantwortet`,-1),c(`ul`,ge,[(f(!0),s(i,null,m(e.recent,e=>(f(),s(`li`,{key:e.id,class:`ih:flex ih:flex-wrap ih:items-center ih:gap-x-3 ih:gap-y-1 ih:px-4 ih:py-2.5 ih:text-sm`},[u(g(b),{href:e.item?.url??`#`,class:`ih:font-medium ih:hover:underline`},{default:v(()=>[l(h(e.item?.title),1)]),_:2},1032,[`href`]),c(`span`,_e,h(e.user?.name)+` · `+h(e.location),1),c(`span`,{class:d([`ih:rounded-full ih:px-2 ih:py-0.5 ih:text-xs ih:font-medium`,e.status===`accepted`?`ih:bg-brand-soft ih:text-brand-text`:`ih:bg-muted ih:text-muted-foreground`])},h(e.status_label),3),c(`span`,ve,h(e.decider?`${e.decider.name}, `:``)+h(g(I)(e.decided_at??e.created_at)),1)]))),128))])])):o(``,!0),u(g(T),{open:!!X.value,"onUpdate:open":_[2]||=e=>!e&&(X.value=null)},{default:v(()=>[X.value?(f(),a(g(E),{key:0,class:`ih:sm:max-w-md`},{default:v(()=>[u(g(k),null,{default:v(()=>[u(g(A),null,{default:v(()=>[l(h(X.value.accept?`Zusagen`:`Absagen`)+`: `+h(X.value.request.item?.title),1)]),_:1}),u(g(D),null,{default:v(()=>[X.value.accept?(f(),s(i,{key:0},[l(`Wird als verliehen an `+h(X.value.request.user?.name)+` nach „`+h(X.value.request.location)+`“ eingetragen.`,1)],64)):(f(),s(i,{key:1},[l(h(X.value.request.user?.name)+` bekommt die Absage im Portal und per E-Mail.`,1)],64))]),_:1})]),_:1}),c(`form`,{id:`verleih-entscheidung`,onSubmit:y(ye,[`prevent`])},[u(g(M),{id:`vl-note`,label:`Hinweis (optional)`,error:g(Z).errors.note||g(Z).errors.status},{default:v(()=>[u(g(F),{id:`vl-note`,modelValue:g(Z).note,"onUpdate:modelValue":_[0]||=e=>g(Z).note=e,rows:`3`,maxlength:`1000`,placeholder:X.value.accept?`z. B. Wir bringen es am Montag vorbei.`:`z. B. Ist bis Ende März schon vergeben.`},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`error`])],32),u(g(O),null,{default:v(()=>[u(g(w),{variant:`outline`,onClick:_[1]||=e=>X.value=null},{default:v(()=>[..._[7]||=[l(`Abbrechen`,-1)]]),_:1}),u(g(w),{type:`submit`,form:`verleih-entscheidung`,variant:X.value.accept?`default`:`destructive`,disabled:g(Z).processing},{default:v(()=>[g(Z).processing?(f(),a(g(te),{key:0,class:`ih:animate-spin`})):o(``,!0),l(` `+h(X.value.accept?`Zusagen`:`Absagen`),1)]),_:1},8,[`variant`,`disabled`])]),_:1})]),_:1})):o(``,!0)]),_:1},8,[`open`])]),_:1}))}};export{Y as default}; \ No newline at end of file +import{t as e}from"../chunks/createLucideIcon-CYyWUN7r.js";import{n as t,t as ee}from"../chunks/x-CV132X1X.js";import{n,r,t as te}from"../chunks/StatusBadge-CZaj6wAi.js";import{t as ne}from"../chunks/inbox-CWQqWjak.js";import{t as re}from"../chunks/loader-circle-km1SveWx.js";import{Fragment as i,createBlock as a,createCommentVNode as o,createElementBlock as s,createElementVNode as c,createTextVNode as l,createVNode as u,normalizeClass as d,openBlock as f,ref as p,renderList as m,toDisplayString as h,unref as g,watch as _,withCtx as v,withModifiers as ie}from"vue";import{Link as y,useForm as b,usePage as x}from"@inertiajs/vue3";import{AppLayout as S,Button as C,Dialog as w,DialogContent as T,DialogDescription as E,DialogFooter as D,DialogHeader as O,DialogTitle as k,EmptyState as A,FormField as j,PageHeader as M,PersonAvatar as N,Textarea as P,formatDate as F,formatRelative as I,toast as L}from"@inhaus/ui";var R=e({name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]}),z=e({name:`message-square-text`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]}),B={"aria-labelledby":`offen`,class:`ih:mb-8`},V={id:`offen`,class:`ih:mb-3 ih:text-sm ih:font-semibold`},H={class:`ih:text-muted-foreground`},ae={key:0,class:`ih:grid ih:gap-3`},U=[`src`,`alt`],W={class:`ih:grid ih:min-w-0 ih:gap-1.5`},G={class:`ih:flex ih:flex-wrap ih:items-center ih:gap-2`},K={class:`ih:flex ih:items-center ih:gap-2 ih:text-sm`},q={class:`ih:font-medium`},J={key:0,class:`ih:text-muted-foreground`},oe={class:`ih:text-xs ih:text-muted-foreground`},se={class:`ih:flex ih:flex-wrap ih:gap-x-4 ih:gap-y-1 ih:text-sm ih:text-muted-foreground`},ce={class:`ih:inline-flex ih:items-center ih:gap-1`},le={key:0,class:`ih:inline-flex ih:items-center ih:gap-1`},ue={key:0,class:`ih:flex ih:gap-1.5 ih:text-sm`},de={key:1,class:`ih:text-xs ih:text-muted-foreground`},fe={class:`ih:flex ih:gap-2 ih:sm:flex-col`},pe={key:1,class:`ih:rounded-lg ih:border ih:bg-card`},me={key:0,"aria-labelledby":`zuletzt`},he={class:`ih:divide-y ih:rounded-lg ih:border ih:bg-card`},ge={class:`ih:text-muted-foreground`},_e={class:`ih:ml-auto ih:text-xs ih:text-muted-foreground`},Y={__name:`Requests`,props:{pending:{type:Array,required:!0},recent:{type:Array,default:()=>[]},labels:{type:Object,required:!0}},setup(e){let Y=x();_(()=>Y.props.flash?.status,e=>e&&L.success(e),{immediate:!0});let X=p(null),Z=b({note:``});function Q(e,t){Z.reset(),Z.clearErrors(),X.value={request:e,accept:t}}function ve(){let{request:e,accept:t}=X.value;Z.post(`/verleih/anfragen/${e.id}/${t?`zusagen`:`absagen`}`,{preserveScroll:!0,onSuccess:()=>X.value=null})}let $=e=>[e.from?`ab ${F(e.from)}`:null,e.until?`bis ${F(e.until)}`:null].filter(Boolean).join(` `);return(p,_)=>(f(),a(g(S),{title:`Anfragen`},{default:v(()=>[u(g(M),{title:`Anfragen`,icon:`images`,breadcrumbs:[{label:e.labels.title,href:`/verleih`}],description:`Zusagen trägt das ${e.labels.singular} gleich als verliehen ein – mit Wunschort und Person. Die anfragende Person wird benachrichtigt.`},null,8,[`breadcrumbs`,`description`]),c(`section`,B,[c(`h2`,V,[_[3]||=l(`Offen `,-1),c(`span`,H,`(`+h(e.pending.length)+`)`,1)]),e.pending.length?(f(),s(`div`,ae,[(f(!0),s(i,null,m(e.pending,e=>(f(),s(`article`,{key:e.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`},[u(g(y),{href:e.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`},{default:v(()=>[e.item?.thumb_url?(f(),s(`img`,{key:0,src:e.item.thumb_url,alt:e.item.title,class:`ih:size-full ih:object-contain`},null,8,U)):(f(),a(g(r),{key:1,class:`ih:size-6 ih:text-muted-foreground`}))]),_:2},1032,[`href`]),c(`div`,W,[c(`div`,G,[u(g(y),{href:e.item?.url??`#`,class:`ih:font-semibold ih:hover:underline`},{default:v(()=>[l(h(e.item?.title),1)]),_:2},1032,[`href`]),e.item?(f(),a(te,{key:0,lent:e.item.lent,class:`ih:border`},null,8,[`lent`])):o(``,!0)]),c(`p`,K,[u(g(N),{person:e.user,class:`ih:size-6`},null,8,[`person`]),c(`span`,null,[c(`span`,q,h(e.user?.name),1),e.user?.department?(f(),s(`span`,J,` · `+h(e.user.department),1)):o(``,!0)]),c(`span`,oe,h(g(I)(e.created_at)),1)]),c(`p`,se,[c(`span`,ce,[u(g(n),{class:`ih:size-3.5`}),l(` `+h(e.location),1)]),$(e)?(f(),s(`span`,le,[u(g(t),{class:`ih:size-3.5`}),l(` `+h($(e)),1)])):o(``,!0)]),e.message?(f(),s(`p`,ue,[u(g(z),{class:`ih:mt-0.5 ih:size-3.5 ih:shrink-0 ih:text-muted-foreground`}),l(` „`+h(e.message)+`“`,1)])):o(``,!0),e.item?.lent?(f(),s(`p`,de,`Gerade verliehen`+h(e.item.location?` (${e.item.location})`:``)+` – eine Zusage trägt den neuen Ort ein.`,1)):o(``,!0)]),c(`div`,fe,[u(g(C),{onClick:t=>Q(e,!0)},{default:v(()=>[u(g(R)),_[4]||=l(` Zusagen`,-1)]),_:1},8,[`onClick`]),u(g(C),{variant:`outline`,onClick:t=>Q(e,!1)},{default:v(()=>[u(g(ee)),_[5]||=l(` Absagen`,-1)]),_:1},8,[`onClick`])])]))),128))])):(f(),s(`div`,pe,[u(g(A),{icon:g(ne),title:`Keine offenen Anfragen`,text:`Neue Anfragen kommen im Portal und per E-Mail.`},null,8,[`icon`])]))]),e.recent.length?(f(),s(`section`,me,[_[6]||=c(`h2`,{id:`zuletzt`,class:`ih:mb-3 ih:text-sm ih:font-semibold`},`Zuletzt beantwortet`,-1),c(`ul`,he,[(f(!0),s(i,null,m(e.recent,e=>(f(),s(`li`,{key:e.id,class:`ih:flex ih:flex-wrap ih:items-center ih:gap-x-3 ih:gap-y-1 ih:px-4 ih:py-2.5 ih:text-sm`},[u(g(y),{href:e.item?.url??`#`,class:`ih:font-medium ih:hover:underline`},{default:v(()=>[l(h(e.item?.title),1)]),_:2},1032,[`href`]),c(`span`,ge,h(e.user?.name)+` · `+h(e.location),1),c(`span`,{class:d([`ih:rounded-full ih:px-2 ih:py-0.5 ih:text-xs ih:font-medium`,e.status===`accepted`?`ih:bg-brand-soft ih:text-brand-text`:`ih:bg-muted ih:text-muted-foreground`])},h(e.status_label),3),c(`span`,_e,h(e.decider?`${e.decider.name}, `:``)+h(g(F)(e.decided_at??e.created_at)),1)]))),128))])])):o(``,!0),u(g(w),{open:!!X.value,"onUpdate:open":_[2]||=e=>!e&&(X.value=null)},{default:v(()=>[X.value?(f(),a(g(T),{key:0,class:`ih:sm:max-w-md`},{default:v(()=>[u(g(O),null,{default:v(()=>[u(g(k),null,{default:v(()=>[l(h(X.value.accept?`Zusagen`:`Absagen`)+`: `+h(X.value.request.item?.title),1)]),_:1}),u(g(E),null,{default:v(()=>[X.value.accept?(f(),s(i,{key:0},[l(`Wird als verliehen an `+h(X.value.request.user?.name)+` nach „`+h(X.value.request.location)+`“ eingetragen.`,1)],64)):(f(),s(i,{key:1},[l(h(X.value.request.user?.name)+` bekommt die Absage im Portal und per E-Mail.`,1)],64))]),_:1})]),_:1}),c(`form`,{id:`verleih-entscheidung`,onSubmit:ie(ve,[`prevent`])},[u(g(j),{id:`vl-note`,label:`Hinweis (optional)`,error:g(Z).errors.note||g(Z).errors.status},{default:v(()=>[u(g(P),{id:`vl-note`,modelValue:g(Z).note,"onUpdate:modelValue":_[0]||=e=>g(Z).note=e,rows:`3`,maxlength:`1000`,placeholder:X.value.accept?`z. B. Wir bringen es am Montag vorbei.`:`z. B. Ist bis Ende März schon vergeben.`},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`error`])],32),u(g(D),null,{default:v(()=>[u(g(C),{variant:`outline`,onClick:_[1]||=e=>X.value=null},{default:v(()=>[..._[7]||=[l(`Abbrechen`,-1)]]),_:1}),u(g(C),{type:`submit`,form:`verleih-entscheidung`,variant:X.value.accept?`default`:`destructive`,disabled:g(Z).processing},{default:v(()=>[g(Z).processing?(f(),a(g(re),{key:0,class:`ih:animate-spin`})):o(``,!0),l(` `+h(X.value.accept?`Zusagen`:`Absagen`),1)]),_:1},8,[`variant`,`disabled`])]),_:1})]),_:1})):o(``,!0)]),_:1},8,[`open`])]),_:1}))}};export{Y as default}; \ No newline at end of file diff --git a/dist/pages/Show.js b/dist/pages/Show.js index 7037762..c1734da 100644 --- a/dist/pages/Show.js +++ b/dist/pages/Show.js @@ -1 +1 @@ -import{t as e}from"../chunks/createLucideIcon-CYyWUN7r.js";import{n as t,t as n}from"../chunks/x-CV132X1X.js";import{n as r,t as i}from"../chunks/loader-circle-DBP4Qhm5.js";import{n as a,r as o,t as s}from"../chunks/StatusBadge-CZaj6wAi.js";import{t as ee}from"../chunks/trash-COMUOW6h.js";import{Fragment as c,computed as te,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createTextVNode as p,createVNode as m,mergeModels as h,onBeforeUnmount as g,openBlock as _,ref as v,renderList as ne,toDisplayString as y,unref as b,useModel as x,watch as S,withCtx as C,withModifiers as w}from"vue";import{Link as T,router as E,useForm as D,usePage as O}from"@inertiajs/vue3";import{AppLayout as re,Button as k,Dialog as A,DialogContent as j,DialogDescription as M,DialogFooter as N,DialogHeader as P,DialogTitle as F,FormField as I,Input as L,PersonAvatar as R,Textarea as z,formatDate as B,toast as ie}from"@inhaus/ui";var ae=e({name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]}),V=e({name:`pencil-line`,size:24,node:[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]}),H=e({name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]}),U=e({name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]}),W=e({name:`user-round`,size:24,node:[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]],aliases:[`user-2`]}),G={class:`ih:grid ih:gap-4 ih:sm:grid-cols-2`},K={__name:`RequestDialog`,props:h({item:{type:Object,required:!0},labels:{type:Object,required:!0},defaultLocation:{type:String,default:null}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:[`update:open`],setup(e){let t=e,n=x(e,`open`),r=new Date().toISOString().slice(0,10),a=D({location:t.defaultLocation??``,from:``,until:``,message:``});function o(){a.post(`/verleih/${t.item.id}/anfragen`,{preserveScroll:!0,onSuccess:()=>{n.value=!1,a.reset(`from`,`until`,`message`)}})}return(t,s)=>(_(),l(b(A),{open:n.value,"onUpdate:open":s[5]||=e=>n.value=e},{default:C(()=>[m(b(j),{class:`ih:sm:max-w-lg`},{default:C(()=>[m(b(P),null,{default:C(()=>[m(b(F),null,{default:C(()=>[p(`„`+y(e.item.title)+`“ anfragen`,1)]),_:1}),m(b(M),null,{default:C(()=>[s[6]||=p(` Das Team bekommt Ihre Anfrage im Portal und per E-Mail und meldet sich bei Ihnen. `,-1),e.item.lent?(_(),d(c,{key:0},[p(` Gerade ist es verliehen – Sie können es trotzdem für später anfragen.`)],64)):u(``,!0)]),_:1})]),_:1}),f(`form`,{id:`verleih-anfrage`,class:`ih:grid ih:gap-4`,onSubmit:w(o,[`prevent`])},[m(b(I),{id:`vl-location`,label:`Wo soll es hin?`,error:b(a).errors.location},{default:C(()=>[m(b(L),{id:`vl-location`,modelValue:b(a).location,"onUpdate:modelValue":s[0]||=e=>b(a).location=e,maxlength:`200`,placeholder:`z. B. Verwaltung, Besprechungsraum 2. OG`,required:``},null,8,[`modelValue`])]),_:1},8,[`error`]),f(`div`,G,[m(b(I),{id:`vl-from`,label:`Ab (optional)`,error:b(a).errors.from},{default:C(()=>[m(b(L),{id:`vl-from`,modelValue:b(a).from,"onUpdate:modelValue":s[1]||=e=>b(a).from=e,type:`date`,min:b(r)},null,8,[`modelValue`,`min`])]),_:1},8,[`error`]),m(b(I),{id:`vl-until`,label:`Bis (optional)`,error:b(a).errors.until},{default:C(()=>[m(b(L),{id:`vl-until`,modelValue:b(a).until,"onUpdate:modelValue":s[2]||=e=>b(a).until=e,type:`date`,min:b(a).from||b(r)},null,8,[`modelValue`,`min`])]),_:1},8,[`error`])]),m(b(I),{id:`vl-message`,label:`Nachricht (optional)`,error:b(a).errors.message},{default:C(()=>[m(b(z),{id:`vl-message`,modelValue:b(a).message,"onUpdate:modelValue":s[3]||=e=>b(a).message=e,rows:`3`,maxlength:`2000`,placeholder:`z. B. Anlass, Ansprechperson vor Ort …`},null,8,[`modelValue`])]),_:1},8,[`error`])],32),m(b(N),null,{default:C(()=>[m(b(k),{variant:`outline`,onClick:s[4]||=e=>n.value=!1},{default:C(()=>[...s[7]||=[p(`Abbrechen`,-1)]]),_:1}),m(b(k),{type:`submit`,form:`verleih-anfrage`,disabled:b(a).processing||!b(a).location.trim()},{default:C(()=>[b(a).processing?(_(),l(b(i),{key:0,class:`ih:animate-spin`})):(_(),l(b(H),{key:1})),s[8]||=p(` Anfrage senden `,-1)]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]))}},q={class:`ih:mb-4 ih:flex ih:flex-wrap ih:items-center ih:justify-between ih:gap-3`},J={key:0,class:`ih:flex ih:gap-2`},oe={class:`ih:grid ih:gap-6 ih:lg:grid-cols-[minmax(0,1fr)_22rem]`},se={class:`ih:grid ih:min-w-0 ih:content-start ih:gap-6`},ce=[`aria-label`],le=[`src`,`alt`],ue={key:1,class:`ih:grid ih:aspect-[4/3] ih:place-items-center ih:rounded-lg ih:border ih:bg-muted ih:text-muted-foreground`},de={key:2,class:`ih:rounded-lg ih:border ih:bg-card ih:p-5`},fe=[`innerHTML`],pe={class:`ih:grid ih:content-start ih:gap-4 ih:lg:sticky ih:lg:top-24`},me={class:`ih:grid ih:gap-4 ih:rounded-lg ih:border ih:bg-card ih:p-5`},he={class:`ih:grid ih:gap-2`},ge={class:`ih:text-xl ih:leading-snug ih:font-semibold`},_e={class:`ih:grid ih:gap-2 ih:text-sm`},ve={class:`ih:flex ih:gap-2`},ye={key:0,class:`ih:flex ih:gap-2`},be={key:1,class:`ih:flex ih:gap-2`},xe={key:0,class:`ih:grid ih:gap-2 ih:rounded-md ih:bg-brand-soft ih:p-3 ih:text-sm ih:text-brand-text`},Se={class:`ih:flex ih:items-center ih:gap-1.5 ih:font-medium`},Ce={key:0,class:`ih:rounded-lg ih:border ih:bg-card ih:p-5`},we={class:`ih:grid ih:gap-3`},Te={class:`ih:min-w-0`},Ee={class:`ih:font-medium`},De={class:`ih:text-xs ih:text-muted-foreground`},Oe=[`aria-label`],ke=[`src`,`alt`],Y={__name:`Show`,props:{item:{type:Object,required:!0},labels:{type:Object,required:!0},canManage:{type:Boolean,default:!1},myRequest:{type:Object,default:null},defaultLocation:{type:String,default:null},requests:{type:Array,default:()=>[]}},setup(e){let h=e,x=O();S(()=>x.props.flash?.status,e=>e&&ie.success(e),{immediate:!0});let z=te(()=>h.item),G=v(!1),Y=v(!1),X=e=>e.key===`Escape`&&(Y.value=!1);S(Y,e=>e?window.addEventListener(`keydown`,X):window.removeEventListener(`keydown`,X)),g(()=>window.removeEventListener(`keydown`,X));let Z=v(!1),Q=D({location:``}),Ae=()=>Q.post(`/verleih/${z.value.id}/zurueck`,{preserveScroll:!0,onSuccess:()=>Z.value=!1}),je=()=>window.confirm(`Anfrage zurückziehen?`)&&E.delete(`/verleih/anfragen/${h.myRequest.id}`,{preserveScroll:!0}),Me=()=>window.confirm(`„${z.value.title}“ endgültig löschen?`)&&E.delete(`/verleih/${z.value.id}`),$=(e,t)=>[e?`ab ${B(e)}`:null,t?`bis ${B(t)}`:null].filter(Boolean).join(` `);return(te,h)=>(_(),l(b(re),{title:z.value.title},{default:C(()=>[f(`div`,q,[m(b(T),{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`},{default:C(()=>[m(b(r),{class:`ih:size-4`}),p(` `+y(e.labels.title),1)]),_:1}),e.canManage?(_(),d(`div`,J,[m(b(k),{variant:`outline`,size:`sm`,"as-child":``},{default:C(()=>[m(b(T),{href:`/verleih/${z.value.id}/bearbeiten`},{default:C(()=>[m(b(V)),h[9]||=p(` Bearbeiten`,-1)]),_:1},8,[`href`])]),_:1}),m(b(k),{variant:`ghost`,size:`sm`,class:`ih:text-destructive ih:hover:text-destructive`,onClick:Me},{default:C(()=>[m(b(ee)),h[10]||=p(` Löschen`,-1)]),_:1})])):u(``,!0)]),f(`div`,oe,[f(`div`,se,[z.value.image_url?(_(),d(`button`,{key:0,type:`button`,class:`ih:grid ih:place-items-center ih:rounded-lg ih:border ih:bg-muted ih:p-4 ih:sm:p-8`,"aria-label":`${z.value.title} vergrößern`,onClick:h[0]||=e=>Y.value=!0},[f(`img`,{src:z.value.image_url,alt:z.value.title,class:`ih:max-h-[70vh] ih:w-auto ih:max-w-full ih:object-contain ih:shadow-md`},null,8,le)],8,ce)):(_(),d(`div`,ue,[m(b(o),{class:`ih:size-10`,"stroke-width":1.5})])),z.value.description?(_(),d(`section`,de,[f(`div`,{class:`verleih-text ih:text-[15px] ih:leading-relaxed`,innerHTML:z.value.description},null,8,fe)])):u(``,!0)]),f(`aside`,pe,[f(`section`,me,[f(`div`,he,[m(s,{lent:z.value.lent,class:`ih:w-fit ih:border`},null,8,[`lent`]),f(`h1`,ge,y(z.value.title),1)]),f(`dl`,_e,[f(`div`,ve,[h[11]||=f(`dt`,{class:`ih:sr-only`},`Aktueller Standort`,-1),m(b(a),{class:`ih:mt-0.5 ih:size-4 ih:shrink-0 ih:text-muted-foreground`,"aria-hidden":`true`}),f(`dd`,null,y(z.value.location||`Standort nicht angegeben`),1)]),z.value.lent&&(z.value.lent_since||z.value.lent_until)?(_(),d(`div`,ye,[h[12]||=f(`dt`,{class:`ih:sr-only`},`Zeitraum`,-1),m(b(t),{class:`ih:mt-0.5 ih:size-4 ih:shrink-0 ih:text-muted-foreground`,"aria-hidden":`true`}),f(`dd`,null,`Verliehen `+y($(z.value.lent_since,z.value.lent_until)),1)])):u(``,!0),z.value.lent_to?(_(),d(`div`,be,[h[13]||=f(`dt`,{class:`ih:sr-only`},`Ausgeliehen von`,-1),m(b(W),{class:`ih:mt-0.5 ih:size-4 ih:shrink-0 ih:text-muted-foreground`,"aria-hidden":`true`}),f(`dd`,null,[m(b(T),{href:`/personen/${z.value.lent_to.id}`,class:`ih:hover:underline`},{default:C(()=>[p(y(z.value.lent_to.name),1)]),_:1},8,[`href`])])])):u(``,!0)]),e.myRequest?(_(),d(`div`,xe,[f(`p`,Se,[m(b(ae),{class:`ih:size-4`}),p(` Angefragt am `+y(b(B)(e.myRequest.created_at)),1)]),f(`p`,null,`Nach „`+y(e.myRequest.location)+`“ `+y($(e.myRequest.from,e.myRequest.until))+` – das Team meldet sich.`,1),f(`button`,{type:`button`,class:`ih:w-fit ih:text-xs ih:font-medium ih:underline`,onClick:je},`Anfrage zurückziehen`)])):(_(),l(b(k),{key:1,size:`lg`,class:`ih:w-full`,onClick:h[1]||=e=>G.value=!0},{default:C(()=>[m(b(H)),p(` `+y(e.labels.singular)+` anfragen`,1)]),_:1})),e.canManage&&z.value.lent?(_(),l(b(k),{key:2,variant:`outline`,class:`ih:w-full`,onClick:h[2]||=e=>Z.value=!0},{default:C(()=>[m(b(U)),h[14]||=p(` Zurückgenommen`,-1)]),_:1})):u(``,!0)]),e.canManage&&e.requests.length?(_(),d(`section`,Ce,[h[16]||=f(`h2`,{class:`ih:mb-3 ih:text-sm ih:font-semibold`},`Anfragen`,-1),f(`ul`,we,[(_(!0),d(c,null,ne(e.requests,e=>(_(),d(`li`,{key:e.id,class:`ih:flex ih:gap-3 ih:text-sm`},[m(b(R),{person:e.user,class:`ih:size-8`},null,8,[`person`]),f(`div`,Te,[f(`p`,null,[f(`span`,Ee,y(e.user?.name),1),p(` · `+y(e.location),1)]),f(`p`,De,y(e.status_label)+` · `+y(b(B)(e.created_at)),1)])]))),128))]),m(b(T),{href:`/verleih/anfragen`,class:`ih:mt-3 ih:inline-block ih:text-sm ih:font-medium ih:text-brand-text ih:hover:underline`},{default:C(()=>[...h[15]||=[p(`Alle Anfragen`,-1)]]),_:1})])):u(``,!0)])]),m(K,{open:G.value,"onUpdate:open":h[3]||=e=>G.value=e,item:z.value,labels:e.labels,"default-location":e.defaultLocation},null,8,[`open`,`item`,`labels`,`default-location`]),m(b(A),{open:Z.value,"onUpdate:open":h[6]||=e=>Z.value=e},{default:C(()=>[m(b(j),{class:`ih:sm:max-w-md`},{default:C(()=>[m(b(P),null,{default:C(()=>[m(b(F),null,{default:C(()=>[p(`„`+y(z.value.title)+`“ zurückgenommen`,1)]),_:1}),m(b(M),null,{default:C(()=>[...h[17]||=[p(`Danach ist es wieder verfügbar. Wo ist es jetzt?`,-1)]]),_:1})]),_:1}),f(`form`,{id:`verleih-zurueck`,onSubmit:w(Ae,[`prevent`])},[m(b(I),{id:`vl-return`,label:`Neuer Standort`,error:b(Q).errors.location},{default:C(()=>[m(b(L),{id:`vl-return`,modelValue:b(Q).location,"onUpdate:modelValue":h[4]||=e=>b(Q).location=e,maxlength:`200`,placeholder:`z. B. Lager Künstlerteam`},null,8,[`modelValue`])]),_:1},8,[`error`])],32),m(b(N),null,{default:C(()=>[m(b(k),{variant:`outline`,onClick:h[5]||=e=>Z.value=!1},{default:C(()=>[...h[18]||=[p(`Abbrechen`,-1)]]),_:1}),m(b(k),{type:`submit`,form:`verleih-zurueck`,disabled:b(Q).processing},{default:C(()=>[b(Q).processing?(_(),l(b(i),{key:0,class:`ih:animate-spin`})):u(``,!0),h[19]||=p(` Speichern`,-1)]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]),Y.value?(_(),d(`div`,{key:0,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":z.value.title,onClick:h[8]||=e=>Y.value=!1},[f(`img`,{src:z.value.image_url,alt:z.value.title,class:`ih:size-full ih:object-contain`},null,8,ke),f(`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`,onClick:h[7]||=w(e=>Y.value=!1,[`stop`])},[m(b(n))])],8,Oe)):u(``,!0)]),_:1},8,[`title`]))}};export{Y as default}; \ No newline at end of file +import{t as e}from"../chunks/createLucideIcon-CYyWUN7r.js";import{n as t,t as n}from"../chunks/x-CV132X1X.js";import{n as r,r as i,t as a}from"../chunks/StatusBadge-CZaj6wAi.js";import{t as o}from"../chunks/loader-circle-km1SveWx.js";import{t as s}from"../chunks/trash-COMUOW6h.js";import{Fragment as c,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as ee,createTextVNode as m,createVNode as h,mergeModels as g,onBeforeUnmount as te,openBlock as _,ref as v,renderList as ne,toDisplayString as y,unref as b,useModel as x,watch as S,withCtx as C,withModifiers as w}from"vue";import{Link as T,router as E,useForm as D,usePage as O}from"@inertiajs/vue3";import{AppLayout as re,Button as k,Dialog as A,DialogContent as j,DialogDescription as M,DialogFooter as N,DialogHeader as P,DialogTitle as F,FormField as I,Input as L,PageHeader as ie,PersonAvatar as ae,Textarea as R,formatDate as z,toast as oe}from"@inhaus/ui";var B=e({name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]}),V=e({name:`pencil-line`,size:24,node:[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]}),H=e({name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]}),U=e({name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]}),W=e({name:`user-round`,size:24,node:[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]],aliases:[`user-2`]}),G={class:`ih:grid ih:gap-4 ih:sm:grid-cols-2`},K={__name:`RequestDialog`,props:g({item:{type:Object,required:!0},labels:{type:Object,required:!0},defaultLocation:{type:String,default:null}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:[`update:open`],setup(e){let t=e,n=x(e,`open`),r=new Date().toISOString().slice(0,10),i=D({location:t.defaultLocation??``,from:``,until:``,message:``});function a(){i.post(`/verleih/${t.item.id}/anfragen`,{preserveScroll:!0,onSuccess:()=>{n.value=!1,i.reset(`from`,`until`,`message`)}})}return(t,s)=>(_(),u(b(A),{open:n.value,"onUpdate:open":s[5]||=e=>n.value=e},{default:C(()=>[h(b(j),{class:`ih:sm:max-w-lg`},{default:C(()=>[h(b(P),null,{default:C(()=>[h(b(F),null,{default:C(()=>[m(`„`+y(e.item.title)+`“ anfragen`,1)]),_:1}),h(b(M),null,{default:C(()=>[s[6]||=m(` Das Team bekommt Ihre Anfrage im Portal und per E-Mail und meldet sich bei Ihnen. `,-1),e.item.lent?(_(),f(c,{key:0},[m(` Gerade ist es verliehen – Sie können es trotzdem für später anfragen.`)],64)):d(``,!0)]),_:1})]),_:1}),p(`form`,{id:`verleih-anfrage`,class:`ih:grid ih:gap-4`,onSubmit:w(a,[`prevent`])},[h(b(I),{id:`vl-location`,label:`Wo soll es hin?`,error:b(i).errors.location},{default:C(()=>[h(b(L),{id:`vl-location`,modelValue:b(i).location,"onUpdate:modelValue":s[0]||=e=>b(i).location=e,maxlength:`200`,placeholder:`z. B. Verwaltung, Besprechungsraum 2. OG`,required:``},null,8,[`modelValue`])]),_:1},8,[`error`]),p(`div`,G,[h(b(I),{id:`vl-from`,label:`Ab (optional)`,error:b(i).errors.from},{default:C(()=>[h(b(L),{id:`vl-from`,modelValue:b(i).from,"onUpdate:modelValue":s[1]||=e=>b(i).from=e,type:`date`,min:b(r)},null,8,[`modelValue`,`min`])]),_:1},8,[`error`]),h(b(I),{id:`vl-until`,label:`Bis (optional)`,error:b(i).errors.until},{default:C(()=>[h(b(L),{id:`vl-until`,modelValue:b(i).until,"onUpdate:modelValue":s[2]||=e=>b(i).until=e,type:`date`,min:b(i).from||b(r)},null,8,[`modelValue`,`min`])]),_:1},8,[`error`])]),h(b(I),{id:`vl-message`,label:`Nachricht (optional)`,error:b(i).errors.message},{default:C(()=>[h(b(R),{id:`vl-message`,modelValue:b(i).message,"onUpdate:modelValue":s[3]||=e=>b(i).message=e,rows:`3`,maxlength:`2000`,placeholder:`z. B. Anlass, Ansprechperson vor Ort …`},null,8,[`modelValue`])]),_:1},8,[`error`])],32),h(b(N),null,{default:C(()=>[h(b(k),{variant:`outline`,onClick:s[4]||=e=>n.value=!1},{default:C(()=>[...s[7]||=[m(`Abbrechen`,-1)]]),_:1}),h(b(k),{type:`submit`,form:`verleih-anfrage`,disabled:b(i).processing||!b(i).location.trim()},{default:C(()=>[b(i).processing?(_(),u(b(o),{key:0,class:`ih:animate-spin`})):(_(),u(b(H),{key:1})),s[8]||=m(` Anfrage senden `,-1)]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]))}},q={class:`ih:grid ih:gap-6 ih:lg:grid-cols-[minmax(0,1fr)_22rem]`},se={class:`ih:grid ih:min-w-0 ih:content-start ih:gap-6`},ce=[`aria-label`],le=[`src`,`alt`],ue={key:1,class:`ih:grid ih:aspect-[4/3] ih:place-items-center ih:rounded-lg ih:border ih:bg-muted ih:text-muted-foreground`},de={key:2,class:`ih:rounded-lg ih:border ih:bg-card ih:p-5`},fe=[`innerHTML`],pe={class:`ih:grid ih:content-start ih:gap-4 ih:lg:sticky ih:lg:top-24`},me={class:`ih:grid ih:gap-4 ih:rounded-lg ih:border ih:bg-card ih:p-5`},he={class:`ih:grid ih:gap-2 ih:text-sm`},ge={class:`ih:flex ih:gap-2`},_e={key:0,class:`ih:flex ih:gap-2`},ve={key:1,class:`ih:flex ih:gap-2`},ye={key:0,class:`ih:grid ih:gap-2 ih:rounded-md ih:bg-brand-soft ih:p-3 ih:text-sm ih:text-brand-text`},be={class:`ih:flex ih:items-center ih:gap-1.5 ih:font-medium`},xe={key:0,class:`ih:rounded-lg ih:border ih:bg-card ih:p-5`},Se={class:`ih:grid ih:gap-3`},Ce={class:`ih:min-w-0`},we={class:`ih:font-medium`},Te={class:`ih:text-xs ih:text-muted-foreground`},Ee=[`aria-label`],De=[`src`,`alt`],J={__name:`Show`,props:{item:{type:Object,required:!0},labels:{type:Object,required:!0},canManage:{type:Boolean,default:!1},myRequest:{type:Object,default:null},defaultLocation:{type:String,default:null},requests:{type:Array,default:()=>[]}},setup(e){let g=e,x=O();S(()=>x.props.flash?.status,e=>e&&oe.success(e),{immediate:!0});let R=l(()=>g.item),G=v(!1),J=v(!1),Y=e=>e.key===`Escape`&&(J.value=!1);S(J,e=>e?window.addEventListener(`keydown`,Y):window.removeEventListener(`keydown`,Y)),te(()=>window.removeEventListener(`keydown`,Y));let X=v(!1),Z=D({location:``}),Oe=()=>Z.post(`/verleih/${R.value.id}/zurueck`,{preserveScroll:!0,onSuccess:()=>X.value=!1}),ke=()=>window.confirm(`Anfrage zurückziehen?`)&&E.delete(`/verleih/anfragen/${g.myRequest.id}`,{preserveScroll:!0}),Q=()=>window.confirm(`„${R.value.title}“ endgültig löschen?`)&&E.delete(`/verleih/${R.value.id}`),$=(e,t)=>[e?`ab ${z(e)}`:null,t?`bis ${z(t)}`:null].filter(Boolean).join(` `);return(l,g)=>(_(),u(b(re),{title:R.value.title},{default:C(()=>[h(b(ie),{title:R.value.title,breadcrumbs:[{label:e.labels.title,href:`/verleih`}]},ee({description:C(()=>[h(a,{lent:R.value.lent,class:`ih:mt-1 ih:w-fit ih:border`},null,8,[`lent`])]),_:2},[e.canManage?{name:`actions`,fn:C(()=>[h(b(k),{variant:`outline`,size:`sm`,"as-child":``},{default:C(()=>[h(b(T),{href:`/verleih/${R.value.id}/bearbeiten`},{default:C(()=>[h(b(V)),g[9]||=m(` Bearbeiten`,-1)]),_:1},8,[`href`])]),_:1}),h(b(k),{variant:`ghost`,size:`sm`,class:`ih:text-destructive ih:hover:text-destructive`,onClick:Q},{default:C(()=>[h(b(s)),g[10]||=m(` Löschen`,-1)]),_:1})]),key:`0`}:void 0]),1032,[`title`,`breadcrumbs`]),p(`div`,q,[p(`div`,se,[R.value.image_url?(_(),f(`button`,{key:0,type:`button`,class:`ih:grid ih:place-items-center ih:rounded-lg ih:border ih:bg-muted ih:p-4 ih:sm:p-8`,"aria-label":`${R.value.title} vergrößern`,onClick:g[0]||=e=>J.value=!0},[p(`img`,{src:R.value.image_url,alt:R.value.title,class:`ih:max-h-[70vh] ih:w-auto ih:max-w-full ih:object-contain ih:shadow-md`},null,8,le)],8,ce)):(_(),f(`div`,ue,[h(b(i),{class:`ih:size-10`,"stroke-width":1.5})])),R.value.description?(_(),f(`section`,de,[p(`div`,{class:`verleih-text ih:text-[15px] ih:leading-relaxed`,innerHTML:R.value.description},null,8,fe)])):d(``,!0)]),p(`aside`,pe,[p(`section`,me,[p(`dl`,he,[p(`div`,ge,[g[11]||=p(`dt`,{class:`ih:sr-only`},`Aktueller Standort`,-1),h(b(r),{class:`ih:mt-0.5 ih:size-4 ih:shrink-0 ih:text-muted-foreground`,"aria-hidden":`true`}),p(`dd`,null,y(R.value.location||`Standort nicht angegeben`),1)]),R.value.lent&&(R.value.lent_since||R.value.lent_until)?(_(),f(`div`,_e,[g[12]||=p(`dt`,{class:`ih:sr-only`},`Zeitraum`,-1),h(b(t),{class:`ih:mt-0.5 ih:size-4 ih:shrink-0 ih:text-muted-foreground`,"aria-hidden":`true`}),p(`dd`,null,`Verliehen `+y($(R.value.lent_since,R.value.lent_until)),1)])):d(``,!0),R.value.lent_to?(_(),f(`div`,ve,[g[13]||=p(`dt`,{class:`ih:sr-only`},`Ausgeliehen von`,-1),h(b(W),{class:`ih:mt-0.5 ih:size-4 ih:shrink-0 ih:text-muted-foreground`,"aria-hidden":`true`}),p(`dd`,null,[h(b(T),{href:`/personen/${R.value.lent_to.id}`,class:`ih:hover:underline`},{default:C(()=>[m(y(R.value.lent_to.name),1)]),_:1},8,[`href`])])])):d(``,!0)]),e.myRequest?(_(),f(`div`,ye,[p(`p`,be,[h(b(B),{class:`ih:size-4`}),m(` Angefragt am `+y(b(z)(e.myRequest.created_at)),1)]),p(`p`,null,`Nach „`+y(e.myRequest.location)+`“ `+y($(e.myRequest.from,e.myRequest.until))+` – das Team meldet sich.`,1),p(`button`,{type:`button`,class:`ih:w-fit ih:text-xs ih:font-medium ih:underline`,onClick:ke},`Anfrage zurückziehen`)])):(_(),u(b(k),{key:1,size:`lg`,class:`ih:w-full`,onClick:g[1]||=e=>G.value=!0},{default:C(()=>[h(b(H)),m(` `+y(e.labels.singular)+` anfragen`,1)]),_:1})),e.canManage&&R.value.lent?(_(),u(b(k),{key:2,variant:`outline`,class:`ih:w-full`,onClick:g[2]||=e=>X.value=!0},{default:C(()=>[h(b(U)),g[14]||=m(` Zurückgenommen`,-1)]),_:1})):d(``,!0)]),e.canManage&&e.requests.length?(_(),f(`section`,xe,[g[16]||=p(`h2`,{class:`ih:mb-3 ih:text-sm ih:font-semibold`},`Anfragen`,-1),p(`ul`,Se,[(_(!0),f(c,null,ne(e.requests,e=>(_(),f(`li`,{key:e.id,class:`ih:flex ih:gap-3 ih:text-sm`},[h(b(ae),{person:e.user,class:`ih:size-8`},null,8,[`person`]),p(`div`,Ce,[p(`p`,null,[p(`span`,we,y(e.user?.name),1),m(` · `+y(e.location),1)]),p(`p`,Te,y(e.status_label)+` · `+y(b(z)(e.created_at)),1)])]))),128))]),h(b(T),{href:`/verleih/anfragen`,class:`ih:mt-3 ih:inline-block ih:text-sm ih:font-medium ih:text-brand-text ih:hover:underline`},{default:C(()=>[...g[15]||=[m(`Alle Anfragen`,-1)]]),_:1})])):d(``,!0)])]),h(K,{open:G.value,"onUpdate:open":g[3]||=e=>G.value=e,item:R.value,labels:e.labels,"default-location":e.defaultLocation},null,8,[`open`,`item`,`labels`,`default-location`]),h(b(A),{open:X.value,"onUpdate:open":g[6]||=e=>X.value=e},{default:C(()=>[h(b(j),{class:`ih:sm:max-w-md`},{default:C(()=>[h(b(P),null,{default:C(()=>[h(b(F),null,{default:C(()=>[m(`„`+y(R.value.title)+`“ zurückgenommen`,1)]),_:1}),h(b(M),null,{default:C(()=>[...g[17]||=[m(`Danach ist es wieder verfügbar. Wo ist es jetzt?`,-1)]]),_:1})]),_:1}),p(`form`,{id:`verleih-zurueck`,onSubmit:w(Oe,[`prevent`])},[h(b(I),{id:`vl-return`,label:`Neuer Standort`,error:b(Z).errors.location},{default:C(()=>[h(b(L),{id:`vl-return`,modelValue:b(Z).location,"onUpdate:modelValue":g[4]||=e=>b(Z).location=e,maxlength:`200`,placeholder:`z. B. Lager Künstlerteam`},null,8,[`modelValue`])]),_:1},8,[`error`])],32),h(b(N),null,{default:C(()=>[h(b(k),{variant:`outline`,onClick:g[5]||=e=>X.value=!1},{default:C(()=>[...g[18]||=[m(`Abbrechen`,-1)]]),_:1}),h(b(k),{type:`submit`,form:`verleih-zurueck`,disabled:b(Z).processing},{default:C(()=>[b(Z).processing?(_(),u(b(o),{key:0,class:`ih:animate-spin`})):d(``,!0),g[19]||=m(` Speichern`,-1)]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]),J.value?(_(),f(`div`,{key:0,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":R.value.title,onClick:g[8]||=e=>J.value=!1},[p(`img`,{src:R.value.image_url,alt:R.value.title,class:`ih:size-full ih:object-contain`},null,8,De),p(`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`,onClick:g[7]||=w(e=>J.value=!1,[`stop`])},[h(b(n))])],8,Ee)):d(``,!0)]),_:1},8,[`title`]))}};export{J as default}; \ No newline at end of file diff --git a/plugin.json b/plugin.json index ee225b8..e90008c 100644 --- a/plugin.json +++ b/plugin.json @@ -1,13 +1,13 @@ { "slug": "verleih", "name": "Verleih", - "version": "1.0.1", + "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" diff --git a/resources/js/pages/Editor.vue b/resources/js/pages/Editor.vue index 19deded..9f8746f 100644 --- a/resources/js/pages/Editor.vue +++ b/resources/js/pages/Editor.vue @@ -1,7 +1,7 @@