@php $fmt = fn ($n) => number_format((int) $n); $money = fn ($n) => '₹'.number_format((int) $n); $completion = $kpis['total'] ? round($kpis['completed'] / $kpis['total'] * 100) : 0; $loanMeta = [ 'LOGIN' => ['Login', 'heroicon-o-arrow-right-end-on-rectangle', 'blue', 'Valuation amount'], 'DISB' => ['Disbursed', 'heroicon-o-banknotes', 'green', 'Disbursed loan amount'], 'APPROVED' => ['Approved', 'heroicon-o-check-badge', 'violet', 'Loan amount'], 'REJECT' => ['Rejected', 'heroicon-o-x-circle', 'red', 'Loan amount'], ]; $monthParam = $month === 'all' ? 'all' : $month; @endphp Due today Open activities {{-- Activity KPIs --}}
{{-- Charts row --}}
@if ($kpis['total'])
{{ $completion }}%
completed
    @foreach ([['Not Started', $kpis['not_started'], 'bg-[#2a78d6] dark:bg-[#3987e5]'], ['In Progress', $kpis['in_progress'], 'bg-[#eb6834] dark:bg-[#d95926]'], ['Completed', $kpis['completed'], 'bg-[#1baf7a] dark:bg-[#199e70]']] as [$label, $value, $dot])
  • {{ $label }} {{ $fmt($value) }}
  • @endforeach @if ($kpis['other'])
  • Other statuses{{ $fmt($kpis['other']) }}
  • @endif
@else @endif
@if ($seesAll)
@if ($byUser)
@foreach ($byUser as $u) @endforeach
TelecallerNot startedIn progressCompletedTotal
{{ $u['name'] }} {{ $fmt($u['not_started']) }} {{ $fmt($u['in_progress']) }} {{ $fmt($u['completed']) }} {{ $fmt($u['total']) }}
@else @endif
@if ($callsByUser)
    @php($maxCalls = max(array_column($callsByUser, 'calls')) ?: 1) @foreach ($callsByUser as $row)
  • {{ $row['name'] }} {{ $fmt($row['calls']) }}
  • @endforeach
@else @endif
Total{{ $fmt($kpis['calls_today']) }}
@endif {{-- Loan pipeline --}}

Loan amount

Login, disbursement, approval and rejection amounts by login month.

@foreach ($loanMeta as $status => [$label, $icon, $tone, $hint]) @endforeach
@if ($loans['users'])
@foreach ($loanMeta as $status => [$label])@endforeach @foreach ($loans['users'] as $u) @foreach (array_keys($loanMeta) as $status) @endforeach @endforeach
Sales manager{{ $label }}
{{ $u['name'] }} @if ($u[$status]['count']) {{ $money($u[$status]['amount']) }} {{ $fmt($u[$status]['count']) }} {{ str('case')->plural($u[$status]['count']) }} @else — @endif
@else @endif
{{-- SMS status --}}

SMS status

{{ $seesAll ? 'Messages queued through the mobile SMS gateway, per user.' : 'Messages you queued through the mobile SMS gateway.' }}

@if ($sms['users'])
@foreach ($sms['users'] as $u) @php($t = max(1, $u['total'])) @endforeach
UserNewSentFailedDelivery
{{ $u['name'] }} #{{ $u['user_id'] }} {{ $fmt($u['new']) }} {{ $fmt($u['sent']) }} {{ $fmt($u['failed']) }}
@if ($u['sent'])
@endif @if ($u['new'])
@endif @if ($u['failed'])
@endif
Sent New Failed
@else @endif
@push('scripts') @endpush