diff --git a/src/pages/LeadsPage.jsx b/src/pages/LeadsPage.jsx index 64b0c83..fdfd682 100644 --- a/src/pages/LeadsPage.jsx +++ b/src/pages/LeadsPage.jsx @@ -119,7 +119,7 @@ function CycleBar() { } export default function LeadsPage() { - const { leads, pipelines, loading, error, updateLead } = useLeads() + const { leads, pipelines, loading, error } = useLeads() const [search, setSearch] = useState('') const [status, setStatus] = useState('all') const [showSettings, setShowSettings] = useState(false) @@ -150,7 +150,7 @@ export default function LeadsPage() { setShowSettings((s) => !s)}> Sucheinstellungen @@ -211,7 +211,7 @@ export default function LeadsPage() { }} > {filtered.map((lead) => ( - + ))} )} @@ -338,24 +338,13 @@ function EmailDraft({ pipeline }) { ) } -function LeadCard({ lead, pipeline, onUpdate }) { +/** Reine Info-Anzeige — Status/Notizen werden NICHT hier gepflegt, + * sondern im Akquise-Ticket des Leads (WOID-Chip). */ +function LeadCard({ lead, pipeline }) { const [open, setOpen] = useState(false) - const [notiz, setNotiz] = useState(lead.notiz || '') - const [busy, setBusy] = useState(false) const meta = statusMeta(lead.crmStatus || 'neu') const score = lead.leadScore || 0 - const setStatus = async (e) => { - setBusy(true) - await onUpdate(lead.$id, { crmStatus: e.target.value }) - setBusy(false) - } - - const saveNotiz = async () => { - if (notiz === (lead.notiz || '')) return - await onUpdate(lead.$id, { notiz }) - } - const websiteUrl = /^https?:\/\//.test(lead.website || '') ? lead.website : null return ( @@ -446,18 +435,7 @@ function LeadCard({ lead, pipeline, onUpdate }) { {lead.woid} )} - - {STATUS_OPTIONS.map((s) => ( - {s.label} - ))} - - setOpen((o) => !o)} title={open ? 'Weniger' : 'Details'}> + setOpen((o) => !o)} title={open ? 'Weniger' : 'Details'} style={{ marginLeft: 'auto' }}> {open ? : } @@ -482,16 +460,7 @@ function LeadCard({ lead, pipeline, onUpdate }) { )} - - setNotiz(e.target.value)} - onBlur={saveNotiz} - placeholder="Interne Notiz zum Lead..." - /> - + {lead.notiz && Notiz (Alt-Bestand): {lead.notiz}} Aufgenommen: {lead.addedAt ? new Date(lead.addedAt).toLocaleDateString('de-DE') : '-'} {lead.leadId ? ` · ${lead.leadId}` : ''}