64 Commits

Author SHA1 Message Date
Marco Gallegos
4ace99b77e bump: Update version to 1.6.1 with search bar interface
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-16 12:07:55 -06:00
Marco Gallegos
9282bd5480 feat: Replace product cards with search bar interface
- Replace category cards with modern search bar for services/products
- Implement real-time search with debouncing (200ms delay)
- Add autocomplete functionality for better UX
- Maintain anticipo functionality with dedicated form
- Add visual feedback notifications instead of alerts
- Improve responsive design and accessibility

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-16 12:07:31 -06:00
Marco Gallegos
5cb8dcdd9e bump: Update version to 1.6.0 with complete PNG receipt system
- Full PNG receipt generation system with robust discount detection
- Material Symbols icons integration
- Comprehensive medical consent and oncology patient support
- Multi-source discount/anticipo detection (discountInfo, descuento, subtotal)
- Mobile-optimized receipt layouts with professional styling
- Complete test coverage for all ticket scenarios

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-15 17:01:09 -06:00
Marco Gallegos
e1a74c4249 feat: Implement robust discount/anticipo detection system for PNG receipts
- Added comprehensive discount detection logic in hasAnyDiscount()
- Created extractDiscountInfo() to handle multiple data sources
- Updated all discount rendering functions to use new extraction logic
- Enhanced support for manual anticipos and applied discounts
- Improved fallback detection using subtotal vs monto differences
- Added Material Symbols icons to action buttons in table
- Fixed discount display issues in PNG receipt generation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-15 16:56:12 -06:00
Marco Gallegos
bcab7573c3 fix: Implement folio prefix system with database migration
- Fix generateFolio() to use configured prefix (e.g. "AP-k8hcg" instead of "AP--k8hcg")
- Add migration endpoint /api/migrate-folios to update existing folios with prefix
- Add automatic migration prompt when folio prefix changes in settings
- Ensure all new folios use the configured prefix format
- Maintain backward compatibility with existing folios

Migration process:
- Detects folios without prefix and adds the configured prefix
- Only updates folios that don't already have the prefix
- Provides user feedback on migration results
- Automatically refreshes ticket list after successful migration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 09:02:27 -06:00
Marco Gallegos
9559652f40 feat: Add automatic anticipo notes to tickets and optimize for 58mm printers
- Add automatic notes for anticipo tickets with commitment and cancellation policy
- Optimize ticket layout for 58mm thermal printers (reduced from 72mm)
- Improve ticket spacing with better margins (0.1cm/0.05cm)
- Add proper capitalization for service titles (e.g. "anticipo" → "Anticipo")
- Enhance total amount formatting with larger font size (15px) and better spacing
- Add visual separation between payment method and staff information

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 08:36:50 -06:00
Marco Gallegos
2b1438a064 docs: Add comprehensive CHANGELOG.md
Complete changelog with all versions from 1.3.7 to 1.5.4:
- Detailed feature descriptions and improvements
- Technical implementation notes
- Docker image information and migration notes
- Support and contribution guidelines

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 16:50:45 -06:00
Marco Gallegos
19d05f152d bump: Update version to 1.5.4 with visual clear tip
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 16:49:15 -06:00
Marco Gallegos
6c1402004d bump: Update version to 1.5.1
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 16:48:43 -06:00
Marco Gallegos
f884117a55 feat: Add visual clear form tip with OS detection
Added visible tip in interface showing correct keyboard shortcut:
- Automatically detects Mac vs Windows/Linux
- Shows 'Cmd + Shift + R' on Mac
- Shows 'Ctrl + Shift + R' on Windows/Linux
- Clean, non-intrusive design with blue accent
- Positioned below 'Generar Venta' button

Technical implementation:
- CSS styling for clear-form-tip class
- JavaScript OS detection using navigator.platform
- Dynamic content update based on detected OS
- Updated cache-busting version for immediate loading

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 16:48:16 -06:00
Marco Gallegos
1676eec8b6 docs: Add keyboard shortcuts tip for form clearing
Added helpful note explaining how to refresh/clear forms:
- Mac: Cmd + Shift + R
- Windows/Linux: Ctrl + Shift + R

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 16:19:52 -06:00
Marco Gallegos
33e92c78ad docs: Update README with version 1.5.1 changes
Document latest improvements:
- Fixed date formatting bug in tickets
- Added favicon integration
- Improved UI compactness and alignment
- Removed clear form button
- Enhanced UX with auto-collapse features

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 16:19:33 -06:00
Marco Gallegos
9f3daff09b fix: Remove clear form button and improve UX
Major UI/UX improvements and bug fixes:

• Fixed date formatting bug in ticket receipts (undefined dates)
• Removed clear form button per user request
• Added favicon integration across all pages (apple-touch-icon, favicon variants)
• Implemented auto-collapse for product categories after adding items
• Changed all ticket content alignment to left for better readability
• Made product interface more compact to reduce scrolling
• Enhanced date validation and formatting throughout the system

Technical changes:
- Fixed esc() function regex that was causing date corruption
- Added collapseAllCategories() function for better UX
- Updated cache-busting versions for proper browser refresh
- Improved date handling with proper validation
- Added comprehensive favicon support with web manifest

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 16:18:51 -06:00
Marco Gallegos
07209a4183 fix: Remove duplicate anticipo comment prompt
Remove browser prompt for anticipo comment and use form field instead to avoid requesting the same information twice.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 20:26:53 -06:00
Marco Gallegos
a12ac988eb fix: Update Docker configuration for persistent data storage
- Update docker-compose.yml to use latest image marcogll/ap-pos:latest
- Change from bind mount to named volume for better data persistence
- Add proper volumes section to ensure database survives container restarts
- Update README with corrected deployment instructions

