@extends('layouts.portal') @section('title', 'All Clients - Staff Portal') @section('sidebar') @include('staff.partials.sidebar', ['active' => 'all-clients']) @endsection @section('content')

Client Management

View and manage all your assigned clients

Create New Client
@if(request('search')) Clear @endif

Total Clients

{{ $clients->total() }}

Active Wills

{{ $clients->sum(function($client) { return $client->wills->count(); }) }}

Pending Review

{{ $clients->where('status', 'pending')->count() }}

Completed

{{ $clients->where('status', 'active')->count() }}

Clients Directory

Showing {{ $clients->firstItem() ?? 0 }} - {{ $clients->lastItem() ?? 0 }} of {{ $clients->total() }} clients
@if($clients->count() > 0)
@foreach($clients as $client) @endforeach
Client Information Contact Details Wills Assets Family Status Actions
{{ substr($client->first_name, 0, 1) }}{{ substr($client->last_name, 0, 1) }}
{{ $client->full_name }}
IC: {{ $client->ic_number }}
{{ $client->email ?? 'N/A' }}
{{ $client->phone ?? 'N/A' }}
{{ $client->wills->count() }} Will(s) {{ $client->assets->count() }} Asset(s) {{ $client->familyMembers->count() }} Member(s) @if($client->status === 'active') Active @elseif($client->status === 'pending') Pending @else {{ ucfirst($client->status) }} @endif
@if($client->wills->count() === 0) @else @endif
@if($clients->hasPages())
{{ $clients->links() }}
@endif @else

No Clients Found

@if(request('search')) No clients match your search criteria. Try different keywords. @else You don't have any assigned clients yet. Get started by creating your first client. @endif

Create Your First Client
@endif
@endsection