<?php
$title = 'Homepage SLA Center';
?>

<div class="container-fluid py-4">

<div class="card border-0 shadow-lg rounded-4">

<div class="card-body">

<h2 class="fw-bold">

<i class="fa fa-stopwatch text-danger"></i>

Homepage SLA & Escalation Center

</h2>

<hr>

<?php if(empty($violations)): ?>

<div class="alert alert-success">

No SLA violations detected.

</div>

<?php else: ?>

<div class="table-responsive">

<table class="table table-hover align-middle">

<thead>

<tr>

<th>Conference</th>
<th>Status</th>
<th>Days Open</th>
<th>SLA</th>
<th>Severity</th>

</tr>

</thead>

<tbody>

<?php foreach($violations as $v): ?>

<tr>

<td><?= htmlspecialchars($v['conference']) ?></td>

<td><?= htmlspecialchars($v['status']) ?></td>

<td><?= (int)$v['days'] ?></td>

<td><?= (int)$v['sla'] ?></td>

<td>

<span class="badge bg-<?= htmlspecialchars($v['class']) ?>">

<?= htmlspecialchars($v['severity']) ?>

</span>

</td>

</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

<?php endif; ?>

</div>

</div>

</div>
