Spaces:
Runtime error
Runtime error
Commit History
-
feat(ta-01): implement SupabaseStorage adapter with signed URLs
Greg +1: Claude Opus 4.7 (1M context)- SupabaseStorage uploads to {account_id}/{user_id}/{uuid}.{ext} inside the configured bucket via supabase-py. get_url() returns a short-lived signed URL (default 10 min TTL) so private buckets stay private. - _strip_url_prefix normalizes inputs so delete() works whether given a relative path or a full Supabase URL (with or without query token). - supabase>=2.0 added to requirements; SDK is lazily imported so the local backend (PHOTO_STORAGE_BACKEND=local) doesn't pay the cost. - AuthImage now passes http(s):// URLs through directly (Supabase signed URLs are already authenticated via the token query param). - Tests updated to cover credential check, prefix stripping for relative paths and signed URLs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>ea91fea -
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 -
fix(ta-01): replace mobile topbar with floating hamburger button
Greg +1: Claude Opus 4.7 (1M context)The fixed topbar was overlapping page-level action buttons (Crear, Carga Masiva). Replace it with a small circular FAB anchored top-left that opens the drawer without consuming a full row of vertical space. main-content now reserves left padding on mobile (pl-16) so page content doesn't sit underneath the FAB. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>d456a34 -
feat(ta-01): responsive layout with mobile hamburger drawer
Greg +1: Claude Opus 4.7 (1M context)- Mobile topbar (< md) with hamburger button on the left, brand on right - Sidebar slides in from the left as a drawer on mobile; static on md+ - Backdrop overlay closes the drawer on click - Auto-close on route change (useLocation effect) and after tapping a NavLink - Close button (X) inside the sidebar header on mobile - main-content pads for the topbar on mobile (pt-[4.5rem]) and the sidebar offset only applies on md+ (ml-0 md:ml-64) Sidebar receives optional mobileOpen + onClose props so the drawer state lives in Layout. The desktop experience is unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>c16d5c1
-
feat(ta-01): switch between front/back camera in CameraCapture
Greg55f0bbf -
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 -
feat(ta-01): spinner placeholder in AuthImage while fetching protected photo
Greg05b0bc2 -
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): 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(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 -
docs(dashboard-ui): rename chart and add subtitle clarifying scope
Greg +1: Claude Opus 4.7 (1M context)Chart now reads "Estudiantes asistentes por sexo" with a subtitle noting it only counts students with an EntranceLog in the range and excludes staff. Avoids confusion with the "Hoy ingresaron" stat card, which includes all roles. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>7c4129e -
feat(dashboard-ui): switch chart to pie + single-select section filter
Greg +1: Claude Opus 4.7 (1M context)Replaces the multi-select sections control with a single dropdown ("Todas las secciones" + each section). Replaces the horizontal grouped bar chart with a donut PieChart showing Masculino / Femenino (and Sin especificar when present) for the chosen scope. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>a01bd6f -
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(dashboard-ui): surface errors, refetch on Limpiar, hide empty chart skeleton
Greg +1: Claude Opus 4.7 (1M context)Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>17b88c0 -
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 -
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(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 -
revert(schedule-print): roll back tight print sizes and color-adjust
Greg +1: Claude Opus 4.7 (1M context)User reporta que el PDF sigue saliendo en 2 paginas pese a los apretones en commit fbc49b3, asi que se prefiere volver al estado previo (0.5in margin + sin overrides agresivos). El tema queda en backlog para revisitar con otra estrategia si vuelve a surgir. Revert volumetrico: - @page margin 0.3in -> 0.5in - Elimina overrides de gap/min-h/text en .schedule-print-area - Elimina print-color-adjust:exact global - Elimina page-break-inside: avoid Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>beb5744 -
fix(schedule-print): force background colors and squeeze grid to 1 page
Greg +1: Claude Opus 4.7 (1M context)Dos issues post primer intento de PDF horario: 1. Backgrounds no se imprimian: browsers tienen "Background graphics" en OFF por default en el dialogo de print, lo cual hace que los bg-blue-100/emerald-100/etc no salgan. Agregada regla global *,*::before,*::after { print-color-adjust: exact } que fuerza impresion de fondos sin importar el setting del usuario. 2. PDF seguia generando 2 paginas. Apretadas mas las reglas print: - margin @page: 0.35in -> 0.3in - gap del grid: 2px (override de gap-1) - min-h celdas: 28px (override de 40px compact) - text-xs/sm: 9px font, line-height 1.15 - padding interno bloque: 1px 4px - page-break-inside: avoid en grid y schedule-print-area para evitar split a segunda pagina Esto cubre escuela con 11 horas/dia x 5 dias = la grilla mas grande posible. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>fbc49b3 -
feat(schedule): fit PDF in single page + use plantel name as title
Greg +1: Claude Opus 4.7 (1M context)Backend: - /auth/me incluye organization_name desde Account; frontend lo persiste en authStore para uso en todo el cliente. Frontend: - ScheduleGrid en modo compact (print) ahora oculta filas de horas vacias (slots sin ningun bloque en dias visibles), reduciendo significativamente el alto total. Tamanos chicos: min-h 40px, text-xs, gap-1, time col 80px, padding ajustado. - ScheduleViewerModal usa organization_name del authStore como H1 primario del PDF y la seccion + periodo como subtitulo. - Print margin reducido de 0.5in a 0.35in para mas espacio util. Resultado: horario tipico (8-9 horas de clase, 5 dias) ahora cabe en una sola pagina letter landscape. Nota operativa: usuarios con session persistida vieja necesitan re-login para que organization_name aparezca en el authStore; mientras tanto el titulo PDF cae al subtitulo solo (Horario -- seccion). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>413032b -
fix(schedule): PDF was printing blank due to display:none cascade
Greg +1: Claude Opus 4.7 (1M context)El wrapper externo del modal tenia .no-print, y la regla .no-print { display: none !important } lo eliminaba con todos sus hijos, incluyendo .schedule-print-area. visibility: visible no puede override display: none de un ancestro. Cambios: - Renombrado el outer overlay y el modal box a print-overlay / print-modal-box (sin no-print). Visibility hidden del body * los oculta sin removerlos del DOM. - En print CSS, reseteo de fondo, sombras, max-height y overflow de esos contenedores para que el grid pueda fluir sin clipping. - Reforzados los !important en .schedule-print-area para escapar cualquier overflow/max-height heredado. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>e3aabbe -
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 -
feat(schedule): add ScheduleViewerModal with PDF print support
Greg +1: Claude Sonnet 4.6Modal wraps ScheduleGrid, fetches schedules on open, shows LoadingState. Descargar PDF calls window.print(). Print CSS added to global.css: letter landscape, schedule-print-area visibility, no-print for chrome. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>099a820 -
feat(schedule): add reusable ScheduleGrid read-only component
Greg +1: Claude Sonnet 4.6Pure read-only grid extracted from ScheduleModal logic. Supports compact mode (smaller padding/font) for print layout. No click/drag/edit handlers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>511ff3f -
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 -
feat(ui): add Spinner and LoadingState shared components
Greg +1: Claude Opus 4.7 (1M context)Adds a reusable Spinner (sm/md/lg) and a LoadingState convenience wrapper (centered spinner + optional message) for consistent loading feedback across pages. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>c11bebb
-
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