{"id":193,"date":"2026-05-20T07:48:47","date_gmt":"2026-05-20T07:48:47","guid":{"rendered":"https:\/\/cashchat.se\/dir\/?page_id=193"},"modified":"2026-05-20T07:48:47","modified_gmt":"2026-05-20T07:48:47","slug":"live","status":"publish","type":"page","link":"https:\/\/cashchat.se\/dir\/live\/","title":{"rendered":"Live"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <title>Adase Ads \u2013 Investor Dashboard<\/title>\n  <!-- CDN for certificate generation -->\n  <script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/html2canvas\/1.4.1\/html2canvas.min.js\"><\/script>\n  <script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/jspdf\/2.5.1\/jspdf.umd.min.js\"><\/script>\n  <style>\n    * {\n      margin: 0;\n      padding: 0;\n      box-sizing: border-box;\n    }\n    :root {\n      --primary: #0a1f44;\n      --gold: #c49a2b;\n      --bg: #f4f6f9;\n      --card-bg: #fff;\n      --text: #1e293b;\n      --shadow: 0 10px 25px -5px rgba(0,0,0,0.05), 0 8px 10px -6px rgba(0,0,0,0.02);\n      --radius: 16px;\n      --transition: 0.2s ease;\n    }\n    body {\n      font-family: 'Inter', system-ui, -apple-system, sans-serif;\n      background: var(--bg);\n      color: var(--text);\n      display: flex;\n      min-height: 100vh;\n    }\n\n    \/* Sidebar *\/\n    .sidebar {\n      width: 260px;\n      background: var(--primary);\n      color: #fff;\n      padding: 24px 16px;\n      position: fixed;\n      top: 0;\n      left: 0;\n      bottom: 0;\n      z-index: 100;\n      transition: transform 0.3s ease;\n      display: flex;\n      flex-direction: column;\n    }\n    .sidebar .logo {\n      font-family: 'Playfair Display', serif;\n      font-size: 24px;\n      font-weight: 700;\n      text-align: center;\n      letter-spacing: 2px;\n      margin-bottom: 32px;\n    }\n    .sidebar .logo span { color: var(--gold); }\n    .sidebar nav a {\n      display: flex;\n      align-items: center;\n      gap: 10px;\n      color: rgba(255,255,255,0.8);\n      text-decoration: none;\n      padding: 12px 16px;\n      border-radius: 10px;\n      margin-bottom: 6px;\n      font-weight: 500;\n      transition: background 0.2s, color 0.2s;\n    }\n    .sidebar nav a:hover,\n    .sidebar nav a.active {\n      background: rgba(255,255,255,0.08);\n      color: var(--gold);\n    }\n    .sidebar .nav-icon { font-size: 18px; width: 24px; text-align: center; }\n\n    \/* Main content *\/\n    .main {\n      margin-left: 260px;\n      flex: 1;\n      padding: 28px 32px;\n      transition: margin-left 0.3s;\n    }\n\n    \/* Mobile header *\/\n    .mobile-header {\n      display: none;\n      align-items: center;\n      gap: 16px;\n      background: var(--primary);\n      color: #fff;\n      padding: 14px 20px;\n      position: sticky;\n      top: 0;\n      z-index: 99;\n    }\n    .mobile-header .menu-toggle {\n      background: none;\n      border: none;\n      color: #fff;\n      font-size: 24px;\n      cursor: pointer;\n    }\n\n    \/* Cards & sections *\/\n    .section {\n      background: var(--card-bg);\n      border-radius: var(--radius);\n      padding: 24px;\n      margin-bottom: 24px;\n      box-shadow: var(--shadow);\n      display: none;\n    }\n    .section.active { display: block; }\n    h2 {\n      font-family: 'Playfair Display', serif;\n      color: var(--primary);\n      font-size: 22px;\n      margin-bottom: 20px;\n      border-bottom: 2px solid var(--gold);\n      padding-bottom: 10px;\n      display: inline-block;\n    }\n    h3 { color: var(--primary); margin: 16px 0 10px; }\n\n    .wallet-balance {\n      font-size: 32px;\n      font-weight: 700;\n      color: var(--gold);\n    }\n    .btn {\n      display: inline-flex;\n      align-items: center;\n      gap: 6px;\n      background: var(--primary);\n      color: #fff;\n      border: none;\n      padding: 10px 20px;\n      border-radius: 30px;\n      font-weight: 600;\n      cursor: pointer;\n      transition: all 0.2s;\n      font-size: 14px;\n    }\n    .btn-gold { background: var(--gold); color: var(--primary); }\n    .btn-outline {\n      background: transparent;\n      border: 1.5px solid var(--primary);\n      color: var(--primary);\n    }\n    .btn:hover { opacity: 0.9; transform: translateY(-1px); }\n    .btn-danger { background: #dc3545; }\n\n    .form-group {\n      margin-bottom: 16px;\n    }\n    .form-group label {\n      display: block;\n      font-weight: 600;\n      margin-bottom: 6px;\n      color: var(--primary);\n    }\n    .form-control {\n      width: 100%;\n      padding: 10px 14px;\n      border: 1.5px solid #e2e8f0;\n      border-radius: 10px;\n      font-size: 15px;\n      transition: border 0.2s;\n    }\n    .form-control:focus {\n      border-color: var(--gold);\n      outline: none;\n    }\n    .row {\n      display: flex;\n      gap: 20px;\n      flex-wrap: wrap;\n    }\n    .col { flex: 1; min-width: 200px; }\n\n    table {\n      width: 100%;\n      border-collapse: collapse;\n      margin-top: 12px;\n    }\n    th, td {\n      padding: 12px 14px;\n      border-bottom: 1px solid #e2e8f0;\n      text-align: left;\n      font-size: 14px;\n    }\n    th { background: #f8fafc; color: var(--primary); font-weight: 600; }\n    .badge {\n      display: inline-block;\n      padding: 2px 10px;\n      border-radius: 12px;\n      font-size: 12px;\n      font-weight: 600;\n    }\n    .badge-success { background: #d4edda; color: #155724; }\n    .badge-warning { background: #fff3cd; color: #856404; }\n    .badge-danger { background: #f8d7da; color: #721c24; }\n    .notification {\n      background: #fff3cd;\n      border-left: 4px solid #ffc107;\n      padding: 12px;\n      border-radius: 8px;\n      margin-bottom: 12px;\n      display: flex;\n      justify-content: space-between;\n      align-items: center;\n    }\n\n    \/* Auth section *\/\n    .auth-container {\n      max-width: 400px;\n      margin: 80px auto;\n      background: var(--card-bg);\n      border-radius: var(--radius);\n      padding: 32px;\n      box-shadow: var(--shadow);\n    }\n\n    \/* Responsive *\/\n    @media (max-width: 768px) {\n      .sidebar {\n        transform: translateX(-100%);\n      }\n      .sidebar.open {\n        transform: translateX(0);\n      }\n      .main {\n        margin-left: 0;\n      }\n      .mobile-header {\n        display: flex;\n      }\n      .row { flex-direction: column; }\n    }\n  <\/style>\n<\/head>\n<body>\n  <!-- Sidebar -->\n  <aside class=\"sidebar\" id=\"sidebar\">\n    <div class=\"logo\">ADASE <span>ADS<\/span><\/div>\n    <nav>\n      <a href=\"#dashboard\" class=\"active\" data-section=\"dashboard\">\ud83d\udcca Dashboard<\/a>\n      <a href=\"#wallet\" data-section=\"wallet\">\ud83d\udcb0 Wallet<\/a>\n      <a href=\"#invest\" data-section=\"invest\">\ud83d\udcdc Buy Notes<\/a>\n      <a href=\"#history-invest\" data-section=\"history-invest\">\ud83c\udfe6 Investments<\/a>\n      <a href=\"#history-tx\" data-section=\"history-tx\">\ud83e\uddfe Transactions<\/a>\n      <a href=\"#\" id=\"logoutSidebar\">\ud83d\udeaa Logout<\/a>\n    <\/nav>\n  <\/aside>\n\n  <!-- Mobile header -->\n  <div class=\"mobile-header\">\n    <button class=\"menu-toggle\" id=\"menuToggle\">\u2630<\/button>\n    <span style=\"font-weight:600;\">Adase Dashboard<\/span>\n  <\/div>\n\n  <!-- Main content -->\n  <main class=\"main\" id=\"mainContent\">\n    <!-- Auth forms (shown when not logged in) -->\n    <div id=\"authSection\">\n      <div class=\"auth-container\">\n        <h2 style=\"text-align:center;\">Welcome<\/h2>\n        <div style=\"display:flex; gap:8px; justify-content:center; margin-bottom:20px;\">\n          <button class=\"btn\" onclick=\"showAuthTab('login')\">Login<\/button>\n          <button class=\"btn btn-outline\" onclick=\"showAuthTab('register')\">Register<\/button>\n        <\/div>\n        <div id=\"loginForm\">\n          <div class=\"form-group\">\n            <label>Email<\/label>\n            <input type=\"email\" class=\"form-control\" id=\"loginEmail\" placeholder=\"you@example.com\">\n          <\/div>\n          <div class=\"form-group\">\n            <label>Password<\/label>\n            <input type=\"password\" class=\"form-control\" id=\"loginPassword\" placeholder=\"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\">\n          <\/div>\n          <button class=\"btn btn-gold\" onclick=\"login()\" style=\"width:100%;\">Login<\/button>\n        <\/div>\n        <div id=\"registerForm\" style=\"display:none;\">\n          <div class=\"form-group\">\n            <label>Full Name<\/label>\n            <input type=\"text\" class=\"form-control\" id=\"regName\" placeholder=\"John Doe\">\n          <\/div>\n          <div class=\"form-group\">\n            <label>Email<\/label>\n            <input type=\"email\" class=\"form-control\" id=\"regEmail\" placeholder=\"you@example.com\">\n          <\/div>\n          <div class=\"form-group\">\n            <label>Password<\/label>\n            <input type=\"password\" class=\"form-control\" id=\"regPassword\" placeholder=\"Min. 6 characters\">\n          <\/div>\n          <button class=\"btn btn-gold\" onclick=\"register()\" style=\"width:100%;\">Register<\/button>\n        <\/div>\n      <\/div>\n    <\/div>\n\n    <!-- Dashboard sections (hidden until logged in) -->\n    <div id=\"dashboardSections\" style=\"display:none;\">\n      <!-- Dashboard overview -->\n      <section class=\"section active\" id=\"section-dashboard\">\n        <h2>Dashboard<\/h2>\n        <div class=\"row\">\n          <div class=\"col\">\n            <p style=\"color:#666;\">Wallet Balance<\/p>\n            <div class=\"wallet-balance\" id=\"balanceDisplay\">0 UGX<\/div>\n          <\/div>\n          <div class=\"col\" style=\"text-align:right;\">\n            <span id=\"userNameDisplay\"><\/span>\n          <\/div>\n        <\/div>\n        <div style=\"margin-top:20px;\">\n          <button class=\"btn btn-gold\" onclick=\"switchSection('wallet')\">\ud83d\udcb5 Add Money<\/button>\n          <button class=\"btn\" onclick=\"switchSection('invest')\">\ud83d\udcdc Buy Notes<\/button>\n        <\/div>\n        <!-- Quick notification list -->\n        <h3 style=\"margin-top:24px;\">\ud83d\udd14 Notifications<\/h3>\n        <div id=\"notificationsPreview\"><\/div>\n      <\/section>\n\n      <!-- Wallet actions -->\n      <section class=\"section\" id=\"section-wallet\">\n        <h2>Wallet<\/h2>\n        <div class=\"row\">\n          <div class=\"col\">\n            <h3>Add Money (Top\u2011up)<\/h3>\n            <div class=\"form-group\">\n              <label>Amount (UGX)<\/label>\n              <input type=\"number\" class=\"form-control\" id=\"topupAmount\" placeholder=\"e.g., 500000\">\n            <\/div>\n            <button class=\"btn btn-gold\" onclick=\"submitTopup()\">Request Top\u2011up<\/button>\n          <\/div>\n          <div class=\"col\">\n            <h3>Withdraw<\/h3>\n            <div class=\"form-group\">\n              <label>Amount (UGX)<\/label>\n              <input type=\"number\" class=\"form-control\" id=\"withdrawAmount\" placeholder=\"e.g., 200000\">\n            <\/div>\n            <button class=\"btn btn-outline\" onclick=\"submitWithdraw()\">Request Withdrawal<\/button>\n          <\/div>\n        <\/div>\n        <div style=\"margin-top:30px;\">\n          <h3>Transfer to Another User<\/h3>\n          <div class=\"row\">\n            <div class=\"col\">\n              <div class=\"form-group\">\n                <label>Recipient Email<\/label>\n                <input type=\"email\" class=\"form-control\" id=\"transferEmail\" placeholder=\"user@example.com\">\n              <\/div>\n            <\/div>\n            <div class=\"col\">\n              <div class=\"form-group\">\n                <label>Amount (UGX)<\/label>\n                <input type=\"number\" class=\"form-control\" id=\"transferAmount\" placeholder=\"e.g., 100000\">\n              <\/div>\n            <\/div>\n          <\/div>\n          <button class=\"btn\" onclick=\"submitTransfer()\">Request Transfer<\/button>\n        <\/div>\n      <\/section>\n\n      <!-- Invest -->\n      <section class=\"section\" id=\"section-invest\">\n        <h2>Buy Convertible Notes<\/h2>\n        <p style=\"color:#666; margin-bottom:20px;\">Minimum 100,000 UGX. Amount will be deducted from your wallet when you download the certificate.<\/p>\n        <div class=\"row\">\n          <div class=\"col\">\n            <div class=\"form-group\">\n              <label>Investment Amount (UGX)<\/label>\n              <input type=\"number\" class=\"form-control\" id=\"investAmount\" min=\"100000\" placeholder=\"e.g., 1000000\">\n            <\/div>\n          <\/div>\n          <div class=\"col\" style=\"display:flex; align-items:flex-end;\">\n            <button class=\"btn btn-gold\" onclick=\"buyAndDownload()\" style=\"width:100%;\">Buy &#038; Download Certificate<\/button>\n          <\/div>\n        <\/div>\n        <p id=\"investMsg\" style=\"margin-top:12px;\"><\/p>\n      <\/section>\n\n      <!-- Investment History -->\n      <section class=\"section\" id=\"section-history-invest\">\n        <h2>Investment History<\/h2>\n        <table>\n          <thead><tr><th>Certificate No<\/th><th>Principal<\/th><th>Date<\/th><th>Download<\/th><\/tr><\/thead>\n          <tbody id=\"investHistoryBody\"><tr><td colspan=\"4\">Loading&#8230;<\/td><\/tr><\/tbody>\n        <\/table>\n      <\/section>\n\n      <!-- Transaction History -->\n      <section class=\"section\" id=\"section-history-tx\">\n        <h2>Wallet Transactions<\/h2>\n        <table>\n          <thead><tr><th>Type<\/th><th>Amount<\/th><th>Status<\/th><th>Date<\/th><th>Note<\/th><\/tr><\/thead>\n          <tbody id=\"txHistoryBody\"><tr><td colspan=\"5\">Loading&#8230;<\/td><\/tr><\/tbody>\n        <\/table>\n      <\/section>\n    <\/div>\n  <\/main>\n\n  <script>\n    \/\/ ==================== CONFIGURATION ====================\n    const API_BASE = 'http:\/\/localhost:3000\/api';  \/\/ \u2190 Change this to your live backend URL\n\n    \/\/ ==================== STATE ====================\n    let token = localStorage.getItem('token');\n    let currentUser = null;\n\n    \/\/ ==================== UI HELPERS ====================\n    function $(sel) { return document.querySelector(sel); }\n    function $$(sel) { return document.querySelectorAll(sel); }\n\n    function switchSection(sectionName) {\n      $$('.section').forEach(s => s.classList.remove('active'));\n      $(`#section-${sectionName}`).classList.add('active');\n      \/\/ update sidebar active\n      $$('.sidebar nav a').forEach(a => a.classList.remove('active'));\n      const link = document.querySelector(`.sidebar nav a[data-section=\"${sectionName}\"]`);\n      if (link) link.classList.add('active');\n      \/\/ On mobile close sidebar\n      document.getElementById('sidebar').classList.remove('open');\n      \/\/ Load data if needed\n      if (sectionName === 'history-invest') fetchInvestments();\n      if (sectionName === 'history-tx') fetchTransactions();\n    }\n\n    function showAuthTab(tab) {\n      $('#loginForm').style.display = tab === 'login' ? 'block' : 'none';\n      $('#registerForm').style.display = tab === 'register' ? 'block' : 'none';\n    }\n\n    \/\/ ==================== API CALLS ====================\n    async function apiCall(url, method = 'GET', body = null) {\n      const headers = { 'Content-Type': 'application\/json' };\n      if (token) headers['x-auth-token'] = token;\n      const options = { method, headers };\n      if (body) options.body = JSON.stringify(body);\n      const res = await fetch(API_BASE + url, options);\n      const data = await res.json();\n      if (!res.ok) throw new Error(data.msg || 'Request failed');\n      return data;\n    }\n\n    \/\/ ==================== AUTH ====================\n    async function login() {\n      const email = $('#loginEmail').value.trim();\n      const password = $('#loginPassword').value;\n      try {\n        const data = await apiCall('\/users\/login', 'POST', { email, password });\n        token = data.token;\n        localStorage.setItem('token', token);\n        currentUser = data.user;\n        showDashboard();\n      } catch (e) { alert(e.message); }\n    }\n\n    async function register() {\n      const name = $('#regName').value.trim();\n      const email = $('#regEmail').value.trim();\n      const password = $('#regPassword').value;\n      try {\n        const data = await apiCall('\/users\/register', 'POST', { name, email, password });\n        token = data.token;\n        localStorage.setItem('token', token);\n        currentUser = data.user;\n        showDashboard();\n      } catch (e) { alert(e.message); }\n    }\n\n    function showDashboard() {\n      $('#authSection').style.display = 'none';\n      $('#dashboardSections').style.display = 'block';\n      $('#userNameDisplay').textContent = currentUser.name;\n      updateBalance(currentUser.walletBalance);\n      fetchNotifications();\n      fetchInvestments();\n      fetchTransactions();\n      switchSection('dashboard');\n    }\n\n    function logout() {\n      localStorage.removeItem('token');\n      token = null;\n      currentUser = null;\n      $('#authSection').style.display = 'block';\n      $('#dashboardSections').style.display = 'none';\n    }\n\n    \/\/ ==================== DATA FETCH ====================\n    async function refreshUser() {\n      const data = await apiCall('\/users\/me');\n      currentUser = data;\n      updateBalance(data.walletBalance);\n    }\n\n    function updateBalance(bal) {\n      $('#balanceDisplay').textContent = bal.toLocaleString() + ' UGX';\n    }\n\n    async function fetchNotifications() {\n      try {\n        const notifs = await apiCall('\/notifications');\n        const container = $('#notificationsPreview');\n        if (notifs.length === 0) {\n          container.innerHTML = '<p>No new notifications<\/p>';\n          return;\n        }\n        container.innerHTML = notifs.map(n => `\n          <div class=\"notification\">\n            <span>${n.message} <small>(${new Date(n.createdAt).toLocaleString()})<\/small><\/span>\n            <button class=\"btn\" style=\"padding:4px 10px; font-size:12px;\" onclick=\"dismissNotif('${n._id}')\">Dismiss<\/button>\n          <\/div>\n        `).join('');\n      } catch (e) { \/* ignore *\/ }\n    }\n\n    async function dismissNotif(id) {\n      await apiCall('\/notifications\/read\/' + id, 'POST');\n      fetchNotifications();\n    }\n\n    async function fetchInvestments() {\n      try {\n        const invs = await apiCall('\/investments');\n        const tbody = $('#investHistoryBody');\n        tbody.innerHTML = invs.map(i => `\n          <tr>\n            <td>${i.certificateNumber}<\/td>\n            <td>${i.principal.toLocaleString()} UGX<\/td>\n            <td>${new Date(i.issuedAt).toLocaleDateString()}<\/td>\n            <td><button class=\"btn\" onclick=\"downloadExistingCert('${i.certificateNumber}', ${i.principal})\">Download<\/button><\/td>\n          <\/tr>\n        `).join('') || '<tr><td colspan=\"4\">No investments yet.<\/td><\/tr>';\n      } catch (e) { $('#investHistoryBody').innerHTML = '<tr><td colspan=\"4\">Error loading<\/td><\/tr>'; }\n    }\n\n    async function fetchTransactions() {\n      try {\n        const txns = await apiCall('\/transactions');\n        const tbody = $('#txHistoryBody');\n        tbody.innerHTML = txns.map(t => `\n          <tr>\n            <td>${t.type}<\/td>\n            <td>${t.amount.toLocaleString()} UGX<\/td>\n            <td><span class=\"badge ${t.status === 'approved' ? 'badge-success' : t.status === 'pending' ? 'badge-warning' : 'badge-danger'}\">${t.status}<\/span><\/td>\n            <td>${new Date(t.createdAt).toLocaleString()}<\/td>\n            <td>${t.description || ''}<\/td>\n          <\/tr>\n        `).join('') || '<tr><td colspan=\"5\">No transactions<\/td><\/tr>';\n      } catch (e) { $('#txHistoryBody').innerHTML = '<tr><td colspan=\"5\">Error loading<\/td><\/tr>'; }\n    }\n\n    \/\/ ==================== WALLET ACTIONS ====================\n    async function submitTopup() {\n      const amount = parseFloat($('#topupAmount').value);\n      if (!amount || amount <= 0) return alert('Enter a valid amount');\n      try {\n        await apiCall('\/wallet\/topup', 'POST', { amount });\n        alert('Top-up request submitted. Admin will review.');\n        $('#topupAmount').value = '';\n      } catch (e) { alert(e.message); }\n    }\n\n    async function submitWithdraw() {\n      const amount = parseFloat($('#withdrawAmount').value);\n      if (!amount || amount <= 0) return alert('Enter a valid amount');\n      try {\n        await apiCall('\/wallet\/withdraw', 'POST', { amount });\n        alert('Withdrawal request submitted.');\n        $('#withdrawAmount').value = '';\n      } catch (e) { alert(e.message); }\n    }\n\n    async function submitTransfer() {\n      const toEmail = $('#transferEmail').value.trim();\n      const amount = parseFloat($('#transferAmount').value);\n      if (!toEmail || !amount || amount <= 0) return alert('Enter valid email and amount');\n      try {\n        const res = await apiCall('\/wallet\/transfer', 'POST', { toEmail, amount });\n        alert(res.msg);\n        $('#transferEmail').value = '';\n        $('#transferAmount').value = '';\n      } catch (e) { alert(e.message); }\n    }\n\n    \/\/ ==================== INVEST &#038; CERTIFICATE ====================\n    async function buyAndDownload() {\n      const principal = parseFloat($('#investAmount').value);\n      if (principal < 100000) return alert('Minimum investment is 100,000 UGX');\n      try {\n        const data = await apiCall('\/invest', 'POST', { principal });\n        alert(`Investment successful! Certificate: ${data.certificateNumber}`);\n        await refreshUser();\n        fetchInvestments();\n        fetchTransactions();\n        generateCertificate(data.certificateNumber, principal, currentUser.name);\n        $('#investAmount').value = '';\n      } catch (e) { alert(e.message); }\n    }\n\n    function downloadExistingCert(certNumber, amount) {\n      generateCertificate(certNumber, amount, currentUser.name);\n    }\n\n    async function generateCertificate(certNumber, amount, name) {\n      const issueDate = new Date().toISOString().split('T')[0];\n      const maturity = new Date(new Date().setFullYear(new Date().getFullYear() + 3)).toISOString().split('T')[0];\n      const wrapper = document.createElement('div');\n      wrapper.style.position = 'absolute';\n      wrapper.style.left = '-9999px';\n      wrapper.innerHTML = `\n        <div style=\"width:800px; padding:40px; background:#fefdf8; border:6px double #0a1f44; font-family: Inter, sans-serif; color:#222;\">\n          <div style=\"text-align:center; font-size:28px; font-weight:700; color:#0a1f44;\">ADASE ADS LTD<\/div>\n          <div style=\"text-align:center; font-size:20px; color:#c49a2b; margin:8px 0 20px;\">Convertible Note Certificate<\/div>\n          <p style=\"font-size:16px;\">This certifies that <strong>${name}<\/strong> has invested <strong>UGX ${amount.toLocaleString()}<\/strong> on <strong>${issueDate}<\/strong>.<\/p>\n          <table style=\"width:100%; margin:20px 0; font-size:14px; border-collapse:collapse;\">\n            <tr><td style=\"padding:8px 0; border-bottom:1px dotted #ccc;\">Certificate No<\/td><td style=\"font-weight:bold;\">${certNumber}<\/td><\/tr>\n            <tr><td style=\"padding:8px 0; border-bottom:1px dotted #ccc;\">Interest Rate<\/td><td>17% p.a.<\/td><\/tr>\n            <tr><td style=\"padding:8px 0; border-bottom:1px dotted #ccc;\">Maturity<\/td><td>${maturity}<\/td><\/tr>\n            <tr><td style=\"padding:8px 0; border-bottom:1px dotted #ccc;\">Conversion Discount<\/td><td>20%<\/td><\/tr>\n          <\/table>\n          <p style=\"margin-top:32px; font-style:italic;\">Authorized Signatory<\/p>\n        <\/div>\n      `;\n      document.body.appendChild(wrapper);\n      const canvas = await html2canvas(wrapper.firstChild, { scale: 2 });\n      document.body.removeChild(wrapper);\n      const link = document.createElement('a');\n      link.download = `Adase_Note_${certNumber}.png`;\n      link.href = canvas.toDataURL();\n      link.click();\n    }\n\n    \/\/ ==================== INITIALIZATION ====================\n    \/\/ Sidebar navigation\n    document.querySelectorAll('.sidebar nav a[data-section]').forEach(a => {\n      a.addEventListener('click', (e) => {\n        e.preventDefault();\n        switchSection(a.dataset.section);\n      });\n    });\n    $('#logoutSidebar').addEventListener('click', (e) => {\n      e.preventDefault();\n      logout();\n    });\n\n    \/\/ Mobile menu toggle\n    $('#menuToggle').addEventListener('click', () => {\n      document.getElementById('sidebar').classList.toggle('open');\n    });\n\n    \/\/ Auto-login if token exists\n    if (token) {\n      (async () => {\n        try {\n          const data = await apiCall('\/users\/me');\n          currentUser = data;\n          showDashboard();\n        } catch (e) {\n          logout();\n        }\n      })();\n    }\n  <\/script>\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>Adase Ads \u2013 Investor Dashboard ADASE ADS \ud83d\udcca Dashboard \ud83d\udcb0 Wallet \ud83d\udcdc Buy Notes \ud83c\udfe6 Investments \ud83e\uddfe Transactions \ud83d\udeaa Logout \u2630 Adase Dashboard Welcome Login Register Email Password Login Full Name Email Password Register Dashboard Wallet Balance 0 UGX \ud83d\udcb5 Add Money \ud83d\udcdc Buy Notes \ud83d\udd14 Notifications Wallet Add Money (Top\u2011up) Amount (UGX) Request Top\u2011up [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"class_list":["post-193","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/cashchat.se\/dir\/wp-json\/wp\/v2\/pages\/193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cashchat.se\/dir\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cashchat.se\/dir\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cashchat.se\/dir\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cashchat.se\/dir\/wp-json\/wp\/v2\/comments?post=193"}],"version-history":[{"count":1,"href":"https:\/\/cashchat.se\/dir\/wp-json\/wp\/v2\/pages\/193\/revisions"}],"predecessor-version":[{"id":194,"href":"https:\/\/cashchat.se\/dir\/wp-json\/wp\/v2\/pages\/193\/revisions\/194"}],"wp:attachment":[{"href":"https:\/\/cashchat.se\/dir\/wp-json\/wp\/v2\/media?parent=193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}