- Ficha de grupo: "Agregar miembro" a todo el ancho y debajo Estadísticas,
Cobrar y Compartir con icono y texto (antes iconos sueltos en mobile).
Los mensajes automáticos de WhatsApp quedan en una fila plegable que
arranca cerrada si no hay ninguno activo.
- Historial del alumno: arranca en la primera clase registrada si es
anterior al alta, como la lista y la regla de riesgo ("1 de 5" en ambos).
- Nuevo grupo: cupo 10 por defecto, precio vacío obligatorio y foco
inicial en el nombre.
- Ajustes: chevron en Seguridad; el botón de tema del header queda solo
en desktop (en mobile vive en Apariencia).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
54 lines
1.7 KiB
TypeScript
54 lines
1.7 KiB
TypeScript
import { Link } from '@tanstack/react-router'
|
|
import { ChevronRight, Fingerprint } from 'lucide-react'
|
|
import { Button } from '../../components/ui'
|
|
import { signOut } from '../../lib/auth-client'
|
|
import { PlanSettingsCard } from '../billing'
|
|
import { MpStatusCard } from '../mp'
|
|
import { WhatsappStatusCard } from '../whatsapp'
|
|
import { AppearanceCard } from './AppearanceCard'
|
|
import { useCallbackFeedbackToast } from './useCallbackFeedbackToast'
|
|
|
|
export function SettingsView() {
|
|
useCallbackFeedbackToast()
|
|
|
|
const handleSignOut = async () => {
|
|
await signOut({
|
|
fetchOptions: { headers: { 'Cache-Control': 'no-cache' } },
|
|
})
|
|
window.location.assign('/login')
|
|
}
|
|
|
|
return (
|
|
<section className="space-y-6">
|
|
<div>
|
|
<h1 className="text-2xl font-bold text-primary">Ajustes</h1>
|
|
<p className="mt-1 text-sm text-foreground/60">Configurá tu cuenta y tus grupos.</p>
|
|
</div>
|
|
|
|
<div className="divide-y divide-border rounded-xl border border-border bg-surface">
|
|
<Link to="/security" className="flex items-center gap-3 px-4 py-3 hover:bg-primary-soft">
|
|
<span className="rounded-lg bg-accent-soft p-2">
|
|
<Fingerprint className="size-4 text-accent-fg" />
|
|
</span>
|
|
<div className="min-w-0 flex-1">
|
|
<p className="text-sm font-medium text-primary">Seguridad</p>
|
|
<p className="text-xs text-foreground/50">Contraseña y passkeys</p>
|
|
</div>
|
|
<ChevronRight className="size-4 text-foreground/40" />
|
|
</Link>
|
|
</div>
|
|
|
|
<PlanSettingsCard />
|
|
|
|
<MpStatusCard />
|
|
|
|
<WhatsappStatusCard />
|
|
|
|
<AppearanceCard />
|
|
|
|
<Button variant="outline" onClick={handleSignOut}>
|
|
Cerrar sesión
|
|
</Button>
|
|
</section>
|
|
)
|
|
} |