@extends('layouts.admin') @section('title', 'User Details') @section('content')

User Details

Edit User
{{-- check if the user is buiness owner and has no busines then create business--}} @if($user->account_type == 'business_owner' && !$user->business) @endif
@if($user->avatar) Avatar @else
{{ strtoupper(substr($user->first_name, 0, 1)) }}{{ strtoupper(substr($user->last_name, 0, 1)) }}
@endif

{{ $user->full_name }}

{{ ucfirst($user->role) }}

{{ ucfirst($user->status) }}
Email

{{ $user->email }}

Phone

{{ $user->phone }}

Joined

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

Last Login

{{ $user->last_login_at ? $user->last_login_at->diffForHumans() : 'Never' }}

User ID #{{ $user->id }}
Full Name {{ $user->full_name }}
Email {{ $user->email }} @if($user->email_verified_at) Verified @endif
Phone {{ $user->phone }} @if($user->phone_verified_at) Verified @endif
Account Type {{ ucfirst(str_replace('_', ' ', $user->account_type)) }}
Role {{ ucfirst($user->role) }}
Status {{ ucfirst($user->status) }}
Date of Birth {{ $user->date_of_birth ?? 'Not provided' }}
Registered {{ $user->created_at->format('M d, Y h:i A') }}
Last Updated {{ $user->updated_at->format('M d, Y h:i A') }}
Last Login {{ $user->last_login_at ? $user->last_login_at->format('M d, Y h:i A') : 'Never' }}
@if($user->business)
Business Information
Business Name {{ $user->business->business_name }}
License Number {{ $user->business->trade_license_number }}
Status {{ ucfirst($user->business->status) }}
Subscription {{ ucfirst($user->business->subscription_status) }}
Total Venues {{ $user->business->total_venues }}
Total Offers {{ $user->business->total_offers }}
View Business Details
@endif
@if($user->subscriptions && $user->subscriptions->count() > 0)
@foreach($user->subscriptions as $subscription) @endforeach
Plan Status Start Date End Date
{{ $subscription->plan->name ?? 'N/A' }} {{ ucfirst($subscription->status) }} {{ $subscription->start_date->format('M d, Y') }} {{ $subscription->end_date->format('M d, Y') }}
@else

No subscriptions

@endif
Account Created

{{ $user->created_at->format('M d, Y h:i A') }}

@if($user->email_verified_at)
Email Verified

{{ $user->email_verified_at->format('M d, Y h:i A') }}

@endif @if($user->last_login_at)
Last Login

{{ $user->last_login_at->format('M d, Y h:i A') }}

@endif
@endsection