Commit Graph

216 Commits

Author SHA1 Message Date
5ade1275de fix(pos): sidebar con estilo del design system — SVG icons, secciones, clip-path
Reescrito sidebar.js para coincidir exactamente con el design system:
- Logo NA con clip-path en tema industrial, border-radius en moderno
- Secciones: Principal, Gestion, Sistema
- SVG icons de Feather (mismo trazo 1.75px)
- Border-left accent en item activo
- Toggle de tema con iconos luna/sol
- Footer con avatar, nombre, rol, y boton logout
- 260px width, colapsa a 56px en mobile
- Usa CSS variables del tokens.css

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 20:35:02 +00:00
d0a1740291 fix(pos): eliminar flash de tema al navegar entre paginas
Script inline en <head> aplica el tema guardado ANTES de que
el CSS se renderice. Elimina el flash blanco→oscuro o viceversa.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 20:28:43 +00:00
e8b53f0b1b fix(pos): tema consistente en todas las paginas + theme bar ocultada
- app-init.js: aplica tema guardado en localStorage, oculta theme-bars
  que tapaban contenido (position:fixed), sobrescribe setTheme() de
  cada pagina para usar version persistente
- sidebar.js: toggle de tema (sol/luna) integrado en el sidebar
- Tema se mantiene al navegar entre paginas

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 20:27:25 +00:00
76c9c2d2db fix(pos): sidebar unificado en todas las paginas
Nuevo sidebar.js compartido que reemplaza el sidebar de cada pagina
con una version consistente:
- Misma estructura y orden de links en todas las paginas
- Nombre y rol del empleado real (de POS_USER)
- Link activo resaltado segun pagina actual
- Boton de logout
- Responsive (colapsa a iconos en <768px)
- Elimina inconsistencias de estilo entre paginas

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 20:20:55 +00:00
b887f0c032 fix(pos): arreglar 29 enlaces rotos del sidebar en todas las paginas
Reemplazados todos los href="#" en nav-items y nav-links con
las rutas reales (/pos/dashboard, /pos/sale, /pos/catalog, etc.)
en catalog, inventory, customers, dashboard, config, reports.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 20:13:34 +00:00
6558e289f3 fix(pos): reemplazar datos demo con datos reales del empleado logueado
- Nuevo app-init.js: auth check, inyecta nombre/rol real del empleado
  en sidebar, header, y status bar de TODAS las páginas
- Eliminados 6 productos demo hardcodeados del catálogo
- Sidebar muestra nombre real del usuario logueado
- Links de navegación marcan la página activa correctamente
- Función posLogout() global para cerrar sesión

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 20:09:12 +00:00
5244c1dcd6 fix(pos): default tenant ID en login para evitar error sin parametro URL
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 08:47:37 +00:00
7810005a57 fix(pos): cargar empleados reales en login en vez de datos demo
- Nuevo endpoint GET /pos/api/auth/employees/<tenant_id>
- Login carga empleados dinamicamente del tenant
- Si hay 1 solo empleado, se auto-selecciona
- Removidos 6 usuarios hardcodeados del design system

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 08:46:25 +00:00
56fed52253 fix(pos): rewrite customers.js to match design system HTML structure
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 08:35:19 +00:00
004cca7ccc fix(pos): rewrite inventory.js to match design system HTML structure
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 08:29:14 +00:00
761e56e87f fix(pos): rewrite invoicing + accounting JS to match design system HTML
Invoicing JS now targets panel-facturas/notas/complementos/cancelaciones/config
panels, modalDetalleOverlay/modalCancelOverlay modals, and switchTab() calls.
Loads CFDI queue data dynamically into data-table tbodies replacing demo rows.

Accounting JS now targets panel-cxc/cxp/balance/resultados/flujo/conciliacion/cierre
panels and finance-card elements. Wires aging, balance sheet, income statement,
and period close to real API endpoints.

