PageSourceSearch

https://ladecloud.io/assets/InstallationProjekt-oxztJTAR.js

js ladecloud.io collected 2026-10-08 20:45:34 UTC 25,414 bytes, 11 lines download raw bytes

1var Ne=Object.defineProperty;var we=(l,d,u)=>d in l?Ne(l,d,{enumerable:!0,configurable:!0,writable:!0,value:u}):l[d]=u;var re=(l,d,u)=>we(l,typeof d!="symbol"?d+"":d,u);import{c as de,R as _e,r as x,u as ve,j as e,X as Ae,L as le,s as S}from"./index-BzhnpQ2E.js";import{D as Se,a as Ee,b as Be,c as Ie}from"./dialog-CLYALuEZ.js";import{M as Fe,l as Le}from"./linkify-DvLjh1J4.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 ze=de("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const De=de("ImagePlus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]),Pe=[{stufe:1,label:"Anfrage eingegangen"},{stufe:2,label:"Machbarkeit wird geprüft"},{stufe:3,label:"Angebot liegt vor"},{stufe:4,label:"Vor-Ort-Aufnahme läuft"},{stufe:5,label:"Installationsangebot in Arbeit"},{stufe:6,label:"Beauftragt"}],Re={eingegangen:"Anfrage eingegangen",pruefung:"Machbarkeit wird geprüft",angebot_liegt_vor:"Angebot liegt vor",vor_ort:"Vor-Ort-Aufnahme läuft",installationsangebot:"Installationsangebot in Arbeit",beauftragt:"Beauftragt",abgeschlossen:"Abgeschlossen",abgelehnt:"Abgeschlossen",hardware_weiche:"Hardware-Bestellung"},ie={site_survey:"Site Survey (Vor-Ort-Begehung)",pre_check:"Pre-Check (Remote-Prüfung)"},c="16px 4px 16px 4px",i="#FE3501",g="#1D2327",me="#F7F8FA",E="+49 9725 7055807",B="[email protected]",oe="https://zeeg.me/christianfickert/",ce=l=>new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR",minimumFractionDigits:0,maximumFractionDigits:0}).format(l),T=l=>l?new Date(l).toLocaleDateString("de-DE",{day:"2-digit",month:"long",year:"numeric"}):"–",Ce={firmengelaende:"Firmengelände",parkplatz:"Parkplatz / Außenbereich",tiefgarage:"Tiefgarage / Parkhaus",wohnanlage:"Wohnanlage / WEG",hotel_gastronomie:"Hotel / Gastronomie",oeffentlich:"Öffentlicher Bereich",sonstiges:"Sonstiges"},Te={ja:"Ja",nein:"Nein",unklar:"Unklar"},Me={sofort:"Sofort",in_3_monaten:"In 3 Monaten",in_6_monaten:"In 6 Monaten",mehr_als_6_monate:"Später als 6 Monate"};class M extends Error{constructor(u,s){super(s);re(this,"status");this.status=u}}function qe(){const{token:l}=_e();x.useEffect(()=>{document.title="Ihr Installationsprojekt | Ladecloud.io";let o=document.querySelector('meta[name="robots"]');o||(o=document.createElement("meta"),o.setAttribute("name","robots"),document.head.appendChild(o)),o.setAttribute("content","noindex, nofollow")},[]);const{data:d,isLoading:u,error:s}=ve({queryKey:["installation-projekt",l],queryFn:async()=>{const{data:o,error:f}=await S.functions.invoke("get-installation-by-token",{body:{token:l}});if(f){let r=500,j="Fehler beim Laden.";const m=f.context;m&&typeof m.status=="number"&&(r=m.status);try{const p=m?await m.json():null;p!=null&&p.error&&(j=p.error)}catch{}throw new M(r,j)}if(!(o!=null&&o.projekt))throw new M(404,"Projekt nicht gefunden.");return o},enabled:!!l,staleTime:60*1e3,retry:!1});if(u)return e.jsx("div",{className:"min-h-screen flex items-center justify-center",style:{fontFamily:"Poppins, sans-serif"},children:e.jsx("div",{className:"text-gray-500",children:"Ihr Projekt wird geladen…"})});if(s||!d){const f=(s instanceof M?s.status:500)===410;return e.jsx("div",{className:"min-h-screen flex items-center justify-center px-6",style:{fontFamily:"Poppins, sans-serif",background:me},children:e.jsxs("div",{className:"max-w-md text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold mb-3",style:{color:g},children:f?"Link abgelaufen":"Projekt nicht gefunden"}),e.jsx("p",{className:"text-gray-600",children:f?"Dieser Projektlink ist leider abgelaufen. Melden Sie sich gern bei uns — wir richten Ihnen einen neuen Link ein.":"Zu diesem Link konnten wir kein Projekt finden. Bitte prüfen Sie den Link aus Ihrer E-Mail oder kontaktieren Sie uns."}),e.jsxs("p",{className:"text-gray-600 mt-4",children:[e.jsx("a",{href:`mailto:${B}`,style:{color:i},children:B})," · ",e.jsx("a",{href:`tel:${E.replace(/\s/g,"")}`,style:{color:i},children:E})]})]})})}return e.jsx(Oe,{data:d,token:l})}function Oe({data:l,token:d}){var te,se,ne,ae;const u=Ae(),{projekt:s,kunden_status:o,produkte:f,betreuer:r,hardware_angebot_url:j}=l,m=l.installation_angebot??null,p=l.kommentare??[],k=l.fotos??[],I=l.foto_limit??20,[he,F]=x.useState(!1),[L,O]=x.use
11State(!1),[N,z]=x.useState(null),[w,U]=x.useState(""),[$,H]=x.useState(!1),[V,D]=x.useState(null),q=x.useRef(null);x.useEffect(()=>{const t=q.current;t&&(t.scrollTop=t.scrollHeight)},[p.length]);const[b,_]=x.useState([]),[y,Z]=x.useState(!1),[K,v]=x.useState(null),[xe,P]=x.useState(!1),ue=k.length>=I,W=Math.max(0,I-k.length),G=()=>u.invalidateQueries({queryKey:["installation-projekt",d]}),Q=async(t,n)=>{const a=t.context;try{const h=a?await a.json():null;if(h!=null&&h.error)return h.error}catch{}return n},ge=async()=>{const t=w.trim();if(t.length!==0){H(!0),D(null);try{const{data:n,error:a}=await S.functions.invoke("update-installation-by-token",{body:{token:d,aktion:"kommentar",inhalt:t}});if(a){D(await Q(a,"Ihre Nachricht konnte nicht gesendet werden. Bitte versuchen Sie es später erneut."));return}if(!(n!=null&&n.ok)){D("Ihre Nachricht konnte nicht gesendet werden.");return}U(""),await G()}finally{H(!1)}}},fe=t=>{if(!t)return;v(null);const n=Array.from(t).filter(a=>a.type.startsWith("image/"));_(a=>[...a,...n].slice(0,W))},pe=t=>{_(n=>n.filter((a,h)=>h!==t))},be=async()=>{if(b.length===0)return;Z(!0),v(null);let t=!1;try{for(const n of b){const a=new FormData;a.append("token",d),a.append("file",n);const{error:h}=await S.functions.invoke("upload-installation-foto",{body:a});if(h){v(await Q(h,"Ein Foto konnte nicht übertragen werden.")),t=!0;break}}_([]),await G(),t||P(!1)}finally{Z(!1)}},J=[s.vorname,s.nachname].filter(Boolean).join(" ").trim(),X=s.id.replace(/-/g,"").slice(0,8).toUpperCase(),R=o.key==="hardware_weiche",C=o.key==="abgelehnt",Y=!!s.angebot_angenommen_am,je=o.key==="angebot_liegt_vor"&&!!s.angebot_stufe&&!Y,ye=!!s.angebot_stufe&&s.verkauf_netto!=null&&!C&&!R,ee=(Array.isArray(s.benoetigte_module)?s.benoetigte_module:[]).map(t=>Fe[t]).filter(Boolean),ke=async()=>{O(!0),z(null);try{const{data:t,error:n}=await S.functions.invoke("update-installation-by-token",{body:{token:d,aktion:"angebot_annehmen"}});if(n){let a="Die Annahme ist leider fehlgeschlagen. Bitte versuchen Sie es erneut oder kontaktieren Sie uns.";const h=n.context;try{const A=h?await h.json():null;A!=null&&A.error&&(a=A.error)}catch{}z(a);return}if(!(t!=null&&t.ok)){z("Die Annahme ist leider fehlgeschlagen.");return}F(!1),await u.invalidateQueries({queryKey:["installation-projekt",d]})}finally{O(!1)}};return e.jsxs("div",{className:"min-h-screen lg:h-screen lg:flex lg:overflow-hidden",style:{fontFamily:"Poppins, sans-serif",color:g,background:"#fff"},children:[e.jsx("div",{className:"w-full lg:w-[58%] lg:h-screen lg:overflow-y-auto scrollbar-unsichtbar",style:{background:g,color:"#fff",backgroundImage:"radial-gradient(circle at 88% 0%, rgba(254,53,1,0.18), transparent 45%)"},children:e.jsxs("div",{className:"px-6 md:px-10 py-8 space-y-10 [&_h1]:text-white [&_h2]:text-white [&_h3]:text-white [&_h4]:text-white",children:[e.jsxs("section",{children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest mb-3",style:{color:i},children:"Ihr Installationsprojekt"}),e.jsx("h1",{className:"text-xl md:text-2xl font-semibold mb-2",children:J?`Guten Tag ${J},`:"Guten Tag,"}),e.jsxs("p",{className:"text-sm text-gray-300",children:["hier sehen Sie jederzeit den aktuellen Stand Ihres Projekts",s.plz||s.ort?` in ${[s.plz,s.ort].filter(Boolean).join(" ")}`:"","."]}),e.jsxs("p",{className:"text-xs text-gray-500 mt-3",children:["Vorgang ",X," · eingegangen am ",T(s.created_at)]})]}),!C&&!R&&e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold mb-1",children:"Projektstand"}),e.jsxs("p",{className:"text-sm text-gray-400 mb-6",children:["Aktueller Schritt: ",e.jsx("span",{className:"font-medium",style:{color:i},children:Re[o.key]??""})]}),e.jsx("ol",{className:"space-y-3",children:Pe.map(t=>{const n=t.stufe<o.stufe||t.stufe===6&&o.key==="abgeschlossen",a=t.stufe===o.stufe&&o.key!=="abgeschlossen";return e.jsxs("li",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"flex items-center justify-center rounded-full text-xs font-semibold shrink-0",style:{width:28,height:28,background:n||a?i:"rgba(255,255,255,0.08)",color:n||a?"#fff":"#9CA3AF"},children:n?"✓":t.stufe}),e.jsx("span",{className:"text-sm",style:{fontWeight:a?600:400,color:n||a?"#fff":"#9CA3AF"},children:t.label})]},t.stufe)}
11)}),s.beratungstermin_am&&e.jsxs("p",{className:"text-sm mt-6 pt-5",style:{borderTop:"1px solid rgba(255,255,255,0.15)"},children:[e.jsx("span",{className:"text-gray-400",children:"Beratungstermin am "}),e.jsxs("span",{className:"font-semibold",children:[new Date(s.beratungstermin_am).toLocaleString("de-DE",{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"})," ","Uhr"]})]})]}),C&&e.jsxs("section",{style:{borderLeft:`4px solid ${i}`},children:[e.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Projekt abgeschlossen"}),e.jsx("p",{className:"text-sm text-gray-300 leading-relaxed",children:(te=s.ablehnung_kommentar_kunde)!=null&&te.trim()?s.ablehnung_kommentar_kunde:"Ihre Installationsanfrage wurde abgeschlossen. Sollte sich Ihre Situation ändern, melden Sie sich gern jederzeit bei uns."}),s.abgelehnt_am&&e.jsxs("p",{className:"text-xs text-gray-500 mt-4",children:["Stand: ",T(s.abgelehnt_am)]})]}),R&&e.jsxs("section",{style:{borderLeft:`4px solid ${i}`},children:[e.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Ihr Projekt wird als Hardware-Bestellung fortgeführt"}),e.jsx("p",{className:"text-sm text-gray-300 leading-relaxed mb-5",children:"Für Ihren Standort ist keine Installation durch unsere Partner erforderlich — Ihre Bestellung führen wir direkt als Hardware-Angebot weiter."}),j?e.jsx(le,{to:j,className:"inline-block text-white text-sm font-semibold px-6 py-3",style:{background:i,borderRadius:c},children:"Zum Hardware-Angebot"}):e.jsx("p",{className:"text-sm text-gray-400",children:"Ihr Hardware-Angebot ist derzeit nicht verfügbar. Bitte kontaktieren Sie uns direkt."})]}),(m==null?void 0:m.netto)!=null&&e.jsxs("section",{className:"p-6",style:{border:`2px solid ${i}`,borderRadius:c},children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest mb-2",style:{color:i},children:"Ihr Installationsangebot"}),e.jsx("h2",{className:"text-lg font-semibold mb-1",children:"Installation Ihrer Ladeinfrastruktur"}),e.jsxs("p",{className:"text-3xl font-semibold my-4",children:[ce(m.netto)," ",e.jsx("span",{className:"text-base font-normal text-gray-400",children:"netto"})]}),((se=m.text)==null?void 0:se.trim())&&e.jsx("p",{className:"text-sm text-gray-300 leading-relaxed whitespace-pre-line mb-4",children:m.text}),e.jsxs("div",{className:"flex flex-wrap gap-3 items-center",children:[m.url&&e.jsx(le,{to:m.url,className:"inline-block text-white text-sm font-semibold px-6 py-3",style:{background:i,borderRadius:c},children:"Angebot beauftragen"}),m.pdf_url&&e.jsx("a",{href:m.pdf_url,target:"_blank",rel:"noopener noreferrer",className:"text-sm font-semibold px-6 py-3",style:{background:"transparent",border:"1px solid rgba(255,255,255,0.3)",borderRadius:c,color:"#fff"},children:"Angebot als PDF"})]}),!m.url&&e.jsx("p",{className:"text-sm text-gray-400 mt-3",children:"Die Beauftragung ist derzeit nicht verfügbar. Bitte kontaktieren Sie uns direkt."}),e.jsx("p",{className:"text-xs text-gray-400 leading-relaxed mt-4",children:"Zusätzlich zur Installation enthält die Beauftragung die Softwarekosten Ihrer gewählten Module."})]}),ye&&e.jsxs("section",{className:"p-6",style:{border:`2px solid ${i}`,borderRadius:c},children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest mb-2",style:{color:i},children:"Angebot für den Vor-Ort-Termin"}),e.jsx("h2",{className:"text-lg font-semibold mb-1",children:ie[s.angebot_stufe]??"Vor-Ort-Termin"}),e.jsxs("p",{className:"text-3xl font-semibold my-4",children:[ce(s.verkauf_netto)," ",e.jsx("span",{className:"text-base font-normal text-gray-400",children:"netto"})]}),((ne=s.angebot_text)==null?void 0:ne.trim())&&e.jsx("p",{className:"text-sm text-gray-300 leading-relaxed whitespace-pre-line mb-4",children:s.angebot_text}),e.jsx("p",{className:"text-xs text-gray-400 leading-relaxed mb-6",children:"Dieser Betrag bezieht sich ausschließlich auf den Vor-Ort-Termin — er ist kein Installationspreis. Bei Beauftragung der Installation wird er vollständig auf die Installationskosten angerechnet."}),Y?e.jsxs("div",{className:"p-4",style:{background:"rgba(255,255,255,0.07)",borderRadius:c},children:[e.jsx("p",{className:"text-sm font-semibold",children:"Angebot angenommen"}),e.jsxs("p",{className:"text-sm text-gray-300 mt-1",children:["Vielen Dank! Sie haben das Angebot am ",T(s.angebot_angenommen_am)," angenommen. Wir melden uns zeitnah bei Ihnen, um den Termin abzustimmen."]})]}):je?e.jsx(e.Fragment,{children:he?e.jsxs("div",{className:"p-4",style:{background:"rgba(255,255,255,0.07)",borderRadius:c},children:[e.jsx("p",{className:"text-sm font-semibold mb-2",children:"Angebot verbindlich annehmen?"}),e.jsxs("p",{className:"text-sm text-gray-300 mb-4",children:["Mit Ihrer Bestätigung beauftragen Sie den Vor-Ort-Termin (",ie[s.angebot_stufe]??"Vor-Ort-Termin",") zum genannten Preis."]}),e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsx("button",{onClick:ke,disabled:L,className:"text-white text-sm font-semibold px-6 py-3 disabled:opacity-60",style:{background:i,borderRadius:c},children:L?"Wird bestätigt…":"Ja, Angebot annehmen"}),e.jsx("button",{onClick:()=>F(!1),disabled:L,className:"text-sm font-semibold px-6 py-3",style:{background:"transparent",border:"1px solid rgba(255,255,255,0.3)",borderRadius:c,color:"#fff"},children:"Zurück"})]}),N&&e.jsx("p",{className:"text-sm mt-3",style:{color:"#DC2626"},children:N})]}):e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>F(!0),className:"text-white text-sm font-semibold px-6 py-3",style:{background:i,borderRadius:c},children:"Angebot annehmen"}),N&&e.jsx("p",{className:"text-sm mt-3",style:{color:"#DC2626"},children:N})]})}):null]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold mb-5",children:"Ihre Anfrage"}),e.jsxs("dl",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-4 text-sm",children:[((ae=s.standorttyp)==null?void 0:ae.length)>0&&e.jsxs("div",{children:[e.jsx("dt",{className:"text-gray-500 text-xs uppercase tracking-wide mb-1",children:"Standorttyp"}),e.jsx("dd",{children:s.standorttyp.map(t=>Ce[t]??t).join(", ")})]}
11),(s.genaue_ladepunkte!=null||s.anzahl_ladepunkte)&&e.jsxs("div",{children:[e.jsx("dt",{className:"text-gray-500 text-xs uppercase tracking-wide mb-1",children:"Geplante Ladepunkte"}),e.jsx("dd",{children:s.genaue_ladepunkte!=null?`${s.genaue_ladepunkte} Ladepunkte`:s.anzahl_ladepunkte})]}),s.tiefbau_erforderlich&&e.jsxs("div",{children:[e.jsx("dt",{className:"text-gray-500 text-xs uppercase tracking-wide mb-1",children:"Tiefbauarbeiten"}),e.jsx("dd",{children:Te[s.tiefbau_erforderlich]??s.tiefbau_erforderlich})]}),s.installationszeitraum&&e.jsxs("div",{children:[e.jsx("dt",{className:"text-gray-500 text-xs uppercase tracking-wide mb-1",children:"Gewünschter Zeitraum"}),e.jsx("dd",{children:Me[s.installationszeitraum]??s.installationszeitraum})]})]}),ee.length>0&&e.jsxs("div",{className:"mt-6",children:[e.jsx("p",{className:"text-gray-500 text-xs uppercase tracking-wide mb-2",children:"Passende Module"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:ee.map(t=>e.jsx("span",{className:"text-xs font-semibold px-3 py-1.5 rounded-full text-white",style:{background:t.farbe},title:t.kurzbeschreibung,children:t.label},t.key))})]}),f.length>0&&e.jsxs("div",{className:"mt-6",children:[e.jsx("p",{className:"text-gray-500 text-xs uppercase tracking-wide mb-3",children:"Ausgewählte Ladestationen"}),e.jsx("ul",{className:"space-y-2.5 text-sm",children:f.map(t=>e.jsxs("li",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-12 w-12 shrink-0 rounded-md overflow-hidden flex items-center justify-center",style:{background:"rgba(255,255,255,0.1)"},children:t.bild_url?e.jsx("img",{src:t.bild_url,alt:t.produkt_name,loading:"lazy",className:"h-full w-full object-contain"}):e.jsx("span",{className:"text-[10px] text-gray-500",children:"kein Bild"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"font-medium text-white",children:t.produkt_name}),e.jsxs("div",{className:"text-xs text-gray-400",children:[e.jsxs("span",{style:{color:i},className:"font-semibold",children:[t.menge," ×"]}),t.quelle==="admin_empfehlung"&&e.jsx("span",{className:"ml-2",children:"von uns empfohlen"})]})]})]},t.id))})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Fotos Ihres Standorts"}),e.jsx("p",{className:"text-sm text-gray-400 mb-5",children:"Fotos von Zählerschrank, Stellplätzen und Kabelwegen helfen uns, Ihr Projekt schneller einzuschätzen."}),k.length>0?e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:k.map(t=>e.jsx("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"block overflow-hidden",style:{borderRadius:c,border:"1px solid rgba(255,255,255,0.15)"},children:e.jsx("img",{src:t.thumb_url,alt:t.name,className:"w-full aspect-square object-cover",loading:"lazy"})},t.url))}):e.jsx("p",{className:"text-sm text-gray-400",children:"Noch keine Fotos vorhanden. Sie können Fotos rechts im Nachrichtenbereich hinzufügen."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold mb-5",children:"Ihr Ansprechpartner"}),r?e.jsxs("div",{className:"flex flex-col sm:flex-row gap-5",children:[r.foto_url&&e.jsx("img",{src:r.foto_url,alt:r.name??"Ansprechpartner",className:"w-20 h-20 rounded-full object-cover shrink-0"}),e.jsxs("div",{className:"text-sm",children:[e.jsx("p",{className:"font-semibold text-base",children:r.name}),r.position&&e.jsx("p",{className:"text-gray-400 mb-3",children:r.position}),e.jsxs("div",{className:"space-y-1.5",children:[r.telefon&&e.jsx("p",{children:e.jsx("a",{href:`tel:${r.telefon.replace(/\s/g,"")}`,style:{color:i},children:r.telefon})}),r.email&&e.jsx("p",{children:e.jsx("a",{href:`mailto:${r.email}`,style:{color:i},children:r.email})})]}),e.jsx("a",{href:r.kalender_url||oe,target:"_blank",rel:"noopener noreferrer",className:"inline-block mt-4 text-sm font-semibold px-5 py-2.5",style:{background:"#fff",color:g,borderRadius:c},children:"Termin vereinbaren"})]})]}):e.jsxs("div",{className:"text-sm",children:[e.jsx("p",{className:"text-gray-300 leading-relaxed mb-4",children:"Bei Fragen zu Ihrem Projekt erreichen Sie uns jederzeit:"}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{children:e.jsx("a",{href:`tel:${E.replace(/\s/g,"")}`,style:{color:i},children:E})}),e.jsx("p",{children:e.jsx("a",{href:`mailto:${B}`,style:{color:i},children:B})})]}),e.jsx("a",{href:oe,target:"_blank",rel:"noopener noreferrer",className:"inline-block mt-4 text-sm font-semibold px-5 py-2.5",style:{background:"#fff",color:g,borderRadius:c},children:"Termin vereinbaren"})]})]}),e.jsxs("p",{className:"text-center text-xs text-gray-500 pb-4",children:["Ein Angebot von Ladecloud.io · Vorgang ",X]})]})}),e.jsxs("aside",{className:"w-full lg:flex-1 lg:h-screen lg:flex lg:flex-col lg:overflow-hidden bg-white",children:[e.jsx("div",{ref:q,className:"lg:flex-1 lg:min-h-0 lg:overflow-y-auto scrollbar-unsichtbar px-6 md:px-8 pt-8",children:e.jsxs("div",{className:"max-w-2xl mx-auto",children:[e.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Nachrichten"}),e.jsx("p",{className:"text-sm text-gray-500 mb-5",children:"Hier können Sie uns jederzeit Fragen oder Hinweise zu Ihrem Projekt schicken."}),p.length>0&&e.jsx("div",{className:"space-y-3 mb-6",children:p.map(t=>{var a;if((a=t.inhalt)!=null&&a.startsWith("__foto__:")){const h=parseInt(t.inhalt.slice(9),10)||1;return e.jsxs("div",{className:"flex items-center justify-center gap-1.5 py-1",children:[e.jsx(ze,{size:13,className:"text-gray-400"}),e.jsx("span",{className:"text-xs text-gray-400",children:h===1?"Ein Bild hochgeladen":`${h} Bilder hochgeladen`})]},t.id)}const n=t.absender!=="kunde";return e.jsxs("div",{className:"p-4",style:{background:n?me:"#FDF1EA",border:n?"1px solid #E5E7EB":"1px solid #F6CFBB",borderRadius:c},children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 mb-1.5",children:[n&&r?e.jsxs("span",{className:"flex items-center gap-2",children:[r.foto_url?e.jsx("img",{src:r.foto_url,alt:r.name??"Ansprechpartner",className:"w-7 h-7 rounded-full object-cover"}):e.jsx("span",{className:"w-7 h-7 rounded-full flex items-center justify-center text-[11px] font-semibold text-white",style:{background:g},children:(r.name??"L").trim().charAt(0).toUpperCase()}),e.jsx("span",{className:"text-sm font-semibold",children:r.name??"Ladecloud.io"})]}):e.jsx("span",{className:"text-sm font-semibold",children:n?t.autor_name??"Ladecloud.io":"Sie"}),e.jsx("span",{className:"text-xs text-gray-400",children:new Date(t.created_at).toLocaleStr
11ing("de-DE")})]}),e.jsx("p",{className:"text-sm text-gray-600 leading-relaxed whitespace-pre-line",children:Le(t.inhalt,"underline break-all text-[#FE3501]")})]},t.id)})})]})}),e.jsx("div",{className:"shrink-0 px-6 md:px-8 py-5",style:{borderTop:"1px solid #E5E7EB",background:"#fff"},children:e.jsxs("div",{className:"max-w-2xl mx-auto",children:[e.jsx("textarea",{value:w,onChange:t=>U(t.target.value.slice(0,4e3)),rows:3,placeholder:"Ihre Nachricht an uns …",className:"w-full p-4 text-sm outline-none",style:{border:"1px solid #E5E7EB",borderRadius:c}}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[e.jsx("button",{type:"button",onClick:ge,disabled:$||w.trim().length===0,className:"text-white text-sm font-semibold px-6 py-3 disabled:opacity-60",style:{background:i,borderRadius:c},children:$?"Wird gesendet…":"Nachricht senden"}),e.jsxs("button",{type:"button",onClick:()=>P(!0),className:"flex items-center gap-2 text-sm font-semibold px-5 py-3",style:{border:"1px solid #E5E7EB",borderRadius:c,color:g,background:"#fff"},"aria-label":"Projektbilder hochladen",title:"Projektbilder hochladen",children:[e.jsx(De,{size:17}),e.jsx("span",{className:"hidden sm:inline",children:"Bilder"})]})]}),e.jsx("div",{className:"mt-2",children:e.jsxs("span",{className:"text-xs text-gray-400",children:[w.length,"/4000 Zeichen"]})}),V&&e.jsx("p",{className:"text-sm mt-2",style:{color:"#DC2626"},children:V})]})})]}),e.jsx(Se,{open:xe,onOpenChange:t=>{y||(P(t),t||(_([]),v(null)))},children:e.jsxs(Ee,{className:"max-w-lg",children:[e.jsx(Be,{children:e.jsx(Ie,{children:"Projektbilder hochladen"})}),e.jsx("p",{className:"text-sm text-gray-500",children:"Laden Sie hier Bilder zu Ihrem Projekt hoch – z. B. vom Stellplatz, Zählerschrank oder Sicherungskasten. Die Bilder erscheinen gesammelt in der Übersicht links."}),ue?e.jsx("p",{className:"text-sm text-gray-500",children:"Maximale Anzahl an Fotos erreicht. Zum Austauschen sprechen Sie uns bitte an."}):e.jsxs(e.Fragment,{children:[b.length>0&&e.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 gap-3 my-4",children:b.map((t,n)=>e.jsxs("div",{className:"relative",children:[e.jsx("img",{src:URL.createObjectURL(t),alt:t.name,className:"w-full aspect-square object-cover",style:{borderRadius:c,border:"1px solid #E5E7EB"}}),e.jsx("button",{type:"button",onClick:()=>pe(n),disabled:y,className:"absolute -top-2 -right-2 w-6 h-6 rounded-full text-xs font-bold text-white",style:{background:g},"aria-label":"Foto aus der Auswahl entfernen",children:"×"})]},`${t.name}-${n}`))}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("label",{className:"cursor-pointer text-sm font-semibold px-5 py-2.5",style:{border:"1px solid #E5E7EB",borderRadius:c,color:g},children:["Fotos auswählen",e.jsx("input",{type:"file",accept:"image/jpeg,image/png,image/webp",multiple:!0,className:"hidden",disabled:y,onChange:t=>{fe(t.target.files),t.target.value=""}})]}),b.length>0&&e.jsx("button",{type:"button",onClick:be,disabled:y,className:"text-white text-sm font-semibold px-5 py-2.5 disabled:opacity-60",style:{background:i,borderRadius:c},children:y?"Wird übertragen…":`${b.length} Bild${b.length===1?"":"er"} hochladen`})]}),e.jsxs("p",{className:"text-xs text-gray-400 mt-3",children:["Noch ",W," von ",I,' Fotos möglich. Erst mit „Hochladen" werden die Bilder übertragen – danach können sie nicht mehr selbst entfernt werden.']}),K&&e.jsx("p",{className:"text-sm mt-3",style:{color:"#DC2626"},children:K})]})]})})]})}export{qe 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.