@php($active = \App\Enums\SosStatus::Active) @if ($alerts->isEmpty()) @else
@foreach ($alerts as $alert) $alert->status === $active])> @endforeach
{{ __('Raised') }}{{ __('From') }}{{ __('Ride') }}{{ __('Location') }}{{ __('Emergency contacts') }}{{ __('Status') }}
{{ $alert->created_at->toDayDateTimeString() }}{{ $alert->created_at->diffForHumans() }} @if ($alert->ride) {{ $alert->ride->booking_number }} @else — @endif @if ($alert->map_url) {{ __('Open map') }} @else — @endif @forelse ($alert->user?->emergencyContacts ?? [] as $contact)
{{ $contact->name }}@if ($contact->relationship) ({{ $contact->relationship }})@endif {{ full_phone($contact->country_code, $contact->phone) }}
@empty {{ __('None added') }} @endforelse
@if ($alert->handler){{ $alert->handler->name }}@endif @if ($alert->admin_notes){{ $alert->admin_notes }}@endif @can('sos.manage') @if (in_array($alert->status, \App\Enums\SosStatus::open(), true))
@if ($alert->status === $active)
@csrf {{ __('Acknowledge') }}
@endif {{ __('Close') }}
@csrf
{{ __('Cancel') }} {{ __('Close alert') }}
@endif @endcan
{{ $alerts->links() }}
@endif