@@ -1943,36 +1938,9 @@ $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];