diff --git a/modules/helpdesk/i18n/default_de.json b/modules/helpdesk/i18n/default_de.json index 513a3d7..4339423 100644 --- a/modules/helpdesk/i18n/default_de.json +++ b/modules/helpdesk/i18n/default_de.json @@ -582,7 +582,18 @@ "Failed to submit for review": "Einreichen zur Prüfung fehlgeschlagen", "You are not assigned to this handover": "Sie sind dieser Übergabe nicht zugewiesen", "Handover cannot be submitted for review in its current status": "Übergabe kann im aktuellen Status nicht zur Prüfung eingereicht werden", - "Open": "Offen", - "Closed": "Abgeschlossen", - "Assigned to (column)": "Zugewiesen an" + "In progress": "In Bearbeitung", + "Done": "Abgeschlossen", + "Assigned to (column)": "Zugewiesen an", + "How do you want to proceed?": "Wie möchten Sie vorgehen?", + "Create myself": "Selbst erstellen", + "I will fill in the handover protocol myself.": "Ich fülle das Übergabeprotokoll selbst aus.", + "Assign to employee": "Mitarbeiter zuweisen", + "An employee will receive an invitation to fill in the protocol.": "Ein Mitarbeiter erhält eine Einladung zum Ausfüllen des Protokolls.", + "Please select an option": "Bitte wählen Sie eine Option", + "Select customer, product and employee": "Kunde, Produkt und Mitarbeiter auswählen", + "Create and assign": "Erstellen & zuweisen", + "Handover created and assigned": "Übergabe erstellt und zugewiesen", + "No active employees found.": "Keine aktiven Mitarbeiter gefunden.", + "Please select an employee to assign": "Bitte wählen Sie einen Mitarbeiter aus" } diff --git a/modules/helpdesk/i18n/default_en.json b/modules/helpdesk/i18n/default_en.json index ece3183..f5a067f 100644 --- a/modules/helpdesk/i18n/default_en.json +++ b/modules/helpdesk/i18n/default_en.json @@ -582,7 +582,18 @@ "Failed to submit for review": "Failed to submit for review", "You are not assigned to this handover": "You are not assigned to this handover", "Handover cannot be submitted for review in its current status": "Handover cannot be submitted for review in its current status", - "Open": "Open", - "Closed": "Closed", - "Assigned to (column)": "Assigned to" + "In progress": "In progress", + "Done": "Done", + "Assigned to (column)": "Assigned to", + "How do you want to proceed?": "How do you want to proceed?", + "Create myself": "Create myself", + "I will fill in the handover protocol myself.": "I will fill in the handover protocol myself.", + "Assign to employee": "Assign to employee", + "An employee will receive an invitation to fill in the protocol.": "An employee will receive an invitation to fill in the protocol.", + "Please select an option": "Please select an option", + "Select customer, product and employee": "Select customer, product and employee", + "Create and assign": "Create and assign", + "Handover created and assigned": "Handover created and assigned", + "No active employees found.": "No active employees found.", + "Please select an employee to assign": "Please select an employee to assign" } diff --git a/modules/helpdesk/lib/Module/Helpdesk/Repository/HandoverRepository.php b/modules/helpdesk/lib/Module/Helpdesk/Repository/HandoverRepository.php index 84d9ffc..3905c74 100644 --- a/modules/helpdesk/lib/Module/Helpdesk/Repository/HandoverRepository.php +++ b/modules/helpdesk/lib/Module/Helpdesk/Repository/HandoverRepository.php @@ -89,9 +89,9 @@ class HandoverRepository if ($status !== '' && $status !== 'all') { $where[] = 'h.status = ?'; $params[] = $status; - } elseif ($view === 'open') { - $where[] = "h.status NOT IN ('completed', 'archived')"; - } elseif ($view === 'closed') { + } elseif ($view === 'active') { + $where[] = "h.status IN ('draft', 'in_progress', 'under_review')"; + } elseif ($view === 'done') { $where[] = "h.status IN ('completed', 'archived')"; } diff --git a/modules/helpdesk/pages/helpdesk/handovers-data().php b/modules/helpdesk/pages/helpdesk/handovers-data().php index abfb321..848a7ae 100644 --- a/modules/helpdesk/pages/helpdesk/handovers-data().php +++ b/modules/helpdesk/pages/helpdesk/handovers-data().php @@ -24,8 +24,8 @@ if (!$canManage) { } // Pass view (open/closed) to repository filter -if (!isset($filters['view']) || $filters['view'] === '') { - $filters['view'] = 'open'; +if (!isset($filters['view']) || !in_array($filters['view'], ['active', 'done'], true)) { + $filters['view'] = 'active'; } $service = app(HandoverService::class); diff --git a/modules/helpdesk/pages/helpdesk/handovers/create().php b/modules/helpdesk/pages/helpdesk/handovers/create().php index 3e86ada..9261517 100644 --- a/modules/helpdesk/pages/helpdesk/handovers/create().php +++ b/modules/helpdesk/pages/helpdesk/handovers/create().php @@ -185,9 +185,9 @@ if ($step === $formStep) { $handoverService->assign($currentTenantId, $handoverId, $form['assigned_to'], $currentUserId, $dueDate, HandoverService::PERMISSION_MANAGE); $sessionStore->remove($sessionKey); - $editUrl = lurl('helpdesk/handovers/edit/' . $handoverId); - Flash::success(t('Handover created and assigned'), $editUrl, 'handover_created'); - Router::redirect($editUrl); + $listUrl = lurl('helpdesk/handovers'); + Flash::success(t('Handover created and assigned'), $listUrl, 'handover_created'); + Router::redirect($listUrl); return; } } else { diff --git a/modules/helpdesk/pages/helpdesk/handovers/filter-schema.php b/modules/helpdesk/pages/helpdesk/handovers/filter-schema.php index 203e5ff..e9fe08c 100644 --- a/modules/helpdesk/pages/helpdesk/handovers/filter-schema.php +++ b/modules/helpdesk/pages/helpdesk/handovers/filter-schema.php @@ -4,7 +4,7 @@ return gridFilterSchema([ 'query' => [ 'search' => ['type' => 'string'], 'status' => ['type' => 'string', 'default' => 'all'], - 'view' => ['type' => 'string', 'default' => 'open'], + 'view' => ['type' => 'string', 'default' => 'active'], 'limit' => ['type' => 'int', 'default' => 20, 'min' => 1, 'max' => 100], 'offset' => ['type' => 'int', 'default' => 0, 'min' => 0], 'order' => [ diff --git a/modules/helpdesk/pages/helpdesk/handovers/index().php b/modules/helpdesk/pages/helpdesk/handovers/index().php index f4ed1f5..19cd868 100644 --- a/modules/helpdesk/pages/helpdesk/handovers/index().php +++ b/modules/helpdesk/pages/helpdesk/handovers/index().php @@ -50,7 +50,7 @@ $canCreate = $authService->authorize(HelpdeskAuthorizationPolicy::ABILITY_HANDOV $myAssignedOnly = !$canManage; // Active tab: open (default) or closed -$activeView = in_array($query['view'] ?? '', ['open', 'closed'], true) ? $query['view'] : 'open'; +$activeView = in_array($query['view'] ?? '', ['active', 'done'], true) ? $query['view'] : 'active'; if ($canManage) { $csrfKey = Session::$csrfSessionKey; diff --git a/modules/helpdesk/pages/helpdesk/handovers/index(default).phtml b/modules/helpdesk/pages/helpdesk/handovers/index(default).phtml index 1fb6c25..cbcd04b 100644 --- a/modules/helpdesk/pages/helpdesk/handovers/index(default).phtml +++ b/modules/helpdesk/pages/helpdesk/handovers/index(default).phtml @@ -33,15 +33,15 @@ require templatePath('partials/app-list-titlebar.phtml');
+ class="" + > + class="" + >
">