diff --git a/README.md b/README.md
index 8d688c59..775db218 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
#### A real-time map-based reporting system for campus infrastructure issues, built to improve visibility, accountability, and resolution efficiency.
[](https://github.com/xodivorce/infra-xodivorce-in/)
-[](https://github.com/xodivorce/infra-xodivorce-in/)
+[](https://github.com/xodivorce/infra-xodivorce-in/)
[](https://github.com/xodivorce/infra-xodivorce-in/)
> **🥰 Like this project? Please consider giving it a Star (🌟) on GitHub to show us your appreciation. Thank you!**
diff --git a/src/assets/admin/_admin_overview.php b/src/assets/admin/_admin_overview.php
index 4abec946..68b05c3e 100755
--- a/src/assets/admin/_admin_overview.php
+++ b/src/assets/admin/_admin_overview.php
@@ -1,4 +1,5 @@
query($sql);
$deptStats = [];
@@ -34,6 +32,15 @@ while ($row = $result->fetch_assoc()) {
$deptStats[$row['category']] = $row;
}
+foreach ($departments as $dept) {
+ if (!isset($deptStats[$dept])) {
+ $deptStats[$dept] = [
+ 'opened_count' => 0,
+ 'progress_count' => 0
+ ];
+ }
+}
+
function getStatusConfig($status) {
switch ($status) {
case 'Operational':
@@ -78,7 +85,7 @@ function getIconPath($name) {
return 'M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z';
}
-
+$services = [];
$activeServices = 0;
$maintenanceCount = 0;
$highPriority = 0;
@@ -110,8 +117,6 @@ foreach ($departments as $dept) {
$totalServices = count($services);
-$activeIncidents = $maintenanceCount + $highPriority;
-
if ($highPriority > 0) {
$sysData = [
'status' => 'System Alert',
@@ -143,6 +148,20 @@ if ($highPriority > 0) {
'svg' => '
Active System
= $activeServices ?>
+= $activeServices ?>
/ = $totalServices ?>= ($totalServices - $activeServices) ?> services inactive
@@ -210,7 +229,7 @@ if ($highPriority > 0) {In Maintenance
-= $maintenanceCount ?>
+= $maintenanceCount ?>
Fixing the things
Outage System
-= $highPriority ?>
+= $highPriority ?>
Take an action now
${s.msg}
+ +