Loheide-eu-mitarbeiterplatt.../public/build/assets/TicketCreate-BtfB42eI.js
Friederich Loheide 9320d602a8
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 4m42s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 4m33s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 5m41s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 5m48s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 8m0s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 8m6s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 5m10s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 5m19s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m21s
Kommentare mit Antworten unter Neuigkeiten
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-26 20:13:41 +00:00

1 line
No EOL
5.4 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{D as e,E as t,On as n,Yt as r,Zn as i,_ as a,b as o,bt as s,g as c,mt as l,o as u,qt as d,tr as f,v as p,y as m}from"./runtime-core.esm-bundler-B8D2lM98.js";import{w as h,y as g}from"./runtime-dom.esm-bundler-BEWGoe8n.js";import{i as _,r as v}from"./app-DWxGGcEZ.js";import{O as y}from"./dist-DtGNiYlK.js";import{G as b,et as x}from"./AppIcon-Fs1zLRYr.js";import{t as S}from"./arrow-left-BMImfTf2.js";import{t as C}from"./AppLayout-CoIfOCw7.js";import{t as w}from"./circle-alert-D8SqHL0j.js";import{t as T}from"./send-6fmdiUe6.js";import{t as E}from"./FormField-BoFAO4pm.js";import{t as D}from"./PageHeader-3eFj38EK.js";import{t as O}from"./button-ZHC5mKey.js";import{t as k}from"./NativeSelect-BGasRaNs.js";import{t as A}from"./Panel-Dkm6KN2N.js";import{t as j}from"./Input-FGSb2-yK.js";import{t as M}from"./Textarea-DEFXqC2w.js";var N={class:`grid gap-2`,role:`radiogroup`,"aria-label":`Gerät`},P=[`value`],F={class:`grid size-9 shrink-0 place-items-center rounded-md bg-muted text-foreground/70`},I={class:`min-w-0`},L={class:`block text-sm font-medium`},R={class:`block truncate text-xs text-muted-foreground`},z={class:`grid size-9 shrink-0 place-items-center rounded-md bg-muted text-foreground/70`},B={key:0,class:`flex items-center gap-2 text-xs text-muted-foreground`},V={class:`grid gap-4`},H={class:`grid gap-4 sm:grid-cols-2`},U={class:`flex justify-end border-t pt-4`},W={__name:`TicketCreate`,props:{assetId:{type:Number,default:null},assets:{type:Object,required:!0},options:{type:Object,required:!0}},setup(W){let G=W,K=c(()=>G.assets.ok?G.assets.data:[]),q=c(()=>G.options.ok?G.options.data.categories:[]),J=c(()=>G.options.ok?G.options.data.locations:[]),Y=_({asset_id:K.value.some(e=>e.id===G.assetId)?G.assetId:null,subject:``,description:``,category_id:null,location_id:null});function X(){Y.transform(e=>({...e,asset_id:e.asset_id||null,category_id:e.category_id?Number(e.category_id):null,location_id:e.location_id?Number(e.location_id):null})).post(`/it-service/tickets`)}return(c,_)=>(l(),p(C,{title:`Ticket erstellen`},{default:d(()=>[e(n(v),{href:`/it-service`,class:`mb-3 inline-flex items-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground`},{default:d(()=>[e(n(S),{class:`size-4`}),_[6]||=t(` Meine IT`,-1)]),_:1}),e(D,{title:`Ticket erstellen`,description:`Beschreiben Sie kurz, was nicht funktioniert – die IT meldet sich.`}),a(`form`,{class:`grid grid-cols-1 items-start gap-6 lg:grid-cols-12`,onSubmit:h(X,[`prevent`])},[e(A,{title:`Worum geht es?`,class:`lg:col-span-5 xl:col-span-4`},{default:d(()=>[a(`div`,N,[(l(!0),o(u,null,s(K.value,t=>(l(),o(`label`,{key:t.id,class:i([`flex cursor-pointer items-center gap-3 rounded-lg border p-3 transition-colors`,n(Y).asset_id===t.id?`border-brand bg-brand-soft/60 ring-1 ring-brand`:`hover:bg-accent/60`])},[r(a(`input`,{"onUpdate:modelValue":_[0]||=e=>n(Y).asset_id=e,type:`radio`,value:t.id,class:`sr-only`},null,8,P),[[g,n(Y).asset_id]]),a(`span`,F,[e(n(b),{class:`size-4`})]),a(`span`,I,[a(`span`,L,f(t.name),1),a(`span`,R,f([t.type,t.serial&&`SN ${t.serial}`].filter(Boolean).join(` · `)),1)])],2))),128)),a(`label`,{class:i([`flex cursor-pointer items-center gap-3 rounded-lg border p-3 transition-colors`,n(Y).asset_id?`hover:bg-accent/60`:`border-brand bg-brand-soft/60 ring-1 ring-brand`])},[r(a(`input`,{"onUpdate:modelValue":_[1]||=e=>n(Y).asset_id=e,type:`radio`,value:null,class:`sr-only`},null,512),[[g,n(Y).asset_id]]),a(`span`,z,[e(n(x),{class:`size-4`})]),_[7]||=a(`span`,null,[a(`span`,{class:`block text-sm font-medium`},`Allgemeines Anliegen`),a(`span`,{class:`block text-xs text-muted-foreground`},`ohne bestimmtes Gerät, z. B. Zugang, Software, Frage`)],-1)],2),W.assets.ok?m(``,!0):(l(),o(`p`,B,[e(n(w),{class:`size-3.5`}),_[8]||=t(` Ihre Geräte konnten nicht geladen werden.`,-1)]))])]),_:1}),e(A,{title:`Beschreibung`,class:`lg:col-span-7 xl:col-span-8`},{default:d(()=>[a(`div`,V,[e(E,{id:`subject`,label:`Betreff`,error:n(Y).errors.subject},{default:d(()=>[e(n(j),{id:`subject`,modelValue:n(Y).subject,"onUpdate:modelValue":_[2]||=e=>n(Y).subject=e,maxlength:`200`,placeholder:`z. B. Drucker im 2. OG druckt nicht`,required:``},null,8,[`modelValue`])]),_:1},8,[`error`]),e(E,{id:`description`,label:`Was ist passiert?`,error:n(Y).errors.description,hint:`Seit wann? Gibt es eine Fehlermeldung? Was haben Sie schon versucht?`},{default:d(()=>[e(n(M),{id:`description`,modelValue:n(Y).description,"onUpdate:modelValue":_[3]||=e=>n(Y).description=e,rows:`7`,maxlength:`20000`,required:``},null,8,[`modelValue`])]),_:1},8,[`error`]),a(`div`,H,[q.value.length?(l(),p(E,{key:0,id:`category`,label:`Kategorie`,error:n(Y).errors.category_id},{default:d(()=>[e(k,{id:`category`,modelValue:n(Y).category_id,"onUpdate:modelValue":_[4]||=e=>n(Y).category_id=e,options:q.value,placeholder:`– bitte wählen –`},null,8,[`modelValue`,`options`])]),_:1},8,[`error`])):m(``,!0),J.value.length?(l(),p(E,{key:1,id:`location`,label:`Standort`,error:n(Y).errors.location_id},{default:d(()=>[e(k,{id:`location`,modelValue:n(Y).location_id,"onUpdate:modelValue":_[5]||=e=>n(Y).location_id=e,options:J.value,placeholder:`– bitte wählen –`},null,8,[`modelValue`,`options`])]),_:1},8,[`error`])):m(``,!0)]),a(`div`,U,[e(n(O),{type:`submit`,disabled:n(Y).processing},{default:d(()=>[n(Y).processing?(l(),p(n(y),{key:0,class:`animate-spin`})):(l(),p(n(T),{key:1})),_[9]||=t(` Ticket absenden `,-1)]),_:1},8,[`disabled`])])])]),_:1})],32)]),_:1}))}};export{W as default};