Upload via GUI (340 Dateien)

This commit is contained in:
2026-10-26 21:19:10 +00:00
parent ecabba060c
commit a7aeec1b26
7 changed files with 160 additions and 6 deletions
+3 -1
View File
@@ -164,8 +164,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && ($_POST['action'] ?? '') === 'end')
$now = db_now();
$pdo->prepare(
"UPDATE tickets SET status='closed', closed_at=COALESCE(closed_at, ?), updated_at=?, locked_by=NULL, locked_at=NULL WHERE id=?"
"UPDATE tickets SET status='closed', resolution_code='other', resolution_note='Live-Chat beendet', closed_at=COALESCE(closed_at, ?), updated_at=?, locked_by=NULL, locked_at=NULL WHERE id=?"
)->execute([$now, $now, $ticket['id']]);
ticket_sla_status_transition($pdo, (int) $ticket['id'], (string) $ticket['status'], 'closed', (int) $staff['id']);
log_activity($pdo, $ticket['id'], $staff['id'], 'Live-Chat beendet');
finalize_work_session($pdo, (int) $ticket['id'], (int) $staff['id']);
@@ -231,6 +232,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if ($autoAssign) $args[] = $staff['id'];
$args[] = $ticket['id'];
$stmt->execute($args);
ticket_sla_status_transition($pdo, (int) $ticket['id'], (string) $ticket['status'], $newStatus, (int) $staff['id']);
if ($autoAssign) log_activity($pdo, $ticket['id'], $staff['id'], 'Automatisch zugewiesen (Live-Chat)');
save_mentions($pdo, $ticket['id'], $threadId, $staff['id'], $message, $ticket);