+ {/* Section 1: Key Metrics */}
+
+
+
Key Metrics
+
+
+
+
+
+
+
+
+
+
+
+ {/* Section 2: Call Breakdown Trends */}
+
+
+
Call Breakdown Trends
+
+
+
Inbound vs Outbound
+
+
+
+
+
+
+ {/* Section 3: Agent Performance Table */}
+
+
+
Agent Performance
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {(agent) => (
+
+ {agent.name}
+ {agent.calls}
+ {agent.inbound}
+ {agent.missed}
+ {agent.followUps}
+ {agent.leads}
+
+ = 25 ? 'text-success-primary' : 'text-error-primary')}>
+ {agent.convPercent}%
+
+
+
+ = 70 ? 'text-success-primary' : (agent.npsscore ?? 0) >= 50 ? 'text-warning-primary' : 'text-error-primary')}>
+ {agent.npsscore ?? '—'}
+
+
+
+ agent.maxidleminutes ? 'text-error-primary font-bold' : 'text-primary')}>
+ {agent.idleMinutes}m
+
+
+
+ )}
+
+
+
+
+
+ {/* Section 4: Time Breakdown */}
+
+
+
Time Breakdown
+
+
+
+
{teamAvg.active}m Active
+
+
+
+
{teamAvg.wrap}m Wrap
+
+
+
+
{teamAvg.idle}m Idle
+
+
+
+
{teamAvg.break_}m Break
+
+
+
+ {agents.map(agent => {
+ const total = agent.activeMinutes + agent.wrapMinutes + agent.idleMinutes + agent.breakMinutes || 1;
+ const isHighIdle = agent.maxidleminutes && agent.idleMinutes > agent.maxidleminutes;
+ return (
+
+
{agent.name}
+
+
+ Active {agent.activeMinutes}m
+ Wrap {agent.wrapMinutes}m
+ Idle {agent.idleMinutes}m
+ Break {agent.breakMinutes}m
+
+
+ );
+ })}
+
+
+
+
+ {/* Section 5: NPS + Conversion */}
+
+
+
+
Overall NPS
+
+
+ {agents.filter(a => a.npsscore != null).map(a => (
+
+
{a.name}
+
+
= 70 ? 'bg-success-solid' : (a.npsscore ?? 0) >= 50 ? 'bg-warning-solid' : 'bg-error-solid')} style={{ width: `${a.npsscore ?? 0}%` }} />
+
+
{a.npsscore}
+
+ ))}
+
+
+
+
Conversion Metrics
+
+
+
{convRate}%
+
Call → Appointment
+
+
+
+ {agents.length > 0 ? Math.round(agents.reduce((s, a) => s + (a.leads > 0 ? 1 : 0), 0) / agents.length * 100) : 0}%
+
+
Lead → Contact
+
+
+
+ {agents.map(a => (
+
+ {a.name}
+ = 25 ? 'success' : 'error'}>{a.convPercent}%
+
+ ))}
+
+
+
+
+
+ {/* Section 6: Performance Alerts */}
+ {alerts.length > 0 && (
+
+
+
+
+ Performance Alerts ({alerts.length})
+
+
+ {alerts.map((alert, i) => (
+
+
+
+ {alert.agent}
+ — {alert.type}
+
+
{alert.value}
+
+ ))}
+
+
+
+ )}
+
+ >
+ );
+};