// CRM module export async function render(container) { container.innerHTML = `

CRM

Kunder och leads

NamnFöretagStatusEmail
`; try { const res = await apiRequest('/crm/customers'); const data = await res.json(); const tbody = container.querySelector('#customers-table tbody'); if (data.customers?.length) { tbody.innerHTML = data.customers.map(c => ` ${c.name} ${c.company || '-'} ${c.status} ${c.email || '-'} `).join(''); } else { tbody.innerHTML = 'Inga kunder hittades'; } } catch (err) { container.innerHTML += `
Kunde inte ladda kunder: ${err.message}
`; } }