@extends('layouts.portal') @section('title', 'Agent Dashboard') @section('page_title', 'Agent Portal') @section('page_subtitle', 'Your Referral & Earnings Hub') @section('sidebar') @include('agent.partials.sidebar', ['active' => 'dashboard']) @endsection @section('content')
Your earnings are growing. Keep referring!
Total Earnings
RM{{ number_format($stats['commission_earned'] ?? 0, 2) }}
Lifetime Commission
{{ $uplineMember['agent']->name }}
{{ $uplineMember['agent']->email }}
Level {{ $uplineMember['level'] }} Upline
{{ $pendingAgent->name }}
{{ $pendingAgent->email }}
Waiting for your approval
{{ $approvedAgent->name }}
{{ $approvedAgent->email }}
Level {{ $approvedAgent->getMlmLevel() }} • {{ $approvedAgent->clients()->count() }} clients
Active
{{ $member['agent']->name }}
{{ $member['agent']->email }}
Level {{ $member['level'] }} Agent • {{ $member['clients_count'] }} clients
RM{{ number_format($member['commission_earned'], 2) }}
{{ $member['wills_count'] }} wills
Total Earnings
RM{{ number_format($stats['commission_earned'] ?? 0, 2) }}
Active Referrals
{{ $stats['total_referrals'] ?? 0 }}
This Month
{{ $stats['this_month'] ?? 0 }}
Pending Payout
$0.00
Share to earn
{{ url('/agent/register?ref=' . auth()->user()->referral_code) }}
New referral
View genealogy
View analytics
Track clients
View earnings
| Client Name | Phone | Status | Date | Action | |
|---|---|---|---|---|---|
|
{{ substr($client->first_name, 0, 1) }}
{{ $client->first_name }} {{ $client->last_name }} |
{{ $client->email }} | {{ $client->phone }} | @if($client->status == 'active') Active @elseif($client->status == 'pending') Pending @elseif($client->status == 'pending_approval') Pending Approval @else {{ ucfirst(str_replace('_', ' ', $client->status ?? 'Unknown')) }} @endif | {{ $client->created_at->format('M d, Y') }} | View Details |