BK

Détails de l'intervention

Demande #{{ $intervention->id ?? 'N/A' }}

Retour à la liste @if(auth()->check() && isset($intervention->user_id) && $intervention->user_id === auth()->id()) Modifier @endif

Intervention #{{ $intervention->id ?? 'N/A' }} @if(!empty($intervention->reference)) ({{ e($intervention->reference) }}) @endif

@if(isset($intervention->created_at) && $intervention->created_at instanceof \Carbon\Carbon) Créée le {{ $intervention->created_at->format('d/m/Y à H:i') }} @if(isset($intervention->updated_at) && $intervention->updated_at instanceof \Carbon\Carbon && $intervention->updated_at->ne($intervention->created_at)) • Dernière mise à jour : {{ $intervention->updated_at->format('d/m/Y à H:i') }} @endif @else Date de création non disponible @endif

@php $statut = $intervention->statut ?? 'nouvelle'; if ($statut === 'terminee') { $statut = 'termine'; } $statutClass = match($statut) { 'nouvelle' => 'badge-statut-nouvelle', 'en_cours' => 'badge-statut-en_cours', 'termine' => 'badge-statut-termine', 'annule' => 'badge-statut-annule', 'cloture' => 'badge-statut-cloture', default => 'badge-statut-nouvelle', }; $statutText = match($statut) { 'nouvelle' => 'Nouvelle', 'en_cours' => 'En cours', 'termine' => 'Terminée', 'annule' => 'Annulée', 'cloture' => 'Clôturée', default => $statut, }; $urgenceClass = match($intervention->urgence ?? 'moyenne') { 'critique' => 'badge-urgence-critique', 'haute' => 'badge-urgence-haute', 'moyenne' => 'badge-urgence-moyenne', 'faible' => 'badge-urgence-faible', default => 'badge-urgence-moyenne', }; $urgenceText = match($intervention->urgence ?? 'moyenne') { 'critique' => 'Critique', 'haute' => 'Haute', 'moyenne' => 'Moyenne', 'faible' => 'Faible', default => $intervention->urgence ?? 'Moyenne', }; @endphp {{ $statutText }} {{ $urgenceText }}
@if(session('success')) @endif @if(session('error')) @endif

Véhicule

Identifiant du véhicule
{{ $intervention->vehicule?->code_equipement ?? 'Non spécifié' }}
Type de véhicule
{{ !empty($intervention->type_vehicule) ? ucfirst(e($intervention->type_vehicule)) : 'Non spécifié' }}
Statut opérationnel @php $operationalStatus = $intervention->operational_status ?? 'active'; $operationalClass = match($operationalStatus) { 'active' => 'badge-operational-active', 'limite' => 'badge-operational-limite', 'inactive' => 'badge-operational-inactive', default => 'badge-operational-active', }; $operationalText = match($operationalStatus) { 'active' => 'Opérationnel', 'limite' => 'Limité', 'inactive' => 'Non opérationnel', default => $operationalStatus, }; @endphp
{{ $operationalText }}
@if(!empty($intervention->vehicule?->marque) || !empty($intervention->vehicule?->modele))
Modèle
{{ e($intervention->vehicule->marque ?? '') }} {{ e($intervention->vehicule->modele ?? '') }}
@endif @if(!empty($intervention->vehicule?->immatriculation))
Immatriculation
{{ e($intervention->vehicule->immatriculation) }}
@endif

Planning & Dates

Date & heure de l'incident
@if(!empty($intervention->incident_date)) {{ \Carbon\Carbon::parse($intervention->incident_date)->format('d/m/Y') }} @if(!empty($intervention->incident_time)) {{ e($intervention->incident_time) }} @endif @else Non spécifiée @endif
Date de soumission
@if(!empty($intervention->date_soumission)) {{ \Carbon\Carbon::parse($intervention->date_soumission)->format('d/m/Y à H:i') }} @else Non spécifiée @endif
Date souhaitée d'intervention
@if(!empty($intervention->date_souhaitee)) @php $dateSouhaitee = \Carbon\Carbon::parse($intervention->date_souhaitee); $daysDiff = $dateSouhaitee->diffInDays(now(), false); $dateInfo = ''; $dateClass = ''; if ($daysDiff == 0) { $dateClass = 'text-green-600'; $dateInfo = 'Aujourd\'hui'; } elseif ($daysDiff == 1) { $dateClass = 'text-blue-600'; $dateInfo = 'Demain'; } elseif ($daysDiff > 0 && $daysDiff < 7) { $dateClass = 'text-blue-600'; $dateInfo = 'Dans ' . $daysDiff . ' jours'; } elseif ($daysDiff >= 7 && $daysDiff < 30) { $dateClass = 'text-amber-600'; $dateInfo = 'Dans ' . ceil($daysDiff/7) . ' semaines'; } elseif ($daysDiff >= 0) { $dateClass = 'text-gray-500'; $dateInfo = 'Planifiée'; } else { $dateClass = 'text-red-600'; $dateInfo = 'Dépassée de ' . abs($daysDiff) . ' jours'; } @endphp {{ $dateSouhaitee->format('d/m/Y') }} {{ $dateInfo }} @else Non définie @endif
Date & heure préférée
@if(!empty($intervention->preferred_date)) {{ \Carbon\Carbon::parse($intervention->preferred_date)->format('d/m/Y') }} @if(!empty($intervention->preferred_time)) {{ e($intervention->preferred_time) }} @endif @else Non spécifiée @endif
Date de traitement
@if(!empty($intervention->date_traitement)) {{ \Carbon\Carbon::parse($intervention->date_traitement)->format('d/m/Y à H:i') }} @else En attente @endif
Date de clôture
@if(!empty($intervention->date_cloture)) {{ \Carbon\Carbon::parse($intervention->date_cloture)->format('d/m/Y à H:i') }} @else Non clôturée @endif

