@extends('layouts.admin') @section('title','Safety incident') @section('heading',$incident->number) @section('content')

Incident details

Raised by: {{ $incident->customer?->name ?? $incident->driver?->user?->name ?? 'Unknown participant' }} · {{ $incident->customer_id ? 'Passenger' : 'Driver' }}

@if($incident->driver)

Assigned driver: {{ $incident->driver?->user?->name }} · {{ $incident->driver?->user?->phone }}

@endif

Location: {{ $incident->latitude }}, {{ $incident->longitude }}

Message: {{ $incident->message ?? 'SOS raised without a message.' }}

Emergency contact: {{ $incident->emergency_contact_name ?? 'Not configured' }} @if($incident->emergency_contact_phone) · {{ $incident->emergency_contact_phone }} @endif

{{ $incident->status }}

External escalation

Queued delivery evidence contains hashed destinations only.

@if($incident->escalations->isEmpty())

No external channel was configured when this SOS was raised. Configure the signed safety webhook and/or emergency-contact SMS before production.

@else
@foreach($incident->escalations as $escalation)@endforeach
ChannelProviderStatusAttemptsProvider evidenceLast attempt
{{ str_replace('_',' ',$escalation->channel) }}{{ $escalation->provider }}{{ $escalation->status }}{{ $escalation->attempts }}{{ $escalation->provider_reference ?? $escalation->response_excerpt ?? 'Pending' }}{{ $escalation->last_attempted_at?->format('d M Y H:i') ?? 'Not attempted' }}
@if($incident->status !== 'resolved' && $incident->escalations->contains('status','failed'))
@csrf
@endif @endif

Immutable audit timeline

@foreach($incident->events as $event)@endforeach
TimeActorTransitionNote
{{ $event->created_at->format('d M Y H:i') }}{{ $event->actor?->name ?? 'System' }}{{ $event->from_status ?? 'created' }} → {{ $event->to_status }}{{ $event->note }}
@endsection