@extends('backend.partials.master') @section('title', ___('admin.webhooks')) @section('maincontent') @php $canEdit = hasPermission('general_settings_update'); @endphp

{{ ___('admin.webhooks') }}

{{ ___('admin.webhooks_help') }}

{{ ___('admin.webhooks_signature_help') }}

@if($newSecret)
{{ ___('admin.webhook_secret_once') }}
{{ $newSecret }}
@endif
@foreach($webhooks as $hook)
{{ $hook->name ?: $hook->url }} @if($hook->is_active){{ ___('label.active') }}@else{{ ___('label.inactive') }}@endif
@if($canEdit)
@csrf
@csrf
@csrf @method('DELETE')
@endif
@if($hook->consecutive_failures)

{{ ___('admin.webhook_failing', ['count' => $hook->consecutive_failures]) }}

@endif @include('backend.settings._webhook-form', ['hook' => $hook, 'action' => route('settings.webhooks.update', $hook->id), 'method' => 'PUT'])
@endforeach @if($canEdit)
{{ ___('admin.webhook_add') }}
@include('backend.settings._webhook-form', ['hook' => null, 'action' => route('settings.webhooks.store'), 'method' => 'POST'])
@endif
{{ ___('admin.webhook_recent') }}
@forelse($deliveries as $d) @empty @endforelse
{{ ___('admin.webhook_event') }}{{ ___('admin.webhook_endpoint') }}{{ ___('label.status') }}{{ ___('admin.webhook_attempts') }}
{{ $d->event }}
{{ $d->created_at?->diffForHumans() }}
{{ $d->webhook?->name ?: $d->webhook?->url }} @if($d->status === 'sent'){{ $d->response_code }} @elseif($d->status === 'failed'){{ ___('admin.webhook_failed') }} @else{{ ___('admin.webhook_pending') }}@endif @if($d->error)
{{ $d->error }}@endif
{{ $d->attempts }} @if($canEdit && $d->status !== 'sent')
@csrf
@endif
{{ ___('admin.webhook_none_yet') }}
@endsection