Team Leader Dashboard
{{ $teamLeader->code }} @if ($teamLeader->region) • Region: {{ $teamLeader->region }} @endif
{{ $stats['total_agents'] }}
Total Agents
{{ $stats['active_agents'] }}
Active Agents
{{ $stats['total_shops'] }}
Total Shops
{{ $stats['active_shops'] }}
Active Shops
{{ $stats['visits_today'] }}
Visits Today
{{ $stats['orders_today'] }}
Orders Today
Your Team Agents
Manage All →
@if ($agents->isNotEmpty())
@foreach ($agents as $agent)
{{ $agent->code }}
Area: {{ $agent->area ?? 'Not Assigned' }}
{{ $agent->is_active ? 'Active' : 'Inactive' }}
{{ $agent->shops_count }}
Total Shops
{{ $agent->active_shops_count ?? 0 }}
Active
{{ $agent->visits_today ?? 0 }}
Visits Today
@endforeach
@else
👥
No agents assigned to your team yet
@endif
@if ($topAgents->isNotEmpty())
Top Performers
@foreach ($topAgents->take(3) as $index => $agent)
{{ $index + 1 }}
{{ $agent->code }}
{{ $agent->area ?? 'No area' }}
{{ $agent->shops_count }} 🏪
@endforeach
@endif
Recent Shops
View All →
@if ($recentShops->isNotEmpty())
@foreach ($recentShops as $shop)
{{ $shop->name }}
{{ $shop->agent ? $shop->agent->code : 'No Agent' }} @if ($shop->district) • {{ $shop->district }} @endif
@endforeach
@else
🏪
No shops yet
@endif
@if ($shopsByDistrict->isNotEmpty())
Shops Distribution by District
@php $maxCount = $shopsByDistrict->max('count'); @endphp @foreach ($shopsByDistrict as $district)
{{ $district->district }}
{{ $district->count }} shops
{{ $district->count }}
@endforeach
@endif