This fixes the issue where imported JSON products were lost on container restart.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 19:05:19 -06:00
Marco Gallegos
6e97309323 fix: Fix product import display and add payment methods
- 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>
2025-09-08 19:01:09 -06:00
Marco Gallegos
8f22d7bc04 fix: Resolve production issues in VPS environment
- 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>
2025-09-08 18:41:16 -06:00
Marco Gallegos
02f5775223 feat: Release version 1.5.0 with major UI improvements and advanced anticipos
- 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>
2025-09-08 18:18:48 -06:00
Marco Gallegos
65837e59b1 feat: Release version 1.4.1
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-05 10:34:21 -06:00
Marco Gallegos
006e74c42a fix: Simplify date generation function in ticket printing
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>
2025-09-05 10:17:27 -06:00
Marco Gallegos
b2963e7f9d fix: Resolve persistent date formatting undefined issue in ticket printing
- 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>
2025-09-04 20:34:43 -06:00
Marco Gallegos
a70c74357e feat: Release version 1.3.7 with user permissions security fix
- 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>
2025-09-04 19:51:45 -06:00
Marco Gallegos
8df8e30092 fix: Correct user role permissions and restrict dashboard/settings access
- 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>
2025-09-04 19:49:55 -06:00
Marco Gallegos
bb99be5098 feat: Release version 1.3.6 with date formatting fixes and Docker updates
- 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>
2025-09-04 19:26:46 -06:00
Marco Gallegos
857653c3ae fix: Resolve ticket date formatting issues and enhance appointment system
- 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>
2025-09-04 19:23:18 -06:00
Marco Gallegos
43eca8269e feat: Implement unified products table with anticipos management
- 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>
2025-09-02 15:07:32 -06:00
Marco Gallegos
541d2f8883 feat: Release version 1.3.5 with coderk Docker image preparation
- 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>
2025-09-02 14:30:10 -06:00
Marco Gallegos
1e92398891 fix: Improve Docker data persistence for Coolify deployments
- 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>
2025-08-29 08:20:41 -06:00
Marco Gallegos
bbcd85eff7 feat: Release version 1.3.1 with Docker optimization and comprehensive documentation
- 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>
2025-08-25 18:41:30 -06:00
Marco Gallegos
edf1be22fb fix: Update Docker image version to 1.3-latest in docker-compose.yml 2025-08-25 18:41:30 -06:00
Marco Gallegos
127a5cdc20 feat: Mejoras de UI, documentación y configuración de Docker
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.
2025-08-25 18:41:30 -06:00
Marco Gallegos
8cb71b47d7 Delete dev-tasks.md 2025-08-25 12:45:44 -06:00
Marco Gallegos
63ed35c854 Merge pull request #3 from marcogll/test
Ajustes de interfaz
2025-08-25 12:45:26 -06:00
Marco Gallegos
f4914431b6 feat: Update database location instructions and improve UI; remove unused table styles 2025-08-25 12:44:20 -06:00
Marco Gallegos
00c5a7068c feat: Estandarizar fechas, mejorar UI y añadir sección de datos
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.
2025-08-25 08:36:33 -06:00
Marco Gallegos
e549a2db9e feat: Estandarizar fechas y mejorar UI
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.
2025-08-25 08:16:17 -06:00
Marco Gallegos
a68eedd11d Merge pull request #2 from marcogll/test
Creasion de test branch
2025-08-25 08:10:08 -06:00
Marco Gallegos
4d027bc393 fix: Correct typo in .gitignore for documentation tasks section 2025-08-25 08:09:22 -06:00
Marco Gallegos
c43384fb5a feat: Update README with project details and usage instructions; add dev-tasks.md to .gitignore 2025-08-25 08:06:00 -06:00
Marco Gallegos
4a841917f8 feat: Add initial setup page and functionality for admin account creation
- 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.
2025-08-25 08:01:30 -06:00
Marco Gallegos
9c497bc414 feat: add ecosystem configuration for process management 2025-08-25 08:01:10 -06:00
Marco Gallegos
39c60dd344 Actualiza app POS: index, server, print y lockfile 2025-08-15 15:37:26 +00:00
Marco Gallegos
b658b9fd42 Crear Docker Compose 2025-08-13 17:30:49 -06:00
Marco Gallegos
6b39f20ade Versión final desde USB (2025-08-13) 2025-08-13 17:16:09 -06:00
Marco Gallegos
05b090b2b2 feat: enhance ticket printing with QR code and improve Dockerfile\n\n- Added a QR code to printed tickets for customer feedback.\n- Improved Dockerfile for better caching and using npm start.\n- Updated print styles and fixed a print area error.\n- Minor updates to index.html and .dockerignore. 2025-08-13 16:56:16 -06:00
Marco Gallegos
eb302e6d7d docs: Añadir sección de diagnóstico de impresión al README 2025-08-13 13:25:41 -06:00
Marco Gallegos
0cbabc8da4 fix(auth): ensure data persistence and correct login
- 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.
2025-08-13 09:55:32 -06:00
Marco Gallegos
2adba24312 refactor: remove author credits from footer 2025-08-13 09:35:25 -06:00
Marco Gallegos
7594d96fa4 feat: add client history and subtypes
- 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.
2025-08-13 09:31:31 -06:00
Marco Gallegos
b59cb2f122 feat(ui): redesign client form and enhance UI
- 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.
2025-08-13 09:09:34 -06:00