MCPcopy Create free account
hub / github.com/Muhammadsiddiq-code/Admin-dashboard / loadDashboardData

Function loadDashboardData

app.js:391–417  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

389}
390
391function loadDashboardData() {
392 // Update statistics
393 document.getElementById("totalStudents").textContent = sampleData.students.length.toLocaleString()
394 document.getElementById("totalTeachers").textContent = sampleData.teachers.length
395 document.getElementById("todayClasses").textContent = "24"
396 document.getElementById("activeUsers").textContent = "456"
397
398 // Load recent news
399 const recentNews = document.getElementById("recentNews")
400 if (recentNews) {
401 recentNews.innerHTML = sampleData.news
402 .slice(0, 3)
403 .map(
404 (news) => `
405 <div class="news-item">
406 <h4>${news.title}</h4>
407 <p>${news.content.substring(0, 100)}...</p>
408 <small>${formatDate(news.date)}</small>
409 </div>
410 `,
411 )
412 .join("")
413 }
414
415 // Create activity chart
416 createActivityChart()
417}
418
419function loadStudentsData() {
420 const tableBody = document.getElementById("studentsTableBody")

Callers 2

showAdminPanelFunction · 0.85
loadPageDataFunction · 0.85

Calls 2

formatDateFunction · 0.85
createActivityChartFunction · 0.85

Tested by

no test coverage detected