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

My Dashboard

Welcome back, {{ $broker->name }}

  1. Dashboard
{{-- ── No linked account notice ── --}} @if(!empty($no_frontend_account))
No bookings linked yet.
Register on the frontend using the same email ({{ $broker->email }}) and select the Broker role. Bookings you make will then appear here automatically.
@endif {{-- ── Broker Info Bar ── --}}
{{-- Avatar --}}
{{ strtoupper(substr($broker->name,0,1)) }}
Name
{{ $broker->name }}
@if($broker->broker_company ?? null)
Company
{{ $broker->broker_company }}
@endif
Commission Rate
{{ $broker->commission_rate ?? '2.00' }}%
Phone
{{ $broker->phone ?? '—' }}
Email
{{ $broker->email }}
{{-- ── KPI Cards ── --}}
@foreach([ ['Total Bookings', $stats['total_bookings'], '#6c757d', 'fa-bookmark', $stats['confirmed'].' confirmed · '.$stats['pending'].' pending'], ['Commission Pending', $currency.$stats['commission_pending'], '#f59e0b', 'fa-clock', 'Awaiting admin approval'], ['Commission Approved', $currency.$stats['commission_approved'], '#3b82f6', 'fa-check-circle', 'Approved, awaiting payment'], ['Commission Paid', $currency.$stats['commission_paid'], '#22c55e', 'fa-coins', 'Total received to date'], ] as [$label, $val, $color, $icon, $sub])
{{ $label }}
{{ $val }}
{{ $sub }}
@endforeach
{{-- ── Charts Row ── --}}
{{-- Monthly Bookings Chart ── --}}
Monthly Bookings & Commission
Last 6 months
{{-- Commission Donut ── --}}
Commission Status
@php $total = $stats['commission_pending'] + $stats['commission_approved'] + $stats['commission_paid']; @endphp @foreach([ ['Paid', $stats['commission_paid'], '#22c55e'], ['Approved', $stats['commission_approved'], '#3b82f6'], ['Pending', $stats['commission_pending'], '#f59e0b'], ] as [$lbl, $amt, $clr])
{{ $lbl }}
{{ $currency }}{{ $amt }}
@endforeach @if($total > 0)
Total: {{ $currency }}{{ $total }}
@endif
{{-- ── Recent Bookings (last 5) ── --}}
Recent Bookings
View All
@forelse($bookings->take(5) as $b) @php $csColors = ['pending'=>'#f59e0b','approved'=>'#3b82f6','paid'=>'#22c55e','rejected'=>'#ef4444']; $bsColors = ['confirmed'=>'#22c55e','pending'=>'#f59e0b','cancelled'=>'#ef4444']; $cc = $csColors[$b->commission_status ?? ''] ?? '#94a3b8'; $bc = $bsColors[$b->booking_status ?? ''] ?? '#94a3b8'; $blockLabel = is_object($b->block) ? ($b->block->block_name ?? '') : ($b->block ?? ''); @endphp @empty @endforelse
# Unit Client Deal Value Commission Comm. Status Booking Status Date
{{ $b->id }}
Unit {{ $b->plot_number ?? '—' }}
{{ $b->plot_type ?? '' }}{{ $blockLabel ? ' · '.$blockLabel : '' }}
{{ $b->client_name ?: ($b->name ?? '—') }}
{{ $b->client_phone ?: ($b->phone ?? '') }}
{{ $currency }} {{ $b->total_amount ?? $b->price ?? 0 }} @if($b->commission_amount)
{{ $currency }} {{ $b->commission_amount }}
@if($b->commission_rate)
{{ $b->commission_rate }}%
@endif @else @endif
{{ ucfirst($b->commission_status ?? 'N/A') }} {{ ucfirst($b->booking_status ?? '—') }} {{ \Carbon\Carbon::parse($b->created_at)->format('d M Y') }}
No bookings yet.
@include('Partials.footer')