/* global React, ChIcon, NavIcon, CHANNELS */ const { useState: useStateR, useMemo: useMemoR } = React; // ============ Data ============ const RESOLVED_TICKETS = [ { id:"CNL-2841", channel:"whatsapp", customer:"María F. Soto", company:"Distribuidora El Quetzal", printer:"HP LaserJet Pro M404dn", issue:"Atasco bandeja 2 · visita agendada", solver:"sofia", duration:"3:42", time:"10:46", kb:"KB-HP-M404-008" }, { id:"CNL-2835", channel:"whatsapp", customer:"José Alvarado", company:"Ferretería Alvarado", printer:"HP LaserJet M111w", issue:"Configuración WiFi resuelta vía KB", solver:"sofia", duration:"4:08", time:"10:18", kb:"KB-HP-WIFI-002" }, { id:"CNL-2826", channel:"call", customer:"Hugo Méndez", company:"Distribuciones HM", printer:"HP Color LaserJet M283fdw", issue:"Reinicio tras corte eléctrico", solver:"sofia", duration:"5:02", time:"09:31", kb:"KB-HP-RESET-004" }, { id:"CNL-2824", channel:"web", customer:"Andrea Pérez", company:"Estética Andrea", printer:"HP LaserJet M111w", issue:"Descarga driver Windows 11", solver:"sofia", duration:"3:18", time:"09:22", kb:"KB-HP-DRV-019" }, { id:"CNL-2822", channel:"email", customer:"Inversiones del Sur", company:"Inversiones del Sur", printer:"HP OfficeJet Pro 9015e", issue:"Solicitud de toner negro · despachado",solver:"sofia", duration:"8:11", time:"09:08", kb:"KB-HP-TONER-005" }, { id:"CNL-2820", channel:"whatsapp", customer:"Carlos Aguilar", company:"Carrocería Aguilar", printer:"HP LaserJet Pro M404dn", issue:"Calidad: limpieza tambor de imagen", solver:"sofia", duration:"7:44", time:"08:54", kb:"KB-HP-M428-021" }, { id:"CNL-2818", channel:"call", customer:"Sandra Villatoro", company:"Clínica Villatoro", printer:"Canon imageRUNNER 2625i", issue:"Error E000 · ciclo de fusor", solver:"taller", duration:"42:18", time:"08:40", kb:"KB-CAN-IR2630-014" }, { id:"CNL-2816", channel:"web", customer:"Lucia Marroquín", company:"Editorial Páginas", printer:"HP LaserJet M428fdw", issue:"Líneas verticales · cambio tambor", solver:"dispatch", duration:"on-site", time:"08:22", kb:"KB-HP-M428-021" }, { id:"CNL-2814", channel:"whatsapp", customer:"Ricardo Solís", company:"Cafetería La Plaza", printer:"HP LaserJet Pro M404n", issue:"Conexión a red por WiFi", solver:"sofia", duration:"4:55", time:"08:11", kb:"KB-HP-WIFI-002" }, { id:"CNL-2812", channel:"email", customer:"Yésica Tobar", company:"Asoc. Mujeres Activas", printer:"HP LaserJet Pro M404dn", issue:"Atasco · visita confirmada", solver:"sofia", duration:"11:04", time:"07:58", kb:"KB-HP-M404-008" }, { id:"CNL-2810", channel:"call", customer:"Banca Crédito GT", company:"Banca Crédito GT (sucursal Mixco)", printer:"Canon imageRUNNER 2630i", issue:"Reposición de papel · usuario nuevo", solver:"sofia", duration:"2:08", time:"07:42", kb:"KB-CAN-IR-OP-002" }, ]; const TOP_KB = [ { code: "KB-HP-M404-008", title: "Reemplazo rodillo bandeja 2", uses: 9, pct: 100 }, { code: "KB-HP-M428-021", title: "Líneas verticales · tambor", uses: 7, pct: 78 }, { code: "KB-HP-WIFI-002", title: "Configuración WiFi M111w", uses: 6, pct: 67 }, { code: "KB-HP-TONER-005",title: "Sustitución cartucho amarillo", uses: 5, pct: 56 }, { code: "KB-CAN-IR2630-014", title: "Códigos E000/E007", uses: 4, pct: 44 }, ]; const TOP_MODELS = [ { name: "HP LaserJet Pro M404dn", count: 14, pct: 100 }, { name: "HP LaserJet M428fdw", count: 9, pct: 64 }, { name: "HP LaserJet M111w", count: 6, pct: 43 }, { name: "HP Color LaserJet M283fdw", count: 5, pct: 36 }, { name: "Canon imageRUNNER 2630i", count: 4, pct: 29 }, ]; // hour distribution (00–23). Real ops hours have spikes const HOURLY = [ 0,0,0,0,0,0,1,3,7,9,8,11,6,5,4,2,1,0,0,0,0,0,0,0 ]; // ============ Components ============ const HourChart = ({ data }) => { const max = Math.max(1, ...data); return (
{data.map((v, h) => (
{v} {h % 2 === 0 ? String(h).padStart(2,"0") : ""}
))}

