diff --git a/modules/helpdesk/i18n/default_de.json b/modules/helpdesk/i18n/default_de.json index 75ffc89..14bf440 100644 --- a/modules/helpdesk/i18n/default_de.json +++ b/modules/helpdesk/i18n/default_de.json @@ -268,5 +268,21 @@ "Last 30 days": "Letzte 30 Tage", "Last 90 days": "Letzte 90 Tage", "Last 180 days": "Letzte 180 Tage", - "Last 365 days": "Letzte 365 Tage" + "Last 365 days": "Letzte 365 Tage", + "Automation": "Automatisierung", + "Risk monitoring": "Risiko-Monitoring", + "rule_help_escalation_overdue": "Empfiehlt Aktion, wenn SLA-Eskalationsfristen überschritten sind.", + "rule_help_high_risk_aging": "Erkennt kritische Tickets mit bestimmten Eskalationscodes, die zu lange offen sind.", + "rule_help_unassigned_open": "Weist auf offene Tickets hin, die keinem Bearbeiter zugewiesen sind.", + "rule_help_stale_open": "Markiert offene Tickets ohne aktuelle Aktivität zur Nachverfolgung.", + "rule_help_customer_backlog": "Warnt, wenn ein Kunde zu viele offene Tickets gleichzeitig hat.", + "rule_help_ticket_volume": "Löst aus, wenn das Ticketvolumen im Vergleich zur Vorperiode ungewöhnlich ansteigt.", + "rule_help_avg_resolution": "Warnt, wenn die durchschnittliche Bearbeitungszeit einen Schwellwert überschreitet.", + "rule_help_open_aging": "Erkennt offene Tickets, die zu lange ohne Bearbeitung sind.", + "rule_help_unassigned_ratio": "Warnt, wenn zu viele offene Tickets keinem Bearbeiter zugewiesen sind.", + "Automation configuration was invalid. Defaults were applied.": "Die Automatisierungskonfiguration war ungültig. Es wurden Standardwerte geladen.", + "Advanced options": "Erweiterte Optionen", + "Min. overdue": "Mind. überfällig", + "Min. age": "Mindestalter", + "Min. open": "Mind. offen" } diff --git a/modules/helpdesk/i18n/default_en.json b/modules/helpdesk/i18n/default_en.json index f30d8d4..0d29e20 100644 --- a/modules/helpdesk/i18n/default_en.json +++ b/modules/helpdesk/i18n/default_en.json @@ -268,5 +268,21 @@ "Last 30 days": "Last 30 days", "Last 90 days": "Last 90 days", "Last 180 days": "Last 180 days", - "Last 365 days": "Last 365 days" + "Last 365 days": "Last 365 days", + "Automation": "Automation", + "Risk monitoring": "Risk monitoring", + "rule_help_escalation_overdue": "Recommends action when SLA escalation deadlines are exceeded.", + "rule_help_high_risk_aging": "Detects critical tickets with specific escalation codes that have been open too long.", + "rule_help_unassigned_open": "Flags open tickets that are not assigned to any support agent.", + "rule_help_stale_open": "Marks open tickets without recent activity for follow-up.", + "rule_help_customer_backlog": "Warns when a customer has too many open tickets at once.", + "rule_help_ticket_volume": "Triggers when ticket volume rises significantly compared to the previous period.", + "rule_help_avg_resolution": "Warns when average resolution time exceeds the threshold.", + "rule_help_open_aging": "Detects open tickets that have been without activity for too long.", + "rule_help_unassigned_ratio": "Warns when too many open tickets lack an assigned agent.", + "Automation configuration was invalid. Defaults were applied.": "Automation configuration was invalid. Defaults were applied.", + "Advanced options": "Advanced options", + "Min. overdue": "Min. overdue", + "Min. age": "Min. age", + "Min. open": "Min. open" } diff --git a/modules/helpdesk/pages/helpdesk/settings/index().php b/modules/helpdesk/pages/helpdesk/settings/index().php index 92a6637..617b4d7 100644 --- a/modules/helpdesk/pages/helpdesk/settings/index().php +++ b/modules/helpdesk/pages/helpdesk/settings/index().php @@ -72,28 +72,28 @@ if ($request->isMethod('POST')) { 'rules' => [ 'escalation_overdue' => [ 'enabled' => isset($post['recommendations_escalation_overdue_enabled']), - 'priority' => (int) ($post['recommendations_escalation_overdue_priority'] ?? 100), + 'priority' => 100, 'min_overdue_minutes' => (int) ($post['recommendations_escalation_overdue_min_overdue_minutes'] ?? 0), ], 'high_risk_aging' => [ 'enabled' => isset($post['recommendations_high_risk_aging_enabled']), - 'priority' => (int) ($post['recommendations_high_risk_aging_priority'] ?? 90), + 'priority' => 90, 'codes' => trim((string) ($post['recommendations_high_risk_aging_codes'] ?? 'MAX,HOCH')), 'min_age_hours' => (int) ($post['recommendations_high_risk_aging_min_age_hours'] ?? 8), ], 'unassigned_open' => [ 'enabled' => isset($post['recommendations_unassigned_open_enabled']), - 'priority' => (int) ($post['recommendations_unassigned_open_priority'] ?? 80), + 'priority' => 80, 'min_age_hours' => (int) ($post['recommendations_unassigned_open_min_age_hours'] ?? 2), ], 'stale_open' => [ 'enabled' => isset($post['recommendations_stale_open_enabled']), - 'priority' => (int) ($post['recommendations_stale_open_priority'] ?? 70), + 'priority' => 70, 'min_age_hours' => (int) ($post['recommendations_stale_open_min_age_hours'] ?? 48), ], 'customer_backlog' => [ 'enabled' => isset($post['recommendations_customer_backlog_enabled']), - 'priority' => (int) ($post['recommendations_customer_backlog_priority'] ?? 60), + 'priority' => 60, 'min_open_tickets' => (int) ($post['recommendations_customer_backlog_min_open_tickets'] ?? 6), ], ], diff --git a/modules/helpdesk/pages/helpdesk/settings/index(default).phtml b/modules/helpdesk/pages/helpdesk/settings/index(default).phtml index 7fffc11..b5edc7e 100644 --- a/modules/helpdesk/pages/helpdesk/settings/index(default).phtml +++ b/modules/helpdesk/pages/helpdesk/settings/index(default).phtml @@ -91,15 +91,9 @@ $isOAuth2 = $authMode === HelpdeskSettingsGateway::AUTH_MODE_OAUTH2; - + - - - - @@ -116,12 +110,11 @@ $isOAuth2 = $authMode === HelpdeskSettingsGateway::AUTH_MODE_OAUTH2; > -
+
- - +
@@ -282,193 +275,135 @@ $isOAuth2 = $authMode === HelpdeskSettingsGateway::AUTH_MODE_OAUTH2;
-
-
+
+
- +
+ +
+ + + + + + + + + +
+ +
+ +
+ + + + + + +
+
-
+
- + -
- - - -
-
+
+
+
+ + +
-
- - - -
- - - - -
-
+
+ + +
-
- - - -
- - - -
-
+
+ + +
-
- - - -
- - - -
-
- -
- - - -
- - - -
-
-
- -
-
- - - -
- - -
-
- -
- - - -
- - -
-
- -
- - - -
- - -
-
- -
- - - -
- - +
+ + +
+
diff --git a/modules/helpdesk/templates/aside-helpdesk-panel.phtml b/modules/helpdesk/templates/aside-helpdesk-panel.phtml index 56cf285..45c9f99 100644 --- a/modules/helpdesk/templates/aside-helpdesk-panel.phtml +++ b/modules/helpdesk/templates/aside-helpdesk-panel.phtml @@ -4,17 +4,23 @@ $layoutNav = is_array($layoutNav ?? null) ? $layoutNav : []; $helpdeskNav = is_array($layoutNav['helpdesk.nav'] ?? null) ? $layoutNav['helpdesk.nav'] : []; $canManageSettings = !empty($helpdeskNav['can_manage_settings']); +$settingsActive = navActive('helpdesk/settings', true); +$customersActive = navActive('helpdesk', true); +if ($settingsActive['isActive']) { + $customersActive = ['class' => '', 'aria' => '', 'isActive' => false]; +} + $helpdeskNavItems = [ [ 'label' => t('Customers'), 'path' => 'helpdesk', - 'active' => navActive('helpdesk', true), + 'active' => $customersActive, 'visible' => true, ], [ 'label' => t('Settings'), 'path' => 'helpdesk/settings', - 'active' => navActive('helpdesk/settings', true), + 'active' => $settingsActive, 'visible' => $canManageSettings, ], ]; diff --git a/modules/helpdesk/web/css/helpdesk.css b/modules/helpdesk/web/css/helpdesk.css index 7632adb..b5a8324 100644 --- a/modules/helpdesk/web/css/helpdesk.css +++ b/modules/helpdesk/web/css/helpdesk.css @@ -26,6 +26,115 @@ } } + /* Automation tab: compact rule list */ + .helpdesk-settings-rules { + display: grid; + gap: calc(var(--app-spacing) * 0.5); + margin-top: calc(var(--app-spacing) * 0.5); + } + + .helpdesk-settings-rule { + display: grid; + grid-template-columns: auto 1fr; + gap: 0 calc(var(--app-spacing) * 0.5); + align-items: center; + padding: calc(var(--app-spacing) * 0.4) 0; + border-bottom: 1px solid color-mix(in srgb, var(--app-contrast, #000) 8%, transparent); + } + + .helpdesk-settings-rule:last-child { + border-bottom: none; + } + + .helpdesk-settings-rule > input[type="checkbox"] { + grid-row: 1 / 3; + } + + .helpdesk-settings-rule-label { + font-weight: 500; + } + + .helpdesk-settings-rule > small { + grid-column: 2; + opacity: 0.65; + } + + /* Risk monitoring: rule with inline threshold */ + .helpdesk-settings-rule-with-threshold { + grid-template-columns: auto 1fr auto; + } + + .helpdesk-settings-rule-toggle { + display: grid; + grid-template-columns: auto 1fr; + gap: 0 calc(var(--app-spacing) * 0.5); + align-items: center; + grid-column: 1 / 3; + cursor: pointer; + } + + .helpdesk-settings-rule-toggle > input[type="checkbox"] { + grid-row: 1 / 3; + } + + .helpdesk-settings-rule-toggle > small { + grid-column: 2; + opacity: 0.65; + } + + .helpdesk-settings-rule-threshold { + grid-row: 1 / 3; + min-width: 6rem; + max-width: 8rem; + } + + .helpdesk-settings-rule-threshold > span { + font-size: 0.8em; + opacity: 0.65; + } + + @media (max-width: 760px) { + .helpdesk-settings-rule-with-threshold { + grid-template-columns: auto 1fr; + } + + .helpdesk-settings-rule-threshold { + grid-column: 1 / -1; + max-width: none; + } + } + + /* Advanced options disclosure */ + .helpdesk-settings-advanced { + margin-top: calc(var(--app-spacing) * 0.5); + border-top: 1px solid color-mix(in srgb, var(--app-contrast, #000) 8%, transparent); + padding-top: calc(var(--app-spacing) * 0.4); + } + + .helpdesk-settings-advanced > summary { + cursor: pointer; + font-size: 0.85em; + opacity: 0.7; + font-weight: 500; + } + + .helpdesk-settings-advanced > summary:hover { + opacity: 1; + } + + .helpdesk-settings-advanced-grid { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: calc(var(--app-spacing) * 0.5); + margin-top: calc(var(--app-spacing) * 0.5); + } + + @media (max-width: 760px) { + .helpdesk-settings-advanced-grid { + grid-template-columns: minmax(0, 1fr); + } + } + /* Clickable rows — shared between search results and ticket list */ .app-clickable-row { cursor: pointer;