Case #{{ $case->case_number }}

Managed by {{ $case->lawyer->name }} | ID: {{ $case->id }}

{{ $case->case_stage ?? 'Pre-Trial' }} {{ ucfirst($case->status) }} Edit

Client

{{ $case->client->name }}

{{ $case->client->email }}

Court Session

@if ($case->court_date)

{{ $case->court_date->format('M d, Y') }} at {{ $case->court_date->format('H:i') }}

{{ $case->court_name ?? 'Court Not Assigned' }}

@else

Not Scheduled

@endif

Matter

{{ $case->title }}

{{ $case->description ?? 'No details provided.' }}

AI Co-Counsel

Automated legal strategy based on facts.

@csrf
@if ($case->ai_analysis)
{!! Str::markdown($case->ai_analysis) !!}
Generated by Google Gemini AI. Verify with counsel.
@else

Click generate to analyze case facts & witnesses.

@endif

Voice Evidence & Notes

@foreach ($case->recordings as $rec)

{{ $rec->title }}

{{ $rec->created_at->diffForHumans() }} • {{ $rec->user->name }}

@csrf @method('DELETE')
@endforeach @if ($case->recordings->count() === 0)

No voice notes recorded yet.

@endif

Evidence Locker

@csrf
@if ($case->evidence && $case->evidence->count() > 0)
@foreach ($case->evidence as $item)
@if ($item->file_path && in_array(pathinfo($item->file_path, PATHINFO_EXTENSION), ['jpg', 'jpeg', 'png', 'webp'])) Evidence @else @endif
{{ $item->title }}
{{ $item->reference_number ?? 'No Ref' }}
@csrf @method('DELETE')

{{ $item->description }}

{{ $item->storage_location ?? 'Unspecified' }} @if ($item->file_path) | View File @endif
@endforeach
@else

Evidence locker is empty.

@endif

Case Activity

@csrf
    @forelse($case->timeline as $note)
  • @if (!$loop->last) @endif
    @php $iconConfig = match ($note->type) { 'call' => [ 'bg' => 'bg-emerald-100', 'text' => 'text-emerald-600', 'icon' => 'ph-phone', ], 'hearing' => [ 'bg' => 'bg-red-100', 'text' => 'text-red-600', 'icon' => 'ph-gavel', ], 'email' => [ 'bg' => 'bg-blue-100', 'text' => 'text-blue-600', 'icon' => 'ph-envelope', ], default => [ 'bg' => 'bg-slate-100', 'text' => 'text-slate-600', 'icon' => 'ph-notepad', ], }; @endphp
    {{ $note->user->name }} {{ $note->activity_date->diffForHumans() }}
    {{ $note->content }}
    @if ($note->is_visible_to_client)
    Visible to Client
    @endif
  • @empty
  • No activity logged yet.

  • @endforelse

Case Particulars

Presiding Judge

{{ $case->judge_name ?? 'Not Assigned' }}

Opposing Counsel

{{ $case->opposing_counsel ?? 'N/A' }}

Police Station

{{ $case->police_station ?? 'N/A' }}

OB Number

{{ $case->police_ob_number ?? 'N/A' }}

Witnesses

@csrf
@if ($case->witnesses && $case->witnesses->count() > 0)
    @foreach ($case->witnesses as $witness)
  • {{ $witness->name }}

    {{ $witness->type }} @if ($witness->statement)

    "{{ Str::limit($witness->statement, 50) }}"

    @endif
    @csrf @method('DELETE')
  • @endforeach
@else

No witnesses added.

@endif

Documents

@csrf
@if ($case->documents->count() > 0)
    @foreach ($case->documents as $doc)
  • {{ $doc->title }}

    {{ $doc->file_type }} • {{ $doc->created_at->format('M d') }}

    @if (in_array(strtolower($doc->file_type), ['pdf', 'jpg', 'jpeg', 'png'])) View @endif Save
  • @endforeach
@else

No documents uploaded.

@endif
Created {{ $case->created_at->format('Y-m-d') }}
Updated {{ $case->updated_at->diffForHumans() }}

Invoices & Billing

+ Create Invoice
@if ($case->invoices && $case->invoices->count() > 0)
@foreach ($case->invoices as $inv) @endforeach
Invoice # Date Amount Status Action
{{ $inv->invoice_number }} @if($inv->user_id === auth()->id()) (You) @endif {{ $inv->created_at->format('M d, Y') }} KES {{ number_format($inv->total_amount) }} @if ($inv->status === 'paid') Paid @elseif ($inv->status === 'pending_approval') Pending Approval @elseif ($inv->status === 'draft')
Rejected @if($inv->rejection_reason) "{{ $inv->rejection_reason }}" @endif
@else {{ ucfirst($inv->status) }} @endif
@if ($inv->status === 'pending_approval' && auth()->user()->isHeadOfLegal())
@csrf
@endif @if ($inv->status === 'unpaid' || $inv->status === 'paid')
@csrf
@endif
@else

No invoices generated for this case yet.

@endif
{{-- --}}