Open
Conversation
…nte y pruebas Contexto de negocio: - Se implementa el requerimiento PR 2 del challenge: agregar el KPI % ocupacion en Dashboard. - El objetivo es exponer una metrica operativa accionable sin romper la experiencia visual existente. Implementacion funcional: - DashboardView ahora calcula occupancy_percentage usando la formula: reservas confirmadas (state=NEW) / total de habitaciones * 100. - Se contempla el caso borde sin habitaciones para evitar division por cero, devolviendo 0. Mejoras de interfaz (reutilizando el diseño actual): - Se mantiene el lenguaje visual del proyecto y se refuerza con un layout en grid responsivo para widgets. - Se agrega una nueva tarjeta para % ocupacion alineada al resto de indicadores. - Se mejora legibilidad con jerarquia visual consistente, colores diferenciados por KPI y estructura adaptativa para desktop/mobile. Calidad y verificacion: - Se añadieron tests para validar el KPI en escenario normal y sin habitaciones. - Suite ejecutada: python manage.py test pms.tests.RoomsFilterTests pms.tests.DashboardOccupancyTests pms.tests.DashboardOccupancyWithoutRoomsTests. - Resultado: OK (5 tests).
- Detalla objetivo, alcance y criterio de cálculo - Enumera archivos impactados y pruebas ejecutadas - Resume impacto operativo y analítico esperado
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumen
Este PR incorpora en Dashboard un indicador de % de ocupación para exponer rápidamente el estado operativo de habitaciones y facilitar decisiones diarias de revenue y disponibilidad.
Qué cambia
0%) para evitar divisiones por cero.Valor funcional
Archivos relevantes
pms/views.pypms/templates/dashboard.htmlpms/statics/css/style.csspms/tests.pydocs/pr-2-dashboard-occupancy.mdValidación / pruebas
0),Información para Deploy
Consideraciones operativas
Documentación
Existe documentación detallada para PM/Arquitectura y Deploy en:
docs/pr-2-dashboard-occupancy.md