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
276 lines
8.5 KiB
HTML
276 lines
8.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 — Economy</title>
|
|
<link rel="stylesheet" href="assets/admin.css">
|
|
<style>
|
|
.eco-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
margin-bottom: 24px;
|
|
}
|
|
.eco-icon {
|
|
width: 56px; height: 56px;
|
|
border-radius: 16px;
|
|
background: linear-gradient(135deg, #FF9500, #FFCC00);
|
|
display: flex; align-items: center; justify-content: center;
|
|
font-size: 28px;
|
|
}
|
|
.eco-title h1 { font-size: 24px; font-weight: 700; }
|
|
.eco-title p { color: var(--text-tertiary); }
|
|
|
|
.cash-banner {
|
|
background: linear-gradient(135deg, #007AFF, #5AC8FA);
|
|
color: white;
|
|
border-radius: var(--radius);
|
|
padding: 24px;
|
|
margin-bottom: 24px;
|
|
}
|
|
.cash-banner h3 { font-size: 15px; opacity: 0.9; margin-bottom: 8px; }
|
|
.cash-banner .amount { font-size: 36px; font-weight: 700; }
|
|
.cash-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 16px;
|
|
margin-top: 16px;
|
|
}
|
|
.cash-item {
|
|
text-align: center;
|
|
padding: 12px;
|
|
background: rgba(255,255,255,0.15);
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
.cash-value { font-size: 20px; font-weight: 700; }
|
|
.cash-label { font-size: 11px; opacity: 0.8; }
|
|
|
|
.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: 28px; font-weight: 700; }
|
|
|
|
.alert-box {
|
|
background: linear-gradient(135deg, #FF3B30, #FF6B6B);
|
|
color: white;
|
|
border-radius: var(--radius);
|
|
padding: 20px;
|
|
margin-bottom: 24px;
|
|
}
|
|
.alert-box h3 { font-size: 17px; margin-bottom: 8px; }
|
|
.alert-box p { font-size: 14px; opacity: 0.9; }
|
|
.alert-box .amount { font-size: 24px; font-weight: 700; margin-top: 8px; }
|
|
|
|
.vouchers-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 14px;
|
|
}
|
|
.vouchers-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);
|
|
}
|
|
.vouchers-table td {
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--separator);
|
|
}
|
|
</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 active" href="economy.html">
|
|
<span class="nav-icon">💰</span>
|
|
Economy
|
|
</a>
|
|
<a class="nav-item" 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">Economy</div>
|
|
</header>
|
|
|
|
<section class="page-content active">
|
|
<div class="eco-header">
|
|
<div class="eco-icon">💰</div>
|
|
<div class="eco-title">
|
|
<h1>Financial Operations</h1>
|
|
<p>Ledger, accounting & treasury</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="alert-box">
|
|
<h3>🚨 Critical Alert</h3>
|
|
<p>Momsdeklaration deadline: 26 July 2026</p>
|
|
<div class="amount">442 000 SEK</div>
|
|
<p style="margin-top:8px;font-size:13px">Leon kravbrev deadline: 13 July 2026 — 197 922 SEK</p>
|
|
</div>
|
|
|
|
<div class="cash-banner">
|
|
<h3>Cash Position</h3>
|
|
<div class="amount" id="total-cash">—</div>
|
|
<div class="cash-grid">
|
|
<div class="cash-item">
|
|
<div class="cash-value" id="cash-sek">—</div>
|
|
<div class="cash-label">SEK</div>
|
|
</div>
|
|
<div class="cash-item">
|
|
<div class="cash-value" id="cash-eur">—</div>
|
|
<div class="cash-label">EUR</div>
|
|
</div>
|
|
<div class="cash-item">
|
|
<div class="cash-value" id="cash-usd">—</div>
|
|
<div class="cash-label">USD</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="stats-grid">
|
|
<div class="stat-card">
|
|
<div class="stat-label">Total Vouchers</div>
|
|
<div class="stat-value" id="eco-vouchers">—</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-label">Accounts</div>
|
|
<div class="stat-value" id="eco-accounts">—</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-label">Pending Invoices</div>
|
|
<div class="stat-value" id="eco-pending">—</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-label">Trial Balance</div>
|
|
<div class="stat-value" id="eco-balance">—</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="section-header">
|
|
<span class="section-title">Recent Vouchers</span>
|
|
</div>
|
|
<table class="vouchers-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Date</th>
|
|
<th>Voucher #</th>
|
|
<th>Description</th>
|
|
<th>Amount</th>
|
|
<th>Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="vouchers-tbody">
|
|
<tr><td colspan="5" style="text-align:center;padding:40px;color:var(--text-tertiary)">Connect to ledger to view vouchers</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<script src="assets/api.js"></script>
|
|
<script>
|
|
'use strict';
|
|
|
|
const api = createAdminAPI(window.location.origin);
|
|
|
|
function formatCurrency(amount, currency = 'SEK') {
|
|
if (!amount) return '—';
|
|
return new Intl.NumberFormat('sv-SE', {
|
|
style: 'currency', currency, maximumFractionDigits: 0
|
|
}).format(amount);
|
|
}
|
|
|
|
async function loadEconomy() {
|
|
try {
|
|
const data = await api._get('/api/v1/unified-dashboard');
|
|
const eco = data.economy || {};
|
|
|
|
document.getElementById('eco-vouchers').textContent = eco.total_vouchers?.toLocaleString() || '—';
|
|
document.getElementById('eco-accounts').textContent = eco.total_accounts?.toLocaleString() || '—';
|
|
document.getElementById('eco-pending').textContent = eco.pending_invoices?.toLocaleString() || '—';
|
|
document.getElementById('eco-balance').textContent = formatCurrency(eco.trial_balance);
|
|
|
|
document.getElementById('cash-sek').textContent = formatCurrency(eco.cash_sek);
|
|
document.getElementById('cash-eur').textContent = formatCurrency(eco.cash_eur, 'EUR');
|
|
document.getElementById('cash-usd').textContent = formatCurrency(eco.cash_usd, 'USD');
|
|
|
|
const total = (eco.cash_sek || 0) + (eco.cash_eur || 0) * 11.5 + (eco.cash_usd || 0) * 10.5;
|
|
document.getElementById('total-cash').textContent = formatCurrency(total);
|
|
} catch (err) {
|
|
console.error('Economy load error:', err);
|
|
}
|
|
}
|
|
|
|
loadEconomy();
|
|
</script>
|
|
</body>
|
|
</html>
|