mirror of
https://github.com/Dvorinka/PPve.git
synced 2026-06-03 20:12:59 +00:00
Add files via upload
This commit is contained in:
+6
-4
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user