Détails Techniques

Type de panne
{{ !empty($intervention->type_panne) ? ucfirst(e($intervention->type_panne)) : 'Non spécifié' }}
@if(!empty($intervention->type_intervention))
Type d'intervention
{{ e($intervention->type_intervention) }}
@endif
Disponibilité
{{ !empty($intervention->disponibilite) ? ucfirst(e($intervention->disponibilite)) : 'Non spécifiée' }}
@if(!empty($intervention->priorite))
Priorité
{{ e($intervention->priorite) }}
@endif

Description & Symptômes

Description
@if(!empty($intervention->description))

{{ e($intervention->description) }}

@else Aucune description @endif
Symptômes observés
@php $symptomes = $intervention->symptomes ?? null; $hasSymptomes = false; if (is_array($symptomes) && count($symptomes) > 0) { $hasSymptomes = true; } elseif (is_string($symptomes) && trim($symptomes) !== '') { $hasSymptomes = true; } @endphp @if($hasSymptomes)
@if(is_array($symptomes))
    @foreach($symptomes as $symptome) @if(is_string($symptome) && trim($symptome) !== '')
  • {{ e($symptome) }}
  • @endif @endforeach
@elseif(is_string($symptomes))

{{ e($symptomes) }}

@endif
@else Aucun symptôme décrit @endif

Galerie Photos

@php // Récupération du tableau de photos avec vérification $photos = $intervention->photos ?? null; $hasPhotos = false; // Vérifier si photos est un tableau non vide if (is_array($photos) && count(array_filter($photos, 'is_string')) > 0) { $hasPhotos = true; } @endphp @if($hasPhotos)
{{ count(array_filter($photos, 'is_string')) }} photo(s) disponible(s). Cliquez pour agrandir.
@else

Aucune photo disponible

Aucune photo n'a été téléchargée pour cette intervention. Les photos aident les techniciens à mieux comprendre la panne.

@if(auth()->check() && isset($intervention->user_id) && $intervention->user_id === auth()->id()) @endif
@endif

Acteurs

Déclarant (Chauffeur)
{{ e($intervention->user?->name ?? 'Non spécifié') }}
@if(!empty($intervention->user?->email))
{{ e($intervention->user->email) }}
@endif
Responsable de parc @if(!empty($intervention->responsable))
{{ e($intervention->responsable->name ?? 'Non assigné') }}
@if(!empty($intervention->responsable->email))
{{ e($intervention->responsable->email) }}
@endif @else
Non assigné
@endif

Coût & Commentaires

Coût réel de l'intervention
@if(!empty($intervention->cout_reel)) {{ number_format((float)$intervention->cout_reel, 2, ',', ' ') }} € @else Non défini @endif
@if(!empty($intervention->commentaire))
Commentaire général

{{ e($intervention->commentaire) }}

@endif @if(!empty($intervention->commentaire_technicien))
Commentaire du technicien

{{ e($intervention->technicien?->name ?? 'Technicien') }}

@if(!empty($intervention->date_commentaire))

{{ \Carbon\Carbon::parse($intervention->date_commentaire)->format('d/m/Y à H:i') }}

@endif
{{ e($intervention->commentaire_technicien) }}
@endif

Récapitulatif

Identifiant
#{{ $intervention->id ?? 'N/A' }}
Référence
{{ $intervention->reference ?? 'N/A' }}
Statut
{{ $statutText }}
Urgence
{{ $urgenceText }}