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:
@@ -508,10 +508,14 @@ function TabsCrm({
|
|||||||
activa,
|
activa,
|
||||||
conteos,
|
conteos,
|
||||||
onCambiar,
|
onCambiar,
|
||||||
|
vistaKanban,
|
||||||
|
onToggleKanban,
|
||||||
}: {
|
}: {
|
||||||
activa: TabCrm
|
activa: TabCrm
|
||||||
conteos: Record<TabCrm, number>
|
conteos: Record<TabCrm, number>
|
||||||
onCambiar: (tab: TabCrm) => void
|
onCambiar: (tab: TabCrm) => void
|
||||||
|
vistaKanban: boolean
|
||||||
|
onToggleKanban: () => void
|
||||||
}) {
|
}) {
|
||||||
const tabs: { id: TabCrm; titulo: string }[] = [
|
const tabs: { id: TabCrm; titulo: string }[] = [
|
||||||
{ id: 'leads', titulo: 'Mis leads' },
|
{ id: 'leads', titulo: 'Mis leads' },
|
||||||
@@ -544,6 +548,15 @@ function TabsCrm({
|
|||||||
</button>
|
</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>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -1021,6 +1034,8 @@ export default function MiDiaPage({ accionesSesion }: { accionesSesion: Acciones
|
|||||||
apartados: resumen.misApartados.length, escrituracion: resumen.misApartados.length, tablero: 0,
|
apartados: resumen.misApartados.length, escrituracion: resumen.misApartados.length, tablero: 0,
|
||||||
}}
|
}}
|
||||||
onCambiar={setTabCrm}
|
onCambiar={setTabCrm}
|
||||||
|
vistaKanban={vistaKanban}
|
||||||
|
onToggleKanban={() => setVistaKanban(!vistaKanban)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{tabCrm !== 'tablero' && (
|
{tabCrm !== 'tablero' && (
|
||||||
|
|||||||
Reference in New Issue
Block a user