/* acme-dashboard.jsx — Analyst dashboard for Acme Bank */
const RECENT_DECISIONS = [
{ name: 'Patricia L. Warren', product: 'Auto Loan', amount: '$28,500', decision: 'Approved', time: '11:42 AM' },
{ name: 'Kevin J. Mitchell', product: 'Personal', amount: '$12,000', decision: 'Declined', time: '11:15 AM' },
{ name: 'Angela M. Torres', product: 'HELOC', amount: '$60,000', decision: 'Approved', time: '10:58 AM' },
{ name: 'William H. Brooks', product: 'Mortgage', amount: '$340,000', decision: 'Committee', time: '10:31 AM' },
{ name: 'Diana K. Patel', product: 'Personal', amount: '$8,500', decision: 'Approved', time: '9:47 AM' },
];
const KpiCard = ({ label, value, sub, subColor, icon }) => (
{label}
{value}
{sub &&
{sub}
}
{icon}
);
/* Simple horizontal bar chart */
const MiniBar = ({ label, value, max, color }) => (
);
const AcmeDashboard = ({ onOpenApplication, model }) => {
const statusColors = {
'approved-conditions': { bg: '#FEF3C7', text: '#B45309', dot: '#F59E0B', label: 'Conditions' },
'review': { bg: '#DBEAFE', text: '#1D4ED8', dot: '#3B82F6', label: 'Review' },
'approved': { bg: '#D1FAE5', text: '#065F46', dot: '#10B981', label: 'Approved' },
'declined': { bg: '#FEE2E2', text: '#991B1B', dot: '#EF4444', label: 'Declined' },
};
const decisionColors = {
'Approved': { color: '#065F46', bg: '#D1FAE5' },
'Declined': { color: '#991B1B', bg: '#FEE2E2' },
'Committee': { color: '#1D4ED8', bg: '#DBEAFE' },
};
return (
{/* Greeting */}
Good morning, David
Wednesday, January 15, 2025 · Consumer Lending Division
{model.engine} — All systems operational
{/* KPI row */}
{/* Main grid */}
{/* Priority Queue */}
Priority Queue
Applications awaiting your review
View All
{/* Table header */}
Applicant
Product
Amount
Score
Status
{/* Rows */}
{APPLICANTS.map((app, i) => {
const sc = statusColors[app.decisionType];
return (
e.currentTarget.style.background = '#F9FAFB'}
onMouseLeave={(e) => e.currentTarget.style.background = 'transparent'}
onClick={() => onOpenApplication(i)}>
{app.productShort}
{app.amount}
= 740 ? ACME.success : app.score >= 670 ? ACME.primary : app.score >= 580 ? '#B45309' : ACME.danger, fontFamily: ACME.font }}>{app.score}
Review →
);
})}
{/* Right column */}
{/* Model Performance */}
Model Performance
{model.label} · 30-day metrics
{/* Recent Decisions */}
Recent Decisions
{RECENT_DECISIONS.map((d, i) => {
const dc = decisionColors[d.decision] || { color: ACME.muted, bg: ACME.bg };
return (
{d.name}
{d.product} · {d.amount}
);
})}
);
};
window.AcmeDashboard = AcmeDashboard;