mirror of
https://github.com/itflow-org/itflow
synced 2026-03-26 07:15:37 +00:00
Update badge color based on status.
This commit is contained in:
@@ -15,17 +15,37 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Ticket Number</th>
|
<th>Ticket Number</th>
|
||||||
<th>Scope</th>
|
<th>Scope</th>
|
||||||
<th class="text-right">Add to Invoice</th>
|
<th>Add to Invoice</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<?php while ($row = mysqli_fetch_array($sql_tickets_billable)) {
|
<?php while ($row = mysqli_fetch_array($sql_tickets_billable)) {
|
||||||
$ticket_id = intval($row['ticket_id']);
|
$ticket_id = intval($row['ticket_id']);
|
||||||
$ticket_subject = nullable_htmlentities($row['ticket_subject']);
|
$ticket_subject = nullable_htmlentities($row['ticket_subject']);
|
||||||
|
$ticket_number = intval($row['ticket_number']);
|
||||||
|
$ticket_prefix = nullable_htmlentities($row['ticket_prefix']);
|
||||||
|
$ticket_status = nullable_htmlentities($row['ticket_status']);
|
||||||
|
|
||||||
|
switch ($ticket_status) {
|
||||||
|
case 'Closed':
|
||||||
|
$ticket_status_class = 'badge-dark';
|
||||||
|
break;
|
||||||
|
case 'Auto Close':
|
||||||
|
$ticket_status_class = 'badge-warning';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$ticket_status_class = 'badge-secondary';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $ticket_id?></td>
|
<td>
|
||||||
|
<a href="ticket.php?ticket_id=<?php echo $ticket_id; ?>">
|
||||||
|
<span class="badge badge-pill <?php echo $ticket_status_class?> p-3"><?php echo "$ticket_prefix$ticket_number"; ?></span>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td><?php echo $ticket_subject ?></td>
|
<td><?php echo $ticket_subject ?></td>
|
||||||
<td></td>
|
|
||||||
<td><a href='ticket.php?ticket_id=<?php echo $ticket_id?>&invoice_id=<?php echo $invoice_id?>#addInvoiceFromTicketModal'>
|
<td><a href='ticket.php?ticket_id=<?php echo $ticket_id?>&invoice_id=<?php echo $invoice_id?>#addInvoiceFromTicketModal'>
|
||||||
<i class="fas fa-fw fa-plus-circle"></i></td>
|
<i class="fas fa-fw fa-plus-circle"></i></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user