From ea727985eae78411c2492710a112e5a84de3461c Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 20 May 2026 14:44:33 +0000 Subject: [PATCH] chore: auto-commit after execute-task GSD-Unit: M013/S01/T02 --- .../app/Http/Controllers/Admin/DashboardController.php | 4 +++- schneespur/app/Listeners/SendJobCompletedNotification.php | 3 +++ schneespur/app/Services/Extension/NavigationRegistry.php | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/schneespur/app/Http/Controllers/Admin/DashboardController.php b/schneespur/app/Http/Controllers/Admin/DashboardController.php index 00b8523..60f524d 100644 --- a/schneespur/app/Http/Controllers/Admin/DashboardController.php +++ b/schneespur/app/Http/Controllers/Admin/DashboardController.php @@ -5,6 +5,7 @@ namespace App\Http\Controllers\Admin; use App\Http\Controllers\Controller; use App\Models\Setting; use App\Services\Extension\DashboardWidgetRegistry; +use App\Services\Extension\FilterRegistry; use Illuminate\Http\RedirectResponse; use Illuminate\View\View; @@ -17,9 +18,10 @@ class DashboardController extends Controller return redirect()->route('admin.dashboard'); } - public function index(DashboardWidgetRegistry $widgetRegistry): View + public function index(DashboardWidgetRegistry $widgetRegistry, FilterRegistry $filterRegistry): View { $widgets = $widgetRegistry->getWidgets(); + $widgets = $filterRegistry->apply('schneespur.dashboard.kpis', $widgets); return view('admin.dashboard', compact('widgets')); } diff --git a/schneespur/app/Listeners/SendJobCompletedNotification.php b/schneespur/app/Listeners/SendJobCompletedNotification.php index 2bbf6a8..69432b7 100644 --- a/schneespur/app/Listeners/SendJobCompletedNotification.php +++ b/schneespur/app/Listeners/SendJobCompletedNotification.php @@ -4,6 +4,7 @@ namespace App\Listeners; use App\Events\JobCompleted; use App\Mail\JobCompletedMail; +use App\Services\Extension\FilterRegistry; use App\Services\NotificationLogService; use App\Services\PdfReportService; use Illuminate\Contracts\Queue\ShouldQueue; @@ -15,6 +16,7 @@ class SendJobCompletedNotification implements ShouldQueue public function __construct( private NotificationLogService $notificationLogService, private PdfReportService $pdfReportService, + private FilterRegistry $filterRegistry, ) {} public function handle(JobCompleted $event): void @@ -35,6 +37,7 @@ class SendJobCompletedNotification implements ShouldQueue } $recipients = $this->resolveRecipients($object, $customer); + $recipients = $this->filterRegistry->apply('schneespur.job.notification.recipients', $recipients, $job); if (empty($recipients)) { $this->notificationLogService->logSkipped($job, $notificationType, 'skipped_no_email'); diff --git a/schneespur/app/Services/Extension/NavigationRegistry.php b/schneespur/app/Services/Extension/NavigationRegistry.php index 76584ce..ed0f499 100644 --- a/schneespur/app/Services/Extension/NavigationRegistry.php +++ b/schneespur/app/Services/Extension/NavigationRegistry.php @@ -8,6 +8,10 @@ class NavigationRegistry extends ExtensionRegistry { protected array $groups = []; + public function __construct( + private readonly FilterRegistry $filterRegistry, + ) {} + public function addGroup(string $key, string $label, int $order = 100): void { $this->groups[$key] = ['key' => $key, 'label' => $label, 'order' => $order]; @@ -73,6 +77,6 @@ class NavigationRegistry extends ExtensionRegistry usort($groupItems, fn (array $a, array $b) => $a['order'] <=> $b['order']); } - return $grouped; + return $this->filterRegistry->apply('schneespur.navigation.items', $grouped); } }