Add files via upload

This commit is contained in:
Tomáš Dvořák
2025-05-23 10:17:24 +02:00
committed by GitHub
parent 9f72a92903
commit d7d7f9a756
+6 -4
View File
@@ -211,14 +211,16 @@
const activeTab = document.querySelector('.switcher-btn.active')?.dataset.type || 'main';
// Get contacts for active tab
const contacts = activeTab === 'main' ? currentData.Contacts : currentData.InternalContacts;
const contacts = activeTab === 'main' ?
(currentData?.Contacts || []) :
(currentData?.InternalContacts || []);
// Apply search filter
const filteredContacts = query ?
contacts.filter(c =>
c.name.toLowerCase().includes(query) ||
c.position.toLowerCase().includes(query) ||
c.phone.includes(query) ||
(c.name && c.name.toLowerCase().includes(query)) ||
(c.position && c.position.toLowerCase().includes(query)) ||
(c.phone && c.phone.includes(query)) ||
(c.service_phone && c.service_phone.includes(query))
) : contacts;