Commit Graph

10 Commits

Author SHA1 Message Date
Adrian Flores Cortes
6a005a6225 [RBAC-005] feat: Propagate RBAC middleware from erp-core
- Add rbac.middleware.ts with requirePerm, requireAnyPerm, requireAllPerms, requireAccess, requirePermOrOwner
- Add shared middleware index exports
- Configure glass-specific roles (manager, production, sales, admin, super_admin)

Propagated from erp-core TASK-2026-01-30-RBAC

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 14:58:35 -06:00
Adrian Flores Cortes
bbbc562128 [SYNC] Synchronize payment-terminals module from erp-core canonical
Source: erp-core (checksum: c9040e545cf55beb87d3e437a4998855)
Priority: P1 - HIGH
Context: TASK-2026-01-25-SISTEMA-REUTILIZACION

Before: Diverged version (one of 3 different versions)
After: Synced with canonical

Changes:
- Complete payment-terminals module synchronized from erp-core
- 21 TypeScript files updated
- Unified payment terminal integration (MercadoPago + Clip)
- Consistent webhook handling across all ERP projects

Benefits:
- Single source of truth for payment terminals functionality
- Consistent TPV integration behavior
- Reduced maintenance burden (~4,000 lines saved)
- Unified webhook processing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 06:52:19 -06:00
Adrian Flores Cortes
ab879e3bc4 [ADD] BaseService propagated from erp-core canonical
Source: erp-core (checksum: 900be2ee48f2faf72ce5253aeab27c88)
Priority: P1 - HIGH (architectural gap resolution)
Context: TASK-2026-01-25-SISTEMA-REUTILIZACION

Before: "Missing"
After: Synced with canonical

Changes:
- BaseService "added" from erp-core
- Checksum: 900be2ee48f2faf72ce5253aeab27c88
- Provides base CRUD operations for all services

Benefits:
- Unified service architecture
- Consistent error handling and validation
- Reduced code duplication in service implementations
- Standard pagination and filtering patterns

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 06:43:37 -06:00
Adrian Flores Cortes
26365df9a0 [SYNC] Synchronize ai module from erp-core canonical
Source: erp-core (checksum: 39a6e229055a21158b63cc4eb4dd232f)
Priority: P0 - CRITICAL divergence resolution
Context: TASK-2026-01-25-SISTEMA-REUTILIZACION

Before: Diverged version with project-specific adaptations
After: Synced with canonical

Changes:
- Complete ai module synchronized from erp-core
- 24 TypeScript files updated
- Unified role-based AI configuration
- Consistent AI behavior across all ERP projects

Note: Project-specific role adaptations (if needed) can be
re-applied as documented extensions after this sync.

Benefits:
- Single source of truth for AI functionality
- Reduced maintenance burden
- Token savings from code reuse
- Consistent behavior baseline

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 06:36:21 -06:00
Adrian Flores Cortes
e19c4b15c5 [PROP-CORE-004] feat: Register payment-terminals module with TypeORM setup
- Added TypeORM DataSource configuration
- Added payment-terminals entities
- Added PaymentTerminalsModule with bootstrap function
- Registered routes: /api/payment-terminals, /api/mercadopago, /api/clip
- Registered webhooks: /webhooks/mercadopago, /webhooks/clip
- Updated API info with available endpoints

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 03:14:01 -06:00
Adrian Flores Cortes
b5dbe9db5f [PROP-CORE-004] fix: Remove external entity references from payment-terminals
Fixed getEntities() to only reference own entities, avoiding require errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 03:08:35 -06:00
Adrian Flores Cortes
db06c9effd [PROP-CORE-004] feat: Adapt AI roles for tempered glass domain
- Roles: ADMIN, SUPERVISOR_PRODUCCION, OPERADOR_CORTE, OPERADOR_HORNO
- Domain-specific tools (furnace, cutting, tempering)
- Glass manufacturing terminology

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 02:57:54 -06:00
Adrian Flores Cortes
bc5a389edb [PROP-CORE-004] feat: Add Phase 6 modules from erp-core
Propagated modules:
- payment-terminals: MercadoPago + Clip TPV
- ai: Role-based AI access (ADMIN, SUPERVISOR_PRODUCCION, OPERADOR_CORTE, OPERADOR_HORNO)
- mcp: 18 ERP tools for AI assistants

Priority: P2 (industrial clients pay via transfer)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 02:45:48 -06:00
0628a86ec1 [ERP-VIDRIO-TEMPLADO] feat: Create backend scaffold
- package.json with Express, TypeORM, PostgreSQL dependencies
- tsconfig.json with TypeScript compiler options
- src/index.ts with health and API info endpoints
- .gitignore with standard exclusions
- Build compiles successfully

Ready for module implementation (8 modules planned)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 12:42:37 -06:00
b20c0a59d3 Initial commit 2026-01-16 14:05:02 +00:00