@extends('layouts.tenant') @section('title', 'Clients') @section('content')

Clients

Manage your client relationships and information

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif

Total Clients

{{ number_format($stats['total_clients']) }}

Active Clients

{{ number_format($stats['active_clients']) }}

Inactive Clients

{{ number_format($stats['inactive_clients']) }}

This Month

{{ number_format($stats['clients_this_month']) }}

@if($clients->count() > 0)
@foreach($clients as $client) @endforeach
Name @if(request('sort_by') === 'name') @if(request('sort_order') === 'asc') @else @endif @endif Email @if(request('sort_by') === 'email') @if(request('sort_order') === 'asc') @else @endif @endif Phone Company @if(request('sort_by') === 'company') @if(request('sort_order') === 'asc') @else @endif @endif Status Created @if(request('sort_by') === 'created_at') @if(request('sort_order') === 'asc') @else @endif @endif Actions
{{ strtoupper(substr($client->name, 0, 1)) }}
{{ $client->name }}
@if($client->company)
{{ $client->company }}
@endif
{{ $client->email }}
{{ $client->phone ?: 'N/A' }} {{ $client->company ?: 'N/A' }} @php $statusClasses = [ 'active' => 'bg-green-100 text-green-800', 'inactive' => 'bg-yellow-100 text-yellow-800', 'archived' => 'bg-gray-100 text-gray-800', ]; @endphp {{ ucfirst($client->status) }} {{ $client->created_at->format('M d, Y') }}
@if($client->status === 'active')
@csrf @method('PATCH')
@elseif($client->status === 'archived')
@csrf @method('PATCH')
@endif
@csrf @method('DELETE')
{{ $clients->links() }}
@else

No clients found

@if(request()->hasAny(['search', 'status', 'sort_by'])) No clients match your current filters. @else Get started by adding your first client. @endif

@if(request()->hasAny(['search', 'status', 'sort_by'])) Clear Filters @else Add First Client @endif
@endif
@endsection