6de2455917
- Added GLOBAL_MARKETS_TITLE to all translation files - Updated footer with 12 markets (4 active + 8 upcoming) - Translated market section to: zh-cn, zh-tw, ja, ko, th, vi, id, ms, hi - Built and deployed to production - CloudFront invalidation: I3RTMXVFDJXWLG3SYX208OP1CC
309 lines
9.5 KiB
HTML
309 lines
9.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="sv" data-theme="light">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>AAMOS Admin — CRM</title>
|
|
<link rel="stylesheet" href="assets/admin.css">
|
|
<style>
|
|
.crm-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
margin-bottom: 24px;
|
|
}
|
|
.crm-icon {
|
|
width: 56px; height: 56px;
|
|
border-radius: 16px;
|
|
background: linear-gradient(135deg, #32ADE6, #64D2FF);
|
|
display: flex; align-items: center; justify-content: center;
|
|
font-size: 28px;
|
|
}
|
|
.crm-title h1 { font-size: 24px; font-weight: 700; }
|
|
.crm-title p { color: var(--text-tertiary); }
|
|
|
|
.stats-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 16px;
|
|
margin-bottom: 24px;
|
|
}
|
|
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
|
|
|
|
.stat-card {
|
|
background: var(--bg-card);
|
|
border-radius: var(--radius);
|
|
padding: 20px;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
.stat-label { font-size: 13px; color: var(--text-tertiary); margin-bottom: 8px; }
|
|
.stat-value { font-size: 32px; font-weight: 700; }
|
|
.stat-change { font-size: 13px; margin-top: 4px; }
|
|
.stat-change.up { color: var(--success); }
|
|
|
|
.pipeline-card {
|
|
background: var(--bg-card);
|
|
border-radius: var(--radius);
|
|
padding: 24px;
|
|
box-shadow: var(--shadow);
|
|
margin-bottom: 24px;
|
|
}
|
|
.pipeline-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
.pipeline-stages {
|
|
display: flex;
|
|
gap: 12px;
|
|
}
|
|
.pipeline-stage {
|
|
flex: 1;
|
|
background: var(--bg-input);
|
|
border-radius: var(--radius-sm);
|
|
padding: 16px;
|
|
text-align: center;
|
|
}
|
|
.stage-name { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
|
|
.stage-count { font-size: 24px; font-weight: 700; }
|
|
.stage-value { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }
|
|
|
|
.customers-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 14px;
|
|
}
|
|
.customers-table th {
|
|
text-align: left;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.4px;
|
|
color: var(--text-tertiary);
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--separator);
|
|
background: var(--bg-input);
|
|
}
|
|
.customers-table td {
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--separator);
|
|
}
|
|
.customer-cell {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
.customer-avatar {
|
|
width: 36px; height: 36px;
|
|
border-radius: 50%;
|
|
background: linear-gradient(135deg, var(--primary), var(--purple));
|
|
display: flex; align-items: center; justify-content: center;
|
|
color: white; font-weight: 700; font-size: 13px;
|
|
}
|
|
.customer-name { font-weight: 600; }
|
|
.customer-email { font-size: 12px; color: var(--text-tertiary); }
|
|
.status-badge {
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
padding: 3px 10px;
|
|
border-radius: 20px;
|
|
}
|
|
.status-active { background: rgba(52,199,89,0.12); color: var(--success); }
|
|
.status-lead { background: rgba(0,122,255,0.12); color: var(--primary); }
|
|
.status-churned { background: var(--bg-input); color: var(--text-tertiary); }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<aside class="sidebar">
|
|
<div class="sidebar-brand">
|
|
<div class="brand-icon">
|
|
<svg viewBox="0 0 24 24"><path d="M12 2L2 7v10l10 5 10-5V7L12 2zm0 2.18L20 8.5v7L12 19.82 4 15.5v-7l8-4.32z"/></svg>
|
|
</div>
|
|
<div class="brand-text">
|
|
<div class="brand-name">AAMOS Admin</div>
|
|
<div class="brand-sub">Unified v2.0</div>
|
|
</div>
|
|
</div>
|
|
|
|
<nav class="sidebar-nav">
|
|
<div class="nav-section-label">Overview</div>
|
|
<a class="nav-item" href="unified-dashboard.html">
|
|
<span class="nav-icon">📊</span>
|
|
Dashboard
|
|
</a>
|
|
<a class="nav-item" href="users.html">
|
|
<span class="nav-icon">👥</span>
|
|
Users
|
|
</a>
|
|
<a class="nav-item" href="modules.html">
|
|
<span class="nav-icon">🔧</span>
|
|
Modules
|
|
</a>
|
|
|
|
<div class="nav-section-label">Systems</div>
|
|
<a class="nav-item" href="quixzoom.html">
|
|
<span class="nav-icon">📸</span>
|
|
quiXzoom
|
|
</a>
|
|
<a class="nav-item" href="landvex.html">
|
|
<span class="nav-icon">🌍</span>
|
|
LandveX
|
|
</a>
|
|
<a class="nav-item" href="economy.html">
|
|
<span class="nav-icon">💰</span>
|
|
Economy
|
|
</a>
|
|
<a class="nav-item active" href="crm.html">
|
|
<span class="nav-icon">🤝</span>
|
|
CRM
|
|
</a>
|
|
|
|
<div class="nav-section-label">System</div>
|
|
<a class="nav-item" href="audit.html">
|
|
<span class="nav-icon">📋</span>
|
|
Audit Log
|
|
</a>
|
|
<a class="nav-item" href="settings.html">
|
|
<span class="nav-icon">⚙️</span>
|
|
Settings
|
|
</a>
|
|
</nav>
|
|
</aside>
|
|
|
|
<div class="main">
|
|
<header class="topbar">
|
|
<div class="topbar-title">CRM</div>
|
|
</header>
|
|
|
|
<section class="page-content active">
|
|
<div class="crm-header">
|
|
<div class="crm-icon">🤝</div>
|
|
<div class="crm-title">
|
|
<h1>Customer Relations</h1>
|
|
<p>Pipeline, customers & revenue</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="stats-grid">
|
|
<div class="stat-card">
|
|
<div class="stat-label">Total Customers</div>
|
|
<div class="stat-value" id="crm-customers">—</div>
|
|
<div class="stat-change up">↑ Active</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-label">Active Leads</div>
|
|
<div class="stat-value" id="crm-leads">—</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-label">Deals Won</div>
|
|
<div class="stat-value" id="crm-won">—</div>
|
|
<div class="stat-change up">↑ 100% win rate</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-label">Pipeline Value</div>
|
|
<div class="stat-value" id="crm-pipeline">—</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="pipeline-card">
|
|
<div class="pipeline-header">
|
|
<span class="section-title">Sales Pipeline</span>
|
|
<span style="color:var(--text-tertiary);font-size:14px">SEK</span>
|
|
</div>
|
|
<div class="pipeline-stages">
|
|
<div class="pipeline-stage">
|
|
<div class="stage-name">Lead</div>
|
|
<div class="stage-count" id="stage-lead">0</div>
|
|
<div class="stage-value">0 SEK</div>
|
|
</div>
|
|
<div class="pipeline-stage">
|
|
<div class="stage-name">Qualified</div>
|
|
<div class="stage-count" id="stage-qualified">0</div>
|
|
<div class="stage-value">0 SEK</div>
|
|
</div>
|
|
<div class="pipeline-stage">
|
|
<div class="stage-name">Proposal</div>
|
|
<div class="stage-count" id="stage-proposal">0</div>
|
|
<div class="stage-value">0 SEK</div>
|
|
</div>
|
|
<div class="pipeline-stage">
|
|
<div class="stage-name">Negotiation</div>
|
|
<div class="stage-count" id="stage-negotiation">0</div>
|
|
<div class="stage-value">0 SEK</div>
|
|
</div>
|
|
<div class="pipeline-stage">
|
|
<div class="stage-name">Closed</div>
|
|
<div class="stage-count" id="stage-closed">1</div>
|
|
<div class="stage-value">2.7M SEK/yr</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="section-header">
|
|
<span class="section-title">Customers</span>
|
|
</div>
|
|
<table class="customers-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Customer</th>
|
|
<th>Status</th>
|
|
<th>MRR</th>
|
|
<th>Since</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<div class="customer-cell">
|
|
<div class="customer-avatar">TB</div>
|
|
<div>
|
|
<div class="customer-name">Trygg Bil</div>
|
|
<div class="customer-email">Vehicle Safety Platform</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td><span class="status-badge status-active">Active</span></td>
|
|
<td>222 916 SEK</td>
|
|
<td>2026</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<script src="assets/api.js"></script>
|
|
<script>
|
|
'use strict';
|
|
|
|
const api = createAdminAPI(window.location.origin);
|
|
|
|
function formatCurrency(sek) {
|
|
if (!sek) return '—';
|
|
return new Intl.NumberFormat('sv-SE', {
|
|
style: 'currency', currency: 'SEK', maximumFractionDigits: 0
|
|
}).format(sek);
|
|
}
|
|
|
|
async function loadCRM() {
|
|
try {
|
|
const data = await api._get('/api/v1/unified-dashboard');
|
|
const crm = data.crm || {};
|
|
|
|
document.getElementById('crm-customers').textContent = crm.total_customers || '—';
|
|
document.getElementById('crm-leads').textContent = crm.active_leads || '—';
|
|
document.getElementById('crm-won').textContent = crm.deals_won || '—';
|
|
document.getElementById('crm-pipeline').textContent = formatCurrency(crm.pipeline_value_sek);
|
|
} catch (err) {
|
|
console.error('CRM load error:', err);
|
|
}
|
|
}
|
|
|
|
loadCRM();
|
|
</script>
|
|
</body>
|
|
</html>
|