Conversation
* fix: Leaflet navigation crash and minor UX bugs * fix: corregir bugs de mapas, navegación, ranking y asignación de trabajadores * feat: ampliar datos de demo con global admin, nueva empresa y asignación de trabajadores a unidades * fix: aplicar sugerencias CodeRabbit en mapas, layout y tests
* fix: mostrar mis pedidos en sidebar para usuarios LOYAL_USER * fix: añadir campo username al formulario de reclamación de pedido * fix: reutilizar fields.username en lugar de clave duplicada en tracking * feat: pedidos B2B cross-org, registro desde tracking con address, validaciones y mejoras UI * test: corregir tests tras cambios en OrderService, UnitService y WorkerService * fix: añadir LoyalUserCompany y actualizar test useOrderForm a b2bOrganizations * test: añadir address en test useUnitForm para pasar validación de ubicación * test: añadir campo address en E2E de registro individual
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review WalkthroughEste PR implementa un panel administrativo completo con reconfiguración de la organización del sistema, múltiples endpoints de administración global, gestión de entidades, eliminaciones en cascada y reinicio de base de datos, junto con una interfaz Vue de múltiples pestañas para métricas, actividad, administración y configuración. ChangesPanel de Control Administrativo
Sequence DiagramsequenceDiagram
participant Admin as Admin User
participant Frontend as AdminDashboard
participant Controller as AdminController
participant Service as AdminService
participant Repo as Repositories
participant DB as Database
Admin->>Frontend: Navigate to home tab
Frontend->>Controller: GET /admin/activity/metrics?period=MONTH
Controller->>Service: getGlobalActivityMetrics(period)
Service->>Repo: countTenants(), countByStatusAndCreatedAtAfter()
Repo->>DB: Query aggregates
DB-->>Repo: Counts
Repo-->>Service: Results
Service-->>Controller: ActivityMetricsResponse
Controller-->>Frontend: Metrics data
Frontend->>Controller: GET /admin/orders-by-day?period=MONTH
Controller->>Service: getGlobalOrdersByDay(period)
Service->>Repo: countByDayGlobal(after)
Repo->>DB: Query daily counts
DB-->>Frontend: Chart data
Admin->>Frontend: Click delete company
Frontend->>Frontend: Show inline confirmation
Admin->>Frontend: Confirm delete
Frontend->>Controller: DELETE /admin/companies/{id}
Controller->>Service: deleteCompany(id)
Service->>Repo: Delete cascade (orders,messages,events,workers)
Repo->>DB: Execute deletes
DB-->>Service: Success
Service-->>Controller: 204 No Content
Controller-->>Frontend: Success
Frontend->>Frontend: Reload company list
Admin->>Frontend: Navigate to settings
Admin->>Frontend: Click reset database
Frontend->>Frontend: Show confirmation modal
Admin->>Frontend: Confirm reset
Frontend->>Controller: POST /admin/reset
Controller->>Service: resetDatabase(adminEmail)
Service->>Repo: Delete all orders, events, messages, leals, units, workers
Service->>Repo: Delete all companies except system
Service->>Repo: Delete all orgs except system
Service->>Repo: Delete all users except admin
Repo->>DB: Execute all deletes in transaction
DB-->>Frontend: 204 No Content
Frontend->>Frontend: Reload to home
🎯 4 (Complex) | ⏱️ ~60 minutes Possibly Related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|


Summary by CodeRabbit
Notas de Lanzamiento
New Features
Chores