Staff
@if ($staff)
img
@if ($staff->staff && $staff->staff->profile_image) Staff Photo @else
@php $words = explode(' ', $staff->name); $initials = count($words) >= 2 ? strtoupper(substr($words[0], 0, 1) . substr(end($words), 0, 1)) : strtoupper(substr($staff->name, 0, 2)); @endphp {{ $initials }}
@endif

#{{ $staff->id }}

{{ $staff->name }}

@if ($staff->roles->count() > 0) {{ ucfirst(str_replace('_', ' ', $staff->roles->first()->name)) }} @else Staff Member @endif

Phone : {{ $staff->phone_number ?: 'Not provided' }}

|

{{ ucfirst($staffRecord->status) }}

Total Clinic Assignments

{{ count($staffClinics) }} Active Assignments
{{--
--}}
Roles & Permissions
@if ($staff->roles->count() > 0) @foreach ($staff->roles as $role) {{ ucfirst(str_replace('_', ' ', $role->name)) }} @endforeach @else No roles assigned @endif
@if ($staff->roles->count() > 0)
This staff member has been assigned {{ $staff->roles->count() }} role(s) with corresponding permissions.
@endif
Clinic Assignments {{ count($staffClinics) }}
@if (count($staffClinics) > 0)
@foreach ($staffClinics as $assignment) @if ($assignment['permissions'] && is_array($assignment['permissions']) && count($assignment['permissions']) > 0) @endif @if ( $assignment['notes'] && ((is_array($assignment['notes']) && count($assignment['notes']) > 0) || (is_string($assignment['notes']) && !empty($assignment['notes'])))) @endif @endforeach
Clinic Details Doctor Status Approval Actions
{{ $assignment['clinic']['name'] ?? 'N/A' }}
@if ($assignment['clinic']['address']) {{ $assignment['clinic']['address'] }} @endif
Assigned: {{ \Carbon\Carbon::parse($assignment['created_at'])->format('M d, Y') }}
{{ $assignment['doctor']['name'] ?? 'N/A' }}
@if ($assignment['doctor']['email']) {{ $assignment['doctor']['email'] }} @endif
{{ ucfirst($assignment['status']) }} {{ ucfirst($assignment['approval_status']) }}
Permissions: @foreach ($assignment['permissions'] as $permission) {{ $permission }} @endforeach
Notes: @if (is_array($assignment['notes'])) {{ implode(', ', $assignment['notes']) }} @else {{ $assignment['notes'] }} @endif
@else
No Clinic Assignments

This staff member has not been assigned to any clinics yet.

@endif
Activity Timeline
  • Staff Account Created

    {{ $staff->created_at->format('M d, Y \a\t g:i A') }}

    Staff member {{ $staff->name }} was added to the system.

  • @if ($staff->updated_at != $staff->created_at)
  • Profile Updated

    {{ $staff->updated_at->format('M d, Y \a\t g:i A') }}

    Staff profile information was last updated.

  • @endif @if (count($staffClinics) > 0) @foreach ($staffClinics as $assignment)
  • Clinic Assignment

    {{ \Carbon\Carbon::parse($assignment['created_at'])->format('M d, Y \a\t g:i A') }}

    Assigned to {{ $assignment['clinic']['name'] ?? 'Unknown Clinic' }} under Dr. {{ $assignment['doctor']['name'] ?? 'Unknown Doctor' }}

  • @endforeach @endif
About
Staff ID

#{{ $staff->id }}

Phone Number

{{ $staff->phone_number ?: 'Not provided' }}

Email Address

{{ $staff->email }}

Date Joined

{{ $staff->created_at->format('M d, Y') }}

Last Updated

{{ $staff->updated_at->format('M d, Y') }}

Account Status

{{ $staffRecord->status }}

Total Clinic Assignments

{{ count($staffClinics) }} Assignment{{ count($staffClinics) != 1 ? 's' : '' }}

@if ($staff->roles->count() > 0)
Assigned Roles
@foreach ($staff->roles as $role) {{ ucfirst(str_replace('_', ' ', $role->name)) }} @endforeach
@endif
Quick Actions
{{-- --}}
@if (count($staffClinics) > 0)
Assignment Statistics

{{ collect($staffClinics)->where('status', 'active')->count() }}

Active

{{ collect($staffClinics)->where('approval_status', 'pending')->count() }}

Pending

{{ collect($staffClinics)->where('approval_status', 'approved')->count() }}

Approved

{{ collect($staffClinics)->where('status', 'inactive')->count() }}

Inactive
@endif
@else

Staff Not Found

The staff member you're looking for could not be found.

@endif
@push('scripts') @endpush