Both files include auth check, live clock, and global switchTab binding.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 08:27:59 +00:00
3ea6f181ff fix(pos): rewrite catalog.js to match design system HTML structure + add cart sidebar
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 08:09:21 +00:00
6ec3a90d57 fix(pos): corregir enlaces de navegacion en todas las paginas
Reemplaza enlaces del design system (dashboard.html, pos.html, etc.)
con rutas reales del POS (/pos/dashboard, /pos/sale, etc.).
Limpia archivos backup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 07:52:03 +00:00
0112b7dca4 feat(pos): integrate design system into POS — payment modal, F-keys, ticket, margins
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 07:31:18 +00:00
9641b0af80 feat(pos): integrate design system for clients, inventory, catalog + offline banner
- Replace customers.html with design system clientes page, add slide panel + wire to customers.js
- Replace inventory.html with design system inventario page, load inventory.js
- Add empty state component to catalog product grid (hidden, shown when no results)
- Add offline banner HTML/CSS to all three pages
- Create offline-banner.js: listens online/offline events, auto-dismisses restored banner after 3s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 07:28:41 +00:00
21427c4dd2 feat(pos): integrate design system for facturacion, contabilidad, dashboard, config, reportes
Replace 5 POS templates with updated design system pages using tokens.css.
Add routes for dashboard, config, and reports pages.
Create stub JS files for dashboard, config, and reports modules.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 07:26:38 +00:00
Lucy
ccd3962458 feat(design): add 16 new components + update 5 pages (ronda 2)
Bloqueantes POS: modal-pago, ticket-termico, banner-cliente, fkeys-footer, columnas-costo-margen
Componentes nuevos: calculadora-cambio, panel-deslizante, badge-cfdi, arbol-colapsable, tarjeta-metrica, grafica-barras, selector-periodo, etiqueta-codigo-barras
Estados: estado-vacio, banner-offline, modal-confirmacion
Páginas actualizadas: facturación, contabilidad, dashboard, configuración, reportes
2026-04-01 07:06:34 +00:00
380698258a feat: agregar design system completo con 2 temas (Industrial + Moderno)
- Login: PIN pad con seleccion de usuario + auth real via API
- Catalogo: grid de productos con sidebar nav y filtros
- POS: layout split con numpad y area de venta
- tokens.css: sistema completo de CSS variables (colores, tipografia, espaciado)
- 2 temas: Industrial Robusto (dark/amber) y Tecnico Moderno (light/orange)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 06:22:46 +00:00
Lucy
46360b6827 feat: agregar design system completo con 2 temas (Industrial + Moderno)
- Tokens CSS con variables para ambos temas (dark/light)
- 21 componentes reutilizables (buttons, cards, tables, modals, etc.)
- 10 pantallas POS (login, catálogo, POS, inventario, clientes, facturación, contabilidad, dashboard, configuración, reportes)
- Preview interactivo con selector de tema
- Generado por el equipo de Hugo (Milo-UX, Iris-UI, Zara-Frontend)
2026-04-01 01:41:04 +00:00
5fc47473b6 docs: add POS screen design guide for design team
10 screens, 20 reusable components, 6 states/variants,
CSS theme system. Complete wireframes and specifications
for each page, modal, and component.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 21:18:14 +00:00
bc950efc26 fix(pos): resolve integration test failures for CFDI + accounting
- Fix sat_accounts.sql: split multi-row INSERT into individual statements
  so parent_id subqueries resolve correctly (was producing all NULLs)
- Add tenant_config table to v1.0 schema (required by CFDI invoicing)
- Seed tenant_config with RFC/regimen during tenant provisioning
- Fix cancel_sale to pass complete sale data for accounting reversal
- Fix CFDI XML builder: use `or` instead of dict.get() defaults to
  handle explicit None values from DB (clave_prod_serv, clave_unidad)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 04:54:50 +00:00
