From e1c2c6e8c6dfb3825bbf7e788cdd93f9e6d4061c Mon Sep 17 00:00:00 2001 From: Carlos Tello Date: Wed, 7 Oct 2026 22:26:52 -0300 Subject: [PATCH] feat(schedule): group reservations by real time slots and clean date-time formatting v3.4.2 --- CHANGELOG.md | 13 +++ MEMORY.md | 14 ++- ROADMAP.md | 2 +- backend/app/__init__.py | 2 +- backend/app/routes/api/openapi.py | 2 +- backend/setup.py | 2 +- frontend/package.json | 2 +- frontend/src/app.js | 67 +++++++++-- frontend/src/routes/schedule.js | 182 +++++++++++++++++++++++++---- frontend/views/schedule/list.html | 12 +- frontend/views/schedule/today.html | 121 +++++++++++-------- frontend/views/schedule/view.html | 8 +- 12 files changed, 334 insertions(+), 93 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f72d56b..df8bd05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,19 @@ El formato está basado en [Keep a Changelog](https://keepachangelog.com/es-ES/1 - **Sincronización Continua Moodle (Fase 6):** Automatización de workers persistentes en background para el procesamiento continuo de la cola de Web Services Moodle 4.1. - **Pruebas de Carga y Hardening (Fase 6):** Pruebas de estrés de concurrencia y validación final de producción. +## [3.4.2] - 2026-10-07 +### Corregido & Mejorado (UX/UI) +- **Agrupación Cronológica de Reservas en Cartelera del Día (`/schedule/today_schedule`):** + - Corrección del bug que duplicaba visualmente una misma reserva por cada hora que abarcaba la cursada (eliminación del bucle `for` de franjas horarias artificiales de 1 hora). + - Implementación de agrupación nativa por franja horaria real de cursada (`grouped_slots`, ej. `08:00 - 11:00 hs`, `18:30 - 21:00 hs`). + - Cada reserva se muestra agrupada exactamente una sola vez en su bloque horario correspondiente, mostrando turno, duración, cupo, aula física/virtual, docente y enlace de videoconferencia. +- **Optimización de Formato de Fecha y Horario en el Sistema (`/schedule/list_reservations`, etc.):** + - Reemplazo del formato ISO crudo con 'T' y segundos (`2026-10-08T08:00:00 - 2026-10-08T11:00:00 hs`) por formato amigable en español: + - Fecha: `Jueves 08/10/2026` / `08/10/2026`. + - Horario: `08:00 - 11:00 hs`. + - Creación de la función utilitaria `formatReservationDates` en el BFF y nuevos filtros Nunjucks (`format_date_human`, `format_time`, `format_time_range`). + - Actualización de las vistas de tabla y mosaico/tarjetas en `list.html`, `today.html` y `view.html`. + ## [3.4.1] - 2026-10-07 ### Corregido - **Corrección de Bug en Importador de Google Sheets (`ReferenceError: availableCareers is not defined`):** diff --git a/MEMORY.md b/MEMORY.md index c902e3b..aefa72b 100644 --- a/MEMORY.md +++ b/MEMORY.md @@ -89,7 +89,17 @@ Memoria del proyecto entre sesiones para la rama `dev`. - Versionado elevado a `v3.4.1`. - Desplegado exitosamente en el servidor LXC `10.0.0.217` (`https://eduspace.oemspot.com.ar`). - Verificación HTTP 200 en `/version`, login admin, `/admin/google_sheets_import`, dashboards modularizados de los 4 roles y cuenta institucional de Bedelía. +- **Sprint UX/UI: Agrupación Cronológica de Reservas y Formato Limpio de Fechas (v3.4.2)**: + - **Problema 1: Duplicación de Reservas por Hora en Cartelera**: + - En `/schedule/today_schedule`, un bucle fijo `for (let hour = 7; hour <= 21; hour++)` insertaba la misma reserva en cada bloque horario de 1 hora que abarcaba la materia (ej. Marketing Digital de 08:00 a 11:00 hs aparecía repetida a las 8, 9 y 10). + - **Solución**: Se eliminó la clonación artificial y se introdujo la agrupación nativa por franja horaria real de cursada (`grouped_slots`, ej. `08:00 - 11:00 hs`, `18:30 - 21:00 hs`). Cada reserva aparece agrupada exactamente UNA SOLA VEZ en su bloque horario correspondiente con turno, duración, aula, cupo y enlace a Meet/Zoom. + - **Problema 2: Formato ISO Crudo en Listado de Reservas**: + - En `/schedule/list_reservations` (tabla y tarjetas) se mostraban strings crudos con 'T' y segundos (`2026-10-08T08:00:00 - 2026-10-08T11:00:00 hs`). + - **Solución**: Se enriquecieron todas las reservas con la función `formatReservationDates` y nuevos filtros Nunjucks (`format_date_human`, `format_time`, `format_time_range`), mostrando fecha limpia (`Jueves 08/10/2026` / `08/10/2026`) y horario amigable (`08:00 - 11:00 hs`). + - **Bump Semántico y Despliegue Obligatorio (Principio 9)**: + - Versión incrementada a `v3.4.2` en Frontend y Backend. + - Despliegue inmediato al servidor institucional `10.0.0.217` y verificación en caliente. ## Próximos pasos -1. Monitoreo del uso del nuevo panel modularizado de Bedelía por parte de los operadores. -2. Continuar con los objetivos de la Fase 6 del Roadmap institucional. \ No newline at end of file +1. Continuar con los objetivos de la Fase 6 del Roadmap institucional. +2. Monitoreo continuo de la experiencia de usuario en Bedelía y Cartelera del Día. \ No newline at end of file diff --git a/ROADMAP.md b/ROADMAP.md index c158473..9517e6f 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -2,7 +2,7 @@ ## Gestión de Espacios Áulicos, Asignación de Comisiones y Operatoria de Bedelía **Institución:** Universidad de la Ciudad de Buenos Aires (UniCABA) -**Versión:** 3.4.1 (Sprint Modularización de Vistas, Aulas Virtuales & Workflow Mandatorio) +**Versión:** 3.4.2 (Sprint UX/UI: Agrupación Cronológica de Reservas y Formato Limpio de Fechas) **Fecha de Actualización:** 07 de Octubre de 2026 **Rama Base:** `dev` diff --git a/backend/app/__init__.py b/backend/app/__init__.py index 5a9b9bf..63f2099 100644 --- a/backend/app/__init__.py +++ b/backend/app/__init__.py @@ -6,7 +6,7 @@ from flask_babel import Babel, gettext as _ from config.config import Config # Initialize extensions -__version__ = "3.4.1" +__version__ = "3.4.2" db = SQLAlchemy() migrate = Migrate() cors = CORS() diff --git a/backend/app/routes/api/openapi.py b/backend/app/routes/api/openapi.py index cb74bb2..9e3d8ee 100644 --- a/backend/app/routes/api/openapi.py +++ b/backend/app/routes/api/openapi.py @@ -7,7 +7,7 @@ OPENAPI_SPEC = { "info": { "title": "Edu-Space REST API", "description": "Enterprise Academic & Physical Space Management REST API with JWT Authentication and Role-Based Access Control.", - "version": "3.4.1" + "version": "3.4.2" }, "servers": [ { diff --git a/backend/setup.py b/backend/setup.py index 1364fe1..53b3077 100644 --- a/backend/setup.py +++ b/backend/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name="edu-space-admin", - version="3.4.1", + version="3.4.2", description="Administrative interface for Edu-Space Classroom Management System", author="Edu-Space Development Team", author_email="admin@edu-space.com", diff --git a/frontend/package.json b/frontend/package.json index 112c76d..567eabd 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "3.4.1", + "version": "3.4.2", "description": "", "main": "index.js", "scripts": { diff --git a/frontend/src/app.js b/frontend/src/app.js index 57359f9..55c7d12 100644 --- a/frontend/src/app.js +++ b/frontend/src/app.js @@ -85,9 +85,9 @@ const env = nunjucks.configure(path.join(__dirname, '../views'), { }); // Versiones institucionales del sistema -const APP_VERSION = '3.4.1'; -const FRONTEND_VERSION = '3.4.1'; -const BACKEND_VERSION = '3.4.1'; +const APP_VERSION = '3.4.2'; +const FRONTEND_VERSION = '3.4.2'; +const BACKEND_VERSION = '3.4.2'; env.addGlobal('app_version', APP_VERSION); env.addGlobal('frontend_version', FRONTEND_VERSION); @@ -129,20 +129,73 @@ env.addFilter('format', function(str, ...args) { const formatDateHelper = function(d, fmt) { if (!d) return ''; - if (typeof d === 'string') return d.split('T')[0]; - return new Date(d).toISOString().split('T')[0]; + let str = String(d); + let datePart = str.includes('T') ? str.split('T')[0] : (str.includes(' ') ? str.split(' ')[0] : str); + if (datePart.match(/^\d{4}-\d{2}-\d{2}$/)) { + const [y, m, day] = datePart.split('-'); + const year = parseInt(y, 10); + const month = parseInt(m, 10); + const dayNum = parseInt(day, 10); + const dObj = new Date(year, month - 1, dayNum); + const daysNames = ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado']; + const monthsNames = ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre']; + const dayName = daysNames[dObj.getDay()] || ''; + const monthName = monthsNames[month - 1] || ''; + const dayPad = String(dayNum).padStart(2, '0'); + const monthPad = String(month).padStart(2, '0'); + + if (fmt === 'long' || fmt === 'human') { + return `${dayName} ${dayPad}/${monthPad}/${year}`; + } + if (fmt === 'full') { + return `${dayName}, ${dayPad} de ${monthName} de ${year}`; + } + return `${dayPad}/${monthPad}/${year}`; + } + return datePart; }; const formatDateTimeHelper = function(d, fmt) { if (!d) return ''; - if (typeof d === 'string') return d.replace('T', ' ').substring(0, 16); - return new Date(d).toLocaleString(); + let str = String(d); + let datePart = formatDateHelper(str); + let timePart = ''; + if (str.includes('T')) { + timePart = str.split('T')[1].substring(0, 5) + ' hs'; + } else if (str.includes(' ')) { + timePart = str.split(' ')[1].substring(0, 5) + ' hs'; + } + return timePart ? `${datePart} ${timePart}` : datePart; +}; + +const formatTimeCleanHelper = function(d) { + if (!d) return ''; + let str = String(d); + if (str.includes('T')) return str.split('T')[1].substring(0, 5) + ' hs'; + if (str.includes(' ')) return str.split(' ')[1].substring(0, 5) + ' hs'; + if (str.match(/^\d{2}:\d{2}/)) return str.substring(0, 5) + ' hs'; + return str; +}; + +const formatTimeRangeHelper = function(start, end) { + if (!start) return ''; + let s = String(start); + let e = String(end || ''); + let st = s.includes('T') ? s.split('T')[1].substring(0, 5) : (s.includes(' ') ? s.split(' ')[1].substring(0, 5) : s.substring(0, 5)); + let et = e.includes('T') ? e.split('T')[1].substring(0, 5) : (e.includes(' ') ? e.split(' ')[1].substring(0, 5) : e.substring(0, 5)); + return et ? `${st} - ${et} hs` : `${st} hs`; }; env.addGlobal('format_date', formatDateHelper); env.addGlobal('format_datetime', formatDateTimeHelper); +env.addGlobal('format_time', formatTimeCleanHelper); +env.addGlobal('format_time_range', formatTimeRangeHelper); + env.addFilter('format_date', formatDateHelper); env.addFilter('format_datetime', formatDateTimeHelper); +env.addFilter('format_date_human', function(d) { return formatDateHelper(d, 'human'); }); +env.addFilter('format_time', formatTimeCleanHelper); +env.addFilter('format_time_range', formatTimeRangeHelper); env.addFilter('tojson', function(val) { return JSON.stringify(val !== undefined ? val : null); diff --git a/frontend/src/routes/schedule.js b/frontend/src/routes/schedule.js index 6352822..a4a5566 100644 --- a/frontend/src/routes/schedule.js +++ b/frontend/src/routes/schedule.js @@ -125,11 +125,132 @@ const handleCalendarData = async (req, res) => { router.get('/calendar_data', handleCalendarData); router.get('/calendar-data', handleCalendarData); +// Función utilitaria para normalizar y formatear fechas, horarios y atributos de una reserva +function formatReservationDates(r) { + if (!r) return r; + const rawStart = r.start_time ? String(r.start_time) : ''; + const rawEnd = r.end_time ? String(r.end_time) : ''; + + // Extraer fecha 'YYYY-MM-DD' + let dateStr = ''; + if (rawStart.includes('T')) { + dateStr = rawStart.split('T')[0]; + } else if (rawStart.includes(' ')) { + dateStr = rawStart.split(' ')[0]; + } else if (rawStart.match(/^\d{4}-\d{2}-\d{2}/)) { + dateStr = rawStart.substring(0, 10); + } + + // Extraer horas HH:mm + let startTimeStr = '08:00'; + let endTimeStr = '10:00'; + if (rawStart.includes('T')) { + startTimeStr = rawStart.split('T')[1].substring(0, 5); + } else if (rawStart.includes(' ')) { + startTimeStr = rawStart.split(' ')[1].substring(0, 5); + } else if (rawStart.match(/^\d{2}:\d{2}/)) { + startTimeStr = rawStart.substring(0, 5); + } + + if (rawEnd.includes('T')) { + endTimeStr = rawEnd.split('T')[1].substring(0, 5); + } else if (rawEnd.includes(' ')) { + endTimeStr = rawEnd.split(' ')[1].substring(0, 5); + } else if (rawEnd.match(/^\d{2}:\d{2}/)) { + endTimeStr = rawEnd.substring(0, 5); + } + + // Formatear fecha en español + let date_short = dateStr; + let date_display = dateStr; + let date_full = dateStr; + if (dateStr && dateStr.includes('-')) { + const parts = dateStr.split('-'); + if (parts.length === 3) { + const year = parseInt(parts[0], 10); + const month = parseInt(parts[1], 10); + const day = parseInt(parts[2], 10); + const dObj = new Date(year, month - 1, day); + const daysNames = ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado']; + const monthsNames = ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre']; + const dayName = daysNames[dObj.getDay()] || ''; + const monthName = monthsNames[month - 1] || ''; + const dayPad = String(day).padStart(2, '0'); + const monthPad = String(month).padStart(2, '0'); + + date_short = `${dayPad}/${monthPad}/${year}`; + date_display = `${dayName} ${dayPad}/${monthPad}/${year}`; + date_full = `${dayName}, ${dayPad} de ${monthName} de ${year}`; + } + } + + // Calcular duración amigable + let durationMinutes = 0; + if (startTimeStr && endTimeStr) { + const [sh, sm] = startTimeStr.split(':').map(Number); + const [eh, em] = endTimeStr.split(':').map(Number); + durationMinutes = (eh * 60 + em) - (sh * 60 + sm); + if (durationMinutes < 0) durationMinutes += 24 * 60; + } + let duration_display = '2 hs'; + if (durationMinutes > 0) { + const hours = Math.floor(durationMinutes / 60); + const mins = durationMinutes % 60; + if (mins === 0) { + duration_display = `${hours} hs`; + } else { + duration_display = `${hours}h ${mins}m`; + } + } + + const isVirt = Boolean(r.is_virtual || (r.classroom && r.classroom.is_virtual) || (r.classroom_name && r.classroom_name.includes('VIRTUAL'))); + const startHour = parseInt(startTimeStr.split(':')[0], 10) || 8; + let inferredShift = r.shift; + if (!inferredShift) { + if (startHour >= 18) inferredShift = 'Noche'; + else if (startHour >= 13) inferredShift = 'Tarde'; + else inferredShift = 'Mañana'; + } + + return { + ...r, + raw_start_time: rawStart, + raw_end_time: rawEnd, + start_time: startTimeStr, + end_time: endTimeStr, + start_time_clean: startTimeStr, + end_time_clean: endTimeStr, + start_time_display: `${startTimeStr} hs`, + end_time_display: `${endTimeStr} hs`, + time_display: `${startTimeStr} - ${endTimeStr} hs`, + time_range: `${startTimeStr} - ${endTimeStr} hs`, + duration_minutes: durationMinutes, + duration_display, + date_raw: dateStr, + date_short, + date_display, + date_full, + shift: inferredShift, + is_virtual: isVirt, + subject_name: r.subject_name || r.purpose || 'Clase Regular', + subject_code: r.subject_code || '', + effective_virtual_link: r.effective_virtual_link || r.virtual_link || '', + classroom: r.classroom || { + code: r.classroom_name || (isVirt ? 'VIRTUAL' : 'Sin Aula'), + floor: isVirt ? 0 : 1, + is_virtual: isVirt, + building: isVirt ? 'Campus Virtual' : 'Edificio Central' + }, + user: r.user || { name: r.teacher_name || 'Docente' } + }; +} + // 3. Vista de Lista de Reservas const handleReservationsList = async (req, res) => { try { const response = await req.apiClient.get('/reservations'); - const reservations = (response.data && response.data.reservations) || []; + const rawReservations = (response.data && response.data.reservations) || []; + const reservations = rawReservations.map(formatReservationDates); res.render('schedule/list', { title: 'Listado de Reservas - Edu-Space Admin', @@ -190,35 +311,46 @@ const handleTodaySchedule = async (req, res) => { const response = await req.apiClient.get('/reservations', { params }); let rawReservations = (response.data && response.data.reservations) || []; - // Format each reservation for the template - const reservations = rawReservations.map(r => { - const st = r.start_time.includes('T') ? r.start_time.split('T')[1].substring(0, 5) : r.start_time; - const et = r.end_time.includes('T') ? r.end_time.split('T')[1].substring(0, 5) : r.end_time; - const isVirt = Boolean(r.is_virtual || (r.classroom && r.classroom.is_virtual)); - return { - ...r, - start_time: st, - end_time: et, - subject_name: r.subject_name || r.purpose || 'Clase Regular', - subject_code: r.subject_code || '', - effective_virtual_link: r.effective_virtual_link || r.virtual_link || '', - is_virtual: isVirt, - classroom: r.classroom || { code: r.classroom_name || (isVirt ? 'VIRTUAL' : 'Sin Aula'), floor: isVirt ? 0 : 1, is_virtual: isVirt }, - user: r.user || { name: r.teacher_name || 'Docente' } - }; + // Formatear cada reserva con atributos enriquecidos + const reservations = rawReservations.map(formatReservationDates); + + // Agrupar en franjas horarias reales (Time Slots) para que cada reserva aparezca agrupada y una sola vez + const slotsMap = new Map(); + reservations.forEach(r => { + const slotKey = `${r.start_time} - ${r.end_time}`; + if (!slotsMap.has(slotKey)) { + slotsMap.set(slotKey, { + key: slotKey, + start_time: r.start_time, + end_time: r.end_time, + time_display: r.time_display, + duration_display: r.duration_display, + shift: r.shift, + items: [] + }); + } + slotsMap.get(slotKey).items.push({ + reservation: r, + classroom: r.classroom, + commission: r.commission, + user: r.user + }); }); - // Build time_blocks for hours 7 to 21 + // Ordenar slots cronológicamente por horario de inicio y fin + const grouped_slots = Array.from(slotsMap.values()).sort((a, b) => { + return a.start_time.localeCompare(b.start_time) || a.end_time.localeCompare(b.end_time); + }); + + // Mantener time_blocks por compatibilidad (asigna a la hora de inicio sin duplicar) const time_blocks = {}; for (let hour = 7; hour <= 21; hour++) { time_blocks[hour] = []; } - reservations.forEach(r => { const startHour = parseInt(r.start_time.split(':')[0], 10) || 8; - const endHour = parseInt(r.end_time.split(':')[0], 10) || (startHour + 2); - for (let h = Math.max(7, startHour); h <= Math.min(21, endHour - 1); h++) { - time_blocks[h].push({ + if (time_blocks[startHour]) { + time_blocks[startHour].push({ reservation: r, classroom: r.classroom, commission: r.commission, @@ -227,7 +359,7 @@ const handleTodaySchedule = async (req, res) => { } }); - // Compute stats + // Computar estadísticas const confirmed = reservations.filter(r => r.status === 'CONFIRMED').length; const pending = reservations.filter(r => r.status === 'PENDING').length; const occupied_classrooms = new Set(reservations.map(r => r.classroom_id).filter(Boolean)).size; @@ -245,6 +377,7 @@ const handleTodaySchedule = async (req, res) => { res.render('schedule/today', { title: 'Cartelera del Día - Edu-Space Admin', reservations, + grouped_slots, time_blocks, stats, today: todayStr, @@ -263,6 +396,7 @@ const handleTodaySchedule = async (req, res) => { res.render('schedule/today', { title: 'Cartelera del Día (Offline)', reservations: [], + grouped_slots: [], time_blocks: {}, stats: { total_reservations: 0, confirmed: 0, pending: 0, occupied_classrooms: 0, total_classrooms: 59 }, today: fallbackToday, @@ -461,9 +595,11 @@ const handleViewReservation = async (req, res) => { const response = await req.apiClient.get(`/reservations/${id}`); const r = response.data; + const formatted = formatReservationDates(r); const resObj = { ...r, + ...formatted, status: { value: (r.status || 'CONFIRMED').toUpperCase(), toString: () => (r.status || 'CONFIRMED').toUpperCase() diff --git a/frontend/views/schedule/list.html b/frontend/views/schedule/list.html index 62b4d9c..95ba3e8 100644 --- a/frontend/views/schedule/list.html +++ b/frontend/views/schedule/list.html @@ -173,8 +173,12 @@ {% for reservation in reservations.items %} -
{{ reservation.start_time }}
- {{ reservation.start_time }} - {{ reservation.end_time }} hs +
+ {{ reservation.date_display or reservation.date_short or format_date_human(reservation.start_time) }} +
+ + {{ reservation.time_display or (reservation.start_time ~ ' - ' ~ reservation.end_time ~ ' hs') }} + @@ -258,10 +262,10 @@
- {{ reservation.start_time }} + {{ reservation.date_display or reservation.date_short or format_date_human(reservation.start_time) }}
- {{ reservation.start_time }} - {{ reservation.end_time }} hs + {{ reservation.time_display or (reservation.start_time ~ ' - ' ~ reservation.end_time ~ ' hs') }}
{% if reservation.status == 'CONFIRMED' or reservation.status.value == 'CONFIRMED' %} diff --git a/frontend/views/schedule/today.html b/frontend/views/schedule/today.html index 0b1e255..a74d3fe 100644 --- a/frontend/views/schedule/today.html +++ b/frontend/views/schedule/today.html @@ -179,25 +179,35 @@
-
- +
- {% for hour in range(7, 22) %} -
-
-
- {% if hour < 10 %}0{% endif %}{{ hour }}:00 -
{{ hour+1 }}:00 hs
+ {% for slot in grouped_slots %} +
+
+
+
+ {{ slot.shift }} +
+ {{ slot.start_time }} +
a {{ slot.end_time }} hs
+
+ {{ slot.duration_display }} +
+
+ + {{ slot.items | length }} {% if slot.items | length == 1 %}asignatura{% else %}asignaturas{% endif %} + +
-
- {% if time_blocks[hour] %} -
- {% for item in time_blocks[hour] %} -
-
-
+
+
+ {% for item in slot.items %} +
+
+
+
@@ -207,62 +217,76 @@ {{ item.reservation.subject_code }} - {{ item.reservation.shift or 'Tarde' }} + {{ item.reservation.shift or slot.shift }} + {% if item.reservation.commission %} + + {{ item.reservation.commission.code or item.reservation.commission.name }} + + {% endif %}
{% if item.reservation.status == 'CONFIRMED' or item.reservation.status.value == 'CONFIRMED' %} - Confirmada + Confirmada {% else %} - Pendiente + Pendiente {% endif %}
+ {% if item.reservation.is_virtual %} + {{ item.classroom.code }} + {% else %} {{ item.classroom.code }} + {% endif %} {% if item.classroom.floor == 0 %}PB{% else %}Piso {{ item.classroom.floor }}{% endif %} + {% if item.classroom.building %} · {{ item.classroom.building }}{% endif %} - {{ item.reservation.start_time }} - {{ item.reservation.end_time }} hs + {{ item.reservation.time_display }}
- -
- - {{ item.reservation.expected_attendees }} estudiantes - -
- {% if item.reservation.effective_virtual_link %} - - Zoom/Meet - - {% endif %} - {% if user.can_edit_reservation(item.reservation) %} - - - - {% endif %} - - Detalles - -
+
+ +
+ + {{ item.reservation.expected_attendees }} estudiantes + {% if item.reservation.teacher_name or item.user.name %} + · {{ item.reservation.teacher_name or item.user.name }} + {% endif %} + +
+ {% if item.reservation.effective_virtual_link %} + + Zoom/Meet + + {% endif %} + {% if user.can_edit_reservation(item.reservation) %} + + + + {% endif %} + + Detalles +
- {% endfor %}
- {% else %} -
- Sin clases programadas en este horario -
- {% endif %} + {% endfor %} +
+ {% else %} +
+ + No hay clases programadas para esta fecha con los filtros aplicados. +
{% endfor %}
@@ -284,15 +308,16 @@ {% for reservation in reservations %} - - {{ reservation.start_time }} - {{ reservation.end_time }} hs + + {{ reservation.time_display }} {{ reservation.classroom.code if reservation.classroom else 'Sin Aula' }} - {% if reservation.classroom and reservation.classroom.floor == 0 %}Planta Baja{% elif reservation.classroom %}Piso {{ reservation.classroom.floor }}{% endif %} + {% if reservation.classroom and reservation.classroom.floor == 0 %}PB{% elif reservation.classroom %}Piso {{ reservation.classroom.floor }}{% endif %} + {% if reservation.classroom and reservation.classroom.building %} · {{ reservation.classroom.building }}{% endif %} diff --git a/frontend/views/schedule/view.html b/frontend/views/schedule/view.html index 345f9a9..8e0ad01 100644 --- a/frontend/views/schedule/view.html +++ b/frontend/views/schedule/view.html @@ -56,11 +56,11 @@

- +

- - {{ format_date(reservation.start_time, format='long')|capitalize }}
- {{ reservation.start_time }} - {{ reservation.end_time }} + + {{ reservation.date_display or format_date(reservation.start_time, 'human') }}
+ {{ reservation.time_display or (reservation.start_time ~ ' - ' ~ reservation.end_time ~ ' hs') }}