Update index.html
Browse files- index.html +302 -90
index.html
CHANGED
|
@@ -1,11 +1,13 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html lang="ar" dir="rtl">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>منصة الأداء - رؤية 2030</title>
|
| 7 |
-
<!--
|
| 8 |
<script src="https://cdn.tailwindcss.com"></script>
|
|
|
|
|
|
|
| 9 |
<link href="https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap" rel="stylesheet">
|
| 10 |
<style>
|
| 11 |
body { font-family: 'Cairo', sans-serif; background-color: #f8fafc; }
|
|
@@ -14,13 +16,13 @@
|
|
| 14 |
<body class="flex h-screen overflow-hidden">
|
| 15 |
|
| 16 |
<!-- القائمة الجانبية (Sidebar) -->
|
| 17 |
-
<aside class="w-64 bg-white border-l border-gray-200 flex flex-col justify-between hidden md:flex">
|
| 18 |
<div>
|
| 19 |
<!-- ترويسة الشعار -->
|
| 20 |
<div class="p-6 flex items-center justify-between border-b border-gray-100">
|
| 21 |
-
<div class="text-right">
|
| 22 |
-
<h1 class="text-lg font-bold text-teal-700">منصة الأداء</h1>
|
| 23 |
-
<p class="text-xs text-gray-400">رؤية 2030</p>
|
| 24 |
</div>
|
| 25 |
<div class="w-9 h-9 rounded-xl bg-teal-600 flex items-center justify-center text-white font-bold">✨</div>
|
| 26 |
</div>
|
|
@@ -28,16 +30,16 @@
|
|
| 28 |
<!-- روابط التنقل -->
|
| 29 |
<nav class="p-4 space-y-2">
|
| 30 |
<button onclick="switchTab('dashboard')" id="btn-dashboard" class="w-full flex items-center gap-3 px-4 py-3 rounded-xl text-sm font-semibold transition bg-teal-700 text-white shadow-sm">
|
| 31 |
-
📊 لوحة التحكم
|
| 32 |
</button>
|
| 33 |
<button onclick="switchTab('kpis')" id="btn-kpis" class="w-full flex items-center gap-3 px-4 py-3 rounded-xl text-sm font-semibold transition text-gray-600 hover:bg-gray-50">
|
| 34 |
-
📈 مؤشرات الأداء
|
| 35 |
</button>
|
| 36 |
<button class="w-full flex items-center gap-3 px-4 py-3 rounded-xl text-sm font-semibold text-gray-600 hover:bg-gray-50">
|
| 37 |
-
📋 إدارة المهام
|
| 38 |
</button>
|
| 39 |
<button class="w-full flex items-center gap-3 px-4 py-3 rounded-xl text-sm font-semibold text-gray-600 hover:bg-gray-50">
|
| 40 |
-
📑 التقارير
|
| 41 |
</button>
|
| 42 |
</nav>
|
| 43 |
</div>
|
|
@@ -45,9 +47,9 @@
|
|
| 45 |
<!-- معلومات المستخدم في أسفل القائمة -->
|
| 46 |
<div class="p-4 border-t border-gray-100 flex items-center gap-3">
|
| 47 |
<div class="w-10 h-10 rounded-full bg-teal-700 text-white flex items-center justify-center font-bold">أ</div>
|
| 48 |
-
<div class="text-right">
|
| 49 |
-
<h4 class="text-sm font-bold text-gray-800">أحمد العتيبي</h4>
|
| 50 |
-
<p class="text-xs text-gray-500">مدير الأداء</p>
|
| 51 |
</div>
|
| 52 |
</div>
|
| 53 |
</aside>
|
|
@@ -58,14 +60,14 @@
|
|
| 58 |
<!-- الشريط العلوى (Navbar) -->
|
| 59 |
<header class="bg-white border-b border-gray-200 px-8 py-4 flex items-center justify-between sticky top-0 z-10">
|
| 60 |
<div class="flex items-center gap-4 w-1/3">
|
| 61 |
-
<input type="text" placeholder="البحث عن مؤشرات، مهام، أو تقارير..." class="w-full bg-gray-50 border border-gray-200 rounded-xl px-4 py-2 text-sm focus:outline-none focus:border-teal-600">
|
| 62 |
</div>
|
| 63 |
-
|
| 64 |
<div class="flex items-center gap-4">
|
| 65 |
-
<
|
| 66 |
-
|
| 67 |
-
<
|
| 68 |
-
</
|
| 69 |
<span class="text-sm text-gray-500">🔔</span>
|
| 70 |
</div>
|
| 71 |
</header>
|
|
@@ -76,8 +78,8 @@
|
|
| 76 |
<!-- ================= الواجهة الأولى: لوحة التحكم ================= -->
|
| 77 |
<section id="view-dashboard" class="space-y-8">
|
| 78 |
<div>
|
| 79 |
-
<h2 class="text-xl font-bold text-gray-800">لوحة التحكم</h2>
|
| 80 |
-
<p class="text-sm text-gray-500">نظرة شاملة على مؤشرات الأداء الرئيسية</p>
|
| 81 |
</div>
|
| 82 |
|
| 83 |
<!-- البطاقات الأربع العلوية -->
|
|
@@ -88,8 +90,8 @@
|
|
| 88 |
<span class="text-xs font-bold text-emerald-600 bg-emerald-50 px-2 py-1 rounded-lg">+12% ↗</span>
|
| 89 |
</div>
|
| 90 |
<div class="mt-4">
|
| 91 |
-
<h3 class="text-2xl font-bold text-gray-800"
|
| 92 |
-
<p class="text-xs text-gray-500 mt-1">إجمالي المؤشرات</p>
|
| 93 |
</div>
|
| 94 |
</div>
|
| 95 |
|
|
@@ -99,8 +101,8 @@
|
|
| 99 |
<span class="text-xs font-bold text-emerald-600 bg-emerald-50 px-2 py-1 rounded-lg">+8% ↗</span>
|
| 100 |
</div>
|
| 101 |
<div class="mt-4">
|
| 102 |
-
<h3 class="text-2xl font-bold text-gray-800"
|
| 103 |
-
<p class="text-xs text-gray-500 mt-1">المؤشرات المكتملة</p>
|
| 104 |
</div>
|
| 105 |
</div>
|
| 106 |
|
|
@@ -110,8 +112,8 @@
|
|
| 110 |
<span class="text-xs font-bold text-red-600 bg-red-50 px-2 py-1 rounded-lg">-2% ↘</span>
|
| 111 |
</div>
|
| 112 |
<div class="mt-4">
|
| 113 |
-
<h3 class="text-2xl font-bold text-gray-800"
|
| 114 |
-
<p class="text-xs text-gray-500 mt-1">المؤشرات المتأخرة</p>
|
| 115 |
</div>
|
| 116 |
</div>
|
| 117 |
|
|
@@ -122,7 +124,7 @@
|
|
| 122 |
</div>
|
| 123 |
<div class="mt-4">
|
| 124 |
<h3 class="text-2xl font-bold text-gray-800">75%</h3>
|
| 125 |
-
<p class="text-xs text-gray-500 mt-1">نسبة الإنجاز</p>
|
| 126 |
</div>
|
| 127 |
</div>
|
| 128 |
</div>
|
|
@@ -131,84 +133,285 @@
|
|
| 131 |
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
|
| 132 |
<!-- توزيع الحالات -->
|
| 133 |
<div class="bg-white p-6 rounded-2xl border border-gray-100 shadow-sm">
|
| 134 |
-
<h3 class="font-bold text-gray-800 mb-4">توزيع الحالات</h3>
|
| 135 |
<div class="flex flex-col items-center justify-center py-6">
|
| 136 |
<div class="w-36 h-36 rounded-full border-8 border-teal-500 border-t-amber-500 border-l-red-500 flex items-center justify-center">
|
| 137 |
-
<span class="text-sm font-bold text-gray-700">الحالة العامة</span>
|
| 138 |
</div>
|
| 139 |
</div>
|
| 140 |
<div class="flex justify-around text-xs text-gray-600 mt-4">
|
| 141 |
-
<span class="flex items-center gap-1"><i class="w-2.5 h-2.5 rounded-full bg-emerald-500 inline-block"></i> جيد (18)</span>
|
| 142 |
-
<span class="flex items-center gap-1"><i class="w-2.5 h-2.5 rounded-full bg-amber-500 inline-block"></i> متوسط (3)</span>
|
| 143 |
-
<span class="flex items-center gap-1"><i class="w-2.5 h-2.5 rounded-full bg-red-500 inline-block"></i> متأخر (3)</span>
|
| 144 |
</div>
|
| 145 |
</div>
|
| 146 |
|
| 147 |
<!-- أداء المؤشرات (Progress Bars) -->
|
| 148 |
<div class="bg-white p-6 rounded-2xl border border-gray-100 shadow-sm lg:col-span-2">
|
| 149 |
-
<h3 class="font-bold text-gray-800 mb-6">أداء المؤشرات الرئيسية</h3>
|
| 150 |
<div id="dashboard-progress-bars" class="space-y-5">
|
| 151 |
-
<!--
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
</div>
|
| 153 |
</div>
|
| 154 |
</div>
|
| 155 |
</section>
|
| 156 |
|
| 157 |
-
<!-- ================= الواجهة الثانية: مؤشرات الأداء
|
| 158 |
<section id="view-kpis" class="space-y-6 hidden">
|
| 159 |
<div class="flex justify-between items-center">
|
| 160 |
<div>
|
| 161 |
-
<h2 class="text-xl font-bold text-gray-800">إدارة مؤشرات الأداء</h2>
|
| 162 |
-
<p class="text-sm text-gray-500">إنشاء ومتابعة وتحليل مؤشرات الأداء الرئيسية</p>
|
| 163 |
</div>
|
| 164 |
-
<div
|
| 165 |
-
<button class="bg-teal-700 text-white px-4 py-2 rounded-xl text-sm font-bold shadow-sm hover:bg-teal-800 transition">+ إنشاء مؤشر جديد</button>
|
| 166 |
</div>
|
| 167 |
</div>
|
| 168 |
|
| 169 |
<!-- قائمة بطاقات المؤشرات -->
|
| 170 |
<div id="kpi-cards-container" class="space-y-4">
|
| 171 |
-
<!-- تُعبأ
|
| 172 |
</div>
|
| 173 |
</section>
|
| 174 |
|
| 175 |
</div>
|
| 176 |
</main>
|
| 177 |
|
| 178 |
-
<!--
|
| 179 |
<script>
|
| 180 |
-
// بيانات ا
|
| 181 |
-
|
| 182 |
-
{
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
];
|
| 187 |
|
| 188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 189 |
const container = document.getElementById('dashboard-progress-bars');
|
| 190 |
container.innerHTML = '';
|
| 191 |
data.forEach(item => {
|
| 192 |
-
let color = item.
|
|
|
|
| 193 |
container.innerHTML += `
|
| 194 |
<div>
|
| 195 |
<div class="flex justify-between text-sm mb-1">
|
| 196 |
<span class="font-bold text-gray-700">${item.kpi_name}</span>
|
| 197 |
-
<span class="text-gray-500">
|
| 198 |
</div>
|
| 199 |
<div class="w-full bg-gray-100 h-3 rounded-full overflow-hidden">
|
| 200 |
-
<div class="${color} h-full rounded-full" style="width: ${item.
|
| 201 |
</div>
|
| 202 |
</div>
|
| 203 |
`;
|
| 204 |
});
|
| 205 |
}
|
| 206 |
|
|
|
|
| 207 |
function renderKPIsList(data) {
|
| 208 |
const container = document.getElementById('kpi-cards-container');
|
| 209 |
container.innerHTML = '';
|
| 210 |
data.forEach(item => {
|
| 211 |
-
let
|
|
|
|
|
|
|
| 212 |
container.innerHTML += `
|
| 213 |
<div class="bg-white p-6 rounded-2xl border border-gray-100 shadow-sm space-y-4">
|
| 214 |
<div class="flex justify-between items-start">
|
|
@@ -225,19 +428,18 @@
|
|
| 225 |
</div>
|
| 226 |
</div>
|
| 227 |
|
| 228 |
-
<div class="grid grid-cols-2 md:grid-cols-
|
| 229 |
-
<div>
|
| 230 |
-
<div>
|
| 231 |
-
<div>الهدف: <span class="font-bold text-gray-700">${item.target}%</span></div>
|
| 232 |
</div>
|
| 233 |
|
| 234 |
<div>
|
| 235 |
<div class="flex justify-between text-xs mb-1 text-gray-500">
|
| 236 |
-
<span>
|
| 237 |
-
<span class="font-bold text-gray-700">${item.
|
| 238 |
</div>
|
| 239 |
<div class="w-full bg-gray-100 h-2.5 rounded-full overflow-hidden">
|
| 240 |
-
<div class="bg-emerald-500 h-full rounded-full" style="width: ${item.
|
| 241 |
</div>
|
| 242 |
</div>
|
| 243 |
</div>
|
|
@@ -245,6 +447,38 @@
|
|
| 245 |
});
|
| 246 |
}
|
| 247 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 248 |
function switchTab(tab) {
|
| 249 |
if(tab === 'dashboard') {
|
| 250 |
document.getElementById('view-dashboard').classList.remove('hidden');
|
|
@@ -259,37 +493,15 @@
|
|
| 259 |
}
|
| 260 |
}
|
| 261 |
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
reader.onload = function(e) {
|
| 268 |
-
try {
|
| 269 |
-
const jsonData = JSON.parse(e.target.result);
|
| 270 |
-
// إذا كان ملفك بنفس هيكل 3month_ar.json، سنقوم بتحويله لتنسيق الواجهة
|
| 271 |
-
let formattedData = jsonData.map(item => ({
|
| 272 |
-
kpi_name: item.kpi_name,
|
| 273 |
-
description: "مؤشر أداء رئيسي معتمد للتقييم الدوري",
|
| 274 |
-
department: "الإدارة العامة للأداء",
|
| 275 |
-
target: item.target,
|
| 276 |
-
current: item.month_3 || 75,
|
| 277 |
-
date: "2026-12-31",
|
| 278 |
-
status: (item.month_3 || 75) >= 75 ? "جيد" : ((item.month_3 || 75) >= 60 ? "يحتاج متابعة" : "متأخر")
|
| 279 |
-
}));
|
| 280 |
-
renderDashboard(formattedData);
|
| 281 |
-
renderKPIsList(formattedData);
|
| 282 |
-
alert("تم تحميل بيانات JSON وتحديث الواجهة بنجاح!");
|
| 283 |
-
} catch (err) {
|
| 284 |
-
alert("حدث خطأ أثناء قراءة ملف الـ JSON.");
|
| 285 |
-
}
|
| 286 |
-
};
|
| 287 |
-
reader.readAsText(file);
|
| 288 |
}
|
| 289 |
|
| 290 |
-
// التشغيل الأولي
|
| 291 |
-
|
| 292 |
-
renderKPIsList(defaultData);
|
| 293 |
</script>
|
| 294 |
</body>
|
| 295 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
+
<html lang="ar" dir="rtl" id="html-root">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title id="page-title">منصة الأداء - رؤية 2030</title>
|
| 7 |
+
<!-- Tailwind CSS -->
|
| 8 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<!-- Chart.js للرسم البياني لتطور الأداء -->
|
| 10 |
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
| 11 |
<link href="https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap" rel="stylesheet">
|
| 12 |
<style>
|
| 13 |
body { font-family: 'Cairo', sans-serif; background-color: #f8fafc; }
|
|
|
|
| 16 |
<body class="flex h-screen overflow-hidden">
|
| 17 |
|
| 18 |
<!-- القائمة الجانبية (Sidebar) -->
|
| 19 |
+
<aside class="w-64 bg-white border-l border-gray-200 flex flex-col justify-between hidden md:flex" id="sidebar">
|
| 20 |
<div>
|
| 21 |
<!-- ترويسة الشعار -->
|
| 22 |
<div class="p-6 flex items-center justify-between border-b border-gray-100">
|
| 23 |
+
<div class="text-right rtl:text-right ltr:text-left">
|
| 24 |
+
<h1 class="text-lg font-bold text-teal-700" id="nav-brand">منصة الأداء</h1>
|
| 25 |
+
<p class="text-xs text-gray-400" id="nav-sub">رؤية 2030</p>
|
| 26 |
</div>
|
| 27 |
<div class="w-9 h-9 rounded-xl bg-teal-600 flex items-center justify-center text-white font-bold">✨</div>
|
| 28 |
</div>
|
|
|
|
| 30 |
<!-- روابط التنقل -->
|
| 31 |
<nav class="p-4 space-y-2">
|
| 32 |
<button onclick="switchTab('dashboard')" id="btn-dashboard" class="w-full flex items-center gap-3 px-4 py-3 rounded-xl text-sm font-semibold transition bg-teal-700 text-white shadow-sm">
|
| 33 |
+
📊 <span data-i18n="menu_dashboard">لوحة التحكم</span>
|
| 34 |
</button>
|
| 35 |
<button onclick="switchTab('kpis')" id="btn-kpis" class="w-full flex items-center gap-3 px-4 py-3 rounded-xl text-sm font-semibold transition text-gray-600 hover:bg-gray-50">
|
| 36 |
+
📈 <span data-i18n="menu_kpis">مؤشرات الأداء</span>
|
| 37 |
</button>
|
| 38 |
<button class="w-full flex items-center gap-3 px-4 py-3 rounded-xl text-sm font-semibold text-gray-600 hover:bg-gray-50">
|
| 39 |
+
📋 <span data-i18n="menu_tasks">إدارة المهام</span>
|
| 40 |
</button>
|
| 41 |
<button class="w-full flex items-center gap-3 px-4 py-3 rounded-xl text-sm font-semibold text-gray-600 hover:bg-gray-50">
|
| 42 |
+
📑 <span data-i18n="menu_reports">التقارير</span>
|
| 43 |
</button>
|
| 44 |
</nav>
|
| 45 |
</div>
|
|
|
|
| 47 |
<!-- معلومات المستخدم في أسفل القائمة -->
|
| 48 |
<div class="p-4 border-t border-gray-100 flex items-center gap-3">
|
| 49 |
<div class="w-10 h-10 rounded-full bg-teal-700 text-white flex items-center justify-center font-bold">أ</div>
|
| 50 |
+
<div class="text-right rtl:text-right ltr:text-left">
|
| 51 |
+
<h4 class="text-sm font-bold text-gray-800" data-i18n="user_name">أحمد العتيبي</h4>
|
| 52 |
+
<p class="text-xs text-gray-500" data-i18n="user_role">مدير الأداء</p>
|
| 53 |
</div>
|
| 54 |
</div>
|
| 55 |
</aside>
|
|
|
|
| 60 |
<!-- الشريط العلوى (Navbar) -->
|
| 61 |
<header class="bg-white border-b border-gray-200 px-8 py-4 flex items-center justify-between sticky top-0 z-10">
|
| 62 |
<div class="flex items-center gap-4 w-1/3">
|
| 63 |
+
<input type="text" id="search-input" placeholder="البحث عن مؤشرات، مهام، أو تقارير..." class="w-full bg-gray-50 border border-gray-200 rounded-xl px-4 py-2 text-sm focus:outline-none focus:border-teal-600">
|
| 64 |
</div>
|
| 65 |
+
|
| 66 |
<div class="flex items-center gap-4">
|
| 67 |
+
<!-- زر تبديل اللغة -->
|
| 68 |
+
<button onclick="toggleLanguage()" class="bg-gray-100 hover:bg-gray-200 text-gray-700 font-bold px-3 py-1.5 rounded-xl text-xs transition flex items-center gap-1">
|
| 69 |
+
🌐 <span id="lang-btn-text">English</span>
|
| 70 |
+
</button>
|
| 71 |
<span class="text-sm text-gray-500">🔔</span>
|
| 72 |
</div>
|
| 73 |
</header>
|
|
|
|
| 78 |
<!-- ================= الواجهة الأولى: لوحة التحكم ================= -->
|
| 79 |
<section id="view-dashboard" class="space-y-8">
|
| 80 |
<div>
|
| 81 |
+
<h2 class="text-xl font-bold text-gray-800" data-i18n="dash_title">لوحة التحكم</h2>
|
| 82 |
+
<p class="text-sm text-gray-500" data-i18n="dash_subtitle">نظرة شاملة على مؤشرات الأداء الرئيسية</p>
|
| 83 |
</div>
|
| 84 |
|
| 85 |
<!-- البطاقات الأربع العلوية -->
|
|
|
|
| 90 |
<span class="text-xs font-bold text-emerald-600 bg-emerald-50 px-2 py-1 rounded-lg">+12% ↗</span>
|
| 91 |
</div>
|
| 92 |
<div class="mt-4">
|
| 93 |
+
<h3 class="text-2xl font-bold text-gray-800">24</h3>
|
| 94 |
+
<p class="text-xs text-gray-500 mt-1" data-i18n="card_total">إجمالي المؤشرات</p>
|
| 95 |
</div>
|
| 96 |
</div>
|
| 97 |
|
|
|
|
| 101 |
<span class="text-xs font-bold text-emerald-600 bg-emerald-50 px-2 py-1 rounded-lg">+8% ↗</span>
|
| 102 |
</div>
|
| 103 |
<div class="mt-4">
|
| 104 |
+
<h3 class="text-2xl font-bold text-gray-800">18</h3>
|
| 105 |
+
<p class="text-xs text-gray-500 mt-1" data-i18n="card_completed">المؤشرات المكتملة</p>
|
| 106 |
</div>
|
| 107 |
</div>
|
| 108 |
|
|
|
|
| 112 |
<span class="text-xs font-bold text-red-600 bg-red-50 px-2 py-1 rounded-lg">-2% ↘</span>
|
| 113 |
</div>
|
| 114 |
<div class="mt-4">
|
| 115 |
+
<h3 class="text-2xl font-bold text-gray-800">3</h3>
|
| 116 |
+
<p class="text-xs text-gray-500 mt-1" data-i18n="card_delayed">المؤشرات المتأخرة</p>
|
| 117 |
</div>
|
| 118 |
</div>
|
| 119 |
|
|
|
|
| 124 |
</div>
|
| 125 |
<div class="mt-4">
|
| 126 |
<h3 class="text-2xl font-bold text-gray-800">75%</h3>
|
| 127 |
+
<p class="text-xs text-gray-500 mt-1" data-i18n="card_rate">نسبة الإنجاز</p>
|
| 128 |
</div>
|
| 129 |
</div>
|
| 130 |
</div>
|
|
|
|
| 133 |
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
|
| 134 |
<!-- توزيع الحالات -->
|
| 135 |
<div class="bg-white p-6 rounded-2xl border border-gray-100 shadow-sm">
|
| 136 |
+
<h3 class="font-bold text-gray-800 mb-4" data-i18n="status_dist">توزيع الحالات</h3>
|
| 137 |
<div class="flex flex-col items-center justify-center py-6">
|
| 138 |
<div class="w-36 h-36 rounded-full border-8 border-teal-500 border-t-amber-500 border-l-red-500 flex items-center justify-center">
|
| 139 |
+
<span class="text-sm font-bold text-gray-700" data-i18n="status_general">الحالة العامة</span>
|
| 140 |
</div>
|
| 141 |
</div>
|
| 142 |
<div class="flex justify-around text-xs text-gray-600 mt-4">
|
| 143 |
+
<span class="flex items-center gap-1"><i class="w-2.5 h-2.5 rounded-full bg-emerald-500 inline-block"></i> <span data-i18n="status_good">جيد</span> (18)</span>
|
| 144 |
+
<span class="flex items-center gap-1"><i class="w-2.5 h-2.5 rounded-full bg-amber-500 inline-block"></i> <span data-i18n="status_medium">متوسط</span> (3)</span>
|
| 145 |
+
<span class="flex items-center gap-1"><i class="w-2.5 h-2.5 rounded-full bg-red-500 inline-block"></i> <span data-i18n="status_late">متأخر</span> (3)</span>
|
| 146 |
</div>
|
| 147 |
</div>
|
| 148 |
|
| 149 |
<!-- أداء المؤشرات (Progress Bars) -->
|
| 150 |
<div class="bg-white p-6 rounded-2xl border border-gray-100 shadow-sm lg:col-span-2">
|
| 151 |
+
<h3 class="font-bold text-gray-800 mb-6" data-i18n="kpi_performance">أداء المؤشرات الرئيسية</h3>
|
| 152 |
<div id="dashboard-progress-bars" class="space-y-5">
|
| 153 |
+
<!-- تُعبأ ديناميكياً -->
|
| 154 |
+
</div>
|
| 155 |
+
</div>
|
| 156 |
+
</div>
|
| 157 |
+
|
| 158 |
+
<!-- الجزئية المفقودة 1: تطور الأداء (مخطط خطي لـ 60 يوماً) -->
|
| 159 |
+
<div class="bg-white p-6 rounded-2xl border border-gray-100 shadow-sm space-y-4">
|
| 160 |
+
<h3 class="font-bold text-gray-800" data-i18n="perf_evolution">تطور الأداء (خلال 60 يوماً)</h3>
|
| 161 |
+
<div class="w-full h-64">
|
| 162 |
+
<canvas id="performanceChart"></canvas>
|
| 163 |
+
</div>
|
| 164 |
+
</div>
|
| 165 |
+
|
| 166 |
+
<!-- الجزئية المفقودة 2: التحليلات الذكية (رؤى مدعومة بالذكاء الاصطناعي) -->
|
| 167 |
+
<div class="space-y-4">
|
| 168 |
+
<h3 class="font-bold text-gray-800 text-lg flex items-center gap-2">
|
| 169 |
+
✨ <span data-i18n="ai_insights_title">التحليلات الذكية (رؤى مدعومة بالذكاء الاصطناعي)</span>
|
| 170 |
+
</h3>
|
| 171 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
| 172 |
+
<div class="bg-white p-5 rounded-2xl border border-gray-100 shadow-sm border-r-4 border-r-emerald-500 space-y-2">
|
| 173 |
+
<h4 class="font-bold text-emerald-600 text-sm" data-i18n="insight_1_title">تحسن ملحوظ</h4>
|
| 174 |
+
<p class="text-xs text-gray-600" data-i18n="insight_1_desc">مؤشر رضا المتعاملين تحسن بنسبة 15% خلال الفترة الماضية.</p>
|
| 175 |
+
</div>
|
| 176 |
+
<div class="bg-white p-5 rounded-2xl border border-gray-100 shadow-sm border-r-4 border-r-amber-500 space-y-2">
|
| 177 |
+
<h4 class="font-bold text-amber-600 text-sm" data-i18n="insight_2_title">تنبيه</h4>
|
| 178 |
+
<p class="text-xs text-gray-600" data-i18n="insight_2_desc">مؤشر "خفض زمن إنجاز المعاملات" يحتاج إلى تدخل سريع لتحقيق الهدف.</p>
|
| 179 |
+
</div>
|
| 180 |
+
<div class="bg-white p-5 rounded-2xl border border-gray-100 shadow-sm border-r-4 border-r-blue-500 space-y-2">
|
| 181 |
+
<h4 class="font-bold text-blue-600 text-sm" data-i18n="insight_3_title">توصية</h4>
|
| 182 |
+
<p class="text-xs text-gray-600" data-i18n="insight_3_desc">يمكن تحسين أداء 3 مؤشرات من خلال زيادة الموارد المخصصة بنسبة 20%.</p>
|
| 183 |
</div>
|
| 184 |
</div>
|
| 185 |
</div>
|
| 186 |
</section>
|
| 187 |
|
| 188 |
+
<!-- ================= الواجهة الثانية: مؤشرات الأداء ================= -->
|
| 189 |
<section id="view-kpis" class="space-y-6 hidden">
|
| 190 |
<div class="flex justify-between items-center">
|
| 191 |
<div>
|
| 192 |
+
<h2 class="text-xl font-bold text-gray-800" data-i18n="kpi_mgmt_title">إدارة مؤشرات الأداء</h2>
|
| 193 |
+
<p class="text-sm text-gray-500" data-i18n="kpi_mgmt_sub">إنشاء ومتابعة وتحليل مؤشرات الأداء الرئيسية</p>
|
| 194 |
</div>
|
| 195 |
+
<div>
|
| 196 |
+
<button class="bg-teal-700 text-white px-4 py-2 rounded-xl text-sm font-bold shadow-sm hover:bg-teal-800 transition" data-i18n="new_kpi_btn">+ إنشاء مؤشر جديد</button>
|
| 197 |
</div>
|
| 198 |
</div>
|
| 199 |
|
| 200 |
<!-- قائمة بطاقات المؤشرات -->
|
| 201 |
<div id="kpi-cards-container" class="space-y-4">
|
| 202 |
+
<!-- تُعبأ ديناميكياً -->
|
| 203 |
</div>
|
| 204 |
</section>
|
| 205 |
|
| 206 |
</div>
|
| 207 |
</main>
|
| 208 |
|
| 209 |
+
<!-- البرمجية والبيانات المدمجة -->
|
| 210 |
<script>
|
| 211 |
+
// ملفات البيانات العربية والإنجليزية بـ 60 عينة يومية
|
| 212 |
+
const data_ar = [
|
| 213 |
+
{
|
| 214 |
+
kpi_id: "KPI_01",
|
| 215 |
+
kpi_name: "تحسين رضا المتعاملين",
|
| 216 |
+
description: "قياس مستوى رضا المتعاملين من خلال استبيانات دورية",
|
| 217 |
+
department: "إدارة خدمة المتعاملين",
|
| 218 |
+
target: 90,
|
| 219 |
+
status: "جيد",
|
| 220 |
+
latest_value: 85.0,
|
| 221 |
+
daily_history: Array.from({length: 60}, (_, i) => ({ day: i+1, value: Math.min(90, 72 + (i * 0.25)) }))
|
| 222 |
+
},
|
| 223 |
+
{
|
| 224 |
+
kpi_id: "KPI_02",
|
| 225 |
+
kpi_name: "رقمنة الخدمات الحكومية",
|
| 226 |
+
description: "نسبة الخدمات المتاحة رقمياً من إجمالي الخدمات",
|
| 227 |
+
department: "إدارة التحول الرقمي",
|
| 228 |
+
target: 95,
|
| 229 |
+
status: "جيد",
|
| 230 |
+
latest_value: 92.0,
|
| 231 |
+
daily_history: Array.from({length: 60}, (_, i) => ({ day: i+1, value: Math.min(95, 80 + (i * 0.2)) }))
|
| 232 |
+
},
|
| 233 |
+
{
|
| 234 |
+
kpi_id: "KPI_03",
|
| 235 |
+
kpi_name: "خفض زمن إنجاز المعاملات",
|
| 236 |
+
description: "متوسط الوقت المستغرق لإنجاز المعاملات الحكومية",
|
| 237 |
+
department: "إدارة العمليات",
|
| 238 |
+
target: 80,
|
| 239 |
+
status: "يحتاج متابعة",
|
| 240 |
+
latest_value: 65.0,
|
| 241 |
+
daily_history: Array.from({length: 60}, (_, i) => ({ day: i+1, value: Math.min(80, 50 + (i * 0.25)) }))
|
| 242 |
+
}
|
| 243 |
];
|
| 244 |
|
| 245 |
+
const data_en = [
|
| 246 |
+
{
|
| 247 |
+
kpi_id: "KPI_01",
|
| 248 |
+
kpi_name: "Customer Satisfaction Improvement",
|
| 249 |
+
description: "Measuring customer satisfaction level through periodic surveys",
|
| 250 |
+
department: "Customer Service Department",
|
| 251 |
+
target: 90,
|
| 252 |
+
status: "Good",
|
| 253 |
+
latest_value: 85.0,
|
| 254 |
+
daily_history: Array.from({length: 60}, (_, i) => ({ day: i+1, value: Math.min(90, 72 + (i * 0.25)) }))
|
| 255 |
+
},
|
| 256 |
+
{
|
| 257 |
+
kpi_id: "KPI_02",
|
| 258 |
+
kpi_name: "Government Services Digitalization",
|
| 259 |
+
description: "Percentage of digitally available services out of total services",
|
| 260 |
+
department: "Digital Transformation Department",
|
| 261 |
+
target: 95,
|
| 262 |
+
status: "Good",
|
| 263 |
+
latest_value: 92.0,
|
| 264 |
+
daily_history: Array.from({length: 60}, (_, i) => ({ day: i+1, value: Math.min(95, 80 + (i * 0.2)) }))
|
| 265 |
+
},
|
| 266 |
+
{
|
| 267 |
+
kpi_id: "KPI_03",
|
| 268 |
+
kpi_name: "Transaction Processing Time Reduction",
|
| 269 |
+
description: "Average time taken to complete government transactions",
|
| 270 |
+
department: "Operations Department",
|
| 271 |
+
target: 80,
|
| 272 |
+
status: "Needs Follow-up",
|
| 273 |
+
latest_value: 65.0,
|
| 274 |
+
daily_history: Array.from({length: 60}, (_, i) => ({ day: i+1, value: Math.min(80, 50 + (i * 0.25)) }))
|
| 275 |
+
}
|
| 276 |
+
];
|
| 277 |
+
|
| 278 |
+
// ترجمات الواجهة للغتين
|
| 279 |
+
const translations = {
|
| 280 |
+
ar: {
|
| 281 |
+
page_title: "منصة الأداء - رؤية 2030",
|
| 282 |
+
nav_brand: "منصة الأداء",
|
| 283 |
+
nav_sub: "رؤية 2030",
|
| 284 |
+
menu_dashboard: "لوحة التحكم",
|
| 285 |
+
menu_kpis: "مؤشرات الأداء",
|
| 286 |
+
menu_tasks: "إدارة المهام",
|
| 287 |
+
menu_reports: "التقارير",
|
| 288 |
+
user_name: "أحمد العتيبي",
|
| 289 |
+
user_role: "مدير الأداء",
|
| 290 |
+
search_placeholder: "البحث عن مؤشرات، مهام، أو تقارير...",
|
| 291 |
+
dash_title: "لوحة التحكم",
|
| 292 |
+
dash_subtitle: "نظرة شاملة على مؤشرات الأداء الرئيسية",
|
| 293 |
+
card_total: "إجمالي المؤشرات",
|
| 294 |
+
card_completed: "المؤشرات المكتملة",
|
| 295 |
+
card_delayed: "المؤشرات المتأخرة",
|
| 296 |
+
card_rate: "نسبة الإنجاز",
|
| 297 |
+
status_dist: "توزيع الحالات",
|
| 298 |
+
status_general: "الحالة العامة",
|
| 299 |
+
status_good: "جيد",
|
| 300 |
+
status_medium: "متوسط",
|
| 301 |
+
status_late: "متأخر",
|
| 302 |
+
kpi_performance: "أداء المؤشرات الرئيسية",
|
| 303 |
+
perf_evolution: "تطور الأداء (خلال 60 يوماً)",
|
| 304 |
+
ai_insights_title: "التحليلات الذكية (رؤى مدعومة بالذكاء الاصطناعي)",
|
| 305 |
+
insight_1_title: "تحسن ملحوظ",
|
| 306 |
+
insight_1_desc: "مؤشر رضا المتعاملين تحسن بنسبة 15% خلال الفترة الماضية.",
|
| 307 |
+
insight_2_title: "تنبيه",
|
| 308 |
+
insight_2_desc: "مؤشر 'خفض زمن إنجاز المعاملات' يحتاج إلى تدخل سريع لتحقيق الهدف.",
|
| 309 |
+
insight_3_title: "توصية",
|
| 310 |
+
insight_3_desc: "يمكن تحسين أداء 3 مؤشرات من خلال زيادة الموارد المخصصة بنسبة 20%.",
|
| 311 |
+
kpi_mgmt_title: "إدارة مؤشرات الأداء",
|
| 312 |
+
kpi_mgmt_sub: "إنشاء ومتابعة وتحليل مؤشرات الأداء الرئيسية",
|
| 313 |
+
new_kpi_btn: "+ إنشاء مؤشر جديد",
|
| 314 |
+
target_label: "الهدف",
|
| 315 |
+
dept_label: "الجهة المسؤولة",
|
| 316 |
+
progress_label: "نسبة التقدم"
|
| 317 |
+
},
|
| 318 |
+
en: {
|
| 319 |
+
page_title: "Performance Platform - Vision 2030",
|
| 320 |
+
nav_brand: "Performance Platform",
|
| 321 |
+
nav_sub: "Vision 2030",
|
| 322 |
+
menu_dashboard: "Dashboard",
|
| 323 |
+
menu_kpis: "KPIs Management",
|
| 324 |
+
menu_tasks: "Tasks Management",
|
| 325 |
+
menu_reports: "Reports",
|
| 326 |
+
user_name: "Ahmed Al-Otaibi",
|
| 327 |
+
user_role: "Performance Director",
|
| 328 |
+
search_placeholder: "Search for KPIs, tasks, or reports...",
|
| 329 |
+
dash_title: "Dashboard",
|
| 330 |
+
dash_subtitle: "Comprehensive overview of key performance indicators",
|
| 331 |
+
card_total: "Total KPIs",
|
| 332 |
+
card_completed: "Completed KPIs",
|
| 333 |
+
card_delayed: "Delayed KPIs",
|
| 334 |
+
card_rate: "Completion Rate",
|
| 335 |
+
status_dist: "Status Distribution",
|
| 336 |
+
status_general: "Overall Status",
|
| 337 |
+
status_good: "Good",
|
| 338 |
+
status_medium: "Medium",
|
| 339 |
+
status_late: "Late",
|
| 340 |
+
kpi_performance: "Key Indicators Performance",
|
| 341 |
+
perf_evolution: "Performance Evolution (60 Days)",
|
| 342 |
+
ai_insights_title: "Smart Analytics (AI-Powered Insights)",
|
| 343 |
+
insight_1_title: "Notable Improvement",
|
| 344 |
+
insight_1_desc: "Customer satisfaction KPI improved by 15% over the past period.",
|
| 345 |
+
insight_2_title: "Alert",
|
| 346 |
+
insight_2_desc: "Transaction time reduction KPI needs prompt intervention.",
|
| 347 |
+
insight_3_title: "Recommendation",
|
| 348 |
+
insight_3_desc: "Performance of 3 KPIs can be improved by increasing allocated resources by 20%.",
|
| 349 |
+
kpi_mgmt_title: "KPIs Management",
|
| 350 |
+
kpi_mgmt_sub: "Create, monitor, and analyze key performance indicators",
|
| 351 |
+
new_kpi_btn: "+ New KPI",
|
| 352 |
+
target_label: "Target",
|
| 353 |
+
dept_label: "Responsible Dept",
|
| 354 |
+
progress_label: "Progress Rate"
|
| 355 |
+
}
|
| 356 |
+
};
|
| 357 |
+
|
| 358 |
+
let currentLang = 'ar';
|
| 359 |
+
let chartInstance = null;
|
| 360 |
+
|
| 361 |
+
function getData() {
|
| 362 |
+
return currentLang === 'ar' ? data_ar : data_en;
|
| 363 |
+
}
|
| 364 |
+
|
| 365 |
+
// تبديل اللغة وتحديث عناصر الصفحة
|
| 366 |
+
function toggleLanguage() {
|
| 367 |
+
currentLang = currentLang === 'ar' ? 'en' : 'ar';
|
| 368 |
+
const root = document.getElementById('html-root');
|
| 369 |
+
root.lang = currentLang;
|
| 370 |
+
root.dir = currentLang === 'ar' ? 'rtl' : 'ltr';
|
| 371 |
+
|
| 372 |
+
document.getElementById('lang-btn-text').innerText = currentLang === 'ar' ? 'English' : 'عربي';
|
| 373 |
+
document.getElementById('search-input').placeholder = translations[currentLang].search_placeholder;
|
| 374 |
+
|
| 375 |
+
// تحديث جميع النصوص التي تحمل السمة data-i18n
|
| 376 |
+
document.querySelectorAll('[data-i18n]').forEach(el => {
|
| 377 |
+
const key = el.getAttribute('data-i18n');
|
| 378 |
+
if (translations[currentLang][key]) {
|
| 379 |
+
el.innerText = translations[currentLang][key];
|
| 380 |
+
}
|
| 381 |
+
});
|
| 382 |
+
|
| 383 |
+
renderAll();
|
| 384 |
+
}
|
| 385 |
+
|
| 386 |
+
// عرض أشرطة التقدم في لوحة التحكم
|
| 387 |
+
function renderDashboardProgress(data) {
|
| 388 |
const container = document.getElementById('dashboard-progress-bars');
|
| 389 |
container.innerHTML = '';
|
| 390 |
data.forEach(item => {
|
| 391 |
+
let color = item.latest_value >= 80 ? 'bg-emerald-500' : (item.latest_value >= 60 ? 'bg-amber-500' : 'bg-red-500');
|
| 392 |
+
const targetText = currentLang === 'ar' ? 'الهدف' : 'Target';
|
| 393 |
container.innerHTML += `
|
| 394 |
<div>
|
| 395 |
<div class="flex justify-between text-sm mb-1">
|
| 396 |
<span class="font-bold text-gray-700">${item.kpi_name}</span>
|
| 397 |
+
<span class="text-gray-500">${targetText}: ${item.target}% (<span class="font-bold text-gray-800">${item.latest_value}%</span>)</span>
|
| 398 |
</div>
|
| 399 |
<div class="w-full bg-gray-100 h-3 rounded-full overflow-hidden">
|
| 400 |
+
<div class="${color} h-full rounded-full transition-all duration-500" style="width: ${item.latest_value}%"></div>
|
| 401 |
</div>
|
| 402 |
</div>
|
| 403 |
`;
|
| 404 |
});
|
| 405 |
}
|
| 406 |
|
| 407 |
+
// عرض قائمة المؤشرات في واجهة المؤشرات
|
| 408 |
function renderKPIsList(data) {
|
| 409 |
const container = document.getElementById('kpi-cards-container');
|
| 410 |
container.innerHTML = '';
|
| 411 |
data.forEach(item => {
|
| 412 |
+
let isGood = item.status.includes('Good') || item.status.includes('جيد');
|
| 413 |
+
let badgeColor = isGood ? 'bg-emerald-50 text-emerald-600' : 'bg-amber-50 text-amber-600';
|
| 414 |
+
const t = translations[currentLang];
|
| 415 |
container.innerHTML += `
|
| 416 |
<div class="bg-white p-6 rounded-2xl border border-gray-100 shadow-sm space-y-4">
|
| 417 |
<div class="flex justify-between items-start">
|
|
|
|
| 428 |
</div>
|
| 429 |
</div>
|
| 430 |
|
| 431 |
+
<div class="grid grid-cols-2 md:grid-cols-2 gap-4 text-xs text-gray-500 bg-gray-50 p-3 rounded-xl">
|
| 432 |
+
<div>${t.dept_label}: <span class="font-bold text-gray-700">${item.department}</span></div>
|
| 433 |
+
<div>${t.target_label}: <span class="font-bold text-gray-700">${item.target}%</span></div>
|
|
|
|
| 434 |
</div>
|
| 435 |
|
| 436 |
<div>
|
| 437 |
<div class="flex justify-between text-xs mb-1 text-gray-500">
|
| 438 |
+
<span>${t.progress_label}</span>
|
| 439 |
+
<span class="font-bold text-gray-700">${item.latest_value}%</span>
|
| 440 |
</div>
|
| 441 |
<div class="w-full bg-gray-100 h-2.5 rounded-full overflow-hidden">
|
| 442 |
+
<div class="bg-emerald-500 h-full rounded-full" style="width: ${item.latest_value}%"></div>
|
| 443 |
</div>
|
| 444 |
</div>
|
| 445 |
</div>
|
|
|
|
| 447 |
});
|
| 448 |
}
|
| 449 |
|
| 450 |
+
// رسم المخطط الخطي لتطور الأداء (Chart.js)
|
| 451 |
+
function renderPerformanceChart(data) {
|
| 452 |
+
const ctx = document.getElementById('performanceChart').getContext('2d');
|
| 453 |
+
if (chartInstance) {
|
| 454 |
+
chartInstance.destroy();
|
| 455 |
+
}
|
| 456 |
+
|
| 457 |
+
const labels = data[0].daily_history.map(d => `Day ${d.day}`);
|
| 458 |
+
const datasets = data.map((kpi, idx) => {
|
| 459 |
+
const colors = ['#0D9488', '#3B82F6', '#10B981'];
|
| 460 |
+
return {
|
| 461 |
+
label: kpi.kpi_name,
|
| 462 |
+
data: kpi.daily_history.map(d => d.value),
|
| 463 |
+
borderColor: colors[idx % colors.length],
|
| 464 |
+
backgroundColor: colors[idx % colors.length],
|
| 465 |
+
tension: 0.3,
|
| 466 |
+
borderWidth: 2
|
| 467 |
+
};
|
| 468 |
+
});
|
| 469 |
+
|
| 470 |
+
chartInstance = new Chart(ctx, {
|
| 471 |
+
type: 'line',
|
| 472 |
+
data: { labels: labels, datasets: datasets },
|
| 473 |
+
options: {
|
| 474 |
+
responsive: true,
|
| 475 |
+
maintainAspectRatio: false,
|
| 476 |
+
plugins: { legend: { position: 'bottom' } }
|
| 477 |
+
}
|
| 478 |
+
});
|
| 479 |
+
}
|
| 480 |
+
|
| 481 |
+
// التنقل بين الأقسام
|
| 482 |
function switchTab(tab) {
|
| 483 |
if(tab === 'dashboard') {
|
| 484 |
document.getElementById('view-dashboard').classList.remove('hidden');
|
|
|
|
| 493 |
}
|
| 494 |
}
|
| 495 |
|
| 496 |
+
function renderAll() {
|
| 497 |
+
const data = getData();
|
| 498 |
+
renderDashboardProgress(data);
|
| 499 |
+
renderKPIsList(data);
|
| 500 |
+
renderPerformanceChart(data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 501 |
}
|
| 502 |
|
| 503 |
+
// التشغيل الأولي عند فتح الصفحة
|
| 504 |
+
renderAll();
|
|
|
|
| 505 |
</script>
|
| 506 |
</body>
|
| 507 |
</html>
|