@extends('backend.layouts.master') @section('title') Attestations émises — {{ $event->bo_title }} @endsection @section('body') @endsection @section('css') @endsection @section('content')
Attestations émises — {{ $event->bo_title }}
Configurations
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif {{-- ───────────────── Statistiques ───────────────── --}}

{{ $stats['total'] }}

Documents

{{ $stats['notified'] }}

Notifiés

{{ $stats['not_notified'] }}

Non notifiés

{{ $stats['coverage'] }}%

Couverture

{{ $stats['pdf_missing'] }}

PDF manquants

{{ $stats['invalid_email'] }}

Emails invalides
@if ($documentsByType->isEmpty())
Aucune attestation n'a encore été émise pour cet événement.
@else
{{-- ───────────── Onglets par type ───────────── --}}
@foreach ($documentsByType as $type => $docs) @php $tabId = 'tab-' . \Illuminate\Support\Str::slug($type ?: 'autre'); @endphp
{{-- Barre d'actions de masse pour ce type --}}
@can('attestations_documents_regenerate')
@csrf
@endcan @can('attestations_documents_send')
@csrf
@csrf
@endcan
@foreach ($docs as $document) @php $sujet = $document->title ?: $document->subject_1 ?: '—'; @endphp @endforeach
Participant Email Sujet / Titre PDF Notifié Actions
{{ optional($document->participant?->user)->firstname }} {{ optional($document->participant?->user)->name }} @if (!$document->participant) Sans participant @endif {{ optional($document->participant?->user)->email ?? '—' }} @if ($document->participant && !$document->email_valid) invalide @endif
{{ $sujet }}
@if ($document->pdf_exists) Voir @else Non généré @endif @can('attestations_documents_regenerate')
@csrf
@endcan
@if ($document->is_email_notified) @php $lastSend = $document->sendLogs->where('status', 'success')->first(); @endphp Oui @if ($lastSend) {{ $lastSend->created_at->format('d/m/Y H:i') }} @endif @else Non @endif @can('attestations_documents_send') @if ($document->participant)
@csrf
@if ($document->is_email_notified)
@csrf
@endif @endif @else @endcan
@endforeach
@endif {{-- ───────────── Modal Aperçu email ───────────── --}} @endsection @section('scripts') @endsection