File size: 26,303 Bytes
c7f695f 0f0ca7a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FCA Training Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
.progress-bar {
height: 6px;
border-radius: 3px;
}
.progress-completed {
background-color: #10B981;
}
.progress-incomplete {
background-color: #F59E0B;
}
.progress-not-attempted {
background-color: #EF4444;
}
.user-card:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}
.filter-active {
background-color: #3B82F6;
color: white;
}
</style>
</head>
<body class="bg-gray-50">
<div class="min-h-screen">
<!-- Header -->
<header class="bg-white shadow-sm">
<div class="max-w-7xl mx-auto px-4 py-6 sm:px-6 lg:px-8 flex justify-between items-center">
<div>
<h1 class="text-2xl font-bold text-gray-900">FCA Training Completion Dashboard</h1>
<p class="text-gray-500">Annual compliance training progress tracking</p>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<input type="text" placeholder="Search employees..." class="pl-10 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
<i data-feather="search" class="absolute left-3 top-2.5 text-gray-400"></i>
</div>
<button class="bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition flex items-center">
<i data-feather="download" class="mr-2"></i>
Export
</button>
</div>
</div>
</header>
<!-- Main Content -->
<main class="max-w-7xl mx-auto px-4 py-6 sm:px-6 lg:px-8">
<!-- Summary Cards -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="bg-white p-6 rounded-xl shadow-sm">
<div class="flex justify-between items-start">
<div>
<p class="text-gray-500">Completed</p>
<h3 class="text-3xl font-bold text-gray-900 mt-1">24</h3>
<p class="text-green-500 text-sm mt-2">+5 from last month</p>
</div>
<div class="bg-green-100 p-3 rounded-full">
<i data-feather="check-circle" class="text-green-600"></i>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-xl shadow-sm">
<div class="flex justify-between items-start">
<div>
<p class="text-gray-500">Incomplete</p>
<h3 class="text-3xl font-bold text-gray-900 mt-1">3</h3>
<p class="text-yellow-500 text-sm mt-2">-2 from last month</p>
</div>
<div class="bg-yellow-100 p-3 rounded-full">
<i data-feather="alert-circle" class="text-yellow-600"></i>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-xl shadow-sm">
<div class="flex justify-between items-start">
<div>
<p class="text-gray-500">Not Attempted</p>
<h3 class="text-3xl font-bold text-gray-900 mt-1">58</h3>
<p class="text-red-500 text-sm mt-2">+3 from last month</p>
</div>
<div class="bg-red-100 p-3 rounded-full">
<i data-feather="x-circle" class="text-red-600"></i>
</div>
</div>
</div>
</div>
<!-- Charts -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
<div class="bg-white p-6 rounded-xl shadow-sm">
<h3 class="text-lg font-semibold mb-4">Completion Status Distribution</h3>
<div class="h-64">
<canvas id="pieChart"></canvas>
</div>
</div>
<div class="bg-white p-6 rounded-xl shadow-sm">
<h3 class="text-lg font-semibold mb-4">Monthly Progress</h3>
<div class="h-64">
<canvas id="lineChart"></canvas>
</div>
</div>
</div>
<!-- Filters -->
<div class="bg-white p-4 rounded-xl shadow-sm mb-6">
<div class="flex flex-wrap gap-2">
<button class="filter-btn px-4 py-2 rounded-full border hover:bg-gray-100" data-filter="all">All</button>
<button class="filter-btn px-4 py-2 rounded-full border hover:bg-gray-100" data-filter="completed">
<span class="inline-block w-2 h-2 rounded-full bg-green-500 mr-2"></span>
Completed
</button>
<button class="filter-btn px-4 py-2 rounded-full border hover:bg-gray-100" data-filter="incomplete">
<span class="inline-block w-2 h-2 rounded-full bg-yellow-500 mr-2"></span>
Incomplete
</button>
<button class="filter-btn px-4 py-2 rounded-full border hover:bg-gray-100" data-filter="not-attempted">
<span class="inline-block w-2 h-2 rounded-full bg-red-500 mr-2"></span>
Not Attempted
</button>
<button class="filter-btn px-4 py-2 rounded-full border hover:bg-gray-100" data-filter="partial">
<span class="inline-block w-2 h-2 rounded-full bg-blue-500 mr-2"></span>
Partial Completion
</button>
</div>
</div>
<!-- Employee List -->
<div class="bg-white rounded-xl shadow-sm overflow-hidden">
<div class="px-6 py-4 border-b flex justify-between items-center">
<h3 class="text-lg font-semibold">Employee Training Status</h3>
<div class="text-sm text-gray-500">Showing <span id="showing-count">80</span> of 80 employees</div>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Employee</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Progress</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Modules</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Action</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200" id="employee-table">
<!-- Employee rows will be inserted here by JavaScript -->
</tbody>
</table>
</div>
<div class="px-6 py-4 border-t flex justify-between items-center">
<div class="text-sm text-gray-500">Page 1 of 4</div>
<div class="flex space-x-2">
<button class="px-3 py-1 border rounded hover:bg-gray-100">Previous</button>
<button class="px-3 py-1 border rounded bg-blue-600 text-white">1</button>
<button class="px-3 py-1 border rounded hover:bg-gray-100">2</button>
<button class="px-3 py-1 border rounded hover:bg-gray-100">3</button>
<button class="px-3 py-1 border rounded hover:bg-gray-100">Next</button>
</div>
</div>
</div>
</main>
</div>
<script>
// Initialize feather icons
feather.replace();
// Sample data (would be replaced with actual data from your source)
const employeeData = [
{ name: "Adeel Ahsan", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Adrien Monteiro", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Alan Willis", completed: 12, incomplete: 0, notAttempted: 0 },
{ name: "Aleksandra Orywal", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Alessia Gigantesco", completed: 1, incomplete: 0, notAttempted: 11 },
{ name: "Alla Alqadi", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Amal Jaradat", completed: 0, incomplete: 1, notAttempted: 12 },
{ name: "Amelie Malta", completed: 6, incomplete: 2, notAttempted: 4 },
{ name: "Andrew McBean", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Andrew Tetley", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Annabel Malta", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Antonio Agresta", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Arkadii Sidorov", completed: 0, incomplete: 0, notAttempted: 13 },
{ name: "Armando Ortiz", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Arthur Clarkson", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Arunan Ravi", completed: 4, incomplete: 0, notAttempted: 8 },
{ name: "Audris Kezi", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Benjamin Thomas", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Benoit Riegel", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Bill Mackway-Jones", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Caroun Derderian", completed: 12, incomplete: 0, notAttempted: 0 },
{ name: "Catarina Malta", completed: 10, incomplete: 0, notAttempted: 3 },
{ name: "Christopher Stribling", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Corrado Ninzoli", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Domenico Fanelli", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Dominic Brindle", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Elena Boccaletti", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Emily Palit", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Emmanuel Valavanis", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Essam Alkadomi", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Fadi Kassis", completed: 5, incomplete: 0, notAttempted: 7 },
{ name: "Feras Batayneh", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Florian Josef", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Garvan Smith", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Giammarco Campolieti", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Giueseppe Gambardella", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Gregory Marbot", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Gustavo Messerlian", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Gwen Arnal", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Hejer Anane", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Hugh Grindon", completed: 12, incomplete: 0, notAttempted: 0 },
{ name: "Ian Wilkins", completed: 12, incomplete: 0, notAttempted: 0 },
{ name: "James Crammond", completed: 12, incomplete: 0, notAttempted: 0 },
{ name: "Jasper Falk", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Keith Temperton", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Linda Amrouche", completed: 12, incomplete: 0, notAttempted: 0 },
{ name: "Marc Levy-Walhain", completed: 12, incomplete: 0, notAttempted: 0 },
{ name: "Marcelo Calvi", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Marco Bach", completed: 13, incomplete: 0, notAttempted: 0 },
{ name: "Masoud Abdorrezai", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Matthieu Prevot", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Maxwell Underhill", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Meryem Kessler", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Naouel Souissi", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Navita Morgan", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Nicholas Tuite", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Oliver Espley", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Osman Khan", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Ozan Kalemdaroglu", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Peter Mulhall", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Ramiro Delfranco", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Robert Collins", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Russell Howard", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Sam Seman", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Samuel Cooper", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Sarp Kavrar", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Serena Irani", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Simon Kelsey", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Simon Luther Mead", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Simon Wise", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Steve Seman", completed: 12, incomplete: 0, notAttempted: 0 },
{ name: "Steven Bennett", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Taher Shakaa", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Terry Torrison", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Thomas Simeon", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Tiziano Chiappini", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Tobias Clothier", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Wasim Ahmad", completed: 0, incomplete: 0, notAttempted: 12 },
{ name: "Youssef Sabri", completed: 0, incomplete: 0, notAttempted: 12 }
];
// Calculate summary statistics
let totalCompleted = 0;
let totalIncomplete = 0;
let totalNotAttempted = 0;
employeeData.forEach(employee => {
totalCompleted += employee.completed;
totalIncomplete += employee.incomplete;
totalNotAttempted += employee.notAttempted;
});
// Update summary cards
document.addEventListener('DOMContentLoaded', function() {
// Update summary numbers (these would be calculated from your actual data)
document.querySelectorAll('.text-3xl')[0].textContent = totalCompleted;
document.querySelectorAll('.text-3xl')[1].textContent = totalIncomplete;
document.querySelectorAll('.text-3xl')[2].textContent = totalNotAttempted;
// Populate employee table
const tableBody = document.getElementById('employee-table');
employeeData.forEach(employee => {
const totalModules = employee.completed + employee.incomplete + employee.notAttempted;
const completionPercentage = (employee.completed / totalModules) * 100;
let statusBadge = '';
let statusClass = '';
if (employee.completed === totalModules) {
statusBadge = 'Completed';
statusClass = 'bg-green-100 text-green-800';
} else if (employee.completed === 0 && employee.incomplete === 0) {
statusBadge = 'Not Started';
statusClass = 'bg-red-100 text-red-800';
} else if (employee.incomplete > 0) {
statusBadge = 'Incomplete';
statusClass = 'bg-yellow-100 text-yellow-800';
} else {
statusBadge = 'In Progress';
statusClass = 'bg-blue-100 text-blue-800';
}
const row = document.createElement('tr');
row.className = 'hover:bg-gray-50';
row.innerHTML = `
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-gray-200 flex items-center justify-center">
<span class="text-gray-600">${employee.name.charAt(0)}</span>
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">${employee.name}</div>
<div class="text-sm text-gray-500">${totalModules} modules</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${statusClass}">
${statusBadge}
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-green-500 h-2 rounded-full" style="width: ${completionPercentage}%"></div>
</div>
<div class="text-xs text-gray-500 mt-1">${employee.completed}/${totalModules} completed</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<div class="flex space-x-1">
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-green-100 text-green-800">
${employee.completed} ✓
</span>
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800">
${employee.incomplete} !
</span>
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-800">
${employee.notAttempted} ✗
</span>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<button class="text-blue-600 hover:text-blue-900 mr-3">Remind</button>
<button class="text-gray-600 hover:text-gray-900">View</button>
</td>
`;
tableBody.appendChild(row);
});
// Initialize charts
const pieCtx = document.getElementById('pieChart').getContext('2d');
const pieChart = new Chart(pieCtx, {
type: 'pie',
data: {
labels: ['Completed', 'Incomplete', 'Not Attempted'],
datasets: [{
data: [totalCompleted, totalIncomplete, totalNotAttempted],
backgroundColor: [
'#10B981',
'#F59E0B',
'#EF4444'
],
borderWidth: 1
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'right',
}
}
}
});
const lineCtx = document.getElementById('lineChart').getContext('2d');
const lineChart = new Chart(lineCtx, {
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
datasets: [
{
label: 'Completed',
data: [2, 5, 8, 10, 12, 15, 18, 20, 22, 24, 24, 24],
borderColor: '#10B981',
backgroundColor: 'rgba(16, 185, 129, 0.1)',
tension: 0.3,
fill: true
},
{
label: 'Incomplete',
data: [10, 8, 6, 5, 4, 4, 3, 3, 3, 3, 3, 3],
borderColor: '#F59E0B',
backgroundColor: 'rgba(245, 158, 11, 0.1)',
tension: 0.3,
fill: true
},
{
label: 'Not Attempted',
data: [80, 75, 70, 65, 60, 55, 50, 45, 40, 35, 30, 25],
borderColor: '#EF4444',
backgroundColor: 'rgba(239, 68, 68, 0.1)',
tension: 0.3,
fill: true
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'top',
}
},
scales: {
y: {
beginAtZero: true
}
}
}
});
// Filter functionality
const filterButtons = document.querySelectorAll('.filter-btn');
filterButtons.forEach(button => {
button.addEventListener('click', function() {
// Remove active class from all buttons
filterButtons.forEach(btn => btn.classList.remove('filter-active', 'text-white'));
// Add active class to clicked button
this.classList.add('filter-active', 'text-white');
const filter = this.dataset.filter;
let visibleCount = 0;
// Filter table rows
const rows = tableBody.querySelectorAll('tr');
rows.forEach(row => {
const statusBadge = row.querySelector('span:first-child').textContent.trim().toLowerCase();
let showRow = false;
if (filter === 'all') {
showRow = true;
} else if (filter === 'completed' && statusBadge === 'completed') {
showRow = true;
} else if (filter === 'incomplete' && statusBadge === 'incomplete') {
showRow = true;
} else if (filter === 'not-attempted' && statusBadge === 'not started') {
showRow = true;
} else if (filter === 'partial' && statusBadge === 'in progress') {
showRow = true;
}
if (showRow) {
row.style.display = '';
visibleCount++;
} else {
row.style.display = 'none';
}
});
// Update showing count
document.getElementById('showing-count').textContent = visibleCount;
});
});
});
</script>
</body>
</html>
|