feat(helpdesk): add empty Dashboard page with sidebar nav item

Adds helpdesk/dashboard route, empty page/view, Overview nav group in the
sidebar, and Dashboard i18n keys (de + en). No content yet.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
aminovfariz
2026-05-26 11:01:35 +02:00
parent 873b75465e
commit cb2f429e0e
7 changed files with 44 additions and 1 deletions

View File

@@ -37,6 +37,7 @@
"No tickets found": "Keine Tickets gefunden", "No tickets found": "Keine Tickets gefunden",
"No tickets are linked to this debtor in Business Central.": "Diesem Kunden sind in Business Central keine Tickets zugeordnet.", "No tickets are linked to this debtor in Business Central.": "Diesem Kunden sind in Business Central keine Tickets zugeordnet.",
"Ticket No.": "Ticket-Nr.", "Ticket No.": "Ticket-Nr.",
"Dashboard": "Dashboard",
"Description": "Beschreibung", "Description": "Beschreibung",
"Status": "Status", "Status": "Status",
"Category": "Kategorie", "Category": "Kategorie",

View File

@@ -37,6 +37,7 @@
"No tickets found": "No tickets found", "No tickets found": "No tickets found",
"No tickets are linked to this debtor in Business Central.": "No tickets are linked to this debtor in Business Central.", "No tickets are linked to this debtor in Business Central.": "No tickets are linked to this debtor in Business Central.",
"Ticket No.": "Ticket No.", "Ticket No.": "Ticket No.",
"Dashboard": "Dashboard",
"Description": "Description", "Description": "Description",
"Status": "Status", "Status": "Status",
"Category": "Category", "Category": "Category",

View File

@@ -38,6 +38,7 @@ final class HelpdeskLayoutProvider implements LayoutContextProvider
} }
return ['helpdesk.nav' => [ return ['helpdesk.nav' => [
'can_view_dashboard' => true,
'can_manage_settings' => $canManageSettings, 'can_manage_settings' => $canManageSettings,
'can_view_team' => $canViewTeam, 'can_view_team' => $canViewTeam,
'can_view_risk_radar' => $canViewRiskRadar, 'can_view_risk_radar' => $canViewRiskRadar,

View File

@@ -14,6 +14,7 @@ return [
'requires' => [], 'requires' => [],
'routes' => [ 'routes' => [
['path' => 'helpdesk/dashboard', 'target' => 'helpdesk/dashboard'],
['path' => 'helpdesk/search-data', 'target' => 'helpdesk/search-data'], ['path' => 'helpdesk/search-data', 'target' => 'helpdesk/search-data'],
['path' => 'helpdesk/domains', 'target' => 'helpdesk/domains'], ['path' => 'helpdesk/domains', 'target' => 'helpdesk/domains'],
['path' => 'helpdesk/domains-data', 'target' => 'helpdesk/domains-data'], ['path' => 'helpdesk/domains-data', 'target' => 'helpdesk/domains-data'],

View File

@@ -0,0 +1,16 @@
<?php
use MintyPHP\Buffer;
use MintyPHP\Module\Helpdesk\HelpdeskAuthorizationPolicy;
use MintyPHP\Support\Guard;
Guard::requireLogin();
Guard::requireAbilityOrForbidden(HelpdeskAuthorizationPolicy::ABILITY_ACCESS);
Buffer::set('title', t('Dashboard'));
Buffer::set('style_groups', json_encode(['helpdesk']));
$breadcrumbs = [
['label' => t('Home'), 'path' => 'admin'],
['label' => t('Helpdesk'), 'path' => 'helpdesk'],
['label' => t('Dashboard')],
];

View File

@@ -0,0 +1,8 @@
<div class="app-details-container">
<section>
<?php
$titlebar = ['title' => t('Dashboard')];
require templatePath('partials/app-details-titlebar.phtml');
?>
</section>
</div>

View File

@@ -2,6 +2,7 @@
$layoutNav = is_array($layoutNav ?? null) ? $layoutNav : []; $layoutNav = is_array($layoutNav ?? null) ? $layoutNav : [];
$helpdeskNav = is_array($layoutNav['helpdesk.nav'] ?? null) ? $layoutNav['helpdesk.nav'] : []; $helpdeskNav = is_array($layoutNav['helpdesk.nav'] ?? null) ? $layoutNav['helpdesk.nav'] : [];
$canViewDashboard = !empty($helpdeskNav['can_view_dashboard']);
$canManageSettings = !empty($helpdeskNav['can_manage_settings']); $canManageSettings = !empty($helpdeskNav['can_manage_settings']);
$canViewTeam = !empty($helpdeskNav['can_view_team']); $canViewTeam = !empty($helpdeskNav['can_view_team']);
$canViewRiskRadar = !empty($helpdeskNav['can_view_risk_radar']); $canViewRiskRadar = !empty($helpdeskNav['can_view_risk_radar']);
@@ -9,6 +10,7 @@ $canManageSoftwareProducts = !empty($helpdeskNav['can_manage_software_products']
$canViewHandovers = !empty($helpdeskNav['can_view_handovers']); $canViewHandovers = !empty($helpdeskNav['can_view_handovers']);
$canViewUpdates = !empty($helpdeskNav['can_view_updates']); $canViewUpdates = !empty($helpdeskNav['can_view_updates']);
$dashboardActive = navActive('helpdesk/dashboard', true);
$settingsActive = navActive('helpdesk/settings', true); $settingsActive = navActive('helpdesk/settings', true);
$teamActive = navActive('helpdesk/team', true); $teamActive = navActive('helpdesk/team', true);
$riskRadarActive = navActive('helpdesk/risk-radar', true); $riskRadarActive = navActive('helpdesk/risk-radar', true);
@@ -17,11 +19,24 @@ $softwareProductsActive = navActive('helpdesk/software-products', true);
$handoversActive = navActive('helpdesk/handovers', true); $handoversActive = navActive('helpdesk/handovers', true);
$updatesActive = navActive('helpdesk/updates', true); $updatesActive = navActive('helpdesk/updates', true);
$customersActive = navActive('helpdesk', true); $customersActive = navActive('helpdesk', true);
if ($settingsActive['isActive'] || $teamActive['isActive'] || $riskRadarActive['isActive'] || $domainsActive['isActive'] || $softwareProductsActive['isActive'] || $handoversActive['isActive'] || $updatesActive['isActive']) { if ($dashboardActive['isActive'] || $settingsActive['isActive'] || $teamActive['isActive'] || $riskRadarActive['isActive'] || $domainsActive['isActive'] || $softwareProductsActive['isActive'] || $handoversActive['isActive'] || $updatesActive['isActive']) {
$customersActive = ['class' => '', 'aria' => '', 'isActive' => false]; $customersActive = ['class' => '', 'aria' => '', 'isActive' => false];
} }
$helpdeskNavGroups = [ $helpdeskNavGroups = [
[
'key' => 'helpdesk-overview',
'label' => t('Overview'),
'icon' => 'bi-speedometer2',
'items' => [
[
'label' => t('Dashboard'),
'path' => 'helpdesk/dashboard',
'active' => $dashboardActive,
'visible' => $canViewDashboard,
],
],
],
[ [
'key' => 'helpdesk-lookup', 'key' => 'helpdesk-lookup',
'label' => t('Lookup'), 'label' => t('Lookup'),