diff --git a/src/components/asignaturas/detalle/MateriaDetailPage.tsx b/src/components/asignaturas/detalle/MateriaDetailPage.tsx index a3b3acc..8beb986 100644 --- a/src/components/asignaturas/detalle/MateriaDetailPage.tsx +++ b/src/components/asignaturas/detalle/MateriaDetailPage.tsx @@ -62,16 +62,33 @@ function EditableHeaderField({ }) { const textValue = String(value) + // Manejador para cuando el usuario termina de editar (pierde el foco) + const handleBlur = (e: React.FocusEvent) => { + const newValue = e.currentTarget.innerText + if (newValue !== textValue) { + onSave(newValue) + } + } + + const handleKeyDown = (e: React.KeyboardEvent) => { + if (e.key === 'Enter') { + e.preventDefault() + e.currentTarget.blur() // Forzamos el guardado al presionar Enter + } + } + return ( - onSave(e.target.value)} - onBlur={(e) => onSave(e.target.value)} - className={`border-none bg-transparent outline-none focus:ring-2 focus:ring-blue-400 ${className ?? ''}`} - /> + // eslint-disable-next-line jsx-a11y/no-static-element-interactions + + {textValue} + ) } diff --git a/src/routes/planes/$planId/_detalle/flujo.tsx b/src/routes/planes/$planId/_detalle/flujo.tsx index b50258e..eb3ba17 100644 --- a/src/routes/planes/$planId/_detalle/flujo.tsx +++ b/src/routes/planes/$planId/_detalle/flujo.tsx @@ -1,5 +1,6 @@ import { createFileRoute } from '@tanstack/react-router' -import { CheckCircle2, Circle, Clock } from 'lucide-react' +import { CheckCircle2, Clock } from 'lucide-react' + import { Badge } from '@/components/ui/badge' import { Button } from '@/components/ui/button' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' @@ -74,7 +75,7 @@ function RouteComponent() {
- + {/*
@@ -97,11 +98,11 @@ function RouteComponent() {
  • Mapa curricular aprobado preliminarmente
  • - + */}
    {/* Estado: Pendiente */} -
    + {/*
    @@ -113,7 +114,7 @@ function RouteComponent() { Pendiente -
    +
    */}
    {/* LADO DERECHO: Formulario de Transición */} @@ -145,7 +146,7 @@ function RouteComponent() { />
    -