-
@foreach ($unparsed as $event)
- {{ $event->occurred_at?->format('d.m. H:i') }} {{ Str::after($event->description, 'Unparsed“: ') }} @endforeach
resetPage(); } public function updatedView(): void { $this->resetPage(); } public function release(int $id): void { $this->authorize('users:manage'); $suppression = EmailSuppression::query()->findOrFail($id); app(EmailSuppressionService::class)->release($suppression, auth()->user(), 'Freigabe im Admin'); session()->flash('status', __(':email freigegeben — der nächste Rückläufer sperrt sie wieder.', ['email' => $suppression->email])); } public function suppress(): void { $this->authorize('users:manage'); $validated = $this->validate([ 'newEmail' => ['required', 'email', 'max:190'], 'newNote' => ['nullable', 'string', 'max:500'], ]); app(EmailSuppressionService::class)->suppress($validated['newEmail'], EmailSuppressionReason::Manual, 'admin', $validated['newNote'] ?: 'manuell im Admin'); $this->reset('newEmail', 'newNote'); session()->flash('status', __('Adresse gesperrt.')); } public function with(): array { $query = EmailSuppression::query() ->when($this->view === 'active', fn ($q) => $q->active()) ->when($this->view === 'released', fn ($q) => $q->whereNotNull('released_at')) ->when(trim($this->search) !== '', fn ($q) => $q->whereLike('email', '%'.trim($this->search).'%')) ->orderByDesc('suppressed_at') ->orderByDesc('id'); return [ 'suppressions' => $query->paginate(50), 'activeCount' => EmailSuppression::query()->active()->count(), 'bouncesThisWeek' => EmailBounce::query()->where('received_at', '>=', now()->subDays(7))->count(), 'unparsed' => ActivityEvent::query() ->where('type', ActivityType::MailSuppressed->value) ->where('description', 'like', 'Rückläufer nicht lesbar%') ->latest('occurred_at') ->limit(10) ->get(), 'circuitOpenUntil' => app(MailCircuitBreaker::class)->openUntil(), 'returnPath' => (string) config('bounces.return_path'), 'imapConfigured' => filled(config('imap.accounts.bounces.host')), ]; } }; ?>