feat: app de alumnos sin contraseña (invitación de un solo uso, avisos de falta y pagos informados)
- Acceso del alumno o tutor con link de un solo uso (hash SHA-256, consumo atómico, el GET no consume), sesión propia de 90 días deslizante, passkeys opcionales (SimpleWebAuthn) y mail de recuperación con rate limit. - Lado alumno (/i/:token, /acceso, /alumno/*): inicio, clases, avisar falta, pagos, informar pago con comprobante (S3 privado, magic bytes) y perfil. - Lado profe: acceso a la app en la ficha del alumno (invitar/reinvitar), "Pagos para verificar" en Cobros con badge, faltas avisadas en la ficha de grupo y datos para transferir en Ajustes. - "Requiere atención" y el recordatorio de WhatsApp excluyen cuotas informadas. - Zona horaria por defecto: Buenos Aires. - Migración add_student_access, tests contra Postgres real (test:db) y docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
41
apps/web/src/features/student-app/StudentBottomNav.tsx
Normal file
41
apps/web/src/features/student-app/StudentBottomNav.tsx
Normal file
@@ -0,0 +1,41 @@
|
||||
import { Link, useLocation } from '@tanstack/react-router'
|
||||
import { cn } from '../../lib/utils'
|
||||
import { isStudentNavItemActive, STUDENT_NAV_ITEMS } from './student-nav-items'
|
||||
|
||||
export function StudentBottomNav() {
|
||||
const location = useLocation()
|
||||
|
||||
return (
|
||||
<nav
|
||||
aria-label="Secciones"
|
||||
className="fixed inset-x-0 bottom-0 z-40 border-t border-border bg-surface/95 pb-[env(safe-area-inset-bottom)] backdrop-blur"
|
||||
>
|
||||
<div className="mx-auto grid max-w-md grid-cols-4">
|
||||
{STUDENT_NAV_ITEMS.map(({ label, to, icon: Icon }) => {
|
||||
const isActive = isStudentNavItemActive(location.pathname, to)
|
||||
return (
|
||||
<Link
|
||||
key={to}
|
||||
to={to}
|
||||
aria-current={isActive ? 'page' : undefined}
|
||||
className={cn(
|
||||
'flex min-h-14 flex-col items-center justify-center gap-1 py-2 text-[11px] font-medium transition-colors',
|
||||
isActive ? 'text-accent-fg' : 'text-foreground/80 hover:text-primary',
|
||||
)}
|
||||
>
|
||||
<span
|
||||
className={cn(
|
||||
'flex size-8 items-center justify-center rounded-lg transition-colors duration-150',
|
||||
isActive && 'bg-accent-soft',
|
||||
)}
|
||||
>
|
||||
<Icon className="size-5" strokeWidth={isActive ? 2.25 : 2} aria-hidden="true" />
|
||||
</span>
|
||||
<span className="leading-none">{label}</span>
|
||||
</Link>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</nav>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user