Files
breadcrumb-the-shire/modules/helpdesk/templates/aside-helpdesk-panel.phtml
fs aee9cb10f3 feat(helpdesk): add dashboards, communication feed, settings UI and fix routing
Add support/sales/controlling dashboards with KPIs, trend charts and
risk indicators. Add debitor communication timeline, contact filters,
system recommendations engine, and configurable controlling risk rules.

Rename search→index to fix query-string preservation on back navigation.
Remove fake escalation rate metric, add KPI info tooltips, and switch
trend chart colors to red (created) / green (closed) for clarity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 18:34:03 +02:00

55 lines
1.9 KiB
PHTML

<?php
$layoutNav = is_array($layoutNav ?? null) ? $layoutNav : [];
$helpdeskNav = is_array($layoutNav['helpdesk.nav'] ?? null) ? $layoutNav['helpdesk.nav'] : [];
$canManageSettings = !empty($helpdeskNav['can_manage_settings']);
$helpdeskNavItems = [
[
'label' => t('Customers'),
'path' => 'helpdesk',
'active' => navActive('helpdesk', true),
'visible' => true,
],
[
'label' => t('Settings'),
'path' => 'helpdesk/settings',
'active' => navActive('helpdesk/settings', true),
'visible' => $canManageSettings,
],
];
$visibleItems = array_values(array_filter($helpdeskNavItems, static fn (array $item): bool => !empty($item['visible'])));
$groupIsActive = false;
foreach ($visibleItems as $item) {
$activeState = $item['active'] ?? [];
if (!empty($activeState['isActive'])) {
$groupIsActive = true;
break;
}
}
?>
<ul class="app-sidebar-admin-nav" aria-label="<?php e(t('Helpdesk')); ?>">
<?php if ($visibleItems): ?>
<li class="app-sidebar-group app-sidebar-admin-group">
<details data-details-key="helpdesk-navigation"<?php if ($groupIsActive): ?> open<?php endif; ?>>
<summary>
<i class="bi bi-headset"></i>
<span><?php e(t('Helpdesk')); ?></span>
</summary>
<ul>
<?php foreach ($visibleItems as $item):
$active = $item['active'] ?? ['class' => '', 'aria' => ''];
?>
<li>
<a href="<?php e(lurl($item['path'])); ?>" class="<?php e($active['class'] ?? ''); ?>" <?php echo $active['aria'] ?? ''; ?>>
<?php e($item['label']); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</details>
</li>
<?php endif; ?>
</ul>