Upload via GUI (275 Dateien)
This commit is contained in:
@@ -41,6 +41,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
'slaPlanId' => !empty($d['sla_plan_id']) ? (int) $d['sla_plan_id'] : null,
|
||||
'managerId' => !empty($d['manager_id']) ? (int) $d['manager_id'] : null,
|
||||
'managerName' => $d['manager_name'] ?? null,
|
||||
'autoAssignMode' => (string) ($d['auto_assign_mode'] ?? 'none'),
|
||||
'autoAssignStaffId' => !empty($d['auto_assign_staff_id']) ? (int) $d['auto_assign_staff_id'] : null,
|
||||
'notes' => $d['notes'] ?? null,
|
||||
'members' => array_values($membersByDept[(int) $d['id']] ?? []),
|
||||
'createdAt' => $d['created_at'] ?? null,
|
||||
@@ -62,6 +64,10 @@ try {
|
||||
// Fehlende Schlüssel (ältere App-Version) lassen Status und SLA-Plan unverändert
|
||||
if (array_key_exists('isActive', $body)) $in['is_active'] = !empty($body['isActive']);
|
||||
if (array_key_exists('slaPlanId', $body)) $in['sla_plan_id'] = $body['slaPlanId'];
|
||||
if (array_key_exists('autoAssignMode', $body)) {
|
||||
$in['auto_assign_mode'] = $body['autoAssignMode'];
|
||||
$in['auto_assign_staff_id'] = $body['autoAssignStaffId'] ?? null;
|
||||
}
|
||||
$newId = department_save($pdo, $id, $in);
|
||||
audit_log($staff['id'], ($id === 0 ? 'Abteilung erstellt: ' : 'Abteilung aktualisiert: ') . trim((string) ($body['name'] ?? '')) . ' (Mobile App)');
|
||||
api_json(['id' => $newId]);
|
||||
|
||||
@@ -27,6 +27,7 @@ if ($ticket['source'] !== 'chat') {
|
||||
$ticketLockedBy = $lockedByName;
|
||||
} else {
|
||||
ticket_acquire_lock((int) $ticket['id'], (int) $staff['id'], $pdo);
|
||||
ticket_assign_on_open($pdo, $ticket, $staff); // unzugewiesenes Ticket wird dem öffnenden Mitarbeiter zugewiesen
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +84,7 @@ if ($ticket['source'] === 'chat' && $ticket['status'] !== 'closed') {
|
||||
$lockedByOtherName = live_chat_locked_by_other($ticket, (int) $staff['id'], $pdo);
|
||||
if (!$lockedByOtherName) {
|
||||
live_chat_acquire_lock((int) $ticket['id'], (int) $staff['id'], $pdo);
|
||||
ticket_assign_on_open($pdo, $ticket, $staff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user