Loheide-eu-mitarbeiterplatt.../public/build/assets/Organigram-CHBEUI1F.js
Friederich Loheide 64d9e0bbed
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 3m47s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 3m50s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 4m4s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 4m13s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 5m43s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 5m44s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 4m55s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m14s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 5m1s
Plugin-Updates über update_url (0.24.0)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-27 08:06:22 +00:00

1 line
No EOL
19 KiB
JavaScript
Raw Permalink 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{D as e,E as t,Ht as n,On as r,St as i,Zn as a,_ as o,b as s,bt as c,ct as l,er as u,g as d,mt as f,o as p,qt as m,tr as h,tt as g,v as _,vn as v,wt as y,y as b}from"./runtime-core.esm-bundler-B8D2lM98.js";import{i as x,s as S}from"./dist--2OKCVzt.js";import{t as C}from"./createLucideIcon-VlaMqNX_.js";import{t as w}from"./chevron-up-B0PLh6a4.js";import{t as T}from"./loader-circle-Wr6tQn-J.js";import{t as E}from"./minus-CHpU4ANA.js";import{t as D}from"./plus-CQwC4vy-.js";import{t as O}from"./smartphone-DpYdBNLx.js";import{t as k}from"./x-DU8daajy.js";import{C as ee,Dt as A,E as j,H as M,M as N,N as P,Ot as F,St as I,T as te,Yt as ne,c as L,dt as R,f as z,m as B,ut as V,vt as H,wt as U}from"./app-ljw5ZzEq.js";import{t as W}from"./useStoredChoice-BAacDiWy.js";var G=C({name:`maximize`,size:24,node:[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`,key:`1dcmit`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`,key:`1e4gt3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`,key:`wsl5sc`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`,key:`18trek`}]]}),K=C({name:`scan-search`,size:24,node:[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`m16 16-1.9-1.9`,key:`1dq9hf`}]]}),q=[`id`],J={class:`min-w-0 flex-1`},Y=[`title`],X=[`title`,`aria-label`],Z=[`aria-expanded`],Q={__name:`OrgCard`,props:{person:{type:Object,required:!0},compact:{type:Boolean,default:!1},highlighted:{type:Boolean,default:!1},open:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:[`toggle`,`focus`],setup(n){let i=n,c=d(()=>P(i.person.department));return(i,l)=>(f(),s(`div`,{id:`person-${n.person.id}`,class:a([`group/card relative overflow-hidden rounded-lg border bg-card text-left shadow-xs transition-shadow hover:shadow-sm`,[n.compact?`w-54`:`w-56`,n.highlighted?`border-brand-400 ring-3 ring-brand-300/50`:``]])},[o(`span`,{class:a([`absolute inset-y-0 left-0 w-1 rounded-l-lg`,c.value.bar]),"aria-hidden":`true`},null,2),o(`div`,{class:a([`flex items-center gap-3`,n.compact?`px-3 py-2`:`px-3.5 pt-3 pb-2.5`])},[e(N,{person:n.person,class:a(n.compact?`size-7 text-[10px]`:`size-10`)},null,8,[`person`,`class`]),o(`div`,J,[n.person.department&&!n.compact?(f(),s(`p`,{key:0,class:a([`truncate text-[10.5px] font-semibold tracking-wide uppercase`,c.value.text])},h(n.person.department),3)):b(``,!0),e(r(x),{href:`/personen/${n.person.id}`,class:`block truncate text-sm leading-tight font-semibold hover:underline`},{default:m(()=>[t(h(n.person.name),1)]),_:1},8,[`href`]),o(`p`,{class:`truncate text-xs leading-tight text-muted-foreground`,title:n.person.job_title},h(n.person.job_title||`–`),9,Y)])],2),o(`button`,{type:`button`,class:`absolute top-1.5 right-1.5 grid size-7 place-items-center rounded-md text-muted-foreground opacity-0 transition-opacity group-hover/card:opacity-100 hover:bg-accent hover:text-foreground focus-visible:opacity-100`,title:`${n.person.name} in den Fokus`,"aria-label":`${n.person.name} in den Fokus`,onClick:l[0]||=e=>i.$emit(`focus`,n.person)},[e(r(K),{class:`size-4`})],8,X),!n.compact&&n.person.reports?(f(),s(`button`,{key:0,type:`button`,class:a([`flex w-full items-center justify-center gap-1.5 rounded-b-lg border-t py-1.5 text-xs font-medium hover:bg-accent`,n.open?`bg-brand-soft/60 text-brand-soft-foreground`:`text-muted-foreground`]),"aria-expanded":n.open,onClick:l[1]||=e=>i.$emit(`toggle`)},[n.loading?(f(),_(r(T),{key:0,class:`size-3.5 animate-spin`})):(f(),_(y(n.open?r(w):r(ne)),{key:1,class:`size-3.5`})),t(` `+h(n.person.reports)+` `+h(n.person.reports===1?`Person`:`Personen`)+` im Team `,1)],10,Z)):b(``,!0)],10,q))}},re={key:0,"aria-busy":`true`},ie={class:`org-members`},ae={class:`grid flex-1 gap-1.5`},oe={key:1},se={key:0},ce={__name:`OrgChartNode`,props:{person:{type:Object,required:!0},teams:{type:Object,default:()=>({})},open:{type:Array,default:()=>[]},focus:{type:Number,default:null}},emits:[`focus`],setup(t){let l=t,u=()=>l.open.includes(l.person.id)&&l.teams[l.person.id]!==void 0,m=v(l.teams[l.person.id]??null),h=v(u()),g=v(!1);n(()=>l.teams,e=>{m.value=e[l.person.id]??m.value,h.value=u()});let y=d(()=>(m.value??[]).filter(e=>e.reports)),x=d(()=>(m.value??[]).filter(e=>!e.reports));async function S(){if(h.value=!h.value,h.value&&m.value===null){g.value=!0;try{m.value=(await M.get(`/personen/organigramm/${l.person.id}/team`)).team}catch{h.value=!1}finally{g.value=!1}}}return(n,l)=>{let u=i(`OrgChartNode`,!0);return f(),s(`li`,null,[e(Q,{person:t.person,highlighted:t.person.id===t.focus,open:h.value,loading:g.value,onToggle:S,onFocus:l[0]||=e=>n.$emit(`focus`,e)},null,8,[`person`,`highlighted`,`open`,`loading`]),h.value&&g.value?(f(),s(`ul`,re,[o(`li`,null,[o(`div`,ie,[(f(),s(p,null,c(3,t=>o(`div`,{key:t,class:`flex w-54 items-center gap-3 rounded-lg border bg-card px-3 py-2`},[e(r(L),{class:`size-7 rounded-full`}),o(`div`,ae,[e(r(L),{class:`h-3 w-3/4`}),e(r(L),{class:`h-2.5 w-1/2`})])])),64))])])])):h.value&&m.value?.length?(f(),s(`ul`,oe,[(f(!0),s(p,null,c(y.value,e=>(f(),_(u,{key:e.id,person:e,teams:t.teams,open:t.open,focus:t.focus,onFocus:l[1]||=e=>n.$emit(`focus`,e)},null,8,[`person`,`teams`,`open`,`focus`]))),128)),x.value.length?(f(),s(`li`,se,[o(`div`,{class:a([`org-members`,{"org-members-wide":x.value.length>8}])},[(f(!0),s(p,null,c(x.value,e=>(f(),_(Q,{key:e.id,person:e,compact:``,highlighted:e.id===t.focus,onFocus:l[2]||=e=>n.$emit(`focus`,e)},null,8,[`person`,`highlighted`]))),128))],2)])):b(``,!0)])):b(``,!0)])}}},le={class:`relative overflow-hidden rounded-lg border bg-card`},ue={class:`absolute top-3 right-3 z-10 flex items-center rounded-md border bg-card shadow-xs`},de={class:`w-11 text-center text-xs text-muted-foreground tabular-nums`},fe={class:`org-tree`},pe={__name:`OrgChart`,props:{roots:{type:Array,required:!0},teams:{type:Object,default:()=>({})},open:{type:Array,default:()=>[]},focus:{type:Number,default:null}},emits:[`focus`],setup(t){let i=t,a=v(null),d=v(1),m=[.5,.67,.8,1,1.15];function y(e){let t=m.findIndex(e=>e>=d.value-.001);d.value=m[Math.min(m.length-1,Math.max(0,t+e))]}function b(){let e=a.value;if(!e)return;let t=e.scrollWidth/d.value;d.value=Math.max(.4,Math.min(1,(e.clientWidth-32)/t)),g(()=>e.scrollLeft=(e.scrollWidth-e.clientWidth)/2)}let x=null;function S(e){e.pointerType!==`mouse`||e.button!==0||e.target.closest(`a, button`)||(x={x:e.clientX,y:e.clientY,left:a.value.scrollLeft,top:a.value.scrollTop},a.value.setPointerCapture(e.pointerId))}function C(e){x&&(a.value.scrollLeft=x.left-(e.clientX-x.x),a.value.scrollTop=x.top-(e.clientY-x.y))}function w(){x=null}function T(){g(()=>{let e=a.value,t=i.focus&&document.getElementById(`person-${i.focus}`)||i.roots.length&&document.getElementById(`person-${i.roots[0].id}`);if(e&&t){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();e.scrollLeft+=n.left-r.left-(r.width-n.width)/2,i.focus&&(e.scrollTop+=n.top-r.top-Math.min(120,(r.height-n.height)/2))}})}return l(T),n(()=>i.focus,T),(n,i)=>(f(),s(`div`,le,[o(`div`,ue,[o(`button`,{type:`button`,class:`grid size-8 place-items-center text-muted-foreground hover:text-foreground`,"aria-label":`Verkleinern`,onClick:i[0]||=e=>y(-1)},[e(r(E),{class:`size-4`})]),o(`span`,de,h(Math.round(d.value*100))+` %`,1),o(`button`,{type:`button`,class:`grid size-8 place-items-center text-muted-foreground hover:text-foreground`,"aria-label":`Vergrößern`,onClick:i[1]||=e=>y(1)},[e(r(D),{class:`size-4`})]),i[3]||=o(`span`,{class:`h-5 w-px bg-border`},null,-1),o(`button`,{type:`button`,class:`grid size-8 place-items-center text-muted-foreground hover:text-foreground`,title:`Einpassen`,"aria-label":`Einpassen`,onClick:b},[e(r(G),{class:`size-4`})])]),o(`div`,{ref_key:`canvas`,ref:a,class:`org-canvas max-h-[calc(100vh-12rem)] min-h-[18rem] cursor-grab overflow-auto active:cursor-grabbing`,onPointerdown:S,onPointermove:C,onPointerup:w,onPointercancel:w},[o(`div`,{class:`inline-block min-w-full px-8 pt-7 pb-8`,style:u({zoom:d.value})},[o(`ul`,fe,[(f(!0),s(p,null,c(t.roots,e=>(f(),_(ce,{key:e.id,person:e,teams:t.teams,open:t.open,focus:t.focus,onFocus:i[2]||=e=>n.$emit(`focus`,e)},null,8,[`person`,`teams`,`open`,`focus`]))),128))])],4)],544)]))}},me={class:`grid gap-5`},he={class:`relative overflow-hidden rounded-lg border bg-card`},ge={class:`flex flex-col gap-5 p-5 sm:flex-row sm:items-center`},_e={class:`min-w-0 flex-1`},ve={class:`text-xl leading-tight font-semibold tracking-tight`},ye={key:1,class:`text-sm text-muted-foreground`},be={class:`mt-2 flex flex-wrap gap-x-4 gap-y-1 text-[13px]`},xe=[`href`],Se={key:1,class:`truncate text-muted-foreground`},Ce={class:`flex shrink-0 flex-wrap gap-2 sm:flex-col`},we={class:`rounded-lg border bg-card`},Te={class:`flex items-center gap-2 border-b px-4 py-2.5 text-sm font-semibold`},Ee={class:`font-normal text-muted-foreground`},De={key:0,class:`overflow-hidden rounded-b-lg`},Oe={class:`-mr-px -mb-px grid sm:grid-cols-2 xl:grid-cols-3`},ke=[`onClick`],Ae={class:`min-w-0 flex-1`},je={class:`block truncate text-sm font-medium`},Me={class:`block truncate text-xs text-muted-foreground`},Ne=[`title`],Pe={key:0,class:`flex items-center gap-1 px-4 pb-2.5 pl-16`},Fe=[`title`,`onClick`],Ie={key:0,class:`ml-1 text-xs text-muted-foreground`},Le={key:1,class:`px-4 py-3 text-[13px] text-muted-foreground`},Re={key:0,class:`grid gap-5`},ze={key:0,class:`rounded-lg border bg-card`},Be={class:`flex items-center gap-2 border-b px-4 py-2.5 text-sm font-semibold`},Ve={class:`p-2`},He={key:0,class:`absolute top-9 bottom-0 left-[1.45rem] w-px bg-border`,"aria-hidden":`true`},Ue=[`onClick`],We={class:`min-w-0`},Ge={class:`block truncate text-sm font-medium`},Ke={class:`block truncate text-xs text-muted-foreground`},qe={key:1,class:`rounded-lg border bg-card`},Je={class:`flex items-center gap-2 border-b px-4 py-2.5 text-sm font-semibold`},Ye={class:`font-normal text-muted-foreground`},Xe={class:`max-h-80 overflow-y-auto p-2`},Ze=[`onClick`],Qe={class:`min-w-0`},$e={class:`block truncate text-[13px] font-medium`},et={class:`block truncate text-xs text-muted-foreground`},tt={__name:`OrgFocus`,props:{roots:{type:Array,required:!0},teams:{type:Object,default:()=>({})},path:{type:Array,default:()=>[]},details:{type:Object,required:!0}},emits:[`focus`,`show-in-tree`],setup(n){let i=n,l=d(()=>{let e=new Map;return[...i.roots,...Object.values(i.teams).flat()].forEach(t=>e.set(t.id,t)),e}),u=d(()=>i.path.slice(0,-1).map(e=>l.value.get(e)).filter(Boolean)),g=d(()=>u.value.at(-1)??null),v=d(()=>g.value?(i.teams[g.value.id]??[]).filter(e=>e.id!==i.details.id):[]),S=d(()=>i.teams[i.details.id]??[]),C=d(()=>[{icon:F,value:i.details.email,href:`mailto:${i.details.email}`},{icon:I,value:i.details.phone,href:i.details.phone&&`tel:${i.details.phone}`},{icon:O,value:i.details.mobile,href:i.details.mobile&&`tel:${i.details.mobile}`},{icon:A,value:[i.details.department,i.details.location].filter(Boolean).join(` · `)}].filter(e=>e.value));return(i,l)=>(f(),s(`div`,{class:a([`grid items-start gap-5`,{"lg:grid-cols-[minmax(0,1fr)_19rem]":u.value.length||v.value.length}])},[o(`div`,me,[o(`section`,he,[o(`span`,{class:a([`absolute inset-y-0 left-0 w-1`,r(P)(n.details.department).bar]),"aria-hidden":`true`},null,2),o(`div`,ge,[e(N,{person:n.details,class:`size-20 text-xl ring-4 ring-brand-soft`},null,8,[`person`]),o(`div`,_e,[n.details.department?(f(),s(`p`,{key:0,class:a([`text-[11px] font-semibold tracking-wide uppercase`,r(P)(n.details.department).text])},h(n.details.department),3)):b(``,!0),o(`h2`,ve,h(n.details.name),1),n.details.job_title?(f(),s(`p`,ye,h(n.details.job_title),1)):b(``,!0),o(`ul`,be,[(f(!0),s(p,null,c(C.value,e=>(f(),s(`li`,{key:e.value,class:`flex min-w-0 items-center gap-1.5`},[(f(),_(y(e.icon),{class:`size-3.5 shrink-0 text-muted-foreground`})),e.href?(f(),s(`a`,{key:0,href:e.href,class:`truncate text-brand-text hover:underline`},h(e.value),9,xe)):(f(),s(`span`,Se,h(e.value),1))]))),128))])]),o(`div`,Ce,[e(r(B),{size:`sm`,"as-child":``},{default:m(()=>[e(r(x),{href:`/personen/${n.details.id}`},{default:m(()=>[e(r(R)),l[1]||=t(` Profil`,-1)]),_:1},8,[`href`])]),_:1}),e(r(B),{variant:`outline`,size:`sm`,onClick:l[0]||=e=>i.$emit(`show-in-tree`,n.details)},{default:m(()=>[e(r(U)),l[2]||=t(` Im Baum`,-1)]),_:1})])])]),o(`section`,we,[o(`h3`,Te,[e(r(V),{class:`size-4 text-brand-text`}),l[3]||=t(` Direkt unterstellt `,-1),o(`span`,Ee,h(S.value.length),1)]),S.value.length?(f(),s(`div`,De,[o(`ul`,Oe,[(f(!0),s(p,null,c(S.value,a=>(f(),s(`li`,{key:a.id,class:`border-r border-b hover:bg-accent/60`},[o(`button`,{type:`button`,class:`flex w-full items-center gap-3 px-4 py-3 text-left`,onClick:e=>i.$emit(`focus`,a)},[e(N,{person:a,class:`size-9`},null,8,[`person`]),o(`span`,Ae,[o(`span`,je,h(a.name),1),o(`span`,Me,h(a.job_title||`–`),1)]),a.reports?(f(),s(`span`,{key:0,class:`inline-flex shrink-0 items-center gap-1 rounded-pill bg-brand-soft px-2 py-0.5 text-[11px] font-medium text-brand-soft-foreground`,title:`${a.reports} im Team`},[e(r(V),{class:`size-3`}),t(` `+h(a.reports),1)],8,Ne)):b(``,!0)],8,ke),n.teams[a.id]?.length?(f(),s(`div`,Pe,[(f(!0),s(p,null,c(n.teams[a.id].slice(0,7),t=>(f(),s(`button`,{key:t.id,type:`button`,class:`-ml-1 rounded-full ring-2 ring-card first:ml-0 hover:ring-brand-300`,title:`${t.name}${t.job_title?` – `+t.job_title:``}`,onClick:e=>i.$emit(`focus`,t)},[e(N,{person:t,class:`size-6 text-[9px]`},null,8,[`person`])],8,Fe))),128)),n.teams[a.id].length>7?(f(),s(`span`,Ie,`+`+h(n.teams[a.id].length-7),1)):b(``,!0)])):b(``,!0)]))),128))])])):(f(),s(`p`,Le,`Keine direkt unterstellten Personen.`))])]),u.value.length||v.value.length?(f(),s(`aside`,Re,[u.value.length?(f(),s(`section`,ze,[o(`h3`,Be,[e(r(w),{class:`size-4 text-brand-text`}),l[4]||=t(` Berichtet an`,-1)]),o(`ol`,Ve,[(f(!0),s(p,null,c([...u.value].reverse(),(t,n)=>(f(),s(`li`,{key:t.id,class:`relative`},[n<u.value.length-1?(f(),s(`span`,He)):b(``,!0),o(`button`,{type:`button`,class:`relative flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-left hover:bg-accent`,onClick:e=>i.$emit(`focus`,t)},[e(N,{person:t,class:`size-8 text-[11px]`},null,8,[`person`]),o(`span`,We,[o(`span`,Ge,h(t.name),1),o(`span`,Ke,h(t.job_title||t.department||`–`),1)])],8,Ue)]))),128))])])):b(``,!0),v.value.length?(f(),s(`section`,qe,[o(`h3`,Je,[e(r(V),{class:`size-4 text-brand-text`}),l[5]||=t(` Im selben Team `,-1),o(`span`,Ye,h(v.value.length),1)]),o(`ul`,Xe,[(f(!0),s(p,null,c(v.value,t=>(f(),s(`li`,{key:t.id},[o(`button`,{type:`button`,class:`flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-left hover:bg-accent`,onClick:e=>i.$emit(`focus`,t)},[e(N,{person:t,class:`size-7 text-[10px]`},null,8,[`person`]),o(`span`,Qe,[o(`span`,$e,h(t.name),1),o(`span`,et,h(t.job_title||`–`),1)])],8,Ze)]))),128))])])):b(``,!0)])):b(``,!0)],2))}},$={class:`flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center`},nt={class:`inline-flex self-start rounded-md border bg-card p-0.5`,role:`group`,"aria-label":`Ansicht`},rt=[`aria-pressed`,`onClick`],it={class:`relative sm:w-80`},at={key:0,class:`absolute inset-x-0 top-full z-30 mt-1 max-h-72 overflow-y-auto rounded-md border bg-popover p-1 shadow-md`},ot=[`onClick`],st={class:`min-w-0`},ct={class:`block truncate font-medium`},lt={class:`block truncate text-xs text-muted-foreground`},ut={key:0,class:`rounded-lg border bg-card`},dt={key:0,class:`mb-3 flex items-center gap-2 text-[13px]`},ft={key:1,class:`mb-3 flex flex-wrap gap-x-4 gap-y-1.5 text-xs text-muted-foreground`,"aria-label":`Abteilungen`},pt={key:3,class:`mt-4 text-[13px] text-muted-foreground`},mt={__name:`Organigram`,props:{roots:{type:Array,required:!0},path:{type:Array,default:()=>[]},open:{type:Array,default:()=>[]},teams:{type:Object,default:()=>({})},focus:{type:Number,default:null},details:{type:Object,default:null},view:{type:String,default:`baum`},stats:{type:Object,default:()=>({people:0,leaders:0})},unassigned:{type:Number,default:0}},setup(i){let u=i,g=W(`organigram.view`,`baum`,[`baum`,`fokus`]);l(()=>{!new URLSearchParams(window.location.search).has(`ansicht`)&&g.value!==u.view&&C(g.value,u.focus,!0)}),n(()=>u.view,e=>g.value=e);function C(e,t=u.focus,n=!1){let r={ansicht:e};t&&(r.person=t),S.get(`/personen/organigramm`,r,{preserveScroll:e===`fokus`,replace:n})}let w=v(``),T=v([]),E;n(w,e=>{if(clearTimeout(E),e.trim().length<2){T.value=[];return}E=setTimeout(async()=>{T.value=(await M.get(`/personen/suche?q=${encodeURIComponent(e.trim())}`)).people},250)});function D(e){w.value=``,T.value=[],C(u.view,e.id)}let O=e=>e.toLocaleString(`de-DE`),A=d(()=>[...new Set([...u.roots,...Object.values(u.teams).flat()].map(e=>e.department).filter(Boolean))].sort((e,t)=>e.localeCompare(t,`de`)).slice(0,16));return(n,l)=>(f(),_(j,{title:`Organigramm`},{default:m(()=>[e(te,{title:`Organigramm`,breadcrumbs:[{label:`Personen`,href:`/personen`}],description:`${O(i.stats.people)} Personen · ${O(i.stats.leaders)} mit Personalverantwortung`},{actions:m(()=>[o(`div`,$,[o(`div`,nt,[(f(!0),s(p,null,c([{key:`baum`,icon:r(U),label:`Baum`},{key:`fokus`,icon:r(K),label:`Fokus`}],e=>(f(),s(`button`,{key:e.key,type:`button`,class:a([`inline-flex h-9 items-center gap-1.5 rounded px-3 text-[13px]`,i.view===e.key?`bg-brand-soft font-medium text-brand-soft-foreground`:`text-muted-foreground hover:text-foreground`]),"aria-pressed":i.view===e.key,onClick:t=>i.view!==e.key&&C(e.key)},[(f(),_(y(e.icon),{class:`size-4`})),t(` `+h(e.label),1)],10,rt))),128))]),o(`div`,it,[e(r(H),{class:`pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground`}),e(r(z),{modelValue:w.value,"onUpdate:modelValue":l[0]||=e=>w.value=e,class:`h-10 bg-card pl-9`,placeholder:`Person finden …`,"aria-label":`Person im Organigramm finden`,autocomplete:`off`},null,8,[`modelValue`]),T.value.length?(f(),s(`ul`,at,[(f(!0),s(p,null,c(T.value,t=>(f(),s(`li`,{key:t.id},[o(`button`,{type:`button`,class:`flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm hover:bg-accent`,onClick:e=>D(t)},[e(N,{person:t,class:`size-7 text-[10px]`},null,8,[`person`]),o(`span`,st,[o(`span`,ct,h(t.name),1),o(`span`,lt,h(t.job_title),1)])],8,ot)]))),128))])):b(``,!0)])])]),_:1},8,[`description`]),i.roots.length?i.view===`fokus`&&i.details?(f(),_(tt,{key:1,roots:i.roots,teams:i.teams,path:i.path,details:i.details,onFocus:l[1]||=e=>C(`fokus`,e.id),onShowInTree:l[2]||=e=>C(`baum`,e.id)},null,8,[`roots`,`teams`,`path`,`details`])):(f(),s(p,{key:2},[i.focus?(f(),s(`div`,dt,[l[5]||=o(`span`,{class:`text-muted-foreground`},`Der Weg zur gesuchten Person ist aufgeklappt.`,-1),e(r(x),{href:`/personen/organigramm?ansicht=baum`,class:`inline-flex items-center gap-1 font-medium text-brand-text hover:underline`},{default:m(()=>[e(r(k),{class:`size-3.5`}),l[4]||=t(` Zurücksetzen`,-1)]),_:1})])):b(``,!0),A.value.length>1?(f(),s(`ul`,ft,[(f(!0),s(p,null,c(A.value,e=>(f(),s(`li`,{key:e,class:`flex items-center gap-1.5`},[o(`span`,{class:a([`size-2.5 rounded-sm`,r(P)(e).bar])},null,2),t(h(e),1)]))),128))])):b(``,!0),e(pe,{roots:i.roots,teams:i.teams,open:i.open,focus:i.focus,onFocus:l[3]||=e=>C(`fokus`,e.id)},null,8,[`roots`,`teams`,`open`,`focus`])],64)):(f(),s(`div`,ut,[e(ee,{icon:r(U),title:`Noch kein Organigramm`,text:`Es sind noch keine Vorgesetzten hinterlegt. Sie kommen aus dem Anmeldedienst (z. B. Entra ID) oder werden im Admin-Bereich bei den Benutzern eingetragen.`},null,8,[`icon`])])),i.unassigned?(f(),s(`p`,pt,h(i.unassigned===1?`1 Person`:`${O(i.unassigned)} Personen`)+` ohne Vorgesetzte*n und ohne Team `+h(i.unassigned===1?`erscheint`:`erscheinen`)+` hier nicht. `,1)):b(``,!0)]),_:1}))}};export{mt as default};