Pico de resolución entre 09:00–12:00 · coincide con apertura comercial. La cola post-almuerzo se aplana porque SOF.IA absorbe los pedidos repetidos sin escalar.

); }; const SOLVER_META = { sofia: { label: "SOF.IA", cls: "", avatar: "S", isSofia: true }, dispatch: { label: "Dispatcher", cls: "manual", avatar: "OP", isSofia: false }, taller: { label: "Taller", cls: "manual", avatar: "T", isSofia: false }, conectividad: { label: "Conectividad", cls: "manual", avatar: "C", isSofia: false }, }; const ResolvedScreen = ({ openTicket }) => { const [solverFilter, setSolverFilter] = useStateR("all"); const [chFilter, setChFilter] = useStateR("all"); const filtered = useMemoR(() => { return RESOLVED_TICKETS.filter(t => (solverFilter === "all" || t.solver === solverFilter) && (chFilter === "all" || t.channel === chFilter) ); }, [solverFilter, chFilter]); // totals derived from the source array (47 reflects the whole day, list shows recent) const TOTAL = 47; const SOFIA = 38; const HUMAN = 9; const sofiaPct = Math.round(SOFIA / TOTAL * 100); return (
Bandeja/Resueltos hoy

Resueltos hoy

Resumen del día · 27 may 2026
{/* Hero */}

{SOFIA} de {TOTAL} tickets resueltos por SOF.IA sin tocar a un humano.

Equivale a {sofiaPct}% de resolución autónoma. Tiempo medio de captura: 42 segundos. El equipo de Canella ganó cerca de 9 horas-persona de tiempo operativo hoy.

27 may 2026 · 16:24 hrs · datos en vivo
Total cerrados
{TOTAL}tickets
▲ 6 vs. ayer
Por SOF.IA
{SOFIA}/ {TOTAL}
{sofiaPct}% autónomos
Tiempo medio
5min 14s
▼ 38s vs. ayer
Tiempo ahorrado
8.7h-persona
≈ 1 jornada completa
{/* Celebrate strip */}
Récord del día · SOF.IA cerró un atasco HP M404 en 3 min 42 s

Caso CNL-2841 (Distribuidora El Quetzal) · serie pronunciada en lenguaje natural, parseada y validada sin intervención humana. Material listo para entrenamiento de futuros casos.

{/* Filters */}
Resuelto por {["all","sofia","dispatch","taller","conectividad"].map(o => ( setSolverFilter(o)}> {o === "all" ? "Todos" : SOLVER_META[o].label} ))}
Canal setChFilter("all")}>Todos {CHANNELS.map(c => ( setChFilter(c.id)}> {c.label.slice(0,4)} ))}
{filtered.length} de {RESOLVED_TICKETS.length} mostrados · resto en histórico
{/* List */}
Ticket Cliente Resolución Resuelto por Duración Cerrado
{filtered.map(t => { const meta = SOLVER_META[t.solver]; const isLong = t.duration.includes(":") && parseInt(t.duration) > 20; const isManual = !meta.isSofia; return (
openTicket({id: t.id, channel: t.channel, state: "auto"})} >
#{t.id}
{t.customer} {t.company}
{t.issue}
{t.printer} · KB {t.kb}
{meta.avatar}
{meta.label}
{t.duration === "on-site" ? "on-site" : t.duration}
{t.time}
); })} {filtered.length === 0 && (
— sin tickets con esos filtros —
)}
{/* Side */}

Distribución por hora

resueltos / hora

KB más usadas hoy

top 5
{TOP_KB.map((k, i) => (
{String(i+1).padStart(2,"0")}
{k.title}{k.code}
{k.uses}
))}

Modelos atendidos

top 5
{TOP_MODELS.map((m, i) => (
{String(i+1).padStart(2,"0")}
{m.name}
{m.count}
))}
); }; window.ResolvedScreen = ResolvedScreen;