@extends('layouts.app') @section('content')
@if (session('success')) @endif @if (isset($errors) && $errors->any()) @endif
{{ $user->name ?: ($isPartner ? 'Partner #' : 'User #') . $user->id }}
Email: {{ $user->email ?: 'N/A' }}  |  Phone: {{ trim(($user->phone_country_code ?? '') . ' ' . ($user->phone_no ?? 'N/A')) }}  |  Role: {{ $user->account_type }}
{{ count($contacts) }} Emergency Contact(s)
Emergency Contacts List
@if(count($contacts) > 0)
@foreach($contacts as $index => $contact) @php $cleanPhone = preg_replace('/[^0-9]/', '', (string)$contact->phone_number); @endphp @endforeach
# Contact Name Relationship Phone Number Status Added Date Action
{{ $index + 1 }}
{{ $contact->name }}
{{ $contact->relation ?: 'Relative' }} {{ $contact->phone_number }} @if($cleanPhone) @endif @if($contact->is_delete === 'active') Active @else Deactivated @endif {{ $contact->created_at ? $contact->created_at->format('d M Y, h:i A') : '-' }}
@else
No Emergency Contacts Found

This user has not added any emergency contacts yet.

@endif
@endsection @push('scripts') @endpush