Upload via GUI (275 Dateien)

This commit is contained in:
2026-10-23 11:14:24 +00:00
parent 967154bf16
commit 998202e074
4 changed files with 33 additions and 3 deletions
+18
View File
@@ -17,6 +17,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
'name' => $_POST['name'] ?? '', 'email' => $_POST['email'] ?? '', 'is_default' => !empty($_POST['is_default']),
'is_active' => ($_POST['status'] ?? 'active') === 'active', 'manager_id' => $_POST['manager_id'] ?? null,
'sla_plan_id' => $_POST['sla_plan_id'] ?? null, 'notes' => $_POST['notes'] ?? '', 'signature' => $_POST['signature'] ?? '',
'auto_assign_mode' => $_POST['auto_assign_mode'] ?? 'none', 'auto_assign_staff_id' => $_POST['auto_assign_staff_id'] ?? null,
]);
audit_log($staff['id'], ($action === 'create' ? 'Abteilung erstellt: ' : 'Abteilung aktualisiert: ') . trim($_POST['name'] ?? ''));
flash('success', $action === 'create' ? 'Abteilung erstellt.' : 'Änderungen gespeichert.');
@@ -84,6 +85,8 @@ require __DIR__ . '/_header.php';
$curStatus = $_POST ? ($_POST['status'] ?? 'active') : (($editDept['is_active'] ?? 1) ? 'active' : 'inactive');
$curEmail = strtolower((string) $v('email', 'email'));
$curManager = (string) $v('manager_id', 'manager_id');
$curAutoMode = (string) $v('auto_assign_mode', 'auto_assign_mode', 'none');
$curAutoStaff = (string) $v('auto_assign_staff_id', 'auto_assign_staff_id');
$isDefaultChecked = $_POST ? !empty($_POST['is_default']) : !empty($editDept['is_default']);
$members = [];
if ($editDept) {
@@ -128,6 +131,21 @@ require __DIR__ . '/_header.php';
<?php endforeach; ?>
</select>
<label for="auto_assign_mode">Neue Tickets automatisch zuweisen</label>
<select id="auto_assign_mode" name="auto_assign_mode">
<?php foreach (department_auto_assign_modes() as $__mk => $__ml): ?>
<option value="<?= e($__mk) ?>" <?= $curAutoMode === $__mk ? 'selected' : '' ?>><?= e($__ml) ?></option>
<?php endforeach; ?>
</select>
<label for="auto_assign_staff_id" style="margin-top:8px">Mitarbeiter (nur bei „Immer an einen bestimmten Mitarbeiter“)</label>
<select id="auto_assign_staff_id" name="auto_assign_staff_id">
<option value="">— Niemand —</option>
<?php foreach ($staffList as $s): ?>
<option value="<?= $s['id'] ?>" <?= $curAutoStaff === (string) $s['id'] ? 'selected' : '' ?>><?= e($s['name']) ?></option>
<?php endforeach; ?>
</select>
<p class="muted" style="font-size:.78rem;margin-top:4px">Gilt für Tickets aus Formular, E-Mail, API (z. B. Minecraft-Plugin) und Live-Chat. Eine Ticket-Regel mit „Mitarbeiter zuweisen“ hat Vorrang. Ist der Mitarbeiter im Urlaub, geht das Ticket an seine Vertretung. „Reihum“ überspringt Mitarbeiter im Urlaub, offline oder außerhalb ihrer Schicht.</p>
<label for="sla_plan_id">SLA-Plan</label>
<select id="sla_plan_id" name="sla_plan_id">
<option value="">— Zeiten der Priorität verwenden —</option>