Commit Graph

12 Commits

Author SHA1 Message Date
Adrian Flores Cortes
881e7e40f2 [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:08 -06:00
Adrian Flores Cortes
c3200bc53e [SYNC] BaseService synchronized from erp-core canonical
Source: erp-core (checksum: 900be2ee48f2faf72ce5253aeab27c88)
Priority: P1 - HIGH (architectural gap resolution)
Context: TASK-2026-01-25-SISTEMA-REUTILIZACION

Before: "Diverged version"
After: Synced with canonical

Changes:
- BaseService "synchronized" 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:25 -06:00
Adrian Flores Cortes
49f9359b0b [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:11 -06:00
Adrian Flores Cortes
5f9c30d268 [MAE-015] feat: Implement assets module backend
Complete implementation of the Assets/Machinery/Maintenance module:

Entities (10):
- AssetCategory: Hierarchical asset categorization with depreciation config
- Asset: Main asset entity (machinery, vehicles, tools, equipment)
- AssetAssignment: Asset-to-project assignments tracking
- WorkOrder: Maintenance work orders with workflow
- WorkOrderPart: Parts/materials used in work orders
- MaintenancePlan: Preventive maintenance plans
- MaintenanceHistory: Historical maintenance records
- FuelLog: Fuel consumption tracking with efficiency calculation
- AssetCost: TCO (Total Cost of Ownership) tracking

Services (3):
- AssetService: CRUD, assignments, categories, statistics
- WorkOrderService: CRUD, workflow (start/hold/resume/complete/cancel), parts
- FuelLogService: CRUD, efficiency calculation, statistics

Controllers (3):
- AssetController: REST API for assets, assignments, categories
- WorkOrderController: REST API for work orders, workflow, plans
- FuelLogController: REST API for fuel logs, statistics

Features:
- Multi-tenant support with tenant_id
- Complete workflow for work orders (draft→scheduled→in_progress→completed)
- Automatic efficiency calculation for fuel consumption
- Asset assignment history tracking
- Maintenance plan generation
- TCO tracking by cost type

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 05:41:54 -06:00
Adrian Flores Cortes
bdf8c878e8 [PROP-CORE-004] feat: Register payment-terminals module in app
- Added PaymentTerminalsModule import and initialization
- Registered routes: /api/v1/payment-terminals, /api/v1/mercadopago, /api/v1/clip
- Registered webhooks: /webhooks/mercadopago, /webhooks/clip
- Updated API info with new endpoints

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 03:13:46 -06:00
Adrian Flores Cortes
3f54669dde [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:24 -06:00
Adrian Flores Cortes
058f42a4d1 [PROP-CORE-004] feat: Adapt AI roles for construction domain
- Roles: ADMIN, SUPERVISOR_OBRA, RESIDENTE, ALMACENISTA
- Domain-specific tools (projects, progress, materials)
- Construction industry terminology

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 02:57:45 -06:00
Adrian Flores Cortes
0493d4b8bd [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_OBRA, RESIDENTE, ALMACENISTA)
- mcp: 18 ERP tools for AI assistants

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 02:45:03 -06:00
Adrian Flores Cortes
9a3f43ed2e chore: Update package-lock.json 2026-01-25 02:27:58 -06:00
81b847ce8a chore: Add .gitignore for clean repository
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 07:31:35 -06:00
7c1480a819 Migración desde erp-construccion/backend - Estándar multi-repo v2
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:11:14 -06:00
aeb201d7f6 Initial commit 2026-01-16 14:04:08 +00:00