diff --git a/api/notifications.php b/api/notifications.php index aa23696..f3afd22 100644 --- a/api/notifications.php +++ b/api/notifications.php @@ -45,7 +45,7 @@ $myUsername = $currentUser['username'] ?? ''; // Query 1: Tickets assigned to me (events from other users) $assignSql = "SELECT - al.log_id, al.action_type, al.entity_type, al.entity_id, al.details, al.created_at, + al.audit_id AS log_id, al.action_type, al.entity_type, al.entity_id, al.details, al.created_at, COALESCE(u.display_name, u.username, 'System') AS actor_name FROM audit_log al LEFT JOIN users u ON al.user_id = u.user_id @@ -88,7 +88,7 @@ $stmt->close(); // Step B: fetch recent comment audit events not by the current user $commentSql = "SELECT - al.log_id, al.action_type, al.entity_type, al.entity_id, al.details, al.created_at, + al.audit_id AS log_id, al.action_type, al.entity_type, al.entity_id, al.details, al.created_at, COALESCE(u.display_name, u.username, 'System') AS actor_name FROM audit_log al LEFT JOIN users u ON al.user_id = u.user_id @@ -118,7 +118,7 @@ foreach ($rawCommentRows as $rawRow) { // Query 3: Status changes on watched tickets (from other users) $statusSql = "SELECT DISTINCT - al.log_id, al.action_type, al.entity_type, al.entity_id, al.details, al.created_at, + al.audit_id AS log_id, al.action_type, al.entity_type, al.entity_id, al.details, al.created_at, COALESCE(u.display_name, u.username, 'System') AS actor_name FROM audit_log al LEFT JOIN users u ON al.user_id = u.user_id diff --git a/assets/css/dashboard.css b/assets/css/dashboard.css index d3d7947..4a5dcaf 100644 --- a/assets/css/dashboard.css +++ b/assets/css/dashboard.css @@ -8,6 +8,14 @@ margin-bottom: 1rem; } +/* Unit suffix on resolution time stat (smaller, muted) */ +.lt-stat-unit { + font-size: 0.65em; + font-weight: 500; + margin-left: 0.15em; + opacity: 0.75; +} + /* Priority row highlights */ .lt-row-critical td { background: rgba(255, 77, 77, 0.04); diff --git a/views/DashboardView.php b/views/DashboardView.php index 6f50cac..0737710 100644 --- a/views/DashboardView.php +++ b/views/DashboardView.php @@ -162,10 +162,25 @@ include __DIR__ . '/layout_header.php'; -
+ 0 ? number_format($avgHours, 1) . ' hours' : 'No data'; + ?> +
-
h
+
Avg Resolution