mirror of
https://github.com/Dvorinka/PPve.git
synced 2026-06-04 20:42: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';
|
const activeTab = document.querySelector('.switcher-btn.active')?.dataset.type || 'main';
|
||||||
|
|
||||||
// Get contacts for active tab
|
// Get contacts for active tab
|
||||||
const contacts = activeTab === 'main' ? currentData.Contacts : currentData.InternalContacts;
|
const contacts = activeTab === 'main' ?
|
||||||
|
(currentData?.Contacts || []) :
|
||||||
|
(currentData?.InternalContacts || []);
|
||||||
|
|
||||||
// Apply search filter
|
// Apply search filter
|
||||||
const filteredContacts = query ?
|
const filteredContacts = query ?
|
||||||
contacts.filter(c =>
|
contacts.filter(c =>
|
||||||
c.name.toLowerCase().includes(query) ||
|
(c.name && c.name.toLowerCase().includes(query)) ||
|
||||||
c.position.toLowerCase().includes(query) ||
|
(c.position && c.position.toLowerCase().includes(query)) ||
|
||||||
c.phone.includes(query) ||
|
(c.phone && c.phone.includes(query)) ||
|
||||||
(c.service_phone && c.service_phone.includes(query))
|
(c.service_phone && c.service_phone.includes(query))
|
||||||
) : contacts;
|
) : contacts;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user