informe-comercial-alfa/app/components/pipeline/PanelesCalidad.js

18 lines
1,008 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Panel from "./Panel";
import MatrizCalidad from "./MatrizCalidad";
import { hayClasif, agg, aggOrd, CLASIF_ORDER } from "../../lib/derive";
// Termómetro + Luz Amarilla + Calidad×Movimiento — puerto de panelesCalidad() (modals.js). Se
// reutiliza tal cual en los 4 informes individuales (Reporte Ejecutivo, Previsión, Renovación,
// Previsión de Renovación) — mismos paneles que Tubería de Ventas, sin dimKey (el informe es un
// snapshot para imprimir, no interactivo).
export default function PanelesCalidad({ p }) {
if (!p.length) return null;
return (
<div className="grid3" style={{ marginBottom: 22 }}>
{hayClasif(p) && <Panel title="Termómetro" hint="Distribución de temperatura" rows={aggOrd(p, "clasif", CLASIF_ORDER, (o) => o.est)} />}
<Panel title="Luz Amarilla — qué la detiene" hint="Bloqueador declarado por el ejecutivo" rows={agg(p, "luz", (o) => o.est)} cls="alerta" top={7} />
{hayClasif(p) && <MatrizCalidad arr={p} />}
</div>
);
}