Add Ticket Assignment feature (Feature 2)

- Add assigned_to column support in TicketModel with assignTicket() and unassignTicket() methods
- Create assign_ticket.php API endpoint for assignment operations
- Update TicketController to load user list from UserModel
- Add assignment dropdown UI in TicketView
- Add JavaScript handler for assignment changes
- Integrate with audit log for assignment tracking

Users can now assign tickets to team members via dropdown selector.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-01 18:36:34 -05:00
parent f9629f60b6
commit 99e60795c9
5 changed files with 135 additions and 4 deletions

View File

@@ -167,6 +167,18 @@ function formatDetails($details, $actionType) {
}
?>
</div>
<div class="ticket-assignment" style="margin-top: 0.5rem;">
<label style="font-weight: 500; margin-right: 0.5rem;">Assigned to:</label>
<select id="assignedToSelect" class="assignment-select" style="padding: 0.25rem 0.5rem; border-radius: 4px; border: 1px solid var(--border-color, #ddd);">
<option value="">Unassigned</option>
<?php foreach ($allUsers as $user): ?>
<option value="<?php echo $user['user_id']; ?>"
<?php echo ($ticket['assigned_to'] == $user['user_id']) ? 'selected' : ''; ?>>
<?php echo htmlspecialchars($user['display_name'] ?? $user['username']); ?>
</option>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="header-controls">
<div class="status-priority-group">