From fc9fcca6c0683fa89efe7c5280166c0cb6cc7b92 Mon Sep 17 00:00:00 2001 From: DANYDHSV Date: Thu, 12 Feb 2026 12:42:38 -0600 Subject: [PATCH] arreglados los contenedores, falta quitar el buscador de instaladores y arreglar los botones de ese crud --- public.php | 193 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 156 insertions(+), 37 deletions(-) diff --git a/public.php b/public.php index 3d75f761..8907af95 100755 --- a/public.php +++ b/public.php @@ -635,6 +635,44 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador box-shadow: none; } + /* ROUNDED CONFIG CONTAINER (Standardized Layout) */ + .config-container { + background: var(--bg-body); + padding: 1.5rem; + border-radius: 12px; + border: 1px solid var(--border); + margin-bottom: 2rem; + display: flex; + gap: 1rem; + align-items: flex-end; + /* Align inputs and buttons */ + flex-wrap: wrap; + } + + .config-container .form-group { + margin-bottom: 0; + /* Remove default margin inside container */ + flex: 1; + min-width: 250px; + } + + /* PLACEHOLDER STATES */ + .placeholder-state { + text-align: center; + padding: 4rem; + color: var(--text-muted); + border: 1px dashed var(--border); + border-radius: 12px; + margin-top: 2rem; + } + + .placeholder-icon { + font-size: 3rem; + margin-bottom: 1rem; + opacity: 0.5; + display: block; + } + /* THEME TOGGLE (Premium) */ .theme-toggle { background: var(--bg-card); @@ -1021,15 +1059,26 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador
-
-
-

- Gestión de Instaladores -

-

👷 Administra tu equipo de técnicos y asigna instalaciones de manera eficiente

-
- +
+

+ Gestión de Instaladores +

+

👷 Administra tu equipo de técnicos y asigna instalaciones de manera eficiente

+ + +
+
+ + +
+
+ +
+
+
@@ -1043,28 +1092,43 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador
+ +
-
+

Notificaciones WhatsApp

📱 Busca clientes y envía comprobantes de pago directamente a su WhatsApp

-
- -
- - - - - + + +
+
+ +
+ + + + + +
+
-
+
+ + +
+ 👋 +

Busca un cliente arriba para ver sus pagos y enviar notificaciones

@@ -1107,20 +1171,32 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador
-
+

Pagos SPEI

🏦 Genera referencias de transferencia bancaria para que tus clientes paguen vía SPEI

- -
- - - - - -
+ + +
+
+ +
+ + + + + +
+
+
+
+ + +
+ 🏦 +

Selecciona un cliente para generar una referencia de pago SPEI

@@ -1221,20 +1297,32 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador
-
+

Pagos OXXO

🏪 Genera fichas de pago OXXO para que tus clientes paguen en tiendas de conveniencia

- -
- - - - - -
+ + +
+
+ +
+ + + + + +
+
+
+
+ + +
+ 🏪 +

Selecciona un cliente para generar una ficha OXXO Pay

@@ -1574,6 +1662,7 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador document.getElementById('selectedClientName').textContent = `Pagos de ${name}`; document.getElementById('btnNotifCrm').href = `${store.publicUrl}/client/${client.id}`; document.getElementById('paymentsContainer').style.display = 'block'; + document.getElementById('notificationsPlaceholder').style.display = 'none'; // Hide placeholder loadPayments(client.id); }); @@ -1638,6 +1727,7 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador document.getElementById('stripeAmount').value = data.accountOutstanding > 0 ? data.accountOutstanding : ''; document.getElementById('btnVerEnCrm').href = `${store.publicUrl}/client/${data.id}`; document.getElementById('stripeDetailContainer').style.display = 'block'; + document.getElementById('stripePlaceholder').style.display = 'none'; // Hide placeholder if (data.stripeCustomerId) loadStripeHistory(data.stripeCustomerId); else document.getElementById('stripeHistoryContainer').style.display = 'none'; }); @@ -1697,7 +1787,8 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador document.getElementById('btnOxxoCrm').href = `${store.publicUrl}/client/${data.id}`; // Reset View - document.getElementById('oxxoPlaceholder').style.display = 'block'; + document.getElementById('oxxoPlaceholder').style.display = 'block'; // This is the PREVIEW placeholder (keep as is) + document.getElementById('oxxoModulePlaceholder').style.display = 'none'; // Hide MODULE placeholder document.getElementById('oxxoResult').style.display = 'none'; document.getElementById('oxxoResult').innerHTML = ''; @@ -1852,9 +1943,37 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador `).join(''); + filterInstallers(); // Re-apply filter after render } renderTable(); + window.filterInstallers = function() { + const query = document.getElementById('installerSearch').value.toLowerCase(); + const rows = document.querySelectorAll('#installersTable tbody tr'); + let visibleCount = 0; + + rows.forEach(row => { + const text = row.innerText.toLowerCase(); + if (text.includes(query)) { + row.style.display = ''; + visibleCount++; + } else { + row.style.display = 'none'; + } + }); + + const emptyState = document.getElementById('installersEmptyState'); + const tableContainer = document.querySelector('#installersTable').parentElement; + + if (visibleCount === 0 && rows.length > 0) { + emptyState.style.display = 'block'; + tableContainer.style.display = 'none'; + } else { + emptyState.style.display = 'none'; + tableContainer.style.display = 'block'; + } + } + window.editInstaller = function(index) { const installer = store.installers[index]; if (!installer) return;