Upload via GUI (290 Dateien)

This commit is contained in:
2026-10-23 17:22:21 +00:00
parent 14b74ef747
commit 80be774c3e
4 changed files with 125 additions and 2 deletions
+9 -2
View File
@@ -1,5 +1,6 @@
<?php
require_once __DIR__ . '/../includes/bootstrap.php';
require_once __DIR__ . '/../includes/ticket_extras.php'; // falls bootstrap.php noch die alte Version ist
$staff = require_staff_login();
$pdo = get_db();
$myDeptIds = staff_department_ids($staff); // null = Admin, alle Abteilungen
@@ -236,9 +237,13 @@ if ($activeTab === 'banned') {
} else {
// Gesperrte Absender in ALLEN anderen Tabs ausblenden
$where[] = $notBannedSql;
// Tickets in der Wiedervorlage erscheinen nur im eigenen Tab, bis ihre Zeit gekommen ist
$where[] = $activeTab === 'snoozed' ? (ticket_snooze_available() ? "t.snoozed_until > '" . db_now() . "'" : '1=0') : ticket_not_snoozed_sql('t');
if ($activeTab === 'open') {
$where[] = "t.status IN ('open','pending','answered')";
} elseif ($activeTab === 'snoozed') {
// alle Status
} elseif ($activeTab === 'on_hold') {
$where[] = "t.status = 'on_hold'";
} elseif ($activeTab === 'resolved') {
@@ -324,8 +329,9 @@ require __DIR__ . '/_header.php';
// Ticket-Zähler für Tabs
$tabCounts = [];
foreach (['open'=>"status IN ('open','pending','answered')", 'on_hold'=>"status='on_hold'", 'resolved'=>"status='resolved'", 'closed'=>"status='closed'"] as $tk => $tcond) {
$tabCounts[$tk] = (int)$pdo->query("SELECT COUNT(*) FROM tickets WHERE $tcond")->fetchColumn();
$tabCounts[$tk] = (int)$pdo->query("SELECT COUNT(*) FROM tickets WHERE $tcond AND " . ticket_not_snoozed_sql('tickets'))->fetchColumn();
}
$tabCounts['snoozed'] = ticket_snooze_available() ? (int)$pdo->query("SELECT COUNT(*) FROM tickets WHERE snoozed_until > '" . db_now() . "'")->fetchColumn() : 0;
// Gesperrt-Tab: sicher mit try/catch
try {
$tabCounts['banned'] = (int)$pdo->query(
@@ -347,8 +353,9 @@ $statusTabs = [
'on_hold' => ['Pausiert', $tabCounts['on_hold']],
'resolved' => ['Gelöst', $tabCounts['resolved']],
'closed' => ['Geschlossen', $tabCounts['closed']],
'snoozed' => ['💤 Wiedervorlage', $tabCounts['snoozed']],
'banned' => ['⛔ Gesperrt', $tabCounts['banned']],
'all' => ['Alle', array_sum($tabCounts)],
'all' => ['Alle', array_sum($tabCounts) - $tabCounts['snoozed']],
];
$quickFilters = [
'me' => ['Mir zugewiesen', $countMe, 'var(--primary)', '#e6f4f3'],