@extends("admin.layouts.app") @section("title", __("admin.notification_channels")) @section("content") {{-- Providers --}}
{{ __('admin.notifications.providers') }}
@if($providers->isEmpty())
{{ __('admin.notifications.no_providers') }}
@else @foreach($providers as $provider) @endforeach
{{ __('common.table.name') }} {{ __('common.table.type') }} {{ __('common.table.status') }} {{ __('admin.notifications.rules') }} {{ __('common.table.actions') }}
{{ $provider->name }} @if($provider->type === 'email') Email @elseif($provider->type === 'slack') Slack @else Webhook @endif @if($provider->active) {{ __('common.status.active') }} @else {{ __('common.status.inactive') }} @endif {{ $provider->rules->count() }} {{ __('admin.notifications.rules_count') }}
@csrf @method("DELETE")
@endif
{{-- Rules --}}
@php $allRules = $providers->flatMap(fn($p) => $p->rules->map(fn($r) => (object) array_merge($r->toArray(), ['provider_name' => $p->name, 'provider_type' => $p->type]))); @endphp @if($allRules->isEmpty())
{{ __('admin.notifications.no_rules') }}
@else @foreach($allRules as $rule) @endforeach
{{ __('admin.notifications.event') }} {{ __('admin.notifications.provider') }} {{ __('common.table.status') }} {{ __('common.table.actions') }}
{{ $rule->event }} {{ $rule->provider_name }} ({{ $rule->provider_type }}) @if($rule->active) {{ __('common.status.active') }} @else {{ __('common.status.inactive') }} @endif
@csrf @method("DELETE")
@endif
{{-- Add Provider Modal --}} {{-- Edit Provider Modal --}} {{-- Add Rule Modal --}} @push("scripts") @endpush @endsection