<?php
$title = 'Workflow Automation 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-robot text-primary"></i>

Workflow Automation Center

</h2>

<hr>

<div class="table-responsive">

<table class="table table-hover">

<thead>

<tr>

<th>Rule</th>
<th>Status</th>
<th>Threshold</th>
<th>Recipient</th>

</tr>

</thead>

<tbody>

<?php foreach($rules as $r): ?>

<tr>

<td><?= htmlspecialchars($r['rule_name']) ?></td>

<td><?= htmlspecialchars($r['target_status']) ?></td>

<td><?= (int)$r['threshold_days'] ?> Days</td>

<td><?= htmlspecialchars($r['recipient_role']) ?></td>

</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>

</div>

</div>
