se eliminó el buscador en el gestor de instaladores

This commit is contained in:
DANYDHSV 2026-02-12 12:48:41 -06:00
parent fc9fcca6c0
commit 12bb5c04a4

View File

@ -1067,16 +1067,11 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador
</div>
<!-- CONFIG CONTAINER -->
<div class="config-container">
<div class="form-group">
<label>Buscar Instalador</label>
<input type="text" id="installerSearch" class="form-control" placeholder="Nombre, ID o WhatsApp..." onkeyup="filterInstallers()">
</div>
<div>
<button class="btn btn-primary" onclick="openInstallerModal()" style="height: 42px;">
+ Nuevo Instalador
</button>
</div>
<!-- CONFIG CONTAINER -->
<div style="display: flex; justify-content: flex-end; margin-bottom: 2rem;">
<button class="btn btn-primary" onclick="openInstallerModal()" style="height: 42px;">
+ Nuevo Instalador
</button>
</div>
<div style="overflow-x: auto;">
@ -1943,36 +1938,9 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador
<img src="?action=image&file=delete.webp" class="icon-action" style="margin-left:10px" onclick="deleteInstaller(${i})" title="Borrar">
</td>
</tr>`).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];