Spaces:
Runtime error
Runtime error
Commit History
-
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 -
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): add adminAttendanceService client
Greg +1: Claude Sonnet 4.6Covers listSections, getRoster (with optional date), swipe, and batchToggle against /api/v1/admin/* endpoints. Uses the same default axios instance as teacherService so bearer auth is injected automatically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>2c6caad
-
feat(dashboard-ui): add SexBySectionChart component
Greg +1: Claude Opus 4.7 (1M context)Adds SexBySection interface + getSexBySection() to dashboardService, and creates the SexBySectionChart component with date range / section filters and a horizontal BarChart via Recharts (admin + teacher roles). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>ec0af58 -
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 -
feat(ui): DateInput wrapper blocks holiday selection by default
Greg +1: Claude Sonnet 4.6holidayService fetches /holidays/dates. useHolidays hook caches the Set<string> across components with module-level cache + invalidation. DateInput wraps <input type=date>, shows red border and warning when a holiday is selected (bypassed via allowHolidays prop). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>2e3220b -
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(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
-
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 -
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