LINUS ROUND 1: Delete dead code (rust/c), generic Store[T], tests, slim main.go

- Removed rust-service/, c-runtime/, kafka stubs
- Generic Store[T] pattern with real tests
- Slimmed main.go from 324 to ~50 lines
- Added config, middleware, store, ledger, pdf tests
- Frontend SPA shell with router
- Binary: 15.5MB -> 12MB
This commit is contained in:
Bernt (LandveX AI)
2026-07-14 12:31:55 +00:00
parent 95b581e8c5
commit c2b10347b1
1100 changed files with 1544 additions and 7058 deletions
+41
View File
@@ -0,0 +1,41 @@
// CRM module
export async function render(container) {
container.innerHTML = `
<header class="module-header">
<h1>CRM</h1>
<p class="subtitle">Kunder och leads</p>
</header>
<div class="toolbar">
<button class="btn-primary" id="btn-new-customer">+ Ny kund</button>
</div>
<div class="table-container">
<table class="data-table" id="customers-table">
<thead>
<tr><th>Namn</th><th>Företag</th><th>Status</th><th>Email</th></tr>
</thead>
<tbody></tbody>
</table>
</div>
`;
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 => `
<tr>
<td>${c.name}</td>
<td>${c.company || '-'}</td>
<td><span class="badge badge-${c.status}">${c.status}</span></td>
<td>${c.email || '-'}</td>
</tr>
`).join('');
} else {
tbody.innerHTML = '<tr><td colspan="4">Inga kunder hittades</td></tr>';
}
} catch (err) {
container.innerHTML += `<div class="alert alert-error">Kunde inte ladda kunder: ${err.message}</div>`;
}
}