// ============================================ // Dashboard — Stats & Quick Actions Component // ============================================ const Dashboard = { init() { this.renderStats(); this.renderQuickActions(); this.renderSystemStatus(); }, renderStats() { const container = Helpers.$('#dashboard-stats'); if (!container) return; const images = MockData.images; const goodCount = images.filter(i => i.isGood).length; const badCount = images.filter(i => !i.isGood).length; const unsortedCount = images.filter(i => i.isGood === null).length; container.innerHTML = `
${images.length} Total Images
${goodCount} Good Parts
${badCount} Defects
${unsortedCount} Unsorted
`; }, renderQuickActions() { const container = Helpers.$('#quick-actions'); if (!container) return; container.innerHTML = MockData.quickActions.map(action => `
${action.label}
`).join(''); }, renderSystemStatus() { const container = Helpers.$('#system-status'); if (!container) return; container.innerHTML = MockData.systemServices.map(service => `
${service.name} ${Helpers.getStatusBadge(service.status)}
`).join(''); } };