PageSourceSearch

https://go2flow.com/_nuxt/_FdYKSd8.js

js go2flow.com collected 2026-10-09 23:46:39 UTC 7,195 bytes, 1 lines download raw bytes

1import{d as M,H as E,I as W,B as j,u as D,C as K,p as G,v as H,x as P,c,a as o,f as a,k as e,t as p,h as g,g as U,w as i,s as z,z as R,m as q,o as d,e as y,A as O,F as Z,j as J}from"./DeHP4PQ5.js";import{_ as Q}from"./fyylAhto.js";import{_ as X}from"./rQOJ-M0h.js";import{_ as Y}from"./xOXyGjNw.js";import{_ as ee}from"./BnP86UkT.js";import{_ as te}from"./BnDpK10u.js";import{_ as se}from"./CFibITRt.js";import{u as oe}from"./C7MhFScQ.js";import{u as le}from"./WfJoJPP0.js";import"./Bj-iqNXa.js";import"./DYOqaLdd.js";import"./GqG0mvra.js";import"./qfNx3nyS.js";import"./C7MasBKa.js";const ae={class:"-m-6"},ne={class:"sticky top-[49px] z-20 flex items-center justify-between border-b border-gray-200 bg-white/95 px-6 py-3 backdrop-blur-sm"},ie={class:"flex items-center gap-3"},re={class:"flex items-center gap-2.5"},de={key:0,class:"flex size-8 items-center justify-center rounded-lg bg-teal-50 text-sm font-semibold text-teal-700"},ue={class:"text-sm font-semibold text-gray-900"},ce={key:0,class:"text-xs text-gray-500"},me={class:"flex items-center gap-2"},pe={key:0,class:"hidden text-xs text-gray-400 sm:inline"},ge={class:"mx-auto max-w-5xl px-6 py-8"},_e={class:"grid grid-cols-1 gap-8 lg:grid-cols-12"},fe={class:"space-y-6 lg:col-span-7"},be={class:"mb-3 flex items-center gap-2"},xe={class:"rounded-xl border border-gray-200 bg-white p-5"},ve={class:"space-y-5"},ye={class:"flex gap-2"},he={class:"relative flex-1"},we={class:"mt-1 text-xs text-gray-500"},ke={class:"mb-3 flex items-center gap-2"},Ve={class:"rounded-xl border border-gray-200 bg-white p-5"},Ue={class:"space-y-5"},ze={key:0,class:"mt-2 flex flex-wrap gap-1.5"},$e={class:"lg:col-span-5"},Be={class:"mb-3 flex items-center gap-2"},Ce={class:"space-y-4 rounded-xl border border-gray-200 bg-white p-5"},Pe=M({__name:"[id]",async setup(Se){let _,$;const f=E(),L=W(),h=j(),r=f.params.id==="new";D({title:r?"Neuer Kunde":"Kunde bearbeiten"});const s=z({name:"",slug:"",description:"",website_url:"",logo_color:"",logo_white:"",tags:[],sort_order:0}),w=z(!1),b=z(!1),{slug:B,isLocked:m,toggleLock:N}=oe(q(()=>s.value.name),{isNew:r});if(K(B,l=>{s.value.slug=l}),!r){const{data:l}=([_,$]=G(()=>le(`/api/admin/clients/${f.params.id}`,{key:`admin-client-${f.params.id}`})),_=await _,$(),_);l.value&&(s.value={name:l.value.name||"",slug:l.value.slug||"",description:l.value.description||"",website_url:l.value.website_url||"",logo_color:l.value.logo_color||"",logo_white:l.value.logo_white||"",tags:l.value.tags||[],sort_order:l.value.sort_order||0},B.value=l.value.slug||"")}K(s,()=>{b.value=!0},{deep:!0});const T=["D2C-Growth","Build & Scale"],C=async()=>{w.value=!0;try{if(r){const l=await $fetch("/api/admin/clients",{method:"POST",body:s.value});b.value=!1,h.add({title:"Kunde erstellt",color:"success"}),L.push(`/admin/clients/${l.id}`)}else await $fetch(`/api/admin/clients/${f.params.id}`,{method:"PUT",body:s.value}),b.value=!1,h.add({title:"Änderungen gespeichert",color:"success"})}catch(l){h.add({title:"Fehler beim Speichern",description:l.data?.message||l.message,color:"error"})}finally{w.value=!1}},S=l=>{(l.metaKey||l.ctrlKey)&&l.key==="s"&&(l.preventDefault(),C())};return H(()=>document.addEventListener("keydown",S)),P(()=>document.removeEventListener("keydown",S)),(l,t)=>{const k=R,V=Q,x=O,v=X,u=Y,A=ee,I=te,F=se;return d(),c("div",ae,[o("div",ne,[o("div",ie,[a(k,{to:"/admin/clients",variant:"ghost",icon:"i-lucide-arrow-left",size:"sm"}),o("div",re,[e(s).name&&!r?(d(),c("div",de,p(e(s).name.charAt(0).toUpperCase()),1)):g("",!0),o("div",null,[o("h1",ue,p(r?"Neuer Kunde":e(s).name||"Kunde bearbeiten"),1),!r&&e(s).slug?(d(),c("p",ce," /referenzen/"+p(e(s).slug),1)):g("",!0)])]),e(b)?(d(),U(V,{key:0,size:"xs",variant:"subtle",color:"warning"},{default:i(()=>[...t[8]||(t[8]=[y(" Ungespeichert ",-1)])]),_:1})):r?g("",!0):(d(),U(V,{key:1,size:"xs",variant:"subtle",color:"success"},{default:i(()=>[...t[9]||(t[9]=[y(" Gespeichert ",-1)])]),_:1}))]),o("div",me,[r?g("",!0):(d(),c("span",pe,[...t[10]||(t[10]=[o("kbd",{class:"rounded border border-gray-200 bg-gray-50 px-1.5 py-0.5 font-mono text-[10px]"},"⌘S",-1)])])),a(k,{loading:e(w),icon:"i-lucide-save",size:"sm",onClick:C},{default:i(()=>[...t[11]||(t[11]=[y(" Speichern ",-1)])]),_:1},8,["loading"])])]),o("div",ge,[o("div",_e,[o("div",fe,[o("section",null,[o("div",be,[a(x,{name:"i-lucide-building-2",class:"size-4 text-gray-400"}),t[12]||(t[12]=o("h2",{class:"text-xs font-semibold uppercase tracking-wider text-gray-500"},"Identitat",-1))]),o("div",xe,[o("div",ve,[a(u,{label:"Name",required:""},{default:i(()=>[a(v,{modelValue:e(s).name,"onUpdate:modelValue":t[0]||(t[0]=n=>e(s).name=n),placeholder:"Firmenname",size:"lg"},null,8,["modelValue"])]),_:1}),a(u,{label:"Slug"},{default:i(()=>[o("div",ye,[o("div",he,[a(v,{modelValue:e(s).slug,"onUpdate:modelValue":t[1]||(t[1]=n=>e(s).slug=n),disabled:e(m),placeholder:"firmenname",class:"flex-1"},null,8,["modelValue","disabled"])]),a(k,{icon:e(m)?"i-lucide-lock":"i-lucide-lock-open",variant:e(m)?"outline":"soft",color:e(m)?"neutral":"warning",size:"sm",onClick:e(N)},null,8,["icon","variant","color","onClick"])]),o("p",we,p(e(m)?"Wird automatisch aus dem Namen generiert":"Manuell bearbeiten — Vorsicht bei bestehenden Links"),1)]),_:1}),a(u,{label:"Beschreibung"},{default:i(()=>[a(A,{modelValue:e(s).description,"onUpdate:modelValue":t[2]||(t[2]=n=>e(s).description=n),placeholder:"Kurze Beschreibung des Kunden und der Zusammenarbeit...",rows:3},null,8,["modelValue"])]),_:1})])])]),o("section",null,[o("div",ke,[a(x,{name:"i-lucide-settings-2",class:"size-4 text-gray-400"}),t[13]||(t[13]=o("h2",{class:"text-xs font-semibold uppercase tracking-wider text-gray-500"},"Metadaten",-1))]),o("div",Ve,[o("div",Ue,[a(u,{label:"Website"},{default:i(()=>[a(v,{modelValue:e(s).website_url,"onUpdate:modelValue":t[3]||(t[3]=n=>e(s).website_url=n),placeholder:"https://example.com",type:"url"},{leading:i(()=>[a(x,{name:"i-lucide-globe",class:"size-4 text-gray-400"})]),_:1},8,["modelValue"])]),_:1}),a(u,{label:"Tags"},{default:i(()=>[a(I,{modelValue:e(s).tags,"onUpdate:modelValue":t[4]||(t[4]=n=>e(s).tags=n),items:T,multiple:"",placeholder:"Tags auswahlen...",ui:{base:"w-full"}},null,8,["modelValue"]),e(s).tags.length?(d(),c("div",ze,[(d(!0),c(Z,null,J(e(s).tags,n=>(d(),U(V,{key:n,size:"sm",variant:"subtle",color:"neutral"},{default:i(()=>[y(p(n),1)]),_:2},1024))),128))])):g("",!0)]),_:1}),a(u,{label:"Sortierung",hint:"Niedrigere Werte erscheinen zuerst"},{default:i(()=>[a(v,{modelValue:e(s).sort_order,"onUpdate:modelValue":t[5]||(t[5]=n=>e(s).sort_order=n),modelModifiers:{number:!0},type:"number",class:"max-w-28"},null,8,["modelValue"])]),_:1})])])])]),o("div",$e,[o("section",null,[o("div",Be,[a(x,{name:"i-lucide-image",class:"size-4 text-gray-400"}),t[14]||(t[14]=o("h2",{class:"text-xs font-semibold uppercase tracking-wider text-gray-500"},"Branding",-1))]),o("div",Ce,[a(F,{modelValue:e(s).logo_color,"onUpdate:modelValue":t[6]||(t[6]=n=>e(s).logo_color=n),label:"Logo Farbe"},null,8,["modelValue"]),a(F,{modelValue:e(s).logo_white,"onUpdate:modelValue":t[7]||(t[7]=n=>e(s).logo_white=n),label:"Logo Weiss"},null,8,["modelValue"])])])])])])])}}});
1export{Pe as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.