Loheide-eu-mitarbeiterplatt.../public/build/assets/Index-C9pd70Gy.js
Friederich Loheide 179471cb53
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 8m15s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 8m16s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 8m10s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 8m15s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 10m23s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 10m41s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 8m59s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 9m1s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 49s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m11s
Einheitlicher Rahmen für alle Seiten (0.49.0)
Das Portal legt den Rahmen selbst um jede Plugin-Seite; AppLayout aus
@inhaus/ui setzt dort nur noch den Titel. Detailseiten nutzen PageHeader.

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

1 line
No EOL
7.6 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{Et as e,Nt as t,P as n,W as r,k as i}from"./ui-DTELwomD.js";import{C as a,E as ee,Et as o,O as s,S as c,T as l,Y as u,i as d,k as f,kt as p,o as m,ot as h,q as g,rt as _,s as v,t as y,v as b,w as x,wt as S}from"./framework-CFqPLBV8.js";import{t as te}from"./calendar-clock-qnL7qJ7e.js";import{t as C}from"./circle-alert-3v1aHtY0.js";import{n as w,t as T}from"./message-square-plus-BCCXqzIH.js";import{c as E,d as ne,l as D,st as O,u as k,z as A}from"./app-DIZuUM-n.js";import{t as j}from"./StatusBadge-Bpn45TaW.js";import{n as M,r as N,t as P}from"./status-p0CPKwc2.js";var F=t({name:`plug`,size:24,node:[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]}),I=t({name:`ticket-check`,size:24,node:[[`path`,{d:`M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z`,key:`qn84l0`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]}),L={key:0,class:`rounded-lg border bg-card`},R=[`innerHTML`],z={class:`grid grid-cols-1 gap-6 lg:grid-cols-12`},B={class:`grid gap-2`},V={key:0,class:`flex items-center gap-2 text-sm text-destructive`},H={key:2,class:`-mx-2 divide-y`},U={class:`min-w-0 flex-1`},W={class:`block text-xs text-muted-foreground`},G={class:`grid content-start gap-6 lg:col-span-5 xl:col-span-4`},K={class:`grid gap-2`},q={key:0,class:`flex items-center gap-2 text-sm text-destructive`},re={key:1,class:`text-[13px] text-muted-foreground`},J={key:2,class:`grid gap-3`},Y={class:`flex items-start gap-3`},X={class:`grid size-10 shrink-0 place-items-center rounded-md bg-muted text-foreground/70`},ie={class:`min-w-0 flex-1`},ae={class:`font-medium leading-tight`},oe={class:`mt-0.5 text-xs text-muted-foreground`},se={class:`mt-2 grid gap-0.5 text-xs`},ce={key:0,class:`flex gap-1.5`},le={class:`font-mono`},ue={key:1,class:`flex gap-1.5`},de={class:`font-mono`},fe={class:`grid gap-2`},pe={key:0,class:`flex items-center gap-2 text-sm text-destructive`},me={key:1,class:`text-[13px] text-muted-foreground`},he={key:2,class:`-mx-1 divide-y`},Z={class:`min-w-0 flex-1`},ge={class:`truncate text-sm font-medium`},_e={class:`text-xs text-muted-foreground tabular-nums`},ve=[`title`,`onClick`],Q={__name:`Index`,props:{configured:{type:Boolean,default:!1},intro:{type:String,default:null},assets:{type:Object,default:null},tickets:{type:Object,default:null},loans:{type:Object,default:null}},setup(t){let Q=m();_(()=>Q.props.flash.status,e=>e&&r.success(e),{immediate:!0}),_(()=>Q.props.errors?.loan,e=>e&&r.error(e));function $(e){if(!e.warranty_end)return null;let t=new Date(e.warranty_end),n=Math.round((t-new Date)/864e5);return Number.isNaN(n)?{text:`Garantie bis ${e.warranty_end}`,tone:``}:n<0?{text:`Garantie abgelaufen (${P(e.warranty_end)})`,tone:`text-muted-foreground`}:n<90?{text:`Garantie endet am ${P(e.warranty_end)}`,tone:`text-amber-700 dark:text-amber-300`}:{text:`Garantie bis ${P(e.warranty_end)}`,tone:`text-muted-foreground`}}function ye(e){window.confirm(`Ausleihe „${e.device}“ stornieren?`)&&v.post(`/it-service/ausleihen/${e.id}/stornieren`,{},{preserveScroll:!0})}return(r,m)=>(g(),a(ne,{title:`Meine IT`},{default:h(()=>[f(k,{title:`Meine IT`,description:`Ihre Geräte, Tickets und Leihgeräte an einem Ort.`},ee({_:2},[t.configured?{name:`actions`,fn:h(()=>[f(S(n),{variant:`outline`,"as-child":``},{default:h(()=>[f(S(d),{href:`/it-service/leihgeraete`},{default:h(()=>[f(S(te)),m[0]||=s(` Leihgerät ausleihen`,-1)]),_:1})]),_:1}),f(S(n),{"as-child":``},{default:h(()=>[f(S(d),{href:`/it-service/tickets/neu`},{default:h(()=>[f(S(T)),m[1]||=s(` Ticket erstellen`,-1)]),_:1})]),_:1})]),key:`0`}:void 0]),1024),t.configured?(g(),l(b,{key:1},[t.intro?(g(),l(`div`,{key:0,class:`prose prose-sm mb-6 max-w-none rounded-lg border border-brand-200 bg-brand-soft/60 px-5 py-4 dark:prose-invert`,innerHTML:t.intro},null,8,R)):x(``,!0),c(`div`,z,[f(D,{title:`Meine Tickets`,class:`min-w-0 lg:col-span-7 xl:col-span-8`},{default:h(()=>[f(S(y),{data:`tickets`},{fallback:h(()=>[c(`div`,B,[(g(),l(b,null,u(4,e=>f(S(i),{key:e,class:`h-14`})),64))])]),default:h(()=>[t.tickets.ok?t.tickets.data.length?(g(),l(`ul`,H,[(g(!0),l(b,null,u(t.tickets.data,e=>(g(),l(`li`,{key:e.id},[f(S(d),{href:`/it-service/tickets/${e.id}`,class:`flex items-center gap-3 rounded-md px-2 py-3 hover:bg-accent/60`},{default:h(()=>[c(`span`,{class:o([`grid size-9 shrink-0 place-items-center rounded-md`,e.open?`bg-brand-soft text-brand-text`:`bg-muted text-muted-foreground`])},[f(S(w),{class:`size-4`})],2),c(`span`,U,[c(`span`,{class:o([`block truncate text-sm font-medium`,{"text-muted-foreground":!e.open}])},p(e.subject),3),c(`span`,W,[e.number?(g(),l(b,{key:0},[s(`#`+p(e.number)+` · `,1)],64)):x(``,!0),s(`erstellt `+p(S(P)(e.created_at,!0)),1)])]),f(j,{label:e.status_label,tone:S(N)(e)},null,8,[`label`,`tone`])]),_:2},1032,[`href`])]))),128))])):(g(),a(E,{key:1,icon:S(I),title:`Keine Tickets`,text:`Wenn etwas nicht funktioniert: „Ticket erstellen“ – die IT kümmert sich darum.`},null,8,[`icon`])):(g(),l(`p`,V,[f(S(C),{class:`size-4`}),s(` `+p(t.tickets.error),1)]))]),_:1})]),_:1}),c(`div`,G,[f(D,{title:`Meine Geräte`},{default:h(()=>[f(S(y),{data:`assets`},{fallback:h(()=>[c(`div`,K,[(g(),l(b,null,u(2,e=>f(S(i),{key:e,class:`h-20`})),64))])]),default:h(()=>[t.assets.ok?t.assets.data.length?(g(),l(`ul`,J,[(g(!0),l(b,null,u(t.assets.data,e=>(g(),l(`li`,{key:e.id,class:`rounded-lg border p-3`},[c(`div`,Y,[c(`span`,X,[f(S(O),{class:`size-5`})]),c(`div`,ie,[c(`p`,ae,p(e.name),1),c(`p`,oe,p([e.type,e.manufacturer&&e.model?`${e.manufacturer} ${e.model}`:e.model].filter(Boolean).join(` · `)),1),c(`dl`,se,[e.inventory?(g(),l(`div`,ce,[m[2]||=c(`dt`,{class:`text-muted-foreground`},`Inventar-Nr.`,-1),c(`dd`,le,p(e.inventory),1)])):x(``,!0),e.serial?(g(),l(`div`,ue,[m[3]||=c(`dt`,{class:`text-muted-foreground`},`Seriennummer`,-1),c(`dd`,de,p(e.serial),1)])):x(``,!0),$(e)?(g(),l(`div`,{key:2,class:o([`flex items-center gap-1.5`,$(e).tone])},[f(S(A),{class:`size-3.5`}),s(` `+p($(e).text),1)],2)):x(``,!0)])])]),f(S(n),{variant:`outline`,size:`sm`,class:`mt-3 w-full`,"as-child":``},{default:h(()=>[f(S(d),{href:`/it-service/tickets/neu?geraet=${e.id}`},{default:h(()=>[f(S(T)),m[4]||=s(` Problem mit diesem Gerät melden`,-1)]),_:1},8,[`href`])]),_:2},1024)]))),128))])):(g(),l(`p`,re,`Ihnen sind keine Geräte zugeordnet.`)):(g(),l(`p`,q,[f(S(C),{class:`size-4`}),s(` `+p(t.assets.error),1)]))]),_:1})]),_:1}),f(D,{title:`Meine Ausleihen`,"action-label":`Leihgeräte`,"action-href":`/it-service/leihgeraete`},{default:h(()=>[f(S(y),{data:`loans`},{fallback:h(()=>[c(`div`,fe,[(g(),l(b,null,u(2,e=>f(S(i),{key:e,class:`h-12`})),64))])]),default:h(()=>[t.loans.ok?t.loans.data.length?(g(),l(`ul`,he,[(g(!0),l(b,null,u(t.loans.data,t=>(g(),l(`li`,{key:t.id,class:`flex items-center gap-3 px-1 py-2.5`},[c(`div`,Z,[c(`p`,ge,p(t.device),1),c(`p`,_e,p(S(P)(t.start))+` – `+p(S(P)(t.end)),1)]),f(j,{label:t.status_label,tone:S(M)(t)},null,8,[`label`,`tone`]),t.cancellable?(g(),l(`button`,{key:0,type:`button`,class:`grid size-7 place-items-center rounded-md text-muted-foreground hover:bg-accent hover:text-destructive`,title:`„${t.device}“ stornieren`,onClick:e=>ye(t)},[f(S(e),{class:`size-4`})],8,ve)):x(``,!0)]))),128))])):(g(),l(`p`,me,`Keine laufenden Ausleihen oder Anfragen.`)):(g(),l(`p`,pe,[f(S(C),{class:`size-4`}),s(` `+p(t.loans.error),1)]))]),_:1})]),_:1})])])],64)):(g(),l(`div`,L,[f(E,{icon:S(F),title:`Der IT-Service ist noch nicht eingerichtet`,text:`Die Administration verbindet das Portal unter „Portal → IT-Service“ mit OpenNIT.`},null,8,[`icon`])]))]),_:1}))}};export{Q as default};