import { auth } from "../../lib/auth";
import { ownerFilter } from "../../lib/authz";
import { getRenovClosed, getMotivosCierre, getSystemUsers } from "../../lib/queries";
import { agg, EJECUTIVOS_RENOV } from "../../lib/derive";
import LoginPrompt from "../../components/LoginPrompt";
import OwnerControl from "../../components/OwnerControl";
import ErrorNotice from "../../components/ErrorNotice";
import Panel from "../../components/pipeline/Panel";
import { DYN, money, money2 } from "../../lib/constants";
export const dynamic = "force-dynamic";
function currentMonth() {
const d = new Date();
return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}`;
}
export default async function RenovPerdidasPage({ searchParams }) {
const session = await auth();
if (!session?.email) return
No hay seguimiento registrado en el CRM ≠ no hubo seguimiento — la mayoría del contacto comercial se hace por WhatsApp, que no está integrado a Dynamics (ver CLAUDE.md).
Clic en el nombre abre la oportunidad en Dynamics 365
No hay renovaciones perdidas en este período para este filtro.
) : (| Cliente | Oportunidad | Motivo de cierre | Línea de Negocio | {!scope.locked &&Ejecutivo | }MRR est. |
|---|---|---|---|---|---|
| {o.cliente || "—"} | {o.name} | {o.motivo} | {o.linea || "—"} | {!scope.locked &&{o.owner} | }{o.est ? money2(o.est) : "—"} |