@include('Partials.sidebar')
@include('Partials.header')
{{-- ── Page Title ── --}}

My Performance

Broker dashboard — {{ $admin->name }}

  1. Reports
  2. My Performance
{{-- ── No linked user warning ── --}} @if(!$frontendUserId)
Your broker account is not linked to a frontend user account. Bookings you close on the frontend will not appear here until your admin email matches a registered user email.
@endif {{-- ── Period Filter ── --}}
@foreach([ 'today' => 'Today', 'this_week' => 'This Week', 'this_month' => 'This Month', 'last_month' => 'Last Month', 'this_quarter' => 'This Quarter', 'this_year' => 'This Year', ] as $val => $label) {{ $label }} @endforeach {{ \Carbon\Carbon::parse($dateFrom)->format('d M') }} – {{ \Carbon\Carbon::parse($dateTo)->format('d M Y') }}
{{-- ── KPI Cards ── --}}
@foreach([ ['Total Bookings', $totalBookings, '#3b82f6', 'fa-handshake' ], ['Confirmed', $confirmedBookings, '#22c55e', 'fa-check-circle' ], ['Pending', $pendingBookings, '#f59e0b', 'fa-clock' ], ['Cancelled', $cancelledBookings, '#ef4444', 'fa-times-circle' ], ['Total Revenue', $currency.$totalRevenue, '#22c55e', 'fa-coins' ], ['Period Revenue', $currency.$periodRevenue, '#10b981', 'fa-chart-line' ], ['Commission Earned', $currency.$paidComm, 0, '#22c55e', 'fa-check-circle' ], ['Commission Pending', $currency.$pendingComm, 0, '#f59e0b', 'fa-clock' ], ['Comm. Approved', $currency.$approvedComm, 0, '#3b82f6', 'fa-thumbs-up' ], ['Comm. Rejected', $currency.$rejectedComm, 0, '#ef4444', 'fa-ban' ], ['Comm. (Cancelled)', $currency.$cancelledComm, 0, '#94a3b8', 'fa-times' ], ['Avg Deal Size', $currency.$avgDealSize, 0, '#8b5cf6', 'fa-chart-bar' ], ] as [$label, $val, $color, $icon])
{{ $val }}
{{ $label }}
@endforeach
{{-- ── Commission Breakdown ── --}}
Commission Breakdown
@foreach([ ['Paid', $paidComm, '#22c55e'], ['Approved', $approvedComm, '#3b82f6'], ['Pending Approval', $pendingComm, '#f59e0b'], ['Rejected', $rejectedComm, '#ef4444'], ['Lost (Cancelled)', $cancelledComm, '#94a3b8'], ] as [$label, $amt, $color])
{{ $label }}
{{ $currency }}{{ $amt }}
@endforeach
{{-- ── Monthly Trend ── --}}
6-Month Trend
{{-- ── Recent Bookings ── --}}
Recent Bookings
@forelse($recentBookings as $b) @php // Booking status styling $bsColors = [ 'confirmed' => ['#22c55e', 'fa-check-circle'], 'pending' => ['#f59e0b', 'fa-clock'], 'cancelled' => ['#ef4444', 'fa-times-circle'], ]; [$bsColor, $bsIcon] = $bsColors[$b->booking_status] ?? ['#94a3b8', 'fa-circle']; // Commission status styling — 4 states $cs = $b->commission_status ?? 'pending'; $csColors = [ 'paid' => '#22c55e', 'approved' => '#3b82f6', 'pending' => '#f59e0b', 'rejected' => '#ef4444', ]; $csColor = $csColors[$cs] ?? '#94a3b8'; $isCancelled = $b->booking_status === 'cancelled'; $isRejected = $cs === 'rejected'; @endphp @empty @endforelse
Client Unit Booking Status Total Amount Commission Comm. Status Date
{{ $b->client_name ?? $b->name ?? '—' }}
{{ $b->client_phone ?? $b->phone ?? '' }}
Unit {{ $b->plot_number ?? '—' }} {{ ucfirst($b->booking_status) }} {{ $currency }}{{ $b->total_amount ?? 0 }} @if($isCancelled)
Cancelled
@endif
@if($b->commission_amount) {{ $currency }}{{ $b->commission_amount }} @if($b->commission_rate) ({{ $b->commission_rate }}%) @endif @if($isCancelled)
Lost
@elseif($isRejected)
Rejected
@endif @else @endif
{{ ucfirst($cs) }} @if($isCancelled)
Booking cancelled
@endif
{{ \Carbon\Carbon::parse($b->created_at)->format('d M Y') }}
No bookings yet.
@include('Partials.footer')