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

Welcome back, {{ Auth::user()->name }}

Here's what's happening with your microfinance system today.

{{ ucfirst(Auth::user()->role) }} Access
{{-- Quick Stats Cards --}} @if(in_array(Auth::user()->role, ['admin', 'loan_officer']))
Active Loans
{{ $stats['activeLoansCount'] ?? 0 }}
+{{ $stats['monthlyLoansCount'] ?? 0 }} this month
Pending Approvals
{{ $stats['pendingApprovalsCount'] ?? 0 }}
{{ $stats['pendingMicroLoansCount'] ?? 0 }} micro loans
Overdue Payments
{{ $stats['overduePaymentsCount'] ?? 0 }}
LKR {{ number_format($stats['overdueAmount'] ?? 0, 2) }} total
Total Members
{{ $stats['totalMembersCount'] ?? 0 }}
{{ $stats['activeMembersCount'] ?? 0 }} active
@endif {{-- Charts Section --}} @if(in_array(Auth::user()->role, ['admin', 'loan_officer']))

Loan Type Distribution

Branch Performance

@if(Auth::user()->role === 'admin')

Credit Officer Performance

@endif

Monthly Loan Trends

Payment Collection Trends

@if(Auth::user()->role === 'admin')

Credit Officer Performance

@endif

Monthly Loan Trends

Payment Collection Trends

@endif {{-- Admin Panel --}} @if(Auth::user()->role === 'admin')

Community Based Organizations (CBO)

Reports & Analytics

@endif {{-- Loan Officer Panel --}} @if(Auth::user()->role === 'loan_officer')
@endif {{-- Default User Panel --}} @if(Auth::user()->role === 'user')

Member Dashboard

@endif
@push('scripts') @endpush @endsection