Rebuild Admin > Ticket Statuses: list on the standard pattern with In use and Switched off tabs, search, sortable headers, ticket counts linking to the tickets, SLA clock and client-reply columns and drag ordering for the pickers and board; one New/Edit window with badge preview, colour swatches and a description shown on hover across the app; per-status choice of whether a client reply by email or portal moves the ticket back to Open or leaves it; switch off and delete move a status's tickets to a chosen status with ticket history and SLA sync, and clear canned responses that set it; built-in statuses keep their names, stay on and have fixed SLA and reply behaviour enforced server-side; badges use readable text colour; the tickets filter keeps a switched-off status; database 3.4.0 adds ticket_status_description and ticket_status_client_reply; new functions/ticket_status.php

This commit is contained in:
johnnyq
2026-10-24 15:14:10 -04:00
parent fb9534b0a2
commit be374e9c2b
26 changed files with 1194 additions and 268 deletions

View File

@@ -238,9 +238,16 @@ function ticketBillableHtml($billable, $style = 'list') {
: '<span class="badge rounded-pill bg-secondary p-2"><i class="fas fa-fw fa-minus"></i></span>';
}
/* A status as its badge - text that reads on its colour, and what it is for on hover (functions/ticket_status.php). */
function ticketStatusHtml($status_name, $status_color, $style = 'list') {
$color = preg_match('/^(#[0-9a-f]{3,8}|[a-z]{3,24})$/i', (string) $status_color) ? $status_color : 'var(--bs-secondary)';
return '<span class="badge rounded-pill text-light' . ($style === 'list' ? ' p-2' : '') . '" style="background-color: ' . $color . '">' . escapeHtml($status_name) . '</span>';
$about = '';
foreach (ticketStatusesAll() as $status) {
if ($status['ticket_status_name'] === (string) $status_name) {
$about = ticketStatusAbout($status);
break;
}
}
return ticketStatusBadgeHtml((string) $status_name, $status_color, $style, $about);
}
/*