Customer Profile - {{ $user->name }}

Back to Users @if($user->hasAnyRole(['patient', 'employee', 'agent'])) Edit Profile @endif

Quick Actions

Create Support Ticket @if($user->subscriptions->isNotEmpty()) View Subscription @endif @if($recentTransactions->isNotEmpty()) @endif @if($user->hasAnyRole(['patient', 'employee', 'agent'])) @endif

Customer Information

{{ $user->name }}
{{ $user->email }}
{{ $user->phone ?? 'Not provided' }}
@if($user->roles->isNotEmpty()) {{ $user->roles->first()->name }} @else No role assigned @endif
{{ ucfirst($user->status) }}
{{ $user->created_at->format('M j, Y') }}
@if($user->address1)
{{ $user->address1 }} @if($user->address2), {{ $user->address2 }}@endif @if($user->city || $user->state || $user->zip)
{{ $user->city }}@if($user->city && $user->state), @endif{{ $user->state }} {{ $user->zip }} @endif
@endif
@if($user->subscriptions->isNotEmpty())

Subscription Overview

{{ $subscriptionStats['total'] }} total {{ $subscriptionStats['active'] }} active
@foreach($user->subscriptions->take(3) as $subscription)
{{ $subscription->plan->name ?? 'Unknown Plan' }}
ID: #{{ $subscription->id }} • @if($subscription->family_role) {{ ucwords(str_replace('_', ' ', $subscription->family_role)) }} • @endif {{ $subscription->starts_at ? $subscription->starts_at->format('M j, Y') : 'No start date' }}
@php $statusColors = [ 'active' => 'success', 'cancelled' => 'error', 'expired' => 'warning', 'pending_payment' => 'info' ]; $color = $statusColors[$subscription->status] ?? 'neutral'; @endphp {{ ucfirst(str_replace('_', ' ', $subscription->status)) }}
View Details
@endforeach @if($user->subscriptions->count() > 3)
View All {{ $user->subscriptions->count() }} Subscriptions
@endif
@endif @if($familyRelationships->isNotEmpty())

Family Plan Relationships

@foreach($familyRelationships as $relationship)
{{ $relationship->user->name }}
{{ $relationship->user->email }}
{{ ucwords(str_replace('_', ' ', $relationship->family_role)) }} {{ ucfirst($relationship->status) }}
View Subscription View Profile
@endforeach
@endif {{-- @if($user->hasRole('patient'))

Doctor Assignment

@if($user->assignedDoctors->isNotEmpty())

Currently Assigned Doctors

@foreach($user->assignedDoctors as $doctor)
{{ $doctor->name }}
{{ $doctor->email }}
@csrf @method('DELETE')
@endforeach
@else

No doctors assigned yet.

@endif @if($availableDoctors->isNotEmpty())

Assign a Doctor

Assign Doctor
@else

No active doctors available for assignment.

@endif
@endif --}} @if($recentTransactions->isNotEmpty())

Recent Payment History

@foreach($recentTransactions as $transaction) @endforeach
Date Amount Plan Payment Method Status Transaction ID
{{ $transaction->created_at->format('M j, Y') }} ${{ number_format($transaction->amount, 2) }} {{ $transaction->subscription->plan->name ?? 'N/A' }} {{ ucfirst(str_replace('_', ' ', $transaction->payment_method)) }} {{ ucfirst($transaction->status) }} @if($transaction->transaction_id) {{ $transaction->transaction_id }} @else N/A @endif
@endif @if($user->medicationOrders->isNotEmpty())

Recent Medication Orders

@foreach($user->medicationOrders->take(5) as $order)
Order #{{ $order->id }}
{{ $order->created_at->format('M j, Y g:i A') }} @if($order->doctor) • Doctor: {{ $order->doctor->name }} @endif
@php $statusColors = [ 'pending' => 'warning', 'assigned' => 'info', 'prescribed' => 'primary', 'completed' => 'success', 'rejected' => 'error' ]; $color = $statusColors[$order->status] ?? 'neutral'; @endphp {{ ucfirst(str_replace('_', ' ', $order->status)) }}
@endforeach
@endif @if($user->patientConsultations->isNotEmpty())

Recent Consultations

@foreach($user->patientConsultations->take(5) as $consultation)
@if($consultation->scheduled_at) {{ $consultation->scheduled_at->format('M j, Y g:i A') }} @else {{ $consultation->created_at->format('M j, Y g:i A') }} @endif
@if($consultation->doctor) Doctor: {{ $consultation->doctor->name }} @else No doctor assigned @endif @if($consultation->type) • Type: {{ ucfirst($consultation->type) }} @endif
@if($consultation->patient_complaint)
{{ Str::limit($consultation->patient_complaint, 100) }}
@endif
@php $statusColors = [ 'pending' => 'warning', 'scheduled' => 'info', 'in_progress' => 'primary', 'completed' => 'success', 'cancelled' => 'error' ]; $color = $statusColors[$consultation->status] ?? 'neutral'; @endphp {{ ucfirst(str_replace('_', ' ', $consultation->status)) }}
@endforeach
@endif @if($user->supportTickets->isNotEmpty())

Recent Support Tickets

View All Tickets
@foreach($user->supportTickets->take(5) as $ticket)
{{ $ticket->subject }}
{{ $ticket->ticket_number }} • {{ $ticket->created_at->format('M j, Y') }} @if($ticket->assignedTo) • Assigned to: {{ $ticket->assignedTo->name }} @endif
{{ ucfirst($ticket->priority) }} {{ ucfirst(str_replace('_', ' ', $ticket->status)) }} View
@endforeach
@endif