Commit Graph

12 Commits

Author SHA1 Message Date
db34a3ddf2 [MCH-BE] feat: Add missing delivery entities (driver, status_history)
- Created driver.entity.ts with DriverStatus enum
- Created delivery-status-history.entity.ts with Delivery relation
- Updated delivery.module.ts imports for TypeOrmModule

Resolves: TASK-2026-01-20-002 audit P0 gap

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 03:29:20 -06:00
b3eaebb54c [MCH-BE] feat: Add export endpoints for PDF/Excel reports
Implement export functionality for four report types:
- Sales: Daily/period sales with totals and items
- Inventory: Current stock with value calculations
- Fiados: Customer credit accounts and balances
- Movements: Inventory entries/exits with references

Features:
- PDF exports using pdfkit with formatted tables and summaries
- Excel exports using exceljs with styling and formulas
- Filter support: date ranges, status, category, etc.
- Proper content-type headers for file downloads
- JWT authentication on all endpoints

Endpoints:
GET /api/v1/exports/sales/:format
GET /api/v1/exports/inventory/:format
GET /api/v1/exports/fiados/:format
GET /api/v1/exports/movements/:format

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 02:30:11 -06:00
c936f447cf [MCH-BE] feat: Add settings API endpoints
Implement settings module with endpoints for tenant configuration:
- GET /api/v1/settings - Get tenant settings
- PATCH /api/v1/settings - Update tenant settings
- GET /api/v1/settings/whatsapp - WhatsApp connection status
- POST /api/v1/settings/whatsapp/test - Test WhatsApp connection
- GET /api/v1/settings/subscription - Subscription information

Includes:
- TenantSettings entity for fiado, WhatsApp and notification preferences
- DTOs for business, fiado, WhatsApp and notification settings
- Service with full CRUD operations
- Integration with existing Tenant, Subscription and WhatsApp entities

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 02:28:32 -06:00
45ec3ec09a chore: Add .gitignore for build artifacts and dependencies
Ignores:
- node_modules/
- dist/
- .env files
- logs
- IDE files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 05:35:11 -06:00
29d68ec9b7 [MCH-006] feat: Implementar modulo onboarding inteligente
- Crear entidades OnboardingSession y ProductScan
- Implementar OcrService con Google Vision API
- Implementar WhisperService para transcripcion de audio
- Crear OnboardingService con flujo completo
- Agregar 12 endpoints para gestion de onboarding
- Soporte para procesamiento de fotos y audios
- Deteccion automatica de productos y precios
- Integracion con TemplatesService para matching

Sprint 5 - Inteligencia (2/2 epicas)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 04:18:16 -06:00
0019ded690 [MCH-007] feat: Implementar modulo templates con 85+ productos de 8 proveedores
- Crear entidades ProductTemplate y TemplateImport
- Implementar TemplatesService con CRUD y busqueda
- Crear TemplatesController con 9 endpoints
- Agregar soporte para giros (abarrotes, papeleria, farmacia, ferreteria)
- Agregar soporte para proveedores (Sabritas, Coca-Cola, Bimbo, etc)
- Implementar importacion masiva de templates a catalogo tenant

Sprint 5 - Inteligencia
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 04:11:35 -06:00
16e5713c60 feat(MCH-016): Implement delivery module for home delivery management
- Add DeliveryZone entity with radius/polygon zone types
- Add Delivery entity with status tracking and proof of delivery
- Implement DeliveryService with zone management and coverage check
- Add Haversine distance calculation for radius zones
- Add ray casting algorithm for polygon zone containment
- Create DeliveryController with REST endpoints
- Register DeliveryModule in app.module.ts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 03:42:34 -06:00
75e881e1cc feat(notifications): Add notifications module (MCH-017)
- Add entities: Notification, NotificationTemplate, NotificationPreference, DeviceToken
- Add NotificationsService with send, templated, preferences, device tokens
- Add NotificationsController with REST endpoints
- Add default notification templates for orders, payments, alerts
- Integrate axios for HTTP calls to WhatsApp service

Sprint 3: MCH-017 Notificaciones

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 03:32:03 -06:00
4fcdd30812 chore: Actualizar dependencias NestJS para compatibilidad v11
- @nestjs/swagger: ^8.1.0 -> ^11.2.5
- @nestjs/config: ^3.3.0 -> ^4.0.2

Resuelve conflictos de peer dependencies con NestJS 11.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 05:21:17 -06:00
d624447d4c Sincronización completa desde michangarrito/apps/backend
Actualización de código al estado actual

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:26:30 -06:00
59e6ea4ab6 Migración desde michangarrito/backend - Estándar multi-repo v2
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:12:07 -06:00
bad656c8c7 Initial commit 2026-01-16 14:05:45 +00:00