diff --git a/web/dashboard.js b/web/dashboard.js index a3ebe7a..87dd78b 100644 --- a/web/dashboard.js +++ b/web/dashboard.js @@ -30,7 +30,7 @@ let html = `
${esc(title)}
${window.MT.CLP(txns.reduce((a, t) => a + t.amount, 0))}
${txns.length} transactions
`; - for (const t of top) html += `
${t.date.slice(5).replace('-', '/')}${esc(window.MT.cleanDesc(t.description) || t.counterparty || '—')}${window.MT.CLP(t.amount)}
`; + for (const t of top) html += `
${t.date.slice(5).replace('-', '/')}${esc(t.description || t.counterparty || '—')}${window.MT.CLP(t.amount)}
`; html += '
'; if (txns.length > 6) html += `
+${txns.length - 6} more
`; tip.innerHTML = html; tip.classList.add('show'); place(e); @@ -133,7 +133,7 @@ const months = window.MT.months; const spendByM = {}; months.forEach(m => spendByM[m] = sum(spend.filter(t => t.ym === m))); // top merchants - const byMerch = groupSum(tx.filter(isExpense), t => window.MT.cleanDesc(t.description) || 'Unknown'); + const byMerch = groupSum(tx.filter(isExpense), t => t.description || 'Unknown'); const merch = sortEntries(byMerch).slice(0, 10); const biggestCat = cats[0]; @@ -172,7 +172,7 @@ host.innerHTML = ''; cats.forEach(([catName, catData], i) => { const color = catColor(i); - const byDesc = groupSum(catData.txns, t => MT.cleanDesc(t.description) || t.description || '—'); + const byDesc = groupSum(catData.txns, t => t.description || '—'); const descs = sortEntries(byDesc); const pct = Math.round(catData.value / total * 100); const section = document.createElement('div'); diff --git a/web/dashboard2.js b/web/dashboard2.js index dcbe280..b945d48 100644 --- a/web/dashboard2.js +++ b/web/dashboard2.js @@ -285,7 +285,7 @@ const shown = rows.slice(0, st.limit); $('#lx-rows').innerHTML = shown.map(t => ` ${t.date} - ${esc(MT.cleanDesc(t.description) || t.counterparty || '—')} + ${esc(t.description || t.counterparty || '—')} ${esc(t.bank)} ${MT.acctShort(t.doc_type)}${t.last4 ? ' ··' + t.last4 : ''} ${FLOW_LABEL[t.flow_type] || t.flow_type} ${t.direction === 'credit' ? '+' : '−'}${CLP(t.amount)}`).join('');