PageSourceSearch

https://nerdchandise-online.lovable.app/assets/B2BAuth-QWZOkS0B.js

js nerdchandise-online.lovable.app collected 2026-10-03 03:34:15 UTC 12,554 bytes, 6 lines download raw bytes

1import{c as he,u as xe,b as ge,r as a,j as e,B as d,g as n}from"./index-DX0GeQpG.js";import{u as pe}from"./useB2BDealer-BoOd1JPu.js";import{N as E,F as q,U as je}from"./Footer-BzmdLRrw.js";import{a as t,I as l}from"./label-BCWhBkc6.js";import{C as R,a as m,c as u,d as h,b as x}from"./card-CR0AeTPj.js";import{T as fe,a as ve,b as _,c as H}from"./tabs-BpB7UeuV.js";import{C as Ne}from"./circle-check-big-C5ioL-e6.js";import{c as be}from"./MaintenanceToggle-DLeQ6t8n.js";import{C as we}from"./circle-x-BfEfociM.js";import{M as g}from"./mail-DYFn5_IT.js";import{B as D}from"./building-2-BS5CZT4L.js";import{L as G}from"./lock-DmiPm8Vz.js";import{F as p}from"./file-text-BEwRI19h.js";import{P as ye}from"./phone-zcEdQ_KY.js";import{G as Ce}from"./globe-CVvMacKQ.js";import{M as Se}from"./map-pin-CzvWid1x.js";import"./index-BW7Zk7Bd.js";import"./index-CgHaEbTc.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Be=he("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]),Ve=()=>{const z=xe(),{user:Z,signIn:K,signUp:U}=ge(),{dealer:r,loading:Fe,registerDealer:V}=pe(),[j,W]=a.useState(""),[f,O]=a.useState(""),[v,N]=a.useState(!1),[b,X]=a.useState(""),[w,J]=a.useState(""),[y,Q]=a.use
6State(""),[C,Y]=a.useState(""),[S,$]=a.useState(""),[B,ee]=a.useState(""),[c,se]=a.useState(""),[F,ae]=a.useState(""),[I,re]=a.useState(""),[k,te]=a.useState(""),[P,le]=a.useState(""),[L,ie]=a.useState("Deutschland"),[M,ne]=a.useState(""),[A,de]=a.useState(""),[T,o]=a.useState(!1),ce=async s=>{s.preventDefault(),N(!0);const{error:i}=await K(j,f);i?n.error("Anmeldung fehlgeschlagen",{description:i.message}):n.success("Erfolgreich angemeldet"),N(!1)},oe=async s=>{s.preventDefault(),o(!0);const{error:i}=await U(b,w,c);if(i){n.error("Registrierung fehlgeschlagen",{description:i.message}),o(!1);return}await new Promise(ue=>setTimeout(ue,1e3));const{error:me}=await V({company_name:y,tax_id:C,vat_id:S||null,trade_license_number:B||null,contact_person:c,phone:F,address:I,postal_code:k,city:P,country:L,website:M||null,business_type:A||null});me?n.error("Händlerregistrierung fehlgeschlagen",{description:"Bitte kontaktieren Sie uns unter [email protected]"}):n.success("Registrierung erfolgreich",{description:"Ihr Antrag wird geprüft. Sie erhalten eine Benachrichtigung, sobald Ihr Konto verifiziert wurde."}),o(!1)};return Z&&r?e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(E,{}),e.jsx("main",{className:"flex-1 container mx-auto px-4 py-12",children:e.jsx("div",{className:"max-w-2xl mx-auto",children:e.jsxs(R,{className:"glass border-border/30",children:[e.jsxs(m,{className:"text-center",children:[e.jsxs("div",{className:"mx-auto mb-4",children:[r.status==="verified"&&e.jsx(Ne,{className:"h-16 w-16 text-green-500"}),r.status==="pending"&&e.jsx(be,{className:"h-16 w-16 text-yellow-500"}),r.status==="rejected"&&e.jsx(we,{className:"h-16 w-16 text-red-500"})]}),e.jsxs(u,{className:"text-2xl",children:[r.status==="verified"&&"Konto verifiziert",r.status==="pending"&&"Verifizierung ausstehend",r.status==="rejected"&&"Antrag abgelehnt"]}),e.jsxs(h,{children:[r.status==="verified"&&"Sie haben vollen Zugriff auf den B2B-Bereich.",r.status==="pending"&&"Ihr Antrag wird derzeit geprüft. Sie erhalten eine Benachrichtigung, sobald Ihr Konto verifiziert wurde.",r.status==="rejected"&&"Leider wurde Ihr Antrag abgelehnt. Bitte kontaktieren Sie uns für weitere Informationen."]})]}),e.jsxs(x,{className:"space-y-4",children:[e.jsxs("div",{className:"p-4 bg-secondary/20 rounded-lg",children:[e.jsx("h4",{className:"font-semibold mb-2",children:r.company_name}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r.contact_person}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[r.address,", ",r.postal_code," ",r.city]})]}),r.status==="verified"&&e.jsx(d,{onClick:()=>z("/b2b/preisliste"),className:"w-full",children:"Zur B2B-Preisliste"}),r.status==="rejected"&&e.jsxs(d,{variant:"outline",onClick:()=>window.location.href="mailto:[email protected]",className:"w-full",children:[e.jsx(g,{className:"h-4 w-4 mr-2"}),"Kontakt aufnehmen"]})]})]})})}),e.jsx(q,{})]}):e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(E,{}),e.jsx("main",{className:"flex-1 container mx-auto px-4 py-12",children:e.jsxs("div",{className:"max-w-2xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx(D,{className:"h-16 w-16 mx-auto mb-4 text-primary"}),e.jsx("h1",{className:"text-3xl font-bold mb-2",children:"B2B Händlerbereich"}),e.jsx("p",{className:"text-muted-foreground",children:"Melden Sie sich an oder registrieren Sie sich als Händler"})]}),e.jsx(R,{className:"glass border-border/30",children:e.jsxs(fe,{defaultValue:"login",className:"w-full",children:[e.jsxs(ve,{className:"grid w-full grid-cols-2",children:[e.jsx(_,{value:"login",children:"Anmelden"}),e.jsx(_,{value:"register",children:"Registrieren"})]}),e.jsxs(H,{value:"login",children:[e.jsxs(m,{children:[e.jsx(u,{children:"Händler-Anmeldung"}),e.jsx(h,{children:"Melden Sie sich mit Ihren Zugangsdaten an"})]}),e.jsx(x,{children:e.jsxs("form",{onSubmit:ce,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(t,{htmlFor:"login-email",children:"E-Mail"}),e.jsxs("div",{className:"relative",children:[e.jsx(g,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(l,{id:"login-email",type:"email",placeholder:"[email protected]",value:j,onChange:s=>W(s.target.value),className:"pl-10",required:!0})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(t,{htmlFor:"login-password",children:"Passwort"}),e.jsxs("div",{className:"relative",children:[e.jsx(G,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(l,{id:"login-password",type:"password",placeholder:"••••••••",value:f,onChange:s=>O(s.target.value),className:"pl-10",required:!0})]})]}),e.jsx(d,{type:"submit",className:"w-full",disabled:v,children:v?"Wird angemeldet...":"Anmelden"})]})})]}),e.jsxs(H,{value:"register",children:[e.jsxs(m,{children:[e.jsx(u,{children:"Händler-Registrierung"}),e.jsx(h,{children:"Registrieren Sie sich mit Ihren Gewerbedaten"})]}),e.jsx(x,{children:e.jsxs("form",{onSubmit:oe,className:"space-y-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"font-semibold text-sm text-muted-foreground uppercase tracking-wide",children:"Zugangsdaten"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(t,{htmlFor:"register-email",children:"E-Mail *"}),e.jsxs("div",{className:"relative",children:[e.jsx(g,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(l,{id:"register-email",type:"email",placeholder:"[email protected]",value:b,onChange:s=>X(s.target.value),className:"pl-10",required:!0})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(t,{htmlFor:"register-password",children:"Passwort *"}),e.jsxs("div",{className:"relative",children:[e.jsx(G,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(l,{id:"register-password",type:"password",placeholder:"Mind. 6 Zeichen",value:w,onChange:s=>J(s.target.value),className:"pl-10",required:!0,minLength:6})]})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"font-semibold text-sm text-muted-foreground uppercase tracking-wide",children:"Firmendaten"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(t,{htmlFor:"company-name",children:"Firmenname *"}),e.jsxs("div",{className:"relative",children:[e.jsx(D,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(l,{id:"company-name",placeholder:"Musterfirma GmbH",value:y,onChange:s=>Q(s.target.value),className:"pl-10",required:!0})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(t,{htmlFor:"tax-id",children:"Steuernummer *"}),e.jsxs("div",{className:"relative",children:[e.jsx(p,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(l,{id:"tax-id",placeholder:"12/345/67890",value:C,onChange:s=>Y(s.target.value),className:"pl-10",required:!0})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(t,{htmlFor:"vat-id",children:"USt-IdNr. (optional)"}),e.jsxs("div",{className:"relative",children:[e.jsx(p,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(l,{id:"vat-id",placeholder:"DE123456789",value:S,onChange:s=>$(s.target.value),className:"pl-10"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(t,{htmlFor:"trade-license",children:"Gewerbeschein-Nr. (optional)"}),e.jsxs("div",{className:"relative",children:[e.jsx(p,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}
6),e.jsx(l,{id:"trade-license",placeholder:"GS-12345",value:B,onChange:s=>ee(s.target.value),className:"pl-10"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(t,{htmlFor:"business-type",children:"Art des Geschäfts (optional)"}),e.jsxs("div",{className:"relative",children:[e.jsx(Be,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(l,{id:"business-type",placeholder:"z.B. Einzelhandel, Online-Shop",value:A,onChange:s=>de(s.target.value),className:"pl-10"})]})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"font-semibold text-sm text-muted-foreground uppercase tracking-wide",children:"Kontaktdaten"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(t,{htmlFor:"contact-person",children:"Ansprechpartner *"}),e.jsxs("div",{className:"relative",children:[e.jsx(je,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(l,{id:"contact-person",placeholder:"Max Mustermann",value:c,onChange:s=>se(s.target.value),className:"pl-10",required:!0})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(t,{htmlFor:"phone",children:"Telefon *"}),e.jsxs("div",{className:"relative",children:[e.jsx(ye,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(l,{id:"phone",type:"tel",placeholder:"+49 123 456789",value:F,onChange:s=>ae(s.target.value),className:"pl-10",required:!0})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(t,{htmlFor:"website",children:"Website (
6optional)"}),e.jsxs("div",{className:"relative",children:[e.jsx(Ce,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(l,{id:"website",type:"url",placeholder:"https://www.ihre-firma.de",value:M,onChange:s=>ne(s.target.value),className:"pl-10"})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"font-semibold text-sm text-muted-foreground uppercase tracking-wide",children:"Geschäftsadresse"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(t,{htmlFor:"address",children:"Straße und Hausnummer *"}),e.jsxs("div",{className:"relative",children:[e.jsx(Se,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(l,{id:"address",placeholder:"Musterstraße 123",value:I,onChange:s=>re(s.target.value),className:"pl-10",required:!0})]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(t,{htmlFor:"postal-code",children:"PLZ *"}),e.jsx(l,{id:"postal-code",placeholder:"12345",value:k,onChange:s=>te(s.target.value),required:!0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(t,{htmlFor:"city",children:"Stadt *"}),e.jsx(l,{id:"city",placeholder:"Musterstadt",value:P,onChange:s=>le(s.target.value),required:!0})]}),e.jsxs("div",{className:"space-y-2 col-span-2 md:col-span-1",children:[e.jsx(t,{htmlFor:"country",children:"Land *"}),e.jsx(l,{id:"country",placeholder:"Deutschland",value:L,onChange:s=>ie(s.target.value),required:!0})]})]})]}),e.jsxs("div",{className:"pt-4",children:[e.jsx(d,{type:"submit",className:"w-full",disabled:T,children:T?"Wird registriert...":"Als Händler registrieren"}),e.jsx("p",{className:"text-xs text-muted-foreground text-center mt-4",children:"Mit der Registrierung bestätigen Sie, dass Sie ein gewerblicher Händler sind. Ihr Antrag wird nach Prüfung freigeschaltet."})]})]})})]})]})})]})}),e.jsx(q,{})]})};export{Ve 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.