feat: periodo global, métricas negocio, seguimiento notas, Drive/Social/Orgánico
Selector de fechas en header (con Personalizado) compartido en el dashboard; Métricas con Ventas/CAC/ROAS CRM, cruce canal y gráficas diarias; Seguimiento solo notas + sync Superhuman; Activos con navegación Drive; Social con métricas IG/FB; Orgánico con prioridades SEO/GEO expertas. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -24,6 +24,8 @@ import {
|
||||
} from 'lucide-react';
|
||||
import TenantSwitcher from '@/components/TenantSwitcher';
|
||||
import type { DashboardModuleId } from '@/lib/tenant-modules';
|
||||
import DateRangePicker from '@/components/DateRangePicker';
|
||||
import { useDateRange } from '@/components/DateRangeContext';
|
||||
|
||||
type NavItem = {
|
||||
href: string;
|
||||
@@ -171,6 +173,7 @@ export default function DashboardShell({
|
||||
}) {
|
||||
const [open, setOpen] = useState(false);
|
||||
const close = () => setOpen(false);
|
||||
const dateRange = useDateRange();
|
||||
|
||||
const visibleNav = NAV_ITEMS.filter((item) => {
|
||||
if (isAgency) return true;
|
||||
@@ -307,25 +310,35 @@ export default function DashboardShell({
|
||||
) : null}
|
||||
|
||||
<div className="flex min-w-0 flex-1 flex-col">
|
||||
<header className="sticky top-0 z-30 h-14 border-b border-gray-200 bg-white/90 backdrop-blur-md px-4 md:px-8 flex items-center gap-3">
|
||||
<button
|
||||
type="button"
|
||||
className="md:hidden rounded-lg p-2 text-gray-600 hover:bg-gray-100"
|
||||
onClick={() => setOpen(true)}
|
||||
aria-label="Abrir menú"
|
||||
>
|
||||
<Menu className="w-5 h-5" />
|
||||
</button>
|
||||
<header className="sticky top-0 z-30 border-b border-gray-200 bg-white/95 backdrop-blur-md px-4 md:px-8 py-2.5 space-y-2">
|
||||
<div className="flex items-center gap-3 min-h-10">
|
||||
<button
|
||||
type="button"
|
||||
className="md:hidden rounded-lg p-2 text-gray-600 hover:bg-gray-100"
|
||||
onClick={() => setOpen(true)}
|
||||
aria-label="Abrir menú"
|
||||
>
|
||||
<Menu className="w-5 h-5" />
|
||||
</button>
|
||||
|
||||
<div className="flex min-w-0 items-center gap-2 text-sm text-gray-500">
|
||||
<span className="hidden sm:inline shrink-0">
|
||||
{isAgency ? 'Contexto:' : 'Cliente / Portal:'}
|
||||
</span>
|
||||
<TenantSwitcher
|
||||
isAgency={isAgency}
|
||||
initialName={viewName || company}
|
||||
/>
|
||||
<div className="flex min-w-0 items-center gap-2 text-sm text-gray-500">
|
||||
<span className="hidden sm:inline shrink-0">
|
||||
{isAgency ? 'Contexto:' : 'Cliente / Portal:'}
|
||||
</span>
|
||||
<TenantSwitcher
|
||||
isAgency={isAgency}
|
||||
initialName={viewName || company}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<DateRangePicker
|
||||
compact
|
||||
preset={dateRange.preset}
|
||||
customSince={dateRange.customSince}
|
||||
customUntil={dateRange.customUntil}
|
||||
onPreset={dateRange.setPreset}
|
||||
onCustomChange={dateRange.setCustom}
|
||||
/>
|
||||
</header>
|
||||
|
||||
<main className="flex-1 overflow-y-auto">
|
||||
|
||||
Reference in New Issue
Block a user