PageSourceSearch

https://printstudios.de/static/react/chunks/PortalProfile-D7JcR0z3.js

js printstudios.de collected 2026-10-06 14:06:06 UTC 5,125 bytes, 1 lines download raw bytes

1import{j as e}from"./motion-4Pe-0l9l.js";import{r as c}from"./icons-D33OLVah.js";import{i as x,j as m}from"./portal-CX12rgP7.js";import{e as u}from"./index-DOjRTYqR.js";import"./react-query-B-PjvZ3S.js";import"./tanstack-9D8FVQmw.js";import"./client-BrDz2RtE.js";import"./radix-Bm8LYzHo.js";import"./router-C_86t40E.js";import"./recharts-CkBxNeT6.js";function k(){const{data:d,isLoading:o}=x(),t=m(),[n,a]=c.useState(!1),s=d?.profile,i=l=>{l.preventDefault(),a(!1);const r=new FormData(l.currentTarget);t.mutate({name:r.get("name")||void 0,company:r.get("company")||void 0,phone:r.get("phone")||void 0,street:r.get("street")||void 0,zip:r.get("zip")||void 0,city:r.get("city")||void 0,country:r.get("country")||void 0},{onSuccess:()=>a(!0)})};return o?e.jsx("div",{className:"py-20 text-center text-sm text-gray-400",children:"Laden..."}):s?e.jsxs("div",{children:[e.jsx("h1",{className:"mb-6 text-2xl font-black text-gray-900",children:"Mein Profil"}),n&&e.jsx("div",{className:"mb-4 rounded-xl bg-emerald-50 p-3 text-sm font-medium text-emerald-800",children:"Profil gespeichert."}),e.jsxs("form",{onSubmit:i,className:"max-w-xl space-y-5",children:[e.jsxs("div",{className:"rounded-2xl border border-gray-100 bg-white p-5",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"mb-1 block text-xs font-semibold text-gray-500",children:"E-Mail Adresse"}),e.jsx("input",{type:"email",value:s.email,disabled:!0,className:"w-full cursor-not-allowed rounded-xl border border-gray-200 bg-gray-50 px-4 py-2.5 text-sm text-gray-500"})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs font-semibold text-gray-500",children:"Name"}),e.jsx("input",{name:"name",defaultValue:s.name||"",className:"w-full rounded-xl border border-gray-200 px-4 py-2.5 text-sm focus:border-gray-900 focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs font-semibold text-gray-500",children:"Firma"}),e.jsx("input",{name:"company",defaultValue:s.company||"",className:"w-full rounded-xl border border-gray-200 px-4 py-2.5 text-sm focus:border-gray-900 focus:outline-none"})]})]}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{className:"mb-1 block text-xs font-semibold text-gray-500",children:"Telefon"}),e.jsx("input",{name:"phone",defaultValue:s.phone||"",className:"w-full rounded-xl border border-gray-200 px-4 py-2.5 text-sm focus:border-gray-900 focus:outline-none"})]})]}),e.jsxs("div",{className:"rounded-2xl border border-gray-100 bg-white p-5",children:[e.jsx("p",{className:"mb-4 text-[10px] font-bold uppercase tracking-wider text-gray-400",children:"Adresse"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs font-semibold text-gray-500",children:"Straße & Hausnummer"}),e.jsx("input",{name:"street",defaultValue:s.address?.street||"",className:"w-full rounded-xl border border-gray-200 px-4 py-2.5 text-sm focus:border-gray-900 focus:outline-none"})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs font-semibold text-gray-500",children:"PLZ"}),e.jsx("input",{name:"zip",defaultValue:s.address?.zip||"",className:"w-full rounded-xl border border-gray-200 px-4 py-2.5 text-sm focus:border-gray-900 focus:outline-none"})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsx("label",{className:"mb-1 block text-xs font-semibold text-gray-500",children:"Stadt"}),e.jsx("input",{name:"city",defaultValue:s.address?.city||"",className:"w-full rounded-xl border border-gray-200 px-4 py-2.5 text-sm focus:border-gray-900 focus:outline-none"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs font-semibold text-gray-500",children:"Land"}),e.jsx("input",{name:"country",defaultValue:s.address?.country||"Deutschland",className:"w-full rounded-xl border border-gray-200 px-4 py-2.5 text-sm focus:border-gray-900 focus:outline-none"})]})]})]}),e.jsx("button",{type:"submit",disabled:t.isPending,className:"w-full rounded-full bg-gray-900 py-3 text-sm font-bold text-white hover:bg-gray-800 disabled:opacity-50",children:t.isPending?"Wird gespeichert...":"Profil speichern"})]}),(s.total_orders||s.member_since)&&e.jsxs("div",{className:"mt-8 flex flex-wrap gap-4",children:[s.total_orders!=null&&e.jsxs("div",{className:"rounded-2xl border border-gray-100 bg-white px-5 py-4",children:[e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-gray-400",children:"Bestellungen"}),e.jsx("p",{className:"text-2xl font-black text-gray-900",children:s.total_orders})]}),s.member_since&&e.jsxs("div",{className:"rounded-2xl border border-gray-100 bg-white px-5 py-4",children:[e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-gray-400",children:"Kunde seit"}),e.jsx("p",{className:"text-2xl font-black text-gray-900",children:u(s.member_since)})]})]})]}):e.jsx("div",{className:"py-20 text-center text-sm text-gray-400",children:"Profil nicht geladen."})}export{k 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.