diff --git a/src/app/dashboard/activos/page.tsx b/src/app/dashboard/activos/page.tsx index e2f3e55..53e86e7 100644 --- a/src/app/dashboard/activos/page.tsx +++ b/src/app/dashboard/activos/page.tsx @@ -3,6 +3,7 @@ import { createClient } from '@/lib/supabase/server'; import { redirect } from 'next/navigation'; import { resolveActiveTenant } from '@/lib/tenant-context'; import AssetsLibrary from '@/components/AssetsLibrary'; +import { EmptyState, PageHeader } from '@/components/ui'; export const dynamic = 'force-dynamic'; @@ -18,18 +19,15 @@ export default async function ActivosPage() { if (ctx.portfolioWide) { return (
- Selecciona un cliente en Contexto para subir o consultar archivos - validados. -
-- Vista global: elige el tenant arriba y vuelve aquí. -
+- Portafolio multi-cliente · control de conexiones (Meta, Google, Drive, - Clientify…) · seguir/archivar clientes · modo superadmin. -
-{ctx.label}
-{sourceNote}
-- Elige un cliente arriba (Contexto) para ver presupuesto y consecución - de objetivos de ese tenant. -
+- Ad tracker · {label} -
-- Resumen Meta + Google: gasto, clics, conversiones y{' '} - preview de creatividades por - anuncio (como en{' '} - - Ad Tracker Brava - - ). Ventana: {range.since} → {range.until}. -
-- Archivo oficial de {tenantLabel}. - Subidas al portal se copian a la carpeta Drive del cliente si está - enlazada. -
-diff --git a/src/components/CrmDashboard.tsx b/src/components/CrmDashboard.tsx index 595d530..fb61244 100644 --- a/src/components/CrmDashboard.tsx +++ b/src/components/CrmDashboard.tsx @@ -25,6 +25,7 @@ import { formatNum, resolveKpiDayRange, } from '@/lib/metrics'; +import { PageHeader } from '@/components/ui'; type RangeKey = KpiRangeKey; @@ -95,44 +96,39 @@ export default function CrmDashboard({ return (
- {label} - {portfolioWide ? ' · portafolio' : ' · zoom cliente'}. Funnel y % a - cliente (ganado) por canal · {rangeHint}. -
-
diff --git a/src/components/DashboardShell.tsx b/src/components/DashboardShell.tsx
new file mode 100644
index 0000000..7a7fff5
--- /dev/null
+++ b/src/components/DashboardShell.tsx
@@ -0,0 +1,278 @@
+'use client';
+
+import React, { useState } from 'react';
+import Link from 'next/link';
+import { usePathname } from 'next/navigation';
+import {
+ BarChart3,
+ Target,
+ FolderGit2,
+ Bot,
+ ShieldCheck,
+ Layers,
+ LogOut,
+ UserCheck,
+ CalendarDays,
+ Radio,
+ Megaphone,
+ Contact,
+ Menu,
+ X,
+ Images,
+} from 'lucide-react';
+import TenantSwitcher from '@/components/TenantSwitcher';
+
+type NavItem = {
+ href: string;
+ label: string;
+ hint?: string;
+ icon: React.ComponentType<{ className?: string }>;
+};
+
+type NavGroup = {
+ title: string;
+ items: NavItem[];
+};
+
+const CLIENT_GROUPS: NavGroup[] = [
+ {
+ title: 'Rendimiento',
+ items: [
+ { href: '/dashboard/kpis', label: 'Métricas', hint: 'KPIs y canales', icon: BarChart3 },
+ { href: '/dashboard/crm', label: 'CRM', hint: 'Leads y clientes', icon: Contact },
+ { href: '/dashboard/seguimiento', label: 'Seguimiento', hint: 'Estado operativo', icon: Radio },
+ { href: '/dashboard/ad-tracker', label: 'Ad Tracker', hint: 'Creatividades y ads', icon: Megaphone },
+ ],
+ },
+ {
+ title: 'Contenido',
+ items: [
+ { href: '/dashboard/estrategia', label: 'Objetivos', hint: 'Plan del mes', icon: Target },
+ { href: '/dashboard/calendario', label: 'Calendario', hint: 'Editorial', icon: CalendarDays },
+ { href: '/dashboard/activos', label: 'Activos', hint: 'Biblioteca de archivos', icon: FolderGit2 },
+ { href: '/dashboard/creatives', label: 'Pipeline', hint: 'Creatividades', icon: Images },
+ ],
+ },
+ {
+ title: 'Herramientas',
+ items: [
+ { href: '/dashboard/asistente', label: 'Asistente', hint: 'IA financiera', icon: Bot },
+ ],
+ },
+];
+
+function isActive(pathname: string, href: string): boolean {
+ if (pathname === href) return true;
+ if (href !== '/dashboard' && pathname.startsWith(href + '/')) return true;
+ return false;
+}
+
+function NavLink({
+ item,
+ onNavigate,
+}: {
+ item: NavItem;
+ onNavigate?: () => void;
+}) {
+ const pathname = usePathname();
+ const active = isActive(pathname, item.href);
+ const Icon = item.icon;
+ return (
+
+
+ 4Ventures
+ Centro de Mando {email}
+
- {label}
- {portfolioWide
- ? ' · portafolio'
- : ' · zoom cliente'}
- . Periodo {rangeHint} (mismos días calendario que Ad Tracker).
-
diff --git a/src/components/SeguimientoBoard.tsx b/src/components/SeguimientoBoard.tsx
index c5293e9..419e738 100644
--- a/src/components/SeguimientoBoard.tsx
+++ b/src/components/SeguimientoBoard.tsx
@@ -24,6 +24,7 @@ import {
sumDaily,
sumWeekly,
} from '@/lib/metrics';
+import { PageHeader } from '@/components/ui';
import {
AD_TRACKER_PRESETS,
RangePreset,
@@ -442,23 +443,14 @@ export default function SeguimientoBoard() {
return (
- Seguimiento
-
- {data.label} · mismas KPIs que Métricas, filtrables por periodo +
- notas del equipo
-
+ {eyebrow}
+
+ {description}
+ {description} {title}
+ {description}
+
- North Star · métricas
-
-
- Evolución de métricas
-
-
+ {title}
+
+ {description ? (
+ {title}
+ {description ? (
+