import Link from "next/link";
import { auth } from "../lib/auth";
import { buscarCuentas } from "../lib/cuentasServer";
import LoginPrompt from "../components/LoginPrompt";
import ErrorNotice from "../components/ErrorNotice";
export const dynamic = "force-dynamic";
// Cuentas del CRM: buscar una cuenta por nombre y abrir su ficha (datos, contactos, oportunidades, actividades).
export default async function CuentasPage({ searchParams }) {
const session = await auth();
if (!session?.email) return
Busca una cuenta del CRM para ver sus datos, contactos y oportunidades, y agregarle actividades.
{q.length > 0 && q.length < 2 &&Escribe al menos 2 letras.
} {cuentas && (| Cuenta | Tipo | Propietario | Teléfono |
|---|---|---|---|
| {c.nombre} {c.comercial && {c.comercial}} | {c.tipo || "—"} | {c.propietario || "—"} | {c.telefono || "—"} |