fix(kanban): botón kanban en todas las pestañas + movimiento a tab bar

- Botón Kanban/Lista movido al final de la barra de pestañas
- Visible en todas las pestañas (leads, oportunidades, apartados, escrituración)
- Eliminado botón duplicado del contenido principal
- TabsCrm recibe vistaKanban + onToggleKanban como props
This commit is contained in:
2026-09-08 09:07:02 +00:00
parent febd636144
commit 8212fd919e

View File

@@ -508,10 +508,14 @@ function TabsCrm({
activa,
conteos,
onCambiar,
vistaKanban,
onToggleKanban,
}: {
activa: TabCrm
conteos: Record<TabCrm, number>
onCambiar: (tab: TabCrm) => void
vistaKanban: boolean
onToggleKanban: () => void
}) {
const tabs: { id: TabCrm; titulo: string }[] = [
{ id: 'leads', titulo: 'Mis leads' },
@@ -544,6 +548,15 @@ function TabsCrm({
</button>
)
})}
{activa !== 'tablero' && (
<button
type="button"
onClick={onToggleKanban}
className="ml-auto rounded-lg border border-[#D1D5DB] bg-white px-3 py-1.5 text-xs font-medium text-[#374151] shadow-sm transition-all hover:bg-[#F9FAFB] dark:border-[#334155] dark:bg-[#0F172A] dark:text-[#CBD5E1] dark:hover:bg-[#1E293B]"
>
{vistaKanban ? '📋 Lista' : '📊 Kanban'}
</button>
)}
</div>
)
}
@@ -1021,6 +1034,8 @@ export default function MiDiaPage({ accionesSesion }: { accionesSesion: Acciones
apartados: resumen.misApartados.length, escrituracion: resumen.misApartados.length, tablero: 0,
}}
onCambiar={setTabCrm}
vistaKanban={vistaKanban}
onToggleKanban={() => setVistaKanban(!vistaKanban)}
/>
{tabCrm !== 'tablero' && (