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 -
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 -
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): 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
-
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 -
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
-
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): 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(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 -
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): 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
-
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