{{-- Rendu lisible (mobile-first) des infos API d'un log ($infos = new_values['infos_api']). Formes gérées : - Planning : { client:{}, devis:[], interventions:[] } - Rapport : { intervention:{ id, libelle, secteur, client } } Cartes empilées, aucun tableau (pas de scroll horizontal sur mobile). --}} @php $i = $infos ?? []; @endphp
{{-- ===== CLIENT (en premier) ===== --}} @if (!empty($i['client'])) @php $c = $i['client']; $clientMeta = array_filter([ $c['ville'] ?? null, !empty($c['id']) ? '#' . $c['id'] : null, ]); @endphp
Client
{{ $c['raison_sociale'] ?? '—' }}
@if (!empty($clientMeta))
{{ implode(' · ', $clientMeta) }}
@endif
@endif {{-- ===== DEVIS ===== --}} @if (!empty($i['devis']))
Devis ({{ count($i['devis']) }})
@foreach ($i['devis'] as $d)
#{{ $d['id'] ?? '—' }} @if (!empty($d['reference'])) ({{ $d['reference'] }}) @endif
@if (!empty($d['nature']))
{{ $d['nature'] }}
@endif @if (!empty($d['ville']))
{{ $d['ville'] }}
@endif
@endforeach
@endif {{-- ===== INTERVENTIONS (planning) ===== --}} @if (!empty($i['interventions']))
Interventions ({{ count($i['interventions']) }})
@foreach ($i['interventions'] as $it)
#{{ $it['id'] ?? '—' }}
@if (!empty($it['libelle']))
{{ $it['libelle'] }}
@endif @if (!empty($it['secteur'])) {{ $it['secteur'] }} @endif
@endforeach
@endif {{-- ===== INTERVENTION unique (rapport) ===== --}} @if (!empty($i['intervention'])) @php $it = $i['intervention']; $titre = '#' . ($it['id'] ?? '—') . (!empty($it['libelle']) ? ' — ' . $it['libelle'] : ''); $interMeta = array_filter([$it['client'] ?? null, $it['secteur'] ?? null]); @endphp
Intervention
{{ $titre }}
@if (!empty($interMeta))
{{ implode(' · ', $interMeta) }}
@endif
@endif