diff --git a/assets/js/app.js b/assets/js/app.js index e8a5ebf..ab084ac 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -149,7 +149,8 @@ class WhatsAppBotManager { case 'menus': this.loadMenus(); break; - case 'conversations': + case 'send_message': + // Cargar lista de usuarios y plantillas cuando se muestra el tab de Enviar Mensaje this.loadMessageUsers(); break; case 'templates': @@ -666,36 +667,9 @@ class WhatsAppBotManager { } async sendBroadcast() { - const filter = document.getElementById('broadcast-filter').value; - const message = document.getElementById('broadcast-message').value; - - if (!message) { - this.showError('Por favor escribe un mensaje'); - return; - } - - if (!confirm('¿Estás seguro de enviar este mensaje a múltiples usuarios?')) { - return; - } - - try { - this.showLoading('Enviando mensajes...'); - const result = await this.apiCall('send_broadcast.php', 'POST', { - filter: filter, - message: message - }); - - if (result.success) { - this.showSuccess(`Mensajes enviados a ${result.sent_count} usuarios`); - document.getElementById('broadcast-form').reset(); - } else { - this.showError(result.error || 'Error en envío masivo'); - } - } catch (error) { - this.showError('Error en envío masivo: ' + error.message); - } finally { - this.hideLoading(); - } + // Funcionalidad de envío masivo deshabilitada temporalmente desde UI + this.showError('Envío masivo deshabilitado temporalmente'); + return; } async saveMenu() { diff --git a/index.php b/index.php index ccaa527..bf30d3a 100644 --- a/index.php +++ b/index.php @@ -329,10 +329,10 @@ try { -
+