c56709d45e feat(pos): hook accounting auto-entries into sale/cancel flow (non-blocking)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 04:14:15 +00:00
4e6bac8661 feat(pos): add CFDI 4.0 XML builder — Ingreso, Egreso, Pago with lxml
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 04:13:08 +00:00
62ea08de9f feat(pos): add accounting frontend — reports, entries, periods
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 04:11:48 +00:00
9a9031fd27 feat(pos): add accounting blueprint — reports, entries, periods
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 04:11:02 +00:00
e0773cdc1e feat(pos): add invoicing blueprint — CFDI generation, queue, cancel
Six endpoints: POST invoice, GET queue, GET queue/<id>, POST queue/process,
POST cancel/<id>, GET <sale_id>/pdf. Also adds cfdi_builder stub (Task 2).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 04:10:48 +00:00
fe8eff5ea0 feat(pos): add invoicing frontend — CFDI queue, XML preview, cancel
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 04:10:48 +00:00
40e7dd371a feat(pos): add accounting engine — auto journal entries for sales/purchases
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 04:10:30 +00:00
a665cdb737 feat(pos): add CFDI queue — offline timbrado with retry backoff
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 04:10:13 +00:00
3b804f2c34 feat(pos): register invoicing + accounting blueprints 2026-03-31 04:09:25 +00:00
aeac4387df docs: add CFDI + Accounting implementation plan (4 of 5)
10-task plan covering:
- Accounting engine (auto journal entries for sales/purchases/cuts)
- CFDI 4.0 XML builder (Ingreso/Egreso/Pago with lxml)
- CFDI queue (offline timbrado with retry backoff via Horux API)
- Invoicing blueprint (6 endpoints)
- Accounting blueprint (11 endpoints: reports, periods, entries)
- Hooks into POS engine (non-blocking try/except)
- Frontends for both modules

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 04:08:21 +00:00
09980c1cdb fix(pos): enrich quotation/layaway items from inventory and allow final payment on layaway complete
Quotation and layaway endpoints were calling calculate_totals() on raw
input items without looking up unit_price/tax_rate from inventory, causing
KeyError. Added _enrich_items() helper (with customer price tier support).
Also removed non-existent discount_total column from quotations INSERT,
and made layaway complete accept a final payment for the remaining balance.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 03:51:21 +00:00
b2484af0fb feat(pos): add POS sale page — F-keys, payment modal, margin display, ticket print
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 03:38:31 +00:00
76f738652b feat(pos): add customers page — search, credit, vehicles, statements
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 03:36:42 +00:00
c66fb13c15 feat(pos): add POS blueprint — sales, quotations, layaways with stock reservation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 03:36:04 +00:00
d0343f8087 feat(pos): add POS engine — sale processing with Decimal totals and margin info
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 03:34:44 +00:00
53e3548249 feat(pos): add cash register blueprint — open/close, X/Z cuts, daily summary
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 03:34:35 +00:00
5550fe7bb0 feat(pos): add customers blueprint — CRUD, credit, vehicles, statements
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 03:34:32 +00:00
2a1aee4ee4 feat(pos): add v1.1 migration — sale_payments, layaway_items, customer_payments 2026-03-31 03:33:58 +00:00
fc5a56ba62 feat(pos): register POS, customers, cash register blueprints and page routes 2026-03-31 03:33:39 +00:00
7036a18601 docs: add POS + Cash Register implementation plan (3 of 5)
9-task plan covering:
- POS engine (sale processing, Decimal totals, margin info)
- Customers blueprint (CRUD, credit, vehicle history, statements, payments)
- POS blueprint (sales, quotations, layaways with stock reservation)
- Cash register (open/close, X/Z cuts, daily consolidated summary)
- POS frontend (F1-F6 shortcuts, margin display, payment modal)
- Customers frontend (search, credit status, account statements)
- Full integration test (20+ tests covering entire sale lifecycle)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 03:32:00 +00:00
3a271dd4ed feat(pos): register inventory + catalog blueprints, add page routes 2026-03-31 02:15:00 +00:00
ab655e2ff1 feat(pos): add inventory management UI — products, purchases, adjustments, alerts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 02:13:03 +00:00
070e2df723 feat(pos): add inventory blueprint — CRUD, operations, physical count, reports, alerts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 02:12:48 +00:00
659832ab16 feat(pos): add catalog UI — browsable inventory with cart and barcode scanner
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 02:12:40 +00:00
7d7ead4d52 feat(pos): add catalog blueprint — search, barcode lookup, cross-references, external availability
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 02:10:52 +00:00
4e7942d1d1 feat(pos): add inventory operations engine — append-only stock mutations
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 02:10:18 +00:00
db205d6228 feat(pos): add barcode generator with PostgreSQL sequence 2026-03-31 02:10:14 +00:00
af404a6474 docs: add POS Inventory + Catalog implementation plan (2 of 5)
8-task plan covering:
- Inventory engine (append-only operations, weighted avg cost)
- Barcode generator (PostgreSQL sequence)
- Inventory blueprint (15+ endpoints: CRUD, purchases, adjustments, transfers, physical count, reports)
- Catalog blueprint (search, barcode lookup, cross-references, external availability)
- Catalog UI with cart and barcode scanner support
- Inventory management UI with tabs for all operations
- 5 inventory reports (valuation, ABC, no-movement, low-stock, branch comparison)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 02:08:05 +00:00
2a639a84ed docs: add complete 4-month roadmap with Pitz competitive analysis
Roadmap covers all features across talleres, refaccionarias, and distribuidores.
Includes competitive comparison vs Pitz, Meru, Jetz, and traditional POS.
Pricing strategy and feature differentiation documented.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 01:50:39 +00:00