@php use App\Support\Hr\HrPerformanceLendingRoutes; use App\Support\Navigation\WorkspaceEmbed; $summary = $officerWorkspace['summary'] ?? []; $registerService = app(\App\Services\LoanBook\ClientIntelligenceRegisterService::class); $registerHomeRoute = $registerHomeRoute ?? HrPerformanceLendingRoutes::registerRoute(); $activeState = $officerWorkspace['state'] ?? null; $employeeId = (int) ($officerWorkspace['employee_id'] ?? 0); $baseParams = collect(request()->except('page', 'state')) ->merge($registerService->filterQueryParams([ 'type' => 'officer', 'employee_id' => $employeeId > 0 ? $employeeId : null, ])) ->all(); $officers = ($clientIntelligence ?? [])['officer_highlights'] ?? []; $fmtOfficer = function (?array $row): string { if (! $row) { return '—'; } return ($row['officer_name'] ?? '—').' · '.number_format((float) ($row['metric_value'] ?? 0), ($row['metric_label'] ?? '') === 'PAR30 %' ? 1 : 0).' '.strtolower((string) ($row['metric_label'] ?? '')); }; @endphp
Total Clients
{{ number_format((int) ($summary['total_clients'] ?? 0)) }}
Active Loans
{{ number_format((int) ($summary['active_loans'] ?? 0)) }}
Active Clients
{{ number_format((int) ($summary['active_clients'] ?? 0)) }}
Dormant
{{ number_format((int) ($summary['dormant_clients'] ?? 0)) }}
Arrears
{{ number_format((int) ($summary['arrears_clients'] ?? 0)) }}
Watch List
{{ number_format((int) ($summary['watchlist_clients'] ?? 0)) }}
VIP
{{ number_format((int) ($summary['vip_clients'] ?? 0)) }}
Portfolio Balance
{{ number_format((float) ($summary['active_portfolio_balance'] ?? 0), 0) }}
Total Arrears
{{ number_format((float) ($summary['total_arrears'] ?? 0), 0) }}
PAR30
{{ number_format((float) ($summary['par30'] ?? 0), 1) }}%
Avg RES
@if (isset($summary['average_res'])) {{ number_format((float) $summary['average_res'], 1) }}% @else — @endif
High-Value Dormant
{{ number_format((int) ($summary['high_value_dormant'] ?? 0)) }}
Needs Follow-up
{{ number_format((int) ($summary['needs_followup'] ?? 0)) }}
Clients from the client register · PAR30, loans and portfolio from LoanBookPortfolioMetricsService (active book).
Officer comparison (portfolio-wide)