Ticket status colours

Standardize ticket statuses via function
This commit is contained in:
Marcus Hill
2024-03-24 10:12:02 +00:00
parent b47aba1d5a
commit 796ba6633e
3 changed files with 29 additions and 36 deletions

View File

@@ -160,17 +160,7 @@ $total_scheduled_tickets = intval($row['total_scheduled_tickets']);
}
$ticket_closed_at = nullable_htmlentities($row['ticket_closed_at']);
if ($ticket_status == "New") {
$ticket_status_color = "danger";
} elseif ($ticket_status == "Open") {
$ticket_status_color = "primary";
} elseif ($ticket_status == "On Hold") {
$ticket_status_color = "success";
} elseif ($ticket_status == "Auto Close") {
$ticket_status_color = "dark";
} elseif ($ticket_status == "Closed") {
$ticket_status_color = "dark";
}
$ticket_status_color = getTicketStatusColor($ticket_status);
if ($ticket_priority == "High") {
$ticket_priority_display = "<span class='p-2 badge badge-danger'>$ticket_priority</span>";
@@ -268,8 +258,8 @@ $total_scheduled_tickets = intval($row['total_scheduled_tickets']);
<td>
<div><?php echo $ticket_updated_at_display; ?></div>
<div><?php echo $ticket_reply_by_display; ?></div>
</td>
</td>
<td>
<?php echo $ticket_created_at_time_ago; ?>
<br>