Add Created By column to dashboard and remove back button from ticket view
This commit is contained in:
@@ -182,11 +182,12 @@
|
||||
|
||||
$columns = [
|
||||
'ticket_id' => 'Ticket ID',
|
||||
'priority' => 'Priority',
|
||||
'priority' => 'Priority',
|
||||
'title' => 'Title',
|
||||
'category' => 'Category',
|
||||
'type' => 'Type',
|
||||
'status' => 'Status',
|
||||
'created_by' => 'Created By',
|
||||
'created_at' => 'Created',
|
||||
'updated_at' => 'Updated'
|
||||
];
|
||||
@@ -206,6 +207,7 @@
|
||||
<?php
|
||||
if (count($tickets) > 0) {
|
||||
foreach($tickets as $row) {
|
||||
$creator = $row['creator_display_name'] ?? $row['creator_username'] ?? 'System';
|
||||
echo "<tr class='priority-{$row['priority']}'>";
|
||||
echo "<td><a href='/ticket/{$row['ticket_id']}' class='ticket-link'>{$row['ticket_id']}</a></td>";
|
||||
echo "<td><span>{$row['priority']}</span></td>";
|
||||
@@ -213,12 +215,13 @@
|
||||
echo "<td>{$row['category']}</td>";
|
||||
echo "<td>{$row['type']}</td>";
|
||||
echo "<td><span class='status-" . str_replace(' ', '-', $row['status']) . "'>{$row['status']}</span></td>";
|
||||
echo "<td>" . htmlspecialchars($creator) . "</td>";
|
||||
echo "<td>" . date('Y-m-d H:i', strtotime($row['created_at'])) . "</td>";
|
||||
echo "<td>" . date('Y-m-d H:i', strtotime($row['updated_at'])) . "</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
} else {
|
||||
echo "<tr><td colspan='8'>No tickets found</td></tr>";
|
||||
echo "<tr><td colspan='9'>No tickets found</td></tr>";
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user