PageSourceSearch

https://xlbox-umzug.de/assets/ProtokollUnterschrift-pimLyNG3.js

js xlbox-umzug.de collected 2026-10-07 05:45:24 UTC 9,776 bytes, 1 lines download raw bytes

1import{r as n,h as k,j as e,k as S,o as P}from"./index-QzpRotdS.js";import{S as w}from"./SignaturPad-BEP9YZqk.js";import{C as D}from"./circle-alert-Di6cQe0v.js";import{C as z}from"./circle-check-CwLeX8K9.js";import{S as O}from"./shield-check-BONk7oHO.js";import{F as I}from"./file-text-DaY48x0Y.js";function H(){return e.jsxs("div",{className:"inline-flex items-center gap-2",children:[e.jsxs("div",{className:"relative w-9 h-9 flex items-center justify-center border-2 border-brand-obsidian rounded-sm",children:[e.jsx("span",{className:"font-heading font-black text-lg text-brand-obsidian leading-none",children:"X"}),e.jsx("div",{className:"absolute top-0 right-0 w-2.5 h-2.5 bg-brand-green rounded-bl-sm"})]}),e.jsx("span",{className:"font-heading font-black text-xl text-brand-obsidian",children:"XLBOX"})]})}function M({url:a,label:d,nr:i}){return a?e.jsxs("a",{href:a,target:"_blank",rel:"noreferrer",className:"flex items-center gap-3 p-3.5 rounded-xl border border-border bg-white hover:border-brand-action/40 transition-colors",children:[e.jsx("span",{className:"w-9 h-9 rounded-lg bg-brand-action/10 flex items-center justify-center shrink-0",children:e.jsx(I,{size:17,className:"text-brand-action"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-body font-semibold text-sm text-brand-obsidian",children:d}),i&&e.jsx("p",{className:"font-body text-xs text-brand-slate",children:i}),e.jsx("p",{className:"font-body text-xs text-brand-action",children:"PDF ansehen →"})]})]}):null}function J(){const a=new URLSearchParams(window.location.search).get("token"),[d,i]=n.useState(!0),[t,L]=n.useState(null),[U,c]=n.useState(!1),[u,F]=n.useState(null),[m,f]=n.useState(""),[h,B]=n.useState(null),[x,X]=n.useState(""),[o,g]=n.useState(!1),[A,b]=n.useState(!1),[p,r]=n.useState(null),[j,C]=n.useState(!1);n.useEffect(()=>{window.scrollTo(0,0)},[]),n.useEffect(()=>{if(!a){c(!0),i(!1);return}k.functions.invoke("getProtokollSignatur",{token:a}).then(s=>{var l;(l=s.data)!=null&&l.error?c(!0):(L(s.data),f(s.data.contactName||""),s.data.protokollSignaturStatus==="unterschrieben"&&b(!0))}).catch(()=>c(!0)).finally(()=>i(!1))},[a]);const T=async()=>{var l,N,y,v;if(!u){r("Bitte unterschreiben Sie im Feld des Auftraggebers.");return}if(!m.trim()){r("Bitte geben Sie den vollständigen Namen des Auftraggebers ein.");return}if(!h){r("Bitte unterschreiben Sie im Feld des XLBOX-Teamleiters.");return}if(!x.trim()){r("Bitte geben Sie den Namen des XLBOX-Teamleiters ein.");return}g(!0),r(null);const s=await k.functions.invoke("signiereProtokoll",{token:a,signaturDataUri:u,name:m.trim(),teamSignaturDataUri:h,teamName:x.trim()});g(!1),(l=s.data)!=null&&l.success||((N=s.data)==null?void 0:N.error)==="already_signed"?b(!0):r(((y=s.data)==null?void 0:y.message)||((v=s.data)==null?void 0:v.error)||"Es ist ein Fehler aufgetreten. Bitte erneut versuchen.")};if(d)return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-brand-mist",children:e.jsx(S,{size:28,className:"text-brand-action animate-spin"})});if(U)return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-brand-mist px-4",children:e.jsxs("div",{className:"bg-white rounded-3xl shadow-lg p-8 text-center max-w-md",children:[e.jsx(D,{size:40,className:"text-red-400 mx-auto mb-4"}),e.jsx("h1",{className:"font-heading font-bold text-xl text-brand-obsidian mb-2",children:"Link ungültig"}),e.jsx("p",{className:"font-body text-sm text-brand-slate",children:"Dieser Signatur-Link ist nicht (mehr) gültig. Bitte kontaktieren Sie uns unter 0179 1449922."})]})});if(A)return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-brand-mist px-4 py-10",children:e.jsxs("div",{className:"bg-white rounded-3xl shadow-xl p-8 sm:p-10 text-center max-w-md",children:[e.jsx("div",{className:"w-20 h-20 rounded-full bg-brand-green flex items-center justify-center mx-auto mb-6 shadow-lg",children:e.jsx(z,{size:36,className:"text-white"})}),e.jsx("h1",{className:"font-heading font-black text-2xl text-brand-obsidian mb-2",children:"Vielen Dank!"}),e.jsx("p",{className:"font-body text-brand-slate mb-4",children:"Ihre Unterschrift zum Umzugsprotokoll wurde erfolgreich erfasst."}),e.jsx("p",{className:"font-body text-sm text-brand-slate/70",children:"Eine Bestätigung erhalten Sie per E-Mail."})]})});const E=t.movingDateFrom?t.movingDateTo&&t.movingDateTo!==t.movingDateFrom?`${new Date(t.movingDateFrom).toLocaleDateString("de-DE")} – ${new Date(t.movingDateTo).toLocaleDateString("de-DE")}`:new Date(t.movingDateFrom).toLocaleDateString("de-DE"):"—";return e.jsx("div",{className:"min-h-screen bg-brand-mist py-8 px-4",children:e.jsxs("div",{className:"max-w-2xl mx-auto",children:[e.jsx("div",{className:"flex justify-center mb-6",children:e.jsx(H,{})}),e.jsxs("div",{className:"bg-white rounded-3xl shadow-lg p-6 sm:p-8 space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 bg-brand-action/10 text-brand-action rounded-full px-3 py-1 text-xs font-semibold font-body mb-3",children:[e.jsx(O,{size:13})," Umzugsprotokoll bestätigen"]}),e.jsx("h1",{className:"font-heading font-black text-2xl text-brand-obsidian",children:"Umzugsprotokoll unterschreiben"}),e.jsx("p",{className:"font-body text-sm text-brand-slate mt-2",children:t.protokollNr?e.jsxs(e.Fragment,{children:["Protokollnummer: ",e.jsx("strong",{children:t.protokollNr})]}):e.jsxs(e.Fragment,{children:["Angebotsnummer: ",e.jsx("strong",{children:t.anfrageNr||"—"})]})})]}),e.jsxs("div",{className:"bg-brand-mist rounded-2xl p-4 grid grid-cols-1 sm:grid-cols-2 gap-3 text-sm font-body",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-brand-slate",children:"Auszug:"}),e.jsx("br",{}),e.jsx("strong",{className:"text-brand-obsidian",children:t.fromAddress||"—"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-brand-slate",children:"Einzug:"}),e.jsx("br",{}),e.jsx("strong",{className:"text-brand-obsidian",children:t.toAddress||"—"})]}),e.jsxs("div",{className:"sm:col-span-2",children:[e.jsx("span",{className:"text-brand-slate",children:"Umzugstermin:"}),e.jsx("br",{}),e.jsx("strong",{className:"text-brand-obsidian",children:E})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-body text-xs font-semibold text-brand-slate uppercase tracking-wider",children:"Ihr Protokoll"}),e.jsx(M,{url:t.protokollUrl,label:"Umzugsprotokoll",nr:t.protokollNr})]}),!j&&e.jsxs("div",{className:"sm:hidden flex items-start gap-2 rounded-lg px-3 py-2.5",style:{background:"#f0faf5",borderLeft:"3px solid #2D6A4F"},children:[e.jsx("span",{className:"text-base leading-none",children:"📱"}),e.jsx("p",{className:"font-body text-brand-obsidian",style:{fontSize:"13px"},children:"Tipp: Drehen Sie Ihr Gerät ins Querformat für mehr Unterschriftsfläche."})]}),j&&e.jsxs("div",{className:"flex items-center gap-2 rounded-lg px-3 py-2.5",style:{background:"#f0faf5",borderLeft:"3px solid #2D6A4F"},children:[e.jsx("span",{className:"text-base leading-none",children:"📱"}),e.jsx("p",{className:"font-body text-brand-action font-semibold",style:{fontSize:"13px"},children:"Querformat erkannt — optimale Unterschrift-Position!"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-body text-xs font-semibold text-brand-slate uppercase tracking-wider mb-2",children:"Unterschrift Auftraggeber"}),e.jsx(w,{onChange:F,onLandscapeHintChange:C})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block font-body text-xs font-semibold text-brand-slate uppercase tracking-wider mb-2",children:"Vollständiger Name (Auftraggeber)"}),e.jsx("input",{type:"text",value:m,onChange:s=>{f(s.target.value),r(null)},placeholder:"Max Mustermann",className:"w-full border border-border rounded-xl px-4 py-3 font-body text-sm focus:outline-none focus:ring-2 focus:ring-brand-action/30 focus:border-brand-action transition-colors"})]}),e.jsxs("div",{className:"pt-4 border-t border-border",children:[e.jsx("p",{className:"font-body text-xs font-semibold text-brand-slate uppercase tracking-wider mb-2",children:"Unterschrift 
1XLBOX-Teamleiter"}),e.jsx(w,{onChange:B})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block font-body text-xs font-semibold text-brand-slate uppercase tracking-wider mb-2",children:"Name XLBOX-Teamleiter"}),e.jsx("input",{type:"text",value:x,onChange:s=>{X(s.target.value),r(null)},placeholder:"Name des Teamleiters",className:"w-full border border-border rounded-xl px-4 py-3 font-body text-sm focus:outline-none focus:ring-2 focus:ring-brand-action/30 focus:border-brand-action transition-colors"})]}),e.jsx("p",{className:"font-body text-xs text-brand-slate/70 leading-relaxed",children:"Mit Ihrer Unterschrift bestätigen Sie den ordnungsgemäßen Ablauf Ihres Umzugs gemäß dem oben verlinkten Umzugsprotokoll der XLBOX Services GmbH."}),p&&e.jsxs("div",{className:"flex items-start gap-2 rounded-xl bg-red-50 border border-red-200 px-4 py-3",children:[e.jsx(D,{size:16,className:"text-red-500 shrink-0 mt-0.5"}),e.jsx("p",{className:"font-body text-sm text-red-600",children:p})]}),e.jsxs("button",{onClick:T,disabled:o,className:"w-full inline-flex items-center justify-center gap-2 bg-brand-action hover:bg-brand-action-dark disabled:opacity-60 text-white font-semibold py-4 rounded-2xl font-body transition-colors text-base shadow-lg shadow-brand-action/20",children:[o?e.jsx(S,{size:18,className:"animate-spin"}):e.jsx(z,{size:18}),o?"Wird verarbeitet…":"Jetzt rechtsverbindlich unterschreiben",!o&&e.jsx(P,{size:16})]})]}),e.jsx("p",{className:"text-center font-body text-xs text-brand-slate/50 mt-6",children:"XLBOX Services GmbH · Berthold-Haupt-Str. 34 · 01257 Dresden"})]})})}export{J 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.