fix: stat cards show full dollar amounts under $100k, k-suffix only at $100k+
This commit is contained in:
@@ -518,7 +518,7 @@ export default function Invoices() {
|
|||||||
const yp = chartData.reduce((s, m) => s + m.Profit, 0);
|
const yp = chartData.reduce((s, m) => s + m.Profit, 0);
|
||||||
const ye = chartData.reduce((s, m) => s + m.Expenses, 0);
|
const ye = chartData.reduce((s, m) => s + m.Expenses, 0);
|
||||||
const yo = chartData.reduce((s, m) => s + m.Outstanding, 0);
|
const yo = chartData.reduce((s, m) => s + m.Outstanding, 0);
|
||||||
const fmt = v => v >= 1000 ? `$${(v/1000).toFixed(1)}k` : `$${v.toFixed(0)}`;
|
const fmt = v => v >= 100000 ? `$${(v/1000).toFixed(0)}k` : `$${v.toFixed(2)}`;
|
||||||
const CARD = { background: 'var(--card-bg)', border: '1px solid var(--border)', borderRadius: 8, padding: '18px 21px', backdropFilter: 'blur(12px)', WebkitBackdropFilter: 'blur(12px)' };
|
const CARD = { background: 'var(--card-bg)', border: '1px solid var(--border)', borderRadius: 8, padding: '18px 21px', backdropFilter: 'blur(12px)', WebkitBackdropFilter: 'blur(12px)' };
|
||||||
const StatCard = ({ label, value, sub, iconBg, iconColor, iconSvg }) => (
|
const StatCard = ({ label, value, sub, iconBg, iconColor, iconSvg }) => (
|
||||||
<div style={{ ...CARD, display: 'flex', alignItems: 'stretch', gap: 21, minHeight: 120 }}>
|
<div style={{ ...CARD, display: 'flex', alignItems: 'stretch', gap: 21, minHeight: 120 }}>
|
||||||
|
|||||||
Reference in New Issue
Block a user