Loheide-eu-mitarbeiterplatt.../public/build/assets/Index-Op5ZstN7.js
Friederich Loheide 8acc0cfd8b
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Failing after 15m6s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 15m58s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 15m42s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 15m21s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 1h1m41s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 1h2m13s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 23m20s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 23m33s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 1m17s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m57s
Feed in der Mitarbeiter-App (0.54.0)
Feed-Registry mit Anbietern (Neu im Team, Neuigkeiten, Termine, Umfragen),
Schnellaktionen je nach Rechten, Nachladen über /feed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-30 14:27:23 +00:00

1 line
No EOL
5.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

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

import{M as e,P as t,W as n}from"./ui-DY0WbyhT.js";import{At as r,C as i,Dt as a,O as o,S as s,T as c,Tt as l,Y as u,_t as d,i as f,k as p,o as m,ot as h,q as g,rt as _,s as v,v as y,w as b}from"./framework-Cy4cevSy.js";import{t as x}from"./plus-BkVfuiNS.js";import{C as S,U as ee,c as te,d as C,et as w,st as T,u as E}from"./app-JMV1_L9S.js";import{t as D}from"./StatusBadge-Cr4k8lvF.js";import{n as O,t as k}from"./SupportButton-D2hWk34S.js";var A={class:`mb-4 flex flex-wrap items-center gap-2`},j={class:`flex flex-wrap gap-1 rounded-md bg-muted p-1`,role:`tablist`,"aria-label":`Status`},M=[`aria-selected`],N={class:`text-xs text-muted-foreground tabular-nums`},P=[`aria-selected`,`onClick`],F={class:`text-xs text-muted-foreground tabular-nums`},I=[`value`],L=[`value`],R={class:`relative w-full sm:w-56`},ne={key:0,class:`grid gap-3`},z={class:`min-w-0 flex-1`},B={class:`flex flex-wrap items-center gap-2`},V={class:`mt-1 line-clamp-2 text-sm text-muted-foreground`},H={class:`mt-2 flex flex-wrap items-center gap-x-3 text-xs text-muted-foreground`},U={key:2,class:`mt-6 flex items-center justify-between text-sm`,"aria-label":`Seiten`},W={key:1},G={class:`text-muted-foreground`},K={key:3},q={__name:`Index`,props:{ideas:{type:Array,required:!0},pagination:{type:Object,required:!0},filters:{type:Object,required:!0},statuses:{type:Object,required:!0},counts:{type:Object,default:()=>({})}},setup(q){let J=q,Y=m();_(()=>Y.props.flash.status,e=>e&&n.success(e),{immediate:!0});let X=d(!1),Z=d(J.filters.q);function Q(e){let t={...J.filters,...e};v.get(`/ideen`,Object.fromEntries(Object.entries(t).filter(([e,t])=>t&&(e!==`sortierung`||t!==`neu`))),{preserveState:!0,preserveScroll:!0})}let $;_(Z,e=>{clearTimeout($),$=setTimeout(()=>Q({q:e}),300)});let re=()=>Object.values(J.counts).reduce((e,t)=>e+t,0),ie={neu:`Neueste`,beliebt:`Meiste Unterstützung`,diskutiert:`Meiste Kommentare`};return(n,d)=>(g(),i(E,{title:`Ideenbox`},{default:h(()=>[p(C,{title:`Ideenbox`,description:`Gute Ideen machen den Alltag leichter. Reichen Sie Vorschläge ein, unterstützen Sie andere – das Gremium prüft und gibt Rückmeldung.`},{actions:h(()=>[p(l(t),{onClick:d[0]||=e=>X.value=!0},{default:h(()=>[p(l(x)),d[5]||=o(` Idee einreichen`,-1)]),_:1})]),_:1}),s(`div`,A,[s(`div`,j,[s(`button`,{type:`button`,role:`tab`,"aria-selected":!q.filters.status,class:a([`rounded px-3 py-1 text-sm font-medium`,q.filters.status?`text-muted-foreground hover:text-foreground`:`bg-card shadow-xs`]),onClick:d[1]||=e=>Q({status:null})},[d[6]||=o(` Alle `,-1),s(`span`,N,r(re()),1)],10,M),(g(!0),c(y,null,u(q.statuses,(e,t)=>(g(),c(`button`,{key:t,type:`button`,role:`tab`,"aria-selected":q.filters.status===t,class:a([`rounded px-3 py-1 text-sm font-medium`,q.filters.status===t?`bg-card shadow-xs`:`text-muted-foreground hover:text-foreground`]),onClick:e=>Q({status:t})},[o(r(e)+` `,1),s(`span`,F,r(q.counts[t]??0),1)],10,P))),128))]),d[7]||=s(`span`,{class:`flex-1`},null,-1),s(`select`,{value:q.filters.sortierung,class:`h-9 rounded-md border bg-card px-2 text-sm`,"aria-label":`Sortierung`,onChange:d[2]||=e=>Q({sortierung:e.target.value})},[(g(),c(y,null,u(ie,(e,t)=>s(`option`,{key:t,value:t},r(e),9,L)),64))],40,I),s(`div`,R,[p(l(ee),{class:`pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground`}),p(l(e),{modelValue:Z.value,"onUpdate:modelValue":d[3]||=e=>Z.value=e,type:`search`,placeholder:`Ideen durchsuchen`,class:`h-9 bg-card pl-8`,"aria-label":`Ideen durchsuchen`},null,8,[`modelValue`])])]),q.ideas.length?(g(),c(`ul`,ne,[(g(!0),c(y,null,u(q.ideas,e=>(g(),c(`li`,{key:e.id,class:`flex gap-4 rounded-lg border bg-card p-4 shadow-xs`},[p(k,{idea:e,disabled:e.author?.id===l(Y).props.auth.user.id},null,8,[`idea`,`disabled`]),s(`div`,z,[s(`div`,B,[p(l(f),{href:e.url,class:`font-semibold hover:underline`},{default:h(()=>[o(r(e.title),1)]),_:2},1032,[`href`]),p(D,{status:e.status,label:e.status_label},null,8,[`status`,`label`])]),s(`p`,V,r(e.excerpt),1),s(`p`,H,[s(`span`,null,r(e.author?.name??`Anonym`)+` · `+r(l(S)(e.created_at)),1),p(l(f),{href:`${e.url}#kommentare`,class:`inline-flex items-center gap-1 hover:text-foreground`},{default:h(()=>[p(l(w),{class:`size-3.5`}),o(` `+r(e.comments),1)]),_:2},1032,[`href`])])])]))),128))])):(g(),i(te,{key:1,icon:l(T),title:q.filters.q||q.filters.status?`Keine passenden Ideen`:`Noch keine Ideen`,text:`Machen Sie den Anfang – jede Verbesserung zählt.`,class:`rounded-lg border bg-card py-12`},null,8,[`icon`,`title`])),q.pagination.last>1?(g(),c(`nav`,U,[q.pagination.prev?(g(),i(l(f),{key:0,href:q.pagination.prev,"preserve-scroll":``,class:`font-medium text-brand-text hover:underline`},{default:h(()=>[...d[8]||=[o(`← Zurück`,-1)]]),_:1},8,[`href`])):(g(),c(`span`,W)),s(`span`,G,`Seite `+r(q.pagination.current)+` von `+r(q.pagination.last),1),q.pagination.next?(g(),i(l(f),{key:2,href:q.pagination.next,"preserve-scroll":``,class:`font-medium text-brand-text hover:underline`},{default:h(()=>[...d[9]||=[o(`Weiter →`,-1)]]),_:1},8,[`href`])):(g(),c(`span`,K))])):b(``,!0),p(O,{open:X.value,"onUpdate:open":d[4]||=e=>X.value=e},null,8,[`open`])]),_:1}))}};export{q as default};