- Fix category mapping from 'Vanity Lashes'/'PMU Services' to 'Pestañas'/'Microblading'
- Update global products array when loading from API
- Add debug logging for categories and products count
- Add new payment methods: Otros, Interno, GiftCard
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix toggleCategory JavaScript error by adding null checks for productsGrid
- Fix product import persistence by changing from INSERT OR REPLACE to DELETE + INSERT
- Add automatic default product import on server startup when database is empty
- Ensure product data survives server restarts and imports
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add sales subtabs: Ventas and Tickets for better organization
- Implement manual anticipos with confirmation checkbox system
- Add automatic "Público General" for sales without specific client
- Reorganize service order: Clean Girl → Elegant → Mystery → Seduction
- Replace gradient with solid black header background
- Improve price alignment with grid layout
- Add sort_order field to products for consistent ordering
- Move movements section from dashboard to Tickets subtab
- Enhanced JavaScript functionality for subtab navigation
- Remove TASKS.md documentation file
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Refactor date generation to use direct string construction instead of
intermediate variables to prevent undefined values in ticket dates.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed unsafe string concatenation in print.js date function
- Replaced manual padding logic with String().padStart() method
- Updated cache busting to v1757039367 for proper reload
- Fixed default tab routing for regular users to 'Ventas'
- Enhanced ticket layout with right-aligned total and payment method
- Improved print styling with 72mm width and better spacing
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update APP_VERSION to 1.3.7 in app.js
- Update Docker image version to marcogll/ap_pos:1.3.7 in docker-compose.yml
- Minor patch release focusing on user role security improvements
Docker images published:
- marcogll/ap_pos:1.3.7 (new version)
- marcogll/ap_pos:latest (updated)
Security enhancements included:
✅ Proper dashboard/settings access control
✅ Sales deletion restricted to admin only
✅ Correct initial tab routing by role
✅ Fixed UI permission selectors
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix setupUIForRole selector to use correct data-tab attributes
- Hide Dashboard and Settings tabs for regular users (non-admin)
- Remove delete buttons from sales table for regular users
- Set initial tab to 'Ventas' for regular users instead of Dashboard
- Add comprehensive logging for role setup debugging
- Update cache buster to v=101.0 for proper browser refresh
Security improvements:
- Regular users: Access to Ventas, Clientes, Productos only
- Admin users: Full access to all sections including Dashboard/Settings
- Proper enforcement of user role restrictions in UI
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update APP_VERSION to 1.3.6 in app.js
- Update Docker image version to marcogll/ap_pos:1.3.6 in docker-compose.yml
- Published Docker images:
- marcogll/ap_pos:1.3.6
- marcogll/ap_pos:latest
- Includes all ticket date formatting corrections from previous commit
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix ticket date format from "04undefined09undefined2025" to proper "DD/MM/YYYY HH:MM"
- Implement proper date handling using movement's fechaISO timestamp
- Add bold formatting for Folio and Fecha labels in tickets
- Enhance appointment date picker with HTML5 date input
- Implement smart time slot availability checking
- Improve anticipo (advance payment) handling with better UX
- Add comprehensive filtering system for products table
- Update cache busting to v=99.9 for proper browser reload
- Modernize date/time components throughout the application
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added unified table for services, courses, and anticipos in Products tab
- Implemented table sorting by folio, date, appointment, and description
- Added filtering by product type and real-time search functionality
- Created action buttons with icons for edit, cancel/reactivate, and delete
- Added special handling for anticipos with appointment date/time fields
- Fixed JavaScript conflicts and function naming issues
- Integrated with existing product management system
- Added responsive design with category badges and status indicators
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Updated README.md version references from 1.8 to 1.3.5
- Changed Docker image from marcogll/ap_pos:latest to coderk/ap_pos:1.3.5
- Prepared Docker configuration for coderk deployment
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update docker-compose.yml to use latest image tag
- Add DB_PATH environment variable for explicit database location
- Configure bind mount for better data persistence in Coolify
- Add VOLUME directive in Dockerfile for data directory
- Ensure database survives container updates and restarts
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update version to 1.3.1 in package.json and docker-compose.yml
- Optimize Dockerfile with proper data directory structure for production
- Add comprehensive Docker documentation (DOCKER.md)
- Include deployment and backup scripts (deploy.sh, backup.sh)
- Add .env.example for environment configuration
- Improve README with detailed deployment instructions
- Fix database path handling for Docker production environment
- Add health checks and proper Docker Compose configuration
- Remove development task documentation
- Update .gitignore to exclude backup directories
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Se realizan varias mejoras a la aplicación:
- **UI/UX:**
- Se establece la pestaña "Registro" como la predeterminada en la sección de Clientes para agilizar el flujo de trabajo.
- Se unifica el estilo de todas las tablas para una apariencia consistente.
- Se mueve la sección de "Ubicación de datos" al final de la configuración y se simplifica su contenido para mayor claridad.
- **Documentación:**
- Se actualiza el `README.md` con una descripción detallada de las funcionalidades del sistema y las instrucciones para el despliegue a través de Docker.
- **Configuración:**
- Se añade `devtastks` al `.gitignore`.
- Se prepara y verifica la configuración de Docker para la construcción de la imagen.
Se realizan los siguientes cambios:
- Se estandariza el formato de fecha a dd/mm/aaaa en toda la aplicación (tablas, reportes, tickets) para consistencia.
- Se ajusta la versión de la aplicación a 1.3.0.
- Se reduce el tamaño del logo principal para mejorar la proporción visual.
- Se corrige el comportamiento de las pestañas de navegación para que en estado inactivo solo muestren el ícono.
- Se añade una sección discreta para la ubicación y exportación de datos, visible solo para administradores, con instrucciones para acceder a la base de datos en el contenedor Docker.
Se realizan los siguientes cambios:
- Se estandariza el formato de fecha a dd/mm/aaaa en toda la aplicación (tablas, reportes, tickets) para consistencia.
- Se ajusta la versión de la aplicación a 1.3.0.
- Se reduce el tamaño del logo principal para mejorar la proporción visual.
- Se corrige el comportamiento de las pestañas de navegación para que en estado inactivo solo muestren el ícono.
- Created setup.html for the initial configuration of the admin account.
- Implemented setup.js to handle form submission and validation.
- Added logo images for branding.
- Introduced storage.js for API data handling (load, save, remove).
- Added styles.css for consistent styling across the application.
- Corrected the client table rendering function to prevent UI breaking.
- Fixed a critical issue where data was not persisting in the local environment by ensuring an absolute path for the database.
- Implemented a temporary password reset mechanism to regain access and then removed it.
- Ensured client data is re-fetched from the server after saving to maintain UI consistency.
- Added subtypes for services (Service/Retouch).
- Implemented expandable client rows to show service history.
- Added a search bar to filter clients by name.
- Added 'Oncological' status column to the client list.
- Created a new API endpoint for client history.
fix(db): ensure database persistence in Docker
- The database path is now configurable via the DB_PATH environment variable.
- The Dockerfile has been updated to create a persistent volume for data.
- The README now contains the correct 'docker run' command for data persistence.
- Reverted to a dark/grey theme for UI elements.
- Replaced text-based logout button with a red icon.
- Redesigned the client form to a cleaner, single-column layout.
- Added 'Gender' field to the client form.
- Added a comprehensive section for 'Oncological Patient' status with conditional fields.
- Updated client database schema and API to support new fields.
- Standardized form input styles, including the telephone field.
- Updated version in the footer to 0.3.0.
- Add user's full name to the database and UI.\n- Allow admins to edit user details (name, username, role).\n- Allow users to edit their own name and password.\n- Automatically set the 'staff' field on new tickets to the current user's name.\n- Bold the 'Te atendió:' label in the printed ticket.
The dashboard was entering an infinite rendering loop, causing the browser to hang and eventually crash. This was likely due to Chart.js's responsive feature triggering a continuous cycle of updates and resizes.
This commit addresses the issue by:
- Modifying `loadDashboardData` to be more robust.
- Calling `incomeChart.update('none')` to prevent animation-related rendering loops.
- Adding a check to ensure the dashboard is still active before updating the DOM, preventing race conditions.
- Improving the re-entrancy guard and error handling within the function.
- Se actualiza el README principal para ofrecer una descripción general del proyecto y dirigir a la documentación específica.
- Se actualiza el README de la aplicación 'ap-pos' con la URL correcta del repositorio para la clonación.
Se soluciona un error crítico que causaba el bloqueo del navegador al visitar la pestaña del dashboard.
El problema era causado por la inicialización de la librería Chart.js en un elemento del DOM que no estaba visible, lo que provocaba un bucle de renderizado infinito.
La solución implementada consiste en:
- Inicializar el gráfico solo la primera vez que la pestaña del dashboard se hace visible.
- En visitas posteriores a la pestaña, solo se actualizan los datos del gráfico ya existente.
Se introduce un sistema completo de roles de usuario (admin, user) para controlar el acceso a las diferentes funcionalidades de la aplicación.
Funcionalidades y Cambios:
- Se añade la columna 'role' a la tabla de usuarios en la base de datos.
- El login ahora devuelve el rol del usuario y la sesión lo almacena.
- El Dashboard y la pestaña de Configuración ahora solo son visibles para los administradores.
- Los administradores tienen una nueva sección en "Configuración" para añadir y eliminar otros usuarios.
- Se implementan endpoints de API seguros ('/api/users') para la gestión de usuarios, accesibles solo por administradores.
- Se corrige un error que impedía la navegación entre pestañas y la interactividad general.
- Se soluciona un error de renderizado del gráfico del dashboard que causaba una sensación de "bucle".
- Se actualiza el README con instrucciones detalladas de instalación, uso y despliegue con Docker.
- Se añaden archivos Dockerfile y .dockerignore para la contenerización.
Se agrega la capacidad de agendar citas para los servicios.
- Se añaden campos de fecha y hora de cita en el formulario de nuevo movimiento.
- Se actualiza la tabla de movimientos para mostrar la información de la cita.
- Se modifica la base de datos para almacenar la fecha y hora de la cita.
- Se ajusta la exportación a CSV para incluir los nuevos campos.
- Se reemplaza la generación de folio secuencial por uno aleatorio.