@extends('layouts.app') @section('title', 'Manager Dashboard') @section('content')

Manager Dashboard

Welcome back, {{ $manager->name }}!

{{ now()->format('F d, Y') }}
Team Size

{{ $stats['team_size'] }}

{{ $stats['active_collectors'] }} collectors
Total Clients

{{ $stats['total_clients'] }}

{{ $stats['active_clients'] }} active
Pending Bills

{{ $stats['pending_bills'] }}

Need attention
Monthly Revenue

৳{{ number_format($stats['monthly_revenue'], 2) }}

This month
Monthly Collection

৳{{ number_format($financialSummary['monthly_collection'], 2) }}

Total collected this month
Monthly Deposits

৳{{ number_format($financialSummary['monthly_deposits'], 2) }}

Approved deposits this month
Monthly Expenses

৳{{ number_format($financialSummary['monthly_expenses'], 2) }}

Approved expenses this month
All Branch Collectors Performance
Collection performance by collector across all branches
@if(count($teamPerformance) > 0)
@foreach($teamPerformance as $perf) @endforeach
Collector Branch Bills Collection Rate Collected Amount Pending Amount
{{ $perf['collector_name'] }}
ID: {{ $perf['employee_id'] ?? 'N/A' }}
{{ $perf['branch_name'] }}
{{ $perf['paid_bills'] }} / {{ $perf['total_bills'] }}
{{ $perf['collection_rate'] }}%
৳{{ number_format($perf['collected_amount'], 2) }} ৳{{ number_format($perf['pending_amount'], 2) }}
@else

No team performance data available

@endif
Pending Approvals
Requires your attention
Deposits ({{ $pendingApprovals['deposits']->count() }})
@if($pendingApprovals['deposits']->count() > 0) @foreach($pendingApprovals['deposits']->take(3) as $deposit)
{{ $deposit->collector->name ?? 'Unknown' }}
৳{{ number_format($deposit->amount, 2) }}
@endforeach @if($pendingApprovals['deposits']->count() > 3) And {{ $pendingApprovals['deposits']->count() - 3 }} more... @endif @else

No pending deposits

@endif
Expenses ({{ $pendingApprovals['expenses']->count() }})
@if($pendingApprovals['expenses']->count() > 0) @foreach($pendingApprovals['expenses']->take(3) as $expense)
{{ $expense->collector->name ?? 'Unknown' }}
৳{{ number_format($expense->amount, 2) }}
@endforeach @if($pendingApprovals['expenses']->count() > 3) And {{ $pendingApprovals['expenses']->count() - 3 }} more... @endif @else

No pending expenses

@endif
Recent Activities
Latest team activities
@if(count($recentActivities) > 0)
@foreach($recentActivities as $activity)
{{ $activity['title'] }}

{{ $activity['description'] }}

{{ \Carbon\Carbon::parse($activity['date'])->diffForHumans() }}
@endforeach
@else

No recent activities

@endif
@endsection