@extends('layouts.portal') @section('title', $agent->name . ' - Performance Details') @section('page_title', $agent->name) @section('page_subtitle', 'Detailed Performance Analysis & Commission Tracking') @section('sidebar') @include('admin.partials.sidebar', ['active' => 'agent-performance']) @endsection @section('content')
{{ ucfirst($agent->role) }} Performance Details
Total Clients
{{ $stats['total_clients'] }}
Total Wills
{{ $stats['total_wills'] }}
Total Commission
RM {{ number_format($stats['total_commission'], 2) }}
This Month
RM {{ number_format($stats['commission_this_month'], 2) }}
{{ $stats['clients_this_month'] }} clients
| Client Name | Will ID | Level | Commission Amount | Status | Date |
|---|---|---|---|---|---|
| @if($commission->will && $commission->will->client) {{ $commission->will->client->first_name }} {{ $commission->will->client->last_name }} @else N/A @endif | {{ $commission->will_id ?? 'N/A' }} | Level {{ $commission->level }} | RM {{ number_format($commission->amount, 2) }} | @php $statusClass = match($commission->status ?? 'pending') { 'paid' => 'bg-green-100 text-green-800', 'pending' => 'bg-yellow-100 text-yellow-800', default => 'bg-gray-100 text-gray-800' }; @endphp {{ ucfirst($commission->status ?? 'pending') }} | {{ $commission->created_at->format('d M Y') }} |
| No commission records found | |||||