chore: auto-commit after execute-task
GSD-Unit: M013/S01/T02
This commit is contained in:
parent
41878e92ef
commit
ea727985ea
3 changed files with 11 additions and 2 deletions
|
|
@ -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'));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue