Add Pipeline RRSS under Social with the existing editorial board.

Keep Creatividades Ads for paid Meta approval and surface organic pipeline again as a clear Social sub-nav link.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
4Ventures
2026-10-13 09:55:46 +02:00
parent b13270d9ac
commit 7819448edc
2 changed files with 29 additions and 44 deletions

View File

@@ -1,46 +1,11 @@
/**
* Pipeline de creatividades — selector entre Aprobación Meta Ads y Pipeline RRSS.
* Pipeline RRSS — producción editorial orgánica (IG/FB).
* Creatividades Ads (paid) vive en /dashboard/creatividades.
*/
'use client';
import React, { useState } from 'react';
import CreativePipelineBoard from '@/components/CreativePipelineBoard';
import ClientCreativesView from '@/components/ClientCreativesView';
import { Sparkles, CalendarDays } from 'lucide-react';
export default function CreativesPage() {
const [mode, setMode] = useState<'ads' | 'social'>('ads');
return (
<div className="space-y-4">
<div className="flex items-center gap-2 px-4 pt-2 border-b border-gray-200">
<button
type="button"
onClick={() => setMode('ads')}
className={`flex items-center gap-1.5 pb-2.5 px-3 text-xs font-semibold border-b-2 transition-colors ${
mode === 'ads'
? 'border-brand-500 text-brand-600'
: 'border-transparent text-gray-500 hover:text-gray-700'
}`}
>
<Sparkles className="w-3.5 h-3.5" />
Aprobación & Anuncios Meta Ads
</button>
<button
type="button"
onClick={() => setMode('social')}
className={`flex items-center gap-1.5 pb-2.5 px-3 text-xs font-semibold border-b-2 transition-colors ${
mode === 'social'
? 'border-brand-500 text-brand-600'
: 'border-transparent text-gray-500 hover:text-gray-700'
}`}
>
<CalendarDays className="w-3.5 h-3.5" />
Pipeline Editorial RRSS
</button>
</div>
{mode === 'ads' ? <ClientCreativesView /> : <CreativePipelineBoard />}
</div>
);
return <CreativePipelineBoard />;
}

View File

@@ -23,6 +23,7 @@ import {
Leaf,
BookMarked,
Sparkles,
Images,
} from 'lucide-react';
import TenantSwitcher from '@/components/TenantSwitcher';
import type { DashboardModuleId } from '@/lib/tenant-modules';
@@ -235,11 +236,24 @@ export default function DashboardShell({
<nav className="flex-1 overflow-y-auto space-y-1.5 pr-1">
{visibleNav.map((item) => {
const underSocial = item.moduleId === 'social';
const showCalendarioUnderSocial =
item.moduleId === 'social' &&
underSocial &&
(isAgency ||
!enabledModules ||
enabledModules.calendario !== false);
const showPipelineRrssUnderSocial =
underSocial &&
(isAgency ||
!enabledModules ||
enabledModules.calendario !== false ||
enabledModules.creatives !== false);
const subLinkCls = (href: string) =>
`ml-4 flex items-center gap-2.5 px-3 py-2 rounded-lg text-xs font-medium transition-all ${
isActive(pathname, href)
? 'bg-brand-50 text-gray-900 border border-brand-200'
: 'text-gray-500 border border-transparent hover:text-gray-900 hover:bg-gray-50'
}`;
return (
<div key={item.href} className="space-y-0.5">
<NavLink item={item} onNavigate={close} />
@@ -247,16 +261,22 @@ export default function DashboardShell({
<Link
href="/dashboard/calendario"
onClick={close}
className={`ml-4 flex items-center gap-2.5 px-3 py-2 rounded-lg text-xs font-medium transition-all ${
isActive(pathname, '/dashboard/calendario')
? 'bg-brand-50 text-gray-900 border border-brand-200'
: 'text-gray-500 border border-transparent hover:text-gray-900 hover:bg-gray-50'
}`}
className={subLinkCls('/dashboard/calendario')}
>
<CalendarDays className="w-3.5 h-3.5 shrink-0 text-pink-500" />
Calendario editorial
</Link>
) : null}
{showPipelineRrssUnderSocial ? (
<Link
href="/dashboard/creatives"
onClick={close}
className={subLinkCls('/dashboard/creatives')}
>
<Images className="w-3.5 h-3.5 shrink-0 text-fuchsia-500" />
Pipeline RRSS
</Link>
) : null}
</div>
);
})}