File size: 766 Bytes
9f7a968
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Initialize tooltips
document.addEventListener('DOMContentLoaded', () => {
    // Refresh feather icons after dynamic content loads
    feather.replace();
    
    // Close mobile sidebar when clicking on nav items
    const navItems = document.querySelectorAll('[data-nav-item]');
    navItems.forEach(item => {
        item.addEventListener('click', () => {
            const sidebar = document.querySelector('custom-sidebar');
            if (window.innerWidth < 768) {
                sidebar.setAttribute('mobile-open', 'false');
            }
        });
    });
    
    // Simulate loading data
    setTimeout(() => {
        const loadingRows = document.querySelectorAll('.loading-row');
        loadingRows.forEach(row => row.remove());
    }, 1500);
});