PageSourceSearch

https://bav-workflow.de/assets/VertragscheckAdmin-B7xCOu1N.js

js bav-workflow.de collected 2026-10-09 03:08:32 UTC 21,150 bytes, 8 lines download raw bytes

1import{f as de,U as me,l as xe,r as d,s as _,j as e,B as h,C as q,I as ue,S as Q,D as he,b as pe,Q as fe,T as ge}from"./index-CNXSaG68.js";import{S as W,a as X,b as Y,c as ee,d as f}from"./select-Ca0Uj18w.js";import{T as je,a as be,b as se,c as te}from"./tabs-_gsA4ysy.js";import{S as y}from"./separator-40YZpQ8c.js";import{L as Ne}from"./loader-circle-D4wDZuya.js";import{C as L}from"./circle-alert-B0ntGteu.js";import{D as k}from"./download-ByfBI-Zl.js";import{R as g}from"./refresh-cw-HxXbLrjv.js";import{C as ve}from"./clipboard-list-CS-f7_6y.js";import{C as re}from"./clock-D70BIPpN.js";import{C as ne}from"./circle-check-big-BVyhgJwl.js";import{S as ye}from"./search-_ZYBQDsn.js";import{F as S}from"./file-text-BZr88nI_.js";import{B as P}from"./building-BjVZFsEX.js";import{U as F}from"./user-BrLEwpcg.js";import{F as we}from"./file-check-BeAruy2e.js";import{E as _e}from"./eye-CT6KAJFk.js";import{C as ke}from"./calendar-B-FzL-Ih.js";import{M as Se}from"./mail-DqdKnAh-.js";import"./chevron-down-DikpWxxi.js";import"./chevron-up-Du7wgoKl.js";import"./check-mPQBmyvA.js";import"./index-COUb44M9.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 Ce=de("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),C={new:{label:"Neu",color:"bg-blue-100 text-blue-800 border-blue-200",icon:L},in_progress:{label:"In Bearbeitung",color:"bg-amber-100 text-amber-800 border-amber-200",icon:re},completed:{label:"Abgeschlossen",color:"bg-green-100 text-green-800 border-green-200",icon:ne}},R=l=>l?new Date(l).toLocaleDateString("de-DE",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}):"–",De=l=>l?new Date(l).toLocaleDateString("de-DE",{day:"2-digit",month:"2-digit",year:"numeric"}):"",ae=l=>l==null?"–":new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(l),Ve=l=>{if(l==null)return"";const c=String(l);return c.includes(";")||c.includes('"')||c.includes(`
7`)?`"${c.replace(/"/g,'""')}"`:c},Ee=l=>{const c=["Status","Eingegangen","Vorname","Nachname","E-Mail","Telefon","Geburtsdatum","Straße","PLZ","Ort","Tätigkeit","Branche","Unternehmensgröße","Arbeitgeber","Versicherungsgesellschaft","Vertragsbeginn","Monatl. Beitrag (€)","AG-Zuschuss (€)","Vollmacht erteilt","Kontaktpräferenzen"],m=l.map(r=>{var w;return[((w=C[r.status])==null?void 0:w.label)??r.status??"Neu",De(r.created_at),r.first_name,r.last_name,r.email,r.phone_number??"",r.birthdate,r.street_address??"",r.postal_code??"",r.city??"",r.employment_type??"",r.industry??"",r.company_size??"",r.employer_name??"",r.insurance_company??"",r.contract_start??"",r.monthly_contribution??"",r.employer_subsidy??"",r.vollmacht_granted?"Ja":"Nein",Array.isArray(r.contact_preferences)?r.contact_preferences.join(", "):""].map(Ve)}),j=[c.join(";"),...m.map(r=>r.join(";"))].join(`
8`),D=new Blob(["\uFEFF"+j],{type:"text/csv;charset=utf-8;"}),u=URL.createObjectURL(D),b=document.createElement("a");b.href=u,b.download=`vertragscheck-anfragen-${new Date().toISOString().slice(0,10)}.csv`,b.click(),URL.revokeObjectURL(u)},Le=({status:l})=>{const c=C[l]??C.new,m=c.icon;return e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium border ${c.color}`,children:[e.jsx(m,{className:"w-3 h-3"}),c.label]})},i=({label:l,value:c})=>e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-xs text-muted-foreground font-medium uppercase tracking-wide",children:l}),e.jsx("span",{className:"text-sm text-foreground",children:c||"–"})]}),ss=()=>{const{isAdmin:l,loading:c}=me(),{toast:m}=xe(),[j,D]=d.useState(null),[u,b]=d.useState([]),[r,w]=d.useState(!0),[A,le]=d.useState(""),[U,ie]=d.useState("all"),[t,B]=d.useState(null),[ce,T]=d.useState(!1),[V,z]=d.useState(null),[O,E]=d.useState(null),[oe,M]=d.useState(!1),p=d.useRef(null);d.useEffect(()=>{l&&I()},[l]);const I=async()=>{w(!0);const{data:s,error:a}=await _.from("vertragscheck_submissions").select("*").order("created_at",{ascending:!1});a?m({title:"Fehler",description:"Daten konnten nicht geladen werden.",variant:"destructive"}):b(s||[]),w(!1)},G=async(s,a)=>{var o;const{error:n}=await _.from("vertragscheck_submissions").update({status:a}).eq("id",s);if(n){m({title:"Fehler",description:"Status konnte nicht aktualisiert werden.",variant:"destructive"});return}b(x=>x.map(v=>v.id===s?{...v,status:a}:v)),(t==null?void 0:t.id)===s&&B(x=>x&&{...x,status:a}),m({title:"Status aktualisiert",description:`Status auf "${(o=C[a])==null?void 0:o.label}" gesetzt.`})},Z=async s=>{p.current&&(URL.revokeObjectURL(p.current),p.current=null),E(null),M(!0);try{const{data:a,error:n}=await _.functions.invoke("resend-vollmacht-pdf",{body:{submission_id:s,action:"download"}});if(n)throw new Error(n.message);const o=new Blob([a],{type:"application/pdf"}),x=URL.createObjectURL(o);p.current=x,E(x)}catch(a){const n=a instanceof Error?a.message:String(a);m({title:"Vorschau fehlgeschlagen",description:n,variant:"destructive"})}finally{M(!1)}},K=async(s,a)=>{D(s);try{const{data:n,error:o}=await _.functions.invoke("resend-vollmacht-pdf",{body:{submission_id:s,action:"download"}});if(o)throw new Error(o.message);const x=new Blob([n],{type:"application/pdf"}),v=URL.createObjectURL(x),$=document.createElement("a");$.href=v,$.download=`vollmacht-${a.replace(/\s+/g,"-").toLowerCase()}.pdf`,$.click(),URL.revokeObjectURL(v)}catch(n){const o=n instanceof Error?n.message:String(n);m({title:"Download fehlgeschlagen",description:o,variant:"destructive"})}finally{D(null)}},H=async s=>{z(s);try{const{data:a,error:n}=await _.functions.invoke("resend-vollmacht-pdf",{body:{submission_id:s}});if(n||!(a!=null&&a.success))throw new Error((n==null?void 0:n.message)||"Fehler");m({title:"PDF versendet ✓",description:"Vollmacht wurde an [email protected] gesendet."})}catch(a){const n=a instanceof Error?a.message:String(a);m({title:"Fehler beim Versand",description:n,variant:"destructive"})}finally{z(null)}},N=u.filter(s=>{const a=!A||`${s.first_name} ${s.last_name} ${s.email} ${s.employer_name??""} ${s.insurance_company??""}`.toLowerCase().includes(A.toLowerCase()),n=U==="all"||s.status===U;return a&&n}),J={all:u.length,new:u.filter(s=>s.status==="new").length,in_progress:u.filter(s=>s.status==="in_progress").length,completed:u.filter(s=>s.status==="completed").length};return c?e.jsx("div",{className:"p-8 flex justify-center",children:e.jsx(Ne,{className:"w-8 h-8 animate-spin text-primary"})}):l?e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Vertragscheck-Anfragen"}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[J.all," Einreichungen gesamt"]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(h,{variant:"outline",size:"sm",onClick:()=>Ee(N),disabled:r||N.length===0,children:[e.jsx(k,{className:"w-4 h-4 mr-2"}),"CSV exportieren ",N.length!==u.length&&`(${N.length})`]}),e.jsxs(h,{variant:"outline",size:"sm",onClick:I,disabled:r,children:[e.jsx(g,{className:`w-4 h-4 mr-2 ${r?"animate-spin":""}`}),"Aktualisieren"]})]})]}),e.jsx("div",{className:"grid grid-cols-4 gap-4",children:[{key:"all",label:"Gesamt",icon:ve,color:"text-foreground"},{key:"new",label:"Neu",icon:L,color:"text-blue-600"},{key:"in_progress",label:"In Bearbeitung",icon:re,color:"text-amber-600"},{key:"completed",label:"Abgeschlossen",icon:ne,color:"text-green-600"}].map(({key:s,label:a,icon:n,color:o})=>e.jsx(q,{className:"p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(n,{className:`w-5 h-5 ${o}`}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold text-foreground",children:J[s]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:a})]})]})},s))}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("div",{className:"relative flex-1 max-w-sm",children:[e.jsx(ye,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(ue,{placeholder:"Name, E-Mail, Arbeitgeber...",value:A,onChange:s=>le(s.target.value),className:"pl-9"})]}),e.jsxs(W,{value:U,onValueChange:ie,children:[e.jsx(X,{className:"w-48",children:e.jsx(Y,{placeholder:"Status filtern"})}),e.jsxs(ee,{className:"admin-light",children:[e.jsx(f,{value:"all",children:"Alle Status"}),e.jsx(f,{value:"new",children:"Neu"}),e.jsx(f,{value:"in_progress",children:"In Bearbeitung"}),e.jsx(f,{value:"completed",children:"Abgeschlossen"})]})]})]}),e.jsx(q,{className:"overflow-hidden",children:r?e.jsx("div",{className:"flex items-center justify-center h-48",children:e.jsx(g,{className:"w-6 h-6 animate-spin text-muted-foreground"})}):N.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center h-48 text-muted-foreground gap-2",children:[e.jsx(S,{className:"w-10 h-10 opacity-30"}),e.jsx("p",{className:"text-sm",children:"Keine Einreichungen gefunden"})]}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"bg-muted/50 border-b border-border",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left px-4 py-3 font-medium text-muted-foreground",children:"Person"}),e.jsx("th",{className:"text-left px-4 py-3 font-medium text-muted-foreground",children:"Modus"}),e.jsx("th",{className:"text-left px-4 py-3 font-medium text-muted-foreground",children:"Versicherung"}),e.jsx("th",{className:"text-left px-4 py-3 font-medium text-muted-foreground",children:"Arbeitgeber"}),e.jsx("th",{className:"text-left px-4 py-3 font-medium text-muted-foreground",children:"Vollmacht"}),e.jsx("th",{className:"text-left px-4 py-3 font-medium text-muted-foreground",children:"Eingegangen"}),e.jsx("th",{className:"text-left px-4 py-3 font-medium text-muted-foreground",children:"Status"}),e.jsx("th",{className:"text-left px-4 py-3 font-medium text-muted-foreground",children:"Aktionen"})]})}),e.jsx("tbody",{children:N.map((s,a)=>e.jsxs("tr",{className:`border-b border-border last:border-0 hover:bg-muted/20 transition-colors ${a%2===0?"":"bg-muted/10"}`,children:[e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{children:[e.jsxs("p",{className:"font-medium text-foreground",children:[s.first_name," ",s.last_name]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s.email}),s.phone_number&&e.jsx("p",{className:"text-xs text-muted-foreground",children:s.phone_number})]})}),e.jsx("td",{className:"px-4 py-3",children:s.submission_type==="arbeitgeber"?e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-purple-100 text-purple-800 border border-purple-200",children:[e.jsx(P,{className:"w-3 h-3"})," Arbeitgeber"]}):e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-sky-100 text-sky-800 border border-sky-200",children:[e.jsx(F,{className:"w-3 h-3"})," Mitarbeiter"]})}),e.jsx("td",{className:"px-4 py-3 text-muted-foreground",children:s.insurance_company||"–"}),e.jsx("td",{className:"px-4 py-3 text-muted-foreground",children:s.employer_name||"–"}),e.jsx("td",{className:"px-4 py-3",children:s.vollmacht_granted?e.jsxs("span",{className:"inline-flex items-center gap-1 text-green-700 text-xs font-medium",children:[e.jsx(we,{className:"w-3.5 h-3.5"})," Erteilt"]}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"Nicht erteilt"})}),e.jsx("td",{className:"px-4 py-3 text-xs text-muted-foreground whitespace-nowrap",children:R(s.created_at)}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs(W,{value:s.status??"new",onValueChange:n=>G(s.id,n),children:[e.jsx(X,{className:"h-8 w-40 text-xs",children:e.jsx(Y,{})}),e.jsxs(ee,{className:"admin-light",children:[e.jsx(f,{value:"new",children:"Neu"}),e.jsx(f,{value:"in_progress",children:"In Bearbeitung"}),e.jsx(f,{value:"completed",children:"Abgeschlossen"})]})]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex gap-1",children:[e.jsx(h,{size:"sm",variant:"ghost",onClick:()=>{B(s),E(null),T(!0),s.vollmacht_granted&&Z(s.id)},className:"h-8 px-2",title:"Details ansehen",children:e.jsx(_e,{className:"w-4 h-4"})}),s.vollmacht_granted&&e.jsxs(e.Fragment,{children:[e.jsx(h,{size:"sm",variant:"ghost",onClick:()=>K(s.id,`${s.first_name} ${s.last_name}`),disabled:j===s.id,className:"h-8 px-2",title:"Vollmacht herunterladen",children:j===s.id?e.jsx(g,{className:"w-4 h-4 animate-spin"}):e.jsx(k,{className:"w-4 h-4"})}),e.jsx(h,{size:"sm",variant:"ghost",onClick:()=>H(s.id),disabled:V===s.id,className:"h-8 px-2 text-primary",title:"Vollmacht per E-Mail senden",children:V===s.id?e.jsx(g,{className:"w-4 h-4 animate-spin"}):e.jsx(Q,{className:"w-4 h-4"})})]})]})})]},s.id))})]})})}),e.jsx(he,{open:ce,onOpenChange:s=>{T(s),!s&&p.current&&(URL.revokeObjectURL(p.current),p.current=null,E(null))},children:e.jsxs(pe,{className:"admin-light max-w-4xl max-h-[90vh] overflow-y-auto",children:[e.jsx(fe,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(ge,{className:"flex items-center gap-2",children:[e.jsx(S,{className:"w-5 h-5 text-primary"}),"Vertragscheck-Details"]}
8),(t==null?void 0:t.vollmacht_granted)&&e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(h,{size:"sm",variant:"outline",onClick:()=>K(t.id,`${t.first_name} ${t.last_name}`),disabled:j===(t==null?void 0:t.id),className:"flex items-center gap-2",children:[j===(t==null?void 0:t.id)?e.jsx(g,{className:"w-4 h-4 animate-spin"}):e.jsx(k,{className:"w-4 h-4"}),"PDF herunterladen"]}),e.jsxs(h,{size:"sm",onClick:()=>H(t.id),disabled:V===(t==null?void 0:t.id),className:"flex items-center gap-2",children:[V===(t==null?void 0:t.id)?e.jsx(g,{className:"w-4 h-4 animate-spin"}):e.jsx(Q,{className:"w-4 h-4"}),"Per E-Mail senden"]})]})]})}),t&&e.jsxs(je,{defaultValue:t.vollmacht_granted?"pdf":"details",className:"w-full",children:[e.jsxs(be,{className:"mb-4",children:[e.jsx(se,{value:"details",children:"Details"}),t.vollmacht_granted&&e.jsxs(se,{value:"pdf",className:"flex items-center gap-1.5",children:[e.jsx(S,{className:"w-3.5 h-3.5"})," Vollmacht-Vorschau"]})]}),t.vollmacht_granted&&e.jsx(te,{value:"pdf",children:oe?e.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] gap-3 text-muted-foreground",children:[e.jsx(g,{className:"w-8 h-8 animate-spin"}),e.jsx("p",{className:"text-sm",children:"PDF wird generiert…"})]}):O?e.jsx("iframe",{src:O,className:"w-full rounded-lg border border-border",style:{height:"65vh"},title:"Vollmacht-Vorschau"}):e.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] gap-3 text-muted-foreground",children:[e.jsx(L,{className:"w-8 h-8 opacity-40"}),e.jsx("p",{className:"text-sm",children:"Vorschau konnte nicht geladen werden."}),e.jsx(h,{size:"sm",variant:"outline",onClick:()=>Z(t.id),children:"Erneut versuchen"})]})}),e.jsx(te,{value:"details",children:e.jsxs("div",{className:"space-y-5 pt-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Le,{status:t.status??"new"}),t.submission_type==="arbeitgeber"?e.jsxs("span",{className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-full text-xs font-medium bg-purple-100 text-purple-800 border border-purple-200",children:[e.jsx(P,{className:"w-3 h-3"})," Arbeitgeber"]}):e.jsxs("span",{className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-full text-xs font-medium bg-sky-100 text-sky-800 border border-sky-200",children:[e.jsx(F,{className:"w-3 h-3"})," Mitarbeiter"]})]}),e.jsxs("span",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[e.jsx(ke,{className:"w-3.5 h-3.5"}),R(t.created_at)]})]}),e.jsx(y,{}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2 mb-3",children:[e.jsx(F,{className:"w-4 h-4 text-primary"})," Persönliche Daten"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(i,{label:"Name",value:`${t.first_name} ${t.last_name}`}),e.jsx(i,{label:"Geburtsdatum",value:t.birthdate}),e.jsx(i,{label:"E-Mail",value:e.jsx("a",{href:`mailto:${t.email}`,className:"text-primary hover:underline",children:t.email})}),e.jsx(i,{label:"Telefon",value:t.phone_number}),e.jsx(i,{label:"Straße",value:t.street_address}),e.jsx(i,{label:"PLZ / Ort",value:t.postal_code&&t.city?`${t.postal_code} ${t.city}`:null})]})]}),e.jsx(y,{}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2 mb-3",children:[e.jsx(P,{className:"w-4 h-4 text-primary"})," Beschäftigung & Vertrag"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(i,{label:"Tätigkeit",value:t.employment_type}),e.jsx(i,{label:"Branche",value:t.industry}),e.jsx(i,{label:"Unternehmensgröße",value:t.company_size}),e.jsx(i,{label:"Arbeitgeber",value:t.employer_name}),e.jsx(i,{label:"Versicherungsgesellschaft",value:t.insurance_company}),e.jsx(i,{label:"Vertragsbeginn",value:t.contract_start}),e.jsx(i,{label:"Monatlicher Beitrag",value:ae(t.monthly_contribution)}),e.jsx(i,{label:"AG-Zuschuss",value:ae(t.employer_subsidy)})]})]}),e.jsx(y,{}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2 mb-3",children:[e.jsx(Ce,{className:"w-4 h-4 text-primary"})," Vollmacht"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(i,{label:"Vollmacht erteilt",value:t.vollmacht_granted?"Ja ✓":"Nein"}),e.jsx(i,{label:"Unterzeichnet am",value:R(t.signature_timestamp)}),t.vollmacht_pdf_path&&e.jsxs("div",{className:"col-span-2 flex gap-2 flex-wrap",children:[e.jsxs("a",{href:t.vollmacht_pdf_path,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 bg-primary text-primary-foreground rounded-md text-sm font-medium hover:opacity-90 transition-opacity",children:[e.jsx(S,{className:"w-4 h-4"}),"Vollmacht öffnen / als PDF drucken"]}),e.jsxs("a",{href:t.vollmacht_pdf_path,download:`vollmacht-${t.id}.html`,className:"inline-flex items-center gap-2 px-4 py-2 border border-border rounded-md text-sm font-medium text-foreground hover:bg-muted/50 transition-colors",children:[e.jsx(k,{className:"w-4 h-4"}),"Herunterladen"]})]}),t.vollmacht_granted&&!t.vollmacht_pdf_path&&e.jsx("div",{className:"col-span-2",children:e.jsx("p",{className:"text-xs text-muted-foreground italic",children:"Vollmacht-Dokument wird bei neuen Einreichungen automatisch gespeichert."})}),t.signature_base64&&e.jsxs("div",{className:"col-span-2",children:[e.jsx("span",{className:"text-xs text-muted-foreground font-medium uppercase tracking-wide",children:"Unterschrift"}),e.jsx("div",{className:"mt-1 border border-border rounded-lg bg-white p-2 inline-block",children:e.jsx("img",{src:t.signature_base64,alt:"Unterschrift",className:"max-h-20"})})]})]})]}),t.contact_preferences&&Array.isArray(t.contact_preferences)&&t.contact_preferences.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(y,{}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2 mb-3",children:[e.jsx(Se,{className:"w-4 h-4 text-primary"})," Kontaktpräferenz"]}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:t.contact_preferences.map(s=>e.jsx("span",{className:"px-3 py-1 bg-primary/10 text-primary text-xs rounded-full font-medium",children:s},s))})]})]}),t.uploaded_files&&Array.isArray(t.uploaded_files)&&t.uploaded_files.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(y,{}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2 mb-3",children:[e.jsx(k,{className:"w-4 h-4 text-primary"})," Hochgeladene Dokumente (",t.uploaded_files.length,")"]}),e.jsx("div",{className:"space-y-2",children:t.uploaded_files.map((s,a)=>e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(S,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("span",{className:"text-foreground truncate",children:s.name||s.path||`Dokument ${a+1}`}),s.url&&e.jsx("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline ml-auto flex-shrink-0",children:"Öffnen"})]},a))})]})]}),e.jsx(y,{}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold text-foreground mb-3",children:"Status ändern"}),e.jsx("div",{className:"flex gap-2",children:Object.entries(C).map(([s,a])=>{const n=a.icon,o=(t.status??"new")===s;return e.jsxs(h,{size:"sm",variant:o?"default":"outline",onClick:()=>G(t.id,s),className:"gap-1.5",children:[e.jsx(n,{className:"w-3.5 h-3.5"}),a.label]},s)})})]})]})})]})]})})]}):e.jsxs("div",{className:"p-8 text-center text-muted-foreground",children:[e.jsx(L,{className:"w-10 h-10 mx-auto mb-3 opacity-40"}),"Kein Zugriff auf diesen Bereich."]})};export{ss 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.