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

13 lines
589 B
JavaScript
Raw Permalink Normal View History

import { PRIORIDAD_COLOR } from "../../lib/derive";
// Etiqueta de color de la prioridad que el ejecutivo registró en la oportunidad (campo de Dynamics).
export default function PrioridadBadge({ o }) {
const n = o.prioridad || "Sin prioridad";
const c = PRIORIDAD_COLOR[n] || PRIORIDAD_COLOR["Sin prioridad"];
return (
<span title="Prioridad registrada en la oportunidad (Dynamics)" style={{ background: c.bg, color: c.fg, fontWeight: 700, fontSize: 11, padding: "2px 8px", borderRadius: 8, whiteSpace: "nowrap" }}>
{n === "Sin prioridad" ? "—" : n}
</span>
);
}