@extends('layouts.app') @section('title', $user->name) @section('content') {{-- This screen's own way back. It is reached from the user list and, with breadcrumbs gone product-wide, had nothing else. --}} {{ __('auth::messages.users.title') }} @can('update', $user) {{ __('common.edit') }} @endcan @can('delete', $user) @endcan @if ($user->isLocked()) @can('update', $user)
@csrf
@endcan
@endif
{{ __('auth::messages.fields.email') }}
{{ $user->email }}
{{ __('auth::messages.fields.phone') }}
{{ $user->phone ?: '—' }}
{{ __('auth::messages.fields.employee_no') }}
{{ $user->employee_no ?: '—' }}
{{ __('auth::messages.fields.branch') }}
{{ $user->branch?->name ?? '—' }}
{{ __('auth::messages.fields.roles') }}
@forelse ($user->roles as $role) {{ __('roles.'.$role->name) }} @empty {{ __('auth::messages.users.no_roles') }} @endforelse
{{-- Where this account's permissions come from. Stated because the role is no longer the answer for everybody: on an account with its own list the role beside it is a description of the job, not of the access, and reading it as access would be wrong. --}}
{{ __('auth::messages.permissions.effective') }}
@if ($user->hasOwnPermissionSet()) {{ __('auth::messages.permissions.own_list') }} @else {{ __('auth::messages.permissions.governed_by_roles') }} @endif {{ $user->getAllPermissions()->count() }}
{{ __('auth::messages.users.last_sign_in') }}
{{ $user->last_login_at?->format('Y-m-d H:i') ?? __('auth::messages.users.never_signed_in') }} @if ($user->last_login_ip) · {{ $user->last_login_ip }} @endif
{{-- Whether this person can be booked, stated rather than implied. The `doctor` role does not put anybody in a clinician picker — this record does — and a clinic with doctors on staff and an empty picker had, until now, nowhere to find that out. --}} @if ($clinicianProfile === null)

{{ __('auth::messages.clinician.none') }}

@else
{{ __('auth::messages.clinician.specialty') }}
{{ $clinicianProfile->specialty ?: '—' }}
{{ __('auth::messages.clinician.license_number') }}
{{ $clinicianProfile->license_number ?: '—' }}
{{ __('auth::messages.clinician.slot_minutes') }}
{{ $clinicianProfile->slot_minutes ? __('auth::messages.clinician.minutes', ['count' => $clinicianProfile->slot_minutes]) : __('auth::messages.clinician.clinic_default') }}
{{ __('auth::messages.clinician.online') }}
{{ $clinicianProfile->online_booking ? __('common.yes') : __('common.no') }}
{{ __('auth::messages.clinician.bookable') }}
@if ($clinicianProfile->accepts_appointments && $user->status === 'active') {{ __('common.yes') }} @else {{ __('common.no') }} {{-- Two different reasons, and the fix differs. --}} {{ $clinicianProfile->accepts_appointments ? __('auth::messages.clinician.blocked_by_status') : __('auth::messages.clinician.blocked_by_profile') }} @endif
@endif @can('update', $user) {{ $clinicianProfile === null ? __('auth::messages.clinician.add') : __('auth::messages.clinician.edit') }} @endcan
@can('update', $user)
@csrf @method('PATCH')
@endcan @can('resetPassword', $user)
@csrf @method('PUT')
@endcan
@endsection