Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt: Knowledgecenter: - Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten - Files-Gallery-Lizenzschlüssel entfernt (config.php) - Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur, nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss), Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge - 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …) Tasks: - Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments) - Task-Definitionen und Verlinkungen geleert - Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
109 lines
4.5 KiB
PHP
109 lines
4.5 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
if (!isset($assignments) && !isset($error)) {
|
|
require_once dirname(dirname(__DIR__)) . '/actions/admin/escalation_dashboard_action.php';
|
|
$viewData = task_cert_admin_escalation_dashboard_action();
|
|
if (is_array($viewData)) {
|
|
extract($viewData, EXTR_SKIP);
|
|
}
|
|
}
|
|
|
|
$error = $error ?? null;
|
|
$assignments = $assignments ?? [];
|
|
$didRecalculate = $did_recalculate ?? false;
|
|
$searchQuery = (string) ($search_query ?? '');
|
|
|
|
if (!function_exists('task_cert_render_styles')) {
|
|
require_once dirname(dirname(__DIR__)) . '/bootstrap.php';
|
|
}
|
|
task_cert_render_styles(['admin']);
|
|
$taskListUrl = task_cert_view_url('admin.task_list');
|
|
$taskFormUrl = task_cert_view_url('admin.task_form');
|
|
$approvalQueueUrl = task_cert_view_url('admin.approval_queue');
|
|
$escalationUrl = task_cert_view_url('admin.escalation_dashboard');
|
|
$categoriesUrl = task_cert_view_url('admin.task_categories');
|
|
$recalcQuery = ['recalc' => 1];
|
|
if ($searchQuery !== '') {
|
|
$recalcQuery['q'] = $searchQuery;
|
|
}
|
|
$escalationRecalcUrl = task_cert_view_url('admin.escalation_dashboard', $recalcQuery);
|
|
?>
|
|
<div class="task-cert task-cert-admin-escalation">
|
|
<div class="task-cert-admin-toolbar">
|
|
<div class="task-cert-admin-toolbar-head">
|
|
<h2 class="task-cert-admin-toolbar-title">Admin</h2>
|
|
<div class="task-cert-admin-toolbar-actions">
|
|
<a href="<?php echo TaskCertView::e($escalationRecalcUrl); ?>" class="btn">Eskalation neu berechnen</a>
|
|
<?php if (!$error): ?>
|
|
<a href="<?php echo TaskCertView::e($taskFormUrl); ?>" class="btn task-cert-btn-success">Neue Aufgabe</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
<div class="task-cert-admin-toolbar-nav">
|
|
<div class="task-cert-admin-nav" aria-label="Admin-Navigation">
|
|
<a href="<?php echo TaskCertView::e($taskListUrl); ?>" class="task-cert-admin-nav-link">Aufgabenliste</a>
|
|
<a href="<?php echo TaskCertView::e($approvalQueueUrl); ?>" class="task-cert-admin-nav-link">Freigaben</a>
|
|
<a href="<?php echo TaskCertView::e($escalationUrl); ?>" class="task-cert-admin-nav-link is-active">Eskalationen</a>
|
|
<a href="<?php echo TaskCertView::e($categoriesUrl); ?>" class="task-cert-admin-nav-link">Kategorien</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if ($error): ?>
|
|
<div class="task-cert-error"><?php echo TaskCertView::e($error); ?></div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($didRecalculate): ?>
|
|
<div class="task-cert-success">Eskalationen wurden neu berechnet.</div>
|
|
<?php endif; ?>
|
|
|
|
<form method="get" action="<?php echo TaskCertView::e($escalationUrl); ?>" class="task-cert-admin-list-search">
|
|
<label for="task-cert-admin-search-escalation">Suche</label>
|
|
<div class="task-cert-admin-list-search-row">
|
|
<input
|
|
type="search"
|
|
id="task-cert-admin-search-escalation"
|
|
name="q"
|
|
value="<?php echo TaskCertView::e($searchQuery); ?>"
|
|
placeholder="Aufgabe, Mitarbeiter, Status oder ID"
|
|
>
|
|
<button type="submit" class="btn">Suchen</button>
|
|
<?php if ($searchQuery !== ''): ?>
|
|
<a href="<?php echo TaskCertView::e($escalationUrl); ?>" class="btn">Zurücksetzen</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
</form>
|
|
|
|
<table class="task-cert-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Zuweisung</th>
|
|
<th>Aufgabe</th>
|
|
<th>Mitarbeiter</th>
|
|
<th>Status</th>
|
|
<th>Fällig am</th>
|
|
<th>Stufe</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($assignments as $row): ?>
|
|
<tr>
|
|
<td><?php echo (int) $row['id']; ?></td>
|
|
<td><?php echo TaskCertView::e($row['task_title'] ?? ''); ?></td>
|
|
<td><?php echo TaskCertView::e($row['contact_name'] ?? ''); ?></td>
|
|
<td><?php echo TaskCertView::e($row['status'] ?? ''); ?></td>
|
|
<td><?php echo TaskCertView::e($row['due_at'] ?? ''); ?></td>
|
|
<td><?php echo (int) ($row['escalation_level'] ?? 0); ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
|
|
<?php if ($assignments === []): ?>
|
|
<tr>
|
|
<td colspan="6">Keine aktiven Eskalationen.</td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|