@extends('layouts.portal') @section('title', 'All Clients') @section('page_title', 'All Clients') @section('page_subtitle', 'Manage client records') @section('sidebar') @endsection @section('content')

All Clients

Manage client records and approvals

Create New Client

Admin Created Client

{{ $adminCreatedCount }}

Agent Referred

{{ $agentReferredCount }}

Lawyer Created

{{ $lawyerCreatedCount }}

Total Clients

{{ $totalClientCount }}

Clear
@if(request()->hasAny(['search', 'source', 'status']))
Active filters: @if(request('search')) Search: {{ request('search') }} @endif @if(request('source')) Source: {{ ucfirst(request('source')) }} @endif @if(request('status')) Status: {{ ucfirst(request('status')) }} @endif
@endif
@if($allClients->count() > 0)

All Clients

Showing {{ $allClients->firstItem() ?? 0 }} - {{ $allClients->lastItem() ?? 0 }} of {{ $allClients->total() }} clients
@foreach($allClients as $client) @endforeach
Client Contact Referred By Status Assigned Staff Date Actions
{{ substr($client->first_name, 0, 1) }}

{{ $client->full_name }}

ID: #{{ $client->id }}

{{ $client->email }}

{{ $client->phone }}

@if($client->referred_by) @if($client->referredByUser)

{{ $client->referredByUser->name }}

Agent

@else

Unknown Agent

ID: {{ $client->referred_by }}

@endif @else

Self

Admin Created

@endif
{{ ucfirst($client->status) }}
@if($client->assignedStaff)
{{ substr($client->assignedStaff->name, 0, 1) }}

{{ $client->assignedStaff->name }}

Staff

@else

Yet to assign

No staff

@endif

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

@if($client->status == 'inactive' && $client->referred_by)
@csrf @method('DELETE')
@elseif($client->status == 'active') @endif
{{ $allClients->links() }}
@endif @if($totalClientCount == 0)

No clients yet

Start by creating your first client or wait for agent referrals

Create Your First Client
@endif
@endsection