diff --git a/views/TicketView.php b/views/TicketView.php index 00fd051..c87570e 100644 --- a/views/TicketView.php +++ b/views/TicketView.php @@ -215,56 +215,58 @@ include __DIR__ . '/layout_header.php'; 1 => 8, 2 => 24, default => 72 }; $elapsedSeconds = time() - strtotime($ticket['created_at']); - $elapsedHours = round($elapsedSeconds / 3600, 1); $slaPct = min(100, round(($elapsedSeconds / ($slaTargetHours * 3600)) * 100)); $slaBreached = $elapsedSeconds >= ($slaTargetHours * 3600); - $alertClass = $priorityNum === 1 ? 'lt-alert--error' : 'lt-alert--warning'; - $alertIcon = $priorityNum === 1 ? '[ ! ]' : '[ ~ ]'; - $alertLabel = $priorityNum === 1 ? 'CRITICAL — P1 Ticket' : 'HIGH PRIORITY — P2 Ticket'; - $progressClass = $slaBreached ? 'lt-progress--red' : ($slaPct >= 75 ? 'lt-progress--red' : 'lt-progress--green'); + $slaClass = $priorityNum === 1 ? 'lt-sla-p1' : 'lt-sla-p2'; + $slaIcon = $priorityNum === 1 ? '[ ! ]' : '[ ~ ]'; + $slaLabel = $priorityNum === 1 ? 'P1 Critical' : 'P2 High'; + $slaId = 'sla-' . htmlspecialchars($ticket['ticket_id'], ENT_QUOTES, 'UTF-8'); ?> - -