Spaces:
Runtime error
Runtime error
Commit History
-
style(ta-01): icon-only Crear/Carga Masiva buttons on mobile in Materias and Secciones
Greg0b411cb -
style(ta-01): collapse Crear/Carga Masiva buttons to icon-only on mobile
Greg52690e1
-
revert(ta-01): role stays immutable on edit (per user request)
Greg6360fcb -
feat(ta-01): allow editing sex and role in user create/edit modal
Greg +1: Claude Opus 4.7 (1M context)Frontend (UsersPage): - Sex selector (Sin especificar / Masculino / Femenino) on create and edit. - Role select no longer disabled while editing; changes are diffed and sent in the PUT payload. Backend (schemas/user.py): - UserUpdate gains optional `role` so PUT /users/{id} can change it. - sex was already supported; just wiring it on the client side. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>bee4db8 -
fix(ta-01): use AuthImage so JWT-protected photo URLs render
Greg +1: Claude Opus 4.7 (1M context)Browser <img src> tags cannot send our Authorization header, so a direct fetch of /api/v1/photos/... returned 401 and showed the photo broken. AuthImage fetches the URL through our axios instance (which injects the token) and renders the bytes via a blob URL. Pass-through for data: and blob: URLs so freshly captured/picked previews don't need a roundtrip. Applied to the two render sites in UsersPage. CardGeneratorPage still uses raw <img src=...> for canvas drawing; out of scope for this fix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>09aa14c -
feat(ta-01): photo upload + camera capture in user create/edit modal
Greg +1: Claude Opus 4.7 (1M context)Frontend (UsersPage): - New uploadUserPhoto / dataUrlToBlob helpers in userService.ts - Both "Capturar foto" (camera) and "Subir foto" (file picker accepting png/jpg/webp ≤5MB) now route through POST /api/v1/users/{id}/photo - Hidden file input wired via ref; live preview from either source - Format/size hint shown under the controls - Removed enrollFace from this flow (still used by FacialPage kiosk) Backend (facial.py enroll_face): Bug introduced by TA-01: face_encodings.photo became VARCHAR(500) but the kiosk enroll endpoint still tried to persist the raw base64 dataURL, which silently broke camera enrollment. Now decodes → processes via photo_pipeline → uploads via PhotoStorage → stores the path. If photo step fails, encoding is still saved (best-effort) so recognition works. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>9b72922 -
style(ta-01): rename Gate column to Entrada al plantel for clarity
Gregd08ed8b -
style(ta-01): use neutral Spanish (no voseo) in admin attendance copy
Gregf0f89c5 -
feat(ta-01): empty state when no section selected on admin attendance page
Greg8391c19 -
style(ta-01): replace symbol+letter with Masculinos/Femeninos in admin counter
Greg34fb973 -
feat(ta-01): show sex breakdown (M/F) in admin attendance counter
Greg +1: Claude Opus 4.7 (1M context)- RosterItem dataclass + AdminRosterItem TS interface gain `sex` field. - AdminAttendancePage counter now shows "(M: N · F: N)" alongside Presentes. - Teacher response unchanged (StudentCardResponse doesn't include sex). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>4aadf35 -
feat(ta-01): admin attendance page with /admin-attendance route + sidebar item
Greg +1: Claude Sonnet 4.6Adds AdminAttendancePage (standalone, no extraction — state shapes differ too much between teacher list view and admin roster view). Features: - Section dropdown + date picker (default today, supports back-dating) - Roster table with effective-status logic, pending toggles, amber highlight - Gate chip: neutral gray, informational tooltip, never blocking - Save calls batchToggle then refreshes roster - Toast auto-dismiss, error banner, loading spinner Wired at /dashboard/admin-attendance; sidebar visible to admin role only. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>655da53 -
feat(ta-01): make gate chip informational in teacher attendance toasts
Greg +1: Claude Sonnet 4.6Replace hard-block language ("no se pudieron marcar porque aún no han ingresado") with softer, informational copy pointing admins to the contingency page. No visual chip exists in TeacherAttendancePage (entrance_logged is not in AttendanceSummaryItem), so only toast text is updated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>e07ae49
-
style(teacher-ui): use word labels instead of symbols in present chip
Greg +1: Claude Opus 4.7 (1M context)Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>c2e5673 -
feat(dashboard-ui): mount SexBySectionChart on dashboard
Greg +1: Claude Opus 4.7 (1M context)Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>8e57577 -
fix(teacher-ui): keep present chip showing today, cleanup type import
Greg +1: Claude Opus 4.7 (1M context)Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>b00b1fd -
feat(teacher-ui): show M/F present chip on attendance page
Greg +1: Claude Opus 4.7 (1M context)Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>156f46d
-
feat(swipe): report students skipped due to missing entrance log
Greg +1: Claude Opus 4.7 (1M context)El endpoint /teacher/attendance/swipe ya filtraba estudiantes que no habian hecho check-in en porteria (sin EntranceLog hoy), pero solo devolvia counts sin decir cuales quedaron skip. El docente marcaba 20 estudiantes, recibia 'guardado correctamente' y veia que todos quedaron ausentes -- sin explicacion. Backend ahora devuelve skipped: [{student_id, name}, ...] siguiendo el mismo patron que batch_toggle ya implementaba. Frontend muestra toast naranja explicito cuando hay skip: - Si created > 0 y hay skipped: 'Se marcaron N presentes. M no se pudieron marcar porque aun no han ingresado al colegio (sin check-in en porteria): names...' - Si created == 0 (todos skipped): 'Ningun estudiante pudo ser marcado presente: aun no han ingresado...' Muestra hasta 3 nombres + 'y X mas' si hay mas para mantener el toast legible. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>4205050 -
chore(ui): swap native date inputs for DateInput across pages
Greg +1: Claude Sonnet 4.6AttendanceReportsPage, LateArrivalsPage, TeacherAttendancePage: holiday- blocking date inputs. HolidaysPage: allowHolidays + cache invalidation on create/delete. EnrollmentsPage birthdate: allowHolidays. TeacherAttendancePage Tarjetas button no longer disabled by schedule; title updated to informational. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>33561bb -
feat(purge): admin sees amber banner after data purge with dismiss action
Greg +1: Claude Sonnet 4.6- authStore: adds account_purged_at field to user type - authService: exports acknowledgePurge() calling POST /auth/ack-purge - PurgeBanner: amber banner with purge date and dismiss button (admin only) - DashboardPage: renders PurgeBanner at top of page Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>309c40b -
feat(developer): UI button + modal to trigger demo purge
Greg +1: Claude Sonnet 4.6Adds PurgeDemoModal (two-step: warning then password confirmation) and wires a "Zona peligrosa" section into the DeveloperPage dashboard tab. Button is guarded by user.role === 'developer'. On success shows row count and refreshes dashboard. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>47a0040 -
feat(representative): add Ver horario button per child
Greg +1: Claude Sonnet 4.6Shown inline next to section name when section_id is available. section_id already present in ChildAttendance type, no backend change needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>ba082ae -
feat(teacher): add Horario button on each section card
Greg +1: Claude Sonnet 4.6Opens ScheduleViewerModal for the section. Uses CalendarDays icon, secondary gray style, placed to the left of the Asistencia button. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>f4ca6fd -
fix(enrollments): pass sectionSubjects to ScheduleModal (was undefined)
Greg +1: Claude Opus 4.7 (1M context)EnrollmentsPage instancia ScheduleModal en la linea 900 y se me paso actualizar la prop cuando renombre 'subjects' a 'sectionSubjects' en commit fc9e304. Resultado: sectionSubjects llegaba undefined y el useEffect del modal explotaba con 'Cannot read properties of undefined (reading map)' al abrir la pagina de Matriculas. Fix: pasar items.find(...).subjects igual que SectionsPage hace. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>357c065 -
feat(schedule): spinner, filtered subjects, and teacher name in modal
Greg +1: Claude Opus 4.7 (1M context)Cambios coordinados al modal de horario por sección: Backend: - SectionScheduleResponse incluye teacher_id y teacher_name. - list_section_schedules + update_section_schedules baten un solo query contra TeacherSection para resolver (section_id, subject_id) -> teacher y populan teacher_name en la respuesta. Frontend: - ScheduleModal: nuevo state loading con LoadingState centrado mientras llega el fetch inicial. Antes mostraba grilla vacia durante ~750ms. - ScheduleModal: prop renombrada a sectionSubjects y filtra el dropdown a SOLO las materias asignadas a esa seccion. "+ Crear materia" sigue funcionando. - Bloque renderiza "Subject - Teacher" cuando hay docente asignado. - SectionsPage pasa items.find(...).subjects al nuevo prop. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>fc9e304 -
feat(ui): paginate Teacher Subjects and Sections lists
Greg +1: Claude Opus 4.7 (1M context)Client-side pagination en TeacherSubjectsPage y TeacherSectionsPage, 10 items por página, mismo estilo de botones que SubjectsPage admin (linea 98-104). No requiere cambios de backend ni de service signature porque los endpoints ya devuelven la lista completa rápido (post-fix N+1) y el dataset por docente es chico (<20 items típicos). Pagination solo se muestra si hay más de una página. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>e3ecb50 -
fix(ui): spinner antes de empty-state en Teacher Subjects/Sections
Greg +1: Claude Opus 4.7 (1M context)Ambas páginas hacían early-return con el mensaje "No tienes materias/ secciones asignadas" cuando array.length === 0, lo cual incluía el estado inicial pre-fetch. Resultado: el usuario veía el mensaje de "sin asignaciones" durante 1-2s mientras cargaba, aunque sí tuviera. Fix: agregar loading state (true inicial), gate del early-return de empty-state al loading=false, mostrar LoadingState mientras carga. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>8d9a518 -
feat(ui): add spinner to Subjects, Sections and Settings pages
Greg +1: Claude Opus 4.7 (1M context)Three pages que el grep inicial no agarró: - SubjectsPage/SectionsPage usan empty-state inline en <tbody> ("Sin materias"/"Sin secciones") en vez del patrón "No hay..." envuelto. Agregado loading state + LoadingState dentro de la fila. - SettingsPage es página de formulario (no listado) y ya tenía un text "Cargando..." plain en línea 43. Reemplazado por LoadingState con spinner + mensaje. Initial loading=true para que el spinner se vea desde el mount. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>f3bd639 -
feat(ui): show spinner during list page load instead of empty-state
Greg +1: Claude Opus 4.7 (1M context)10 list pages now display a LoadingState spinner on mount while data fetches, preventing the misleading "No hay registros" flash before results arrive. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>257cf06
-
fix(checkin): el modo facial/manual reacciona al cambio de config (sin re-login)
Greg +1: Claude Opus 4.7 (1M context)current-mode devuelve checkin_mode de la cuenta; la página enciende/apaga la cámara según ese valor (antes usaba user.checkin_mode cacheado del login). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>c513bff -
fix(checkin): permitir la página de asistencia en producción (HTTPS), no solo LAN
Greg +1: Claude Opus 4.7 (1M context)Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>8195ad1 -
Quick wins de asistencia: auditoría, tardanzas, dashboard, portal representante y matrícula
Greg +1: Claude Opus 4.7 (1M context)Check-in / asistencia: - Check-in público: toggle Entrada/Salida MANUAL; detección de entrada tardía, salida temprana y salida tardía (+1h) contra account.schedule + tolerancia. - Vista docente: bloqueo de marcar antes del horario, aviso por falta de ingreso, batch-toggle por fecha. Cableado a EntranceLog (check-in real) — antes leían Attendance: - Dashboard admin (KPIs, gráfica, actividad reciente). - Reportes (historial) con filtro por rol + export CSV. - Tardanzas: todos los roles + filtro por rol + export CSV. - Fix: materias del docente en dashboard se cuentan vía TeacherSection (no el legacy Section.subject_id); _teacher_section_ids ahora distinct. Auditoría: - Helper utils/audit.py (log_action/log_for) + wiring en login, reset de contraseña, alta/edición/baja de usuario y matrícula/desmatrícula (con IP). Portal Representante ("Mis Hijos"): - Muestra ingreso al plantel (EntranceLog) + asistencia a clase (Attendance) + alerta de discrepancia (entró al plantel pero no …8381024
-
Preparar despliegue en fly.io: monolito dockerizado + seeder demo
Greg +1: Claude Opus 4.7 (1M context)- Dockerfile monolito multi-stage (Vite build + backend FastAPI sirviendo el SPA) - dlib via wheel precompilado (dlib-bin) para evitar compilacion pesada/OOM - main.py sirve el SPA con fallback de rutas (guardia anti path-traversal) - entrypoint.sh: espera DB, crea esquema (create_all), siembra demo, uvicorn - seed_demo.py: cuenta demo venezolana (materias, secciones, docentes, representantes, 35 estudiantes en una seccion c/u), asistencia de hoy simulada (facial presente / solo ingreso / tarde / manual / ausente), historial de 10 dias y feriados del calendario escolar - fly.toml (app) + deploy/fly.db.toml (MySQL) + deploy/DEPLOY.md - docker-compose.monolith.yml para prueba local (validada end-to-end) - Asistencia docente: bloqueo antes del horario, aviso por falta de ingreso, batch-toggle por fecha; matricula de una sola seccion por estudiante; ScheduleModal: poblar formulario al clic en bloque/celda Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>6aa6081