Intervention n° {{ !empty($intervention['task_id']) ? $intervention['task_id'] : $intervention['id'] }}
Date d'intervention
{{ isset($intervention['intervention_date']) ? date('d/m/Y', strtotime($intervention['intervention_date'])) : 'Non attribuée' }}
{{ $intervention['address'] ?? 'Non connue' }}

{{ $intervention['title'] ?? 'Intervention' }}

{{ $intervention['description'] ?? 'Aucune description disponible' }}
Priorité
{{ ucfirst($intervention['priority'] ?? 'normal') }}
Deadline
@if(isset($intervention['deadline'])) {{ date('d/m/Y', strtotime($intervention['deadline'])) }} @else non définie @endif
Assignation
@if(isset($intervention['workers']) && count($intervention['workers']) > 0) assignée @else non assignée @endif
Intervenants
@php $workerCount = isset($intervention['workers']) ? count($intervention['workers']) : 0; @endphp @if($workerCount > 0) {{ $workerCount }} intervenant{{ $workerCount > 1 ? 's' : '' }} @else aucun assigné @endif
Commentaires
@php $commentCount = 0; $comments = []; // Récupérer les commentaires de la même façon que dans la page de détail if (isset($intervention['content']['comments'])) { // Si les commentaires sont déjà un tableau if (is_array($intervention['content']['comments'])) { $comments = $intervention['content']['comments']; } // Si les commentaires sont une chaîne JSON elseif (is_string($intervention['content']['comments'])) { $comments = json_decode($intervention['content']['comments'], true) ?? []; } } // Si les commentaires ne sont pas dans content, essayer directement elseif (isset($intervention['comments'])) { // Si les commentaires sont déjà un tableau if (is_array($intervention['comments'])) { $comments = $intervention['comments']; } // Si les commentaires sont une chaîne JSON elseif (is_string($intervention['comments'])) { $comments = json_decode($intervention['comments'], true) ?? []; } } $commentCount = count($comments); @endphp @if($commentCount > 0) {{ $commentCount }} commentaire{{ $commentCount > 1 ? 's' : '' }} @else aucun commentaire @endif
Photos
@php $photoCount = isset($intervention['photos']) ? count($intervention['photos']) : 0; @endphp @if($photoCount > 0) {{ $photoCount }} photo{{ $photoCount > 1 ? 's' : '' }} @else aucune photo @endif