@section('title', 'Profile - {{ ucfirst(str_replace("_", " ", $user->role)) }} Dashboard')
@if($user->role === 'head_nurse')

My Profile

Manage your profile information and view system overview

@else

My Profile

View your profile information

@endif
@if (session()->has('success')) @if($user->role === 'head_nurse')
{{ session('success') }}
@else
{{ session('success') }}
@endif @endif
@if($user->role === 'head_nurse')

Total Clinics

{{ $statistics['total_clinics'] ?? 0 }}

Active Nurses

{{ $statistics['total_nurses'] ?? 0 }}

Total Zones

{{ $statistics['total_zones'] ?? 0 }}

Total Mothers

{{ $statistics['total_mothers'] ?? 0 }}

@elseif($user->role === 'clinic_admin')

Nurses in Clinic

{{ \App\Models\User::where('clinic_id', $user->clinic_id)->where('role', 'nurse')->where('is_active', true)->count() }}

Active Zones

{{ \App\Models\Zone::where('clinic_id', $user->clinic_id)->where('is_active', true)->count() }}

Expectant Mothers

{{ \App\Models\ExpectantMother::where('clinic_id', $user->clinic_id)->count() }}

Pending Requests

{{ \App\Models\ClinicChangeRequest::where('new_clinic_id', $user->clinic_id)->where('status', 'pending')->count() }}

@else

Assigned Mothers

{{ $statistics['assigned_mothers'] ?? 0 }}

Pending Appointments

{{ $statistics['pending_appointments'] ?? 0 }}

Total Appointments

{{ $statistics['total_appointments'] ?? 0 }}

Completed

{{ $statistics['completed_appointments'] ?? 0 }}

@if($user->role === 'nurse')

This Week's Duties

{{ $statistics['this_week_duties'] ?? 0 }}

@endif @endif
@if($user->role === 'head_nurse')
@if($user->profile_picture) Profile Picture @else
@endif

{{ $user->name }}

Head Nurse Administrator

Staff ID

{{ $user->staff_id ?? 'HN001' }}

Email Address

{{ $user->email }}

System Access

All Clinics

Full system-wide access to all 11 clinics

Phone Number

{{ $user->phone ?? 'Not provided' }}

Account Status
Active

Password Status

@if($user->must_change_password) Must Change Password @else Password Updated @endif

Joined Date

{{ $user->created_at->format('F j, Y') }}

{{ $user->created_at->diffForHumans() }}

@elseif($user->role === 'clinic_admin')

@if($user->clinic) {{ $user->clinic->name }}
Clinic Administrator @if($user->clinic->address)
{{ $user->clinic->address }} @endif @if($user->clinic->phone)
📞 {{ $user->clinic->phone }} @endif @else Not assigned to any clinic @endif

@else

@if($user->clinic) {{ $user->clinic->name }} @if($user->clinic->address)
{{ $user->clinic->address }} @endif @if($user->clinic->phone)
📞 {{ $user->clinic->phone }} @endif @else Not assigned to any clinic @endif

@endif

{{ $user->phone ?? 'Not provided' }}

{{ ucfirst(str_replace('_', ' ', $user->role)) }}

{{ ($user->status ?? ($user->is_active ? 'active' : 'inactive')) === 'active' || $user->is_active ? 'Active' : 'Inactive' }}

@if($user->must_change_password) Must Change Password @else Password Updated @endif @if($user->password_changed_at)
Last changed: {{ \Carbon\Carbon::parse($user->password_changed_at)->format('M j, Y') }} @endif

{{ $user->created_at->format('F j, Y') }}
{{ $user->created_at->diffForHumans() }}

@if($user->profile_picture) @endif

Profile information is managed by your administrator

@if($user->role === 'nurse')

My Duty Timetable

Week of {{ $weekStartDate ? $weekStartDate->format('M j, Y') : 'Current Week' }}

@if($currentWeekDuties && $currentWeekDuties->count() > 0)
@foreach($currentWeekDuties as $duty) @endforeach
Day Date Zone/Room Status
{{ $duty->day_of_week }}
@if($duty->duty_date->isToday())
Today
@endif
{{ $duty->duty_date->format('M j, Y') }}
{{ $duty->zone->zone_name ?? 'N/A' }}
{{ $duty->zone->zone_code ?? 'N/A' }}
@if($duty->duty_date->isPast()) Completed @elseif($duty->duty_date->isToday()) Today @else Upcoming @endif
Total Duties
{{ $currentWeekDuties->count() }}
Completed
{{ $currentWeekDuties->where('duty_date', '<', now()->startOfDay())->count() }}
Upcoming
{{ $currentWeekDuties->where('duty_date', '>=', now()->startOfDay())->count() }}
@else

No Duties Assigned

You don't have any duty assignments for this week.

Contact your clinic administrator if you believe this is an error.

@endif
@endif @if($showUploadModal)

Upload Profile Picture

@error('profilePicture') {{ $message }} @enderror
@if($profilePicture)
Preview
@endif

• Maximum file size: 2MB

• Supported formats: JPG, PNG, GIF

• Recommended size: 400x400 pixels

@endif