Loheide-eu-mitarbeiterplatt.../public/build/assets/Index-DqpXjvEM.js
Friederich Loheide 38f47f98e2
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 14m38s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 14m13s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 11m56s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 11m44s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 56m9s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 1h2m6s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 10m30s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 47s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m16s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 9m13s
Oberfläche Mitarbeiter-App umschaltbar (0.52.0)
Einstellung interface (classic|app) im Erscheinungsbild; data-ui am Wurzelelement,
warme Tokens, Karten mit Schatten, Menüpunkte als Pillen; Startseite dreispaltig.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-29 19:17: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-DY0WbyhT.js";import{At as a,C as o,Dt as s,E as c,O as l,S as u,T as d,Tt as f,Y as p,i as m,k as h,o as g,ot as _,q as v,rt as y,s as b,t as x,v as S,w as C}from"./framework-Cy4cevSy.js";import{t as ee}from"./calendar-clock-DPshBkAF.js";import{t as w}from"./circle-alert-DbMsxJO9.js";import{n as T,t as E}from"./message-square-plus-B6YQtawt.js";import{V as te,c as D,d as ne,l as O,lt as k,u as A}from"./app-C8emkL0O.js";import{t as j}from"./StatusBadge-CHP5HdKL.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=g();y(()=>Q.props.flash.status,e=>e&&r.success(e),{immediate:!0}),y(()=>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?`)&&b.post(`/it-service/ausleihen/${e.id}/stornieren`,{},{preserveScroll:!0})}return(r,g)=>(v(),o(A,{title:`Meine IT`},{default:_(()=>[h(ne,{title:`Meine IT`,description:`Ihre Geräte, Tickets und Leihgeräte an einem Ort.`},c({_:2},[t.configured?{name:`actions`,fn:_(()=>[h(f(n),{variant:`outline`,"as-child":``},{default:_(()=>[h(f(m),{href:`/it-service/leihgeraete`},{default:_(()=>[h(f(ee)),g[0]||=l(` Leihgerät ausleihen`,-1)]),_:1})]),_:1}),h(f(n),{"as-child":``},{default:_(()=>[h(f(m),{href:`/it-service/tickets/neu`},{default:_(()=>[h(f(E)),g[1]||=l(` Ticket erstellen`,-1)]),_:1})]),_:1})]),key:`0`}:void 0]),1024),t.configured?(v(),d(S,{key:1},[t.intro?(v(),d(`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)):C(``,!0),u(`div`,z,[h(O,{title:`Meine Tickets`,class:`min-w-0 lg:col-span-7 xl:col-span-8`},{default:_(()=>[h(f(x),{data:`tickets`},{fallback:_(()=>[u(`div`,B,[(v(),d(S,null,p(4,e=>h(f(i),{key:e,class:`h-14`})),64))])]),default:_(()=>[t.tickets.ok?t.tickets.data.length?(v(),d(`ul`,H,[(v(!0),d(S,null,p(t.tickets.data,e=>(v(),d(`li`,{key:e.id},[h(f(m),{href:`/it-service/tickets/${e.id}`,class:`flex items-center gap-3 rounded-md px-2 py-3 hover:bg-accent/60`},{default:_(()=>[u(`span`,{class:s([`grid size-9 shrink-0 place-items-center rounded-md`,e.open?`bg-brand-soft text-brand-text`:`bg-muted text-muted-foreground`])},[h(f(T),{class:`size-4`})],2),u(`span`,U,[u(`span`,{class:s([`block truncate text-sm font-medium`,{"text-muted-foreground":!e.open}])},a(e.subject),3),u(`span`,W,[e.number?(v(),d(S,{key:0},[l(`#`+a(e.number)+` · `,1)],64)):C(``,!0),l(`erstellt `+a(f(P)(e.created_at,!0)),1)])]),h(j,{label:e.status_label,tone:f(N)(e)},null,8,[`label`,`tone`])]),_:2},1032,[`href`])]))),128))])):(v(),o(D,{key:1,icon:f(I),title:`Keine Tickets`,text:`Wenn etwas nicht funktioniert: „Ticket erstellen“ – die IT kümmert sich darum.`},null,8,[`icon`])):(v(),d(`p`,V,[h(f(w),{class:`size-4`}),l(` `+a(t.tickets.error),1)]))]),_:1})]),_:1}),u(`div`,G,[h(O,{title:`Meine Geräte`},{default:_(()=>[h(f(x),{data:`assets`},{fallback:_(()=>[u(`div`,K,[(v(),d(S,null,p(2,e=>h(f(i),{key:e,class:`h-20`})),64))])]),default:_(()=>[t.assets.ok?t.assets.data.length?(v(),d(`ul`,J,[(v(!0),d(S,null,p(t.assets.data,e=>(v(),d(`li`,{key:e.id,class:`rounded-lg border p-3`},[u(`div`,Y,[u(`span`,X,[h(f(k),{class:`size-5`})]),u(`div`,ie,[u(`p`,ae,a(e.name),1),u(`p`,oe,a([e.type,e.manufacturer&&e.model?`${e.manufacturer} ${e.model}`:e.model].filter(Boolean).join(` · `)),1),u(`dl`,se,[e.inventory?(v(),d(`div`,ce,[g[2]||=u(`dt`,{class:`text-muted-foreground`},`Inventar-Nr.`,-1),u(`dd`,le,a(e.inventory),1)])):C(``,!0),e.serial?(v(),d(`div`,ue,[g[3]||=u(`dt`,{class:`text-muted-foreground`},`Seriennummer`,-1),u(`dd`,de,a(e.serial),1)])):C(``,!0),$(e)?(v(),d(`div`,{key:2,class:s([`flex items-center gap-1.5`,$(e).tone])},[h(f(te),{class:`size-3.5`}),l(` `+a($(e).text),1)],2)):C(``,!0)])])]),h(f(n),{variant:`outline`,size:`sm`,class:`mt-3 w-full`,"as-child":``},{default:_(()=>[h(f(m),{href:`/it-service/tickets/neu?geraet=${e.id}`},{default:_(()=>[h(f(E)),g[4]||=l(` Problem mit diesem Gerät melden`,-1)]),_:1},8,[`href`])]),_:2},1024)]))),128))])):(v(),d(`p`,re,`Ihnen sind keine Geräte zugeordnet.`)):(v(),d(`p`,q,[h(f(w),{class:`size-4`}),l(` `+a(t.assets.error),1)]))]),_:1})]),_:1}),h(O,{title:`Meine Ausleihen`,"action-label":`Leihgeräte`,"action-href":`/it-service/leihgeraete`},{default:_(()=>[h(f(x),{data:`loans`},{fallback:_(()=>[u(`div`,fe,[(v(),d(S,null,p(2,e=>h(f(i),{key:e,class:`h-12`})),64))])]),default:_(()=>[t.loans.ok?t.loans.data.length?(v(),d(`ul`,he,[(v(!0),d(S,null,p(t.loans.data,t=>(v(),d(`li`,{key:t.id,class:`flex items-center gap-3 px-1 py-2.5`},[u(`div`,Z,[u(`p`,ge,a(t.device),1),u(`p`,_e,a(f(P)(t.start))+` – `+a(f(P)(t.end)),1)]),h(j,{label:t.status_label,tone:f(M)(t)},null,8,[`label`,`tone`]),t.cancellable?(v(),d(`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)},[h(f(e),{class:`size-4`})],8,ve)):C(``,!0)]))),128))])):(v(),d(`p`,me,`Keine laufenden Ausleihen oder Anfragen.`)):(v(),d(`p`,pe,[h(f(w),{class:`size-4`}),l(` `+a(t.loans.error),1)]))]),_:1})]),_:1})])])],64)):(v(),d(`div`,L,[h(D,{icon:f(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};