@extends('layouts.dashboard') @section('title', 'Client Details') @section('content')
Back to Clients
{{ strtoupper(substr($client->name, 0, 1)) }}
{{ $client->name }}

{{ $client->email }}

@php $badgeClass = match($client->subscription_type) { 'trial' => 'bg-warning', 'basic' => 'bg-info', 'premium' => 'bg-danger', 'enterprise' => 'bg-purple', default => 'bg-secondary' }; @endphp {{ ucfirst($client->subscription_type) }}
@if(!$client->is_active) Inactive @elseif($client->isSubscriptionExpired()) Expired @elseif($client->isOnTrial()) Trial @else Active @endif
Phone
{{ $client->phone ?? '-' }}
Slug
{{ $client->slug }}
Address
{{ $client->address ?? '-' }}
Created
{{ $client->created_at->format('M d, Y') }}
Expires
{{ ($client->isOnTrial() ? $client->trial_ends_at : $client->subscription_ends_at)?->format('M d, Y') ?? 'N/A' }}
Subscription
Days Remaining {{ $client->getDaysRemaining() }} days
@php $daysPercent = min(100, max(0, ($client->getDaysRemaining() / 30) * 100)); @endphp
@csrf
Service Controls (Organization Level)

Toggling these will affect all users in this organization.

{{-- SMS Service --}}
SMS Service
Auto-reply SMS for all users
@csrf
{{-- WhatsApp Service --}}
WhatsApp Service
WhatsApp auto-reply for all users
@csrf
{{-- Promotions Service --}}
Promotions
Promotional messages for all users
@csrf

{{ $stats['total_users'] }}

Total Users

{{ $stats['pending_users'] }}

Pending

{{ $stats['approved_users'] }}

Approved

{{ $stats['total_admins'] }}

Admins
Usage Limits
Users {{ $stats['total_users'] }} / {{ $client->max_users }}
@php $userPercent = $client->max_users > 0 ? ($stats['total_users'] / $client->max_users * 100) : 0 @endphp
Client Admins {{ $stats['total_admins'] }} / {{ $client->max_client_admins }}
@php $adminPercent = $client->max_client_admins > 0 ? ($stats['total_admins'] / $client->max_client_admins * 100) : 0 @endphp
Client Admins
@forelse($client->clientAdmins as $admin) @empty @endforelse
Name Role Status Last Login Actions
{{ $admin->name }}
{{ $admin->email }}
{{ ucfirst($admin->role) }} @if($admin->is_active) Active @else Inactive @endif {{ $admin->last_login_at?->diffForHumans() ?? 'Never' }} Permissions
No client admins
Assigned Templates
Assign More
@forelse($client->templates as $template) @empty @endforelse
Template Type Status
{{ $template->name }}
@if($template->isDerived()) From: {{ $template->createdFrom?->name ?? 'Global' }} @endif
{{ ucfirst($template->type) }} @if($template->is_active) Active @else Inactive @endif
No templates assigned
@endsection @push('styles') @endpush