diff --git a/index.html b/index.html index 1a79fb9..80c70c5 100644 --- a/index.html +++ b/index.html @@ -142,6 +142,6 @@ body{font:17px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",Inter,system-ui,s - + diff --git a/script.js b/script.js index 3a969a8..a894bcf 100644 --- a/script.js +++ b/script.js @@ -102,11 +102,16 @@ let isAdmin = true; // ========== АВТОМАТИЧЕСКАЯ ЗАГРУЗКА ========== document.addEventListener('DOMContentLoaded', function() { - document.getElementById('admin-panel').classList.remove('hidden'); - document.getElementById('employee-panel').classList.add('hidden'); - showTab('dashboard'); - renderDashboard(); - renderCityStats(); + try { + document.getElementById('admin-panel').classList.remove('hidden'); + document.getElementById('employee-panel').classList.add('hidden'); + showTab('dashboard'); + renderDashboard(); + renderCityStats(); + } catch (e) { + console.error('Ошибка инициализации:', e); + document.body.innerHTML = '
Ошибка загрузки: ' + e.message + '
'; + } }); // ========== ТАБЫ ==========