feat: módulo de empresa con números WhatsApp y endpoints API por empresa

- DB: company_phones (3 tipos de permiso, límites por usuarios ERP)
- DB: company_endpoints (11 endpoints upload/download configurables)
- DB: erp_active_users en companies (base para calcular límites)
- Company edit: 3 pestañas — General / Números WhatsApp / Endpoints API
- Límites: tipo 1 = usuarios_erp×10, tipo 2+3 = usuarios_erp
- Endpoints: URL configurable + botón Probar + preview de respuesta JSON
- Layout::close() agregado

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-19 21:57:31 -05:00
co-authored by Claude Sonnet 4.6
parent b083d49769
commit 860e93a20b
4 changed files with 517 additions and 82 deletions
+8
View File
@@ -265,6 +265,14 @@ $routes = [
['GET', '/admin/test-message', fn() => DashboardController::testMessage()],
['POST', '/admin/test-message/send', fn() => DashboardController::testMessageSend()],
// ─── Números WhatsApp por empresa ──────────────────────────────────────
['POST', '/admin/company/phone/save', fn() => DashboardController::companyPhoneSave()],
['POST', '/admin/company/phone/delete', fn() => DashboardController::companyPhoneDelete()],
// ─── Endpoints API por empresa ─────────────────────────────────────────
['POST', '/admin/company/endpoint/save', fn() => DashboardController::companyEndpointSave()],
['POST', '/admin/company/endpoint/test', fn() => DashboardController::companyEndpointTest()],
// ─── Admin: listar pendientes de aprobación ─────────────────────────────
['GET', '/admin/pending-list', fn() => DashboardController::pendingList()],
['GET', '/admin/pending', fn() => DashboardController::pending()],