@extends('layouts.app') @section('content') @php $canEditUser = auth()->check() && auth()->user()->hasPermission('users', 'edit'); $canDeleteUser = auth()->check() && auth()->user()->hasPermission('users', 'delete'); $canViewSecurityTab = $canEditUser || $canDeleteUser; $profileImage = $user->getFirstMediaUrl('profile', 'thumb') ?: $user->getFirstMediaUrl('profile'); $coverImage = $user->getFirstMediaUrl('cover'); $galleryMedia = $user->getMedia('album'); @endphp
@if($profileImage) Profile Image @else
@endif

{{ $user->name }}

#{{ $user->id }} | {{ $user->email }}

{{ trim(($user->phone_country_code ?? '') . ' ' . ($user->phone_no ?? '')) }}

{{ ucfirst($user->status) }}
Account Type: {{ ucfirst(str_replace('_', ' ', $user->account_type)) }}
Created: {{ optional($user->created_at)->format('d M Y, h:i A') }}
Basic Info
Name: {{ $user->name }}
Email: {{ $user->email ?: '-' }}
Phone: {{ trim(($user->phone_country_code ?? '') . ' ' . ($user->phone_no ?? '')) ?: '-' }}
Status: {{ ucfirst($user->status) }}
Created At: {{ optional($user->created_at)->format('d M Y, h:i A') ?: '-' }}
Updated At: {{ optional($user->updated_at)->format('d M Y, h:i A') ?: '-' }}
@if($user->deleted_at)
Deleted At: {{ optional($user->deleted_at)->format('d M Y, h:i A') ?: '-' }}
@endif
Verification
email_verified_at ? 'checked' : '' }} onchange="toggleVerification('email')" {{ !$canEditUser ? 'disabled' : '' }}>
Email Verified: {{ $user->email_verified_at ? 'Yes (' . \Carbon\Carbon::parse($user->email_verified_at)->format('d M Y, h:i A') . ')' : 'No' }}
phone_no_verified_at ? 'checked' : '' }} onchange="toggleVerification('phone')" {{ !$canEditUser ? 'disabled' : '' }}>
Phone Verified: {{ $user->phone_no_verified_at ? 'Yes (' . \Carbon\Carbon::parse($user->phone_no_verified_at)->format('d M Y, h:i A') . ')' : 'No' }}
KYC Status: {{ ucfirst(str_replace('_', ' ', $user->kyc_status ?? 'not_submitted')) }}
Personal
Gender: {{ ucfirst(optional($user->profile)->gender ?? '-') }}
Date of Birth: {{ optional(optional($user->profile)->date_of_birth)->format('d M Y') ?: (optional($user->profile)->date_of_birth ?? '-') }}
Cover Photo: @if($coverImage)
Cover Photo
@else - @endif
Languages
@if($user->languages->count())
@foreach($user->languages as $language) {{ $language->name }} @endforeach
@else No languages added. @endif
Bio

{{ optional($user->profile)->bio ?: 'No bio available.' }}

Location
Country: {{ optional(optional($user->address)->country)->name ?: '-' }}
State: {{ optional(optional($user->address)->state)->name ?: '-' }}
City: {{ optional(optional($user->address)->city)->name ?: '-' }}
Address: {{ optional($user->address)->address ?: '-' }}
Pin Code: {{ optional($user->address)->pin_code ?: '-' }}
Coordinates
Latitude: {{ optional($user->address)->current_latitude ?: '-' }}
Longitude: {{ optional($user->address)->current_longitude ?: '-' }}
{{-- @if($canViewSecurityTab)
Action Access
Can Edit User: {{ $canEditUser ? 'Yes' : 'No' }}
Can Delete User: {{ $canDeleteUser ? 'Yes' : 'No' }}
Can View User: {{ auth()->user()->hasPermission('users', 'view') ? 'Yes' : 'No' }}
Audit
Created At: {{ optional($user->created_at)->format('d M Y, h:i A') ?: '-' }}
Updated At: {{ optional($user->updated_at)->format('d M Y, h:i A') ?: '-' }}
Deleted At: {{ optional($user->deleted_at)->format('d M Y, h:i A') ?: '-' }}
@endif --}}
@if($canEditUser) @endif @endsection