<?php $title='Report Flags'; ob_start(); ?>
<div class="d-flex justify-content-between mb-3"><h3>Report Flags</h3><a href="/samanta_crm/report-flags/create" class="btn btn-primary btn-sm">Add</a></div>
<table class="table table-sm table-striped"><thead><tr><th>Code</th><th>Label</th><th>View Type</th><th>Add.</th><th>Blocked</th><th>Order</th><th><?= __("common.active", "Active") ?></th><th></th></tr></thead><tbody><?php foreach($flags as $f): ?><tr><td><?= htmlspecialchars($f['code']) ?></td><td><?= htmlspecialchars($f['label']) ?></td><td><span class="badge bg-light text-dark"><?= htmlspecialchars($f['view_type']??'') ?></span></td><td><?= !empty($f['show_additional'])?'Yes':'-' ?></td><td><?= !empty($f['show_blocked'])?'Yes':'-' ?></td><td><?= (int)$f['sort_order'] ?></td><td><?= $f['is_active']?'Yes':'No' ?></td><td class="text-end"><a class="btn btn-sm btn-outline-primary" href="/samanta_crm/report-flags/<?= $f['id'] ?>/edit"><?= __("common.edit", "Edit") ?></a><form method="POST" action="/samanta_crm/report-flags/<?= $f['id'] ?>/delete" class="d-inline" onsubmit="return confirm('Delete?')"><button class="btn btn-sm btn-outline-danger">Del</button></form></td></tr><?php endforeach; ?></tbody></table>
<?php $content=ob_get_clean(); include '../app/Views/layout.php'; ?>
