@extends('adminlte::page') @section('title', 'Dashboard') @section('content_header')

Dashboard

@endsection @section('content')

{{ number_format($activeCases) }}

Active Cases

{{ number_format($clientsCount) }}

Clients

{{ number_format($tasksDueCount) }}

Tasks Due

{{ number_format($overdueInvoices) }}

Overdue Invoices

{{ number_format($upcomingCourtCount) }}

Upcoming Court Dates (30d)

{{ number_format($unreadCommunications) }}

Unread Communications

{{ number_format($overdueTasksCount) }}

Overdue Tasks

{{ number_format($hoursThisWeek, 1) }}

Hours Logged (This Week)

{{ number_format($newClientsRange) }}

New Clients (range)

{{ number_format($newCasesRange) }}

New Cases (range)

{{ number_format($docsRange) }}

Documents Added (range)

{{ number_format($commsRange) }}

Communications (range)

Invoice by Status

@php $isL = $invoiceStatusChart['labels'] ?? []; $isD = $invoiceStatusChart['data'] ?? []; @endphp @if(!empty($isL))
    @foreach($isL as $i=>$lbl)
  • {{ $lbl }} — Rp {{ number_format((float)($isD[$i] ?? 0), 0, ',', '.') }}
  • @endforeach
@else
No data
@endif

A/R Aging

@php $arL = $arAgingChart['labels'] ?? []; $arD = $arAgingChart['data'] ?? []; @endphp @if(!empty($arL))
    @foreach($arL as $i=>$lbl)
  • {{ $lbl }} — Rp {{ number_format((float)($arD[$i] ?? 0), 0, ',', '.') }}
  • @endforeach
@else
No data
@endif

Invoicing Trend (6 months)

@php $itL = $invoiceTrendChart['labels'] ?? []; $itD = $invoiceTrendChart['data'] ?? []; @endphp @if(!empty($itL))
@foreach($itL as $i=>$lbl)
{{ $lbl }} — Rp {{ number_format((float)($itD[$i] ?? 0), 0, ',', '.') }}
@endforeach
@else
No data
@endif

Recent Invoices

@forelse($recentInvoices as $invoice) @empty @endforelse
# Client Case Total Status
{{ $invoice->invoice_number }} {{ Str::limit($invoice->client?->name ?? 'N/A', 40) }} {{ Str::limit($invoice->case?->title, 60) }} Rp {{ number_format((float)($invoice->total_amount ?? 0), 0, ',', '.') }} {{ ucfirst($invoice->status) }}
No recent invoices

Case Status

@php $csL = $caseStatusChart['labels'] ?? []; $csD = $caseStatusChart['data'] ?? []; @endphp @if(!empty($csL))
    @foreach($csL as $i=>$lbl)
  • {{ $lbl }} — {{ number_format((int)($csD[$i] ?? 0)) }}
  • @endforeach
@else
No data
@endif

Team Hours (This Week)

@php $thL = $teamHoursChart['labels'] ?? []; $thD = $teamHoursChart['data'] ?? []; @endphp @if(!empty($thL))
    @foreach($thL as $i=>$lbl)
  • {{ $lbl }} — {{ number_format((float)($thD[$i] ?? 0), 1) }} h
  • @endforeach
@else
No data
@endif

Communications (30d)

@php $ctL = $commTypeChart['labels'] ?? []; $ctD = $commTypeChart['data'] ?? []; @endphp @if(!empty($ctL))
    @foreach($ctL as $i=>$lbl)
  • {{ $lbl }} {{ number_format((int)($ctD[$i] ?? 0)) }}
  • @endforeach
@else
No data
@endif

Recent Cases

@forelse($recentCases as $case) @empty @endforelse
Case # Title Client Status
{{ $case->case_number }} {{ Str::limit($case->title, 60) }} {{ $case->client ? $case->client->name : 'N/A' }} {{ $case->status }}
No recent cases found

Upcoming Court Dates

@forelse($nextCourtDates as $cd) @empty @endforelse
Date Court Case Status
{{ optional($cd->scheduled_date)->format('M d, H:i') }} {{ Str::limit($cd->court_name, 40) }} {{ Str::limit($cd->case?->title, 60) }} {{ ucfirst($cd->status ?? 'scheduled') }}
No upcoming court dates

Recent Tasks

@forelse($recentTasks as $t) @empty @endforelse
Title Case Assignee Due
{{ Str::limit($t->title, 50) }} {{ Str::limit($t->case?->title, 40) }} {{ $t->assignee?->name ?? 'Unassigned' }} @php $dueBadge = 'badge-due-future'; if ($t->due_date && $t->due_date->isPast()) $dueBadge = 'badge-due-overdue'; elseif ($t->due_date && $t->due_date->isBefore(now()->addDays(3))) $dueBadge = 'badge-due-soon'; @endphp {{ optional($t->due_date)->format('M d') ?? '-' }}
No recent tasks

Recent Documents

@forelse($recentDocuments as $doc) @empty @endforelse
Filename Case Uploaded By Date
{{ Str::limit($doc->original_filename ?? $doc->filename, 60) }} {{ Str::limit($doc->case?->title, 50) }} {{ $doc->uploader?->name ?? '-' }} {{ optional($doc->created_at)->format('M d') }}
No recent documents

Recent Communications

@forelse($recentCommunications as $c) @empty @endforelse
Subject Case Type Date
{{ Str::limit($c->subject ?? Str::limit(strip_tags($c->content), 50), 60) }} {{ Str::limit($c->case?->title, 50) }} @php $commClass = match($c->communication_type) { 'email' => 'badge-comm-email', 'call' => 'badge-comm-call', 'meeting' => 'badge-comm-meeting', 'message' => 'badge-comm-message', default => 'badge-comm-other' }; @endphp {{ ucfirst($c->communication_type) }} {{ optional($c->communication_date)->format('M d, H:i') }}
No recent communications
@endsection @push('css') @endpush @push('js') @endpush