fix(notas): buscar por leadId O nombre del cliente
- Las notas se buscan por leadId O por nombre del cliente - Al convertir lead→oportunidad, las notas siguen visibles - Funciona en todas las etapas: lead, oportunidad, apartado, escrituración
This commit is contained in:
@@ -40,7 +40,7 @@ export default function DetalleLeadModal({ item, onCerrar }: { item: LeadItem; o
|
||||
setCargandoNotas(true)
|
||||
try {
|
||||
const todas = await listarRecordatorios()
|
||||
setNotas(todas.filter((r) => r.leadId === item.id))
|
||||
setNotas(todas.filter((r) => r.leadId === item.id || r.titulo?.toLowerCase().includes(item.nombre.toLowerCase()) || r.descripcion?.toLowerCase().includes(item.nombre.toLowerCase())))
|
||||
} catch { setNotaError('Error al cargar notas.') }
|
||||
finally { setCargandoNotas(false) }
|
||||
}, [item.id])
|
||||
|
||||
Reference in New Issue
Block a user