import React, { useEffect, useState } from 'react'; import { UploadIcon } from './icons/UploadIcon'; import { TrendingUpIcon } from './icons/TrendingUpIcon'; import { BugIcon } from './icons/BugIcon'; import { ClockIcon } from './icons/ClockIcon'; import { LightbulbIcon } from './icons/LightbulbIcon'; import { ExclamationTriangleIcon } from './icons/StatusIcons'; import apiService, { AnalyticsResponse, AgencyAnalyticsItem } from '../services/apiService'; // Agent performance is still static for now - would need separate API const agentPerformance = [ { name: 'Legal Agent', passRate: 85, avgIssues: 1.2, trend: 'up' }, { name: 'Brand Agent', passRate: 68, avgIssues: 2.5, trend: 'down' }, { name: 'Channel Best Practices Agent', passRate: 92, avgIssues: 0.8, trend: 'up' }, { name: 'Channel Tech Specs Agent', passRate: 71, avgIssues: 1.9, trend: 'stable' }, ]; const UpArrow = () => ; const DownArrow = () => ; const StableLine = () => ; const TrendIndicator: React.FC<{ trend: 'up' | 'down' | 'stable' }> = ({ trend }) => { if (trend === 'up') { return
Overall usage and performance statistics for the tool.
{stat.name}
{stat.value}
| Agency | Proofs Reviewed | Pass Rate | Failed | Errors | Legal Review |
|---|---|---|---|---|---|
| {agency.agency_name} {isSelected && (selected)} | {agency.total_reviews} |
= 80 ? 'bg-success' : rate < 70 ? 'bg-error' : 'bg-warning'}`}>
{rate}%
|
{agency.failed} | {agency.errors} | {agency.legal_review} |
Key Insight (Last 7 Days):
A sharp decline in Best Practice adherence has been noted, primarily driven by proofs from the Barclays Q4 Social campaign. The Brand Guardian agent also shows a declining performance trend, suggesting a potential need for updated brand guideline training or proof review.
| Agent Name | Pass Rate | Avg. Issues per Proof | Performance Trend |
|---|---|---|---|
| {agent.name} |
= 80 ? 'bg-oliver-green' : agent.passRate < 70 ? 'bg-oliver-gold' : 'bg-oliver-orange'}`}>
{agent.passRate}%
|
{agent.avgIssues} |
|