Gestion du Courrier
Suivi et gestion des courriers administratifs
@if(auth()->user()->role->nom === 'Administrateur')
Nouveau courrier
@endif
@if(in_array(auth()->user()->role->nom, ['Administrateur', 'Chef de Service', 'Responsable RH']))
@endif
{{ $stats['total'] }}
Total
{{ $stats['nouveaux'] }}
Nouveaux
{{ $stats['en_traitement'] }}
En traitement
{{ $stats['traites'] }}
Traités
{{ $stats['en_souffrance'] }}
En souffrance
{{ $stats['total'] > 0 ? round(($stats['traites'] / $stats['total']) * 100) : 0 }}%
Taux de célérité
@if($notifications->count() > 0)
Notifications Courriers
@foreach($notifications as $notification)
@php
// On autorise uniquement
et
$messageSafe = strip_tags($notification->data['message'], '');
@endphp
@endforeach
@endif
@if($courriers->count() > 0)
| Objet |
Type |
Statut |
Date réception |
Date limite |
Agent traitant |
Actions |
@foreach($courriers as $courrier)
{{ $courrier->objet }}
@if($courrier->reference)
Ref: {{ $courrier->reference }}
@endif
|
{{ $courrier->type }} |
{{ $courrier->statut }}
|
{{ optional($courrier->date_reception)->format('d/m/Y') ?? '—' }} |
@php
$dateLimite = $courrier->date_limite
? \Carbon\Carbon::parse($courrier->date_limite)
: null;
@endphp
@if($dateLimite)
{{ $dateLimite->format('d/m/Y') }}
@else
Non définie
@endif
|
@if($courrier->agentsTraitants->isNotEmpty())
{{ $courrier->agentsTraitants->first()->name }}
@else
Non assigné
@endif
|
@if(auth()->user()->role->nom === 'Administrateur')
@endif
@if(
$courrier->type === 'DEPART'
&& $courrier->statut !== 'Traité'
&& auth()->user()->role->nom === 'Administrateur'
)
@endif
{{-- Bouton traitement dynamique pour agents/admins --}}
@php
$canTraiter = in_array(auth()->user()->role->nom, ['Agent', 'Administrateur', 'Chef de Service', 'Responsable RH']);
@endphp
@if($canTraiter)
@if(in_array($courrier->statut, ['Affecté', 'En traitement']))
@elseif($courrier->statut === 'Traité')
Traité
@endif
@endif
|
@endforeach
{{-- Pagination avec maintien des filtres --}}
@else
Aucun courrier
Il n'y a encore aucun courrier enregistré.
Créer le premier courrier
@endif