@extends('layouts.app') @section('title', 'Kontak & Leads') @section('content') {{-- Summary Stats --}}
{{ number_format($summary['total']) }}
Total Kontak
{{ number_format($summary['new']) }}
Lead Baru
{{ number_format($summary['qualified']) }}
Qualified
{{ number_format($summary['converted']) }}
Converted
{{-- Filter Bar --}}
@cannot('sales') @endcannot @if(request()->hasAny(['search','status','source','assigned_to'])) Reset @endif
{{-- Table --}}
@if($contacts->isEmpty())
Belum ada kontak

Tambah kontak baru atau ubah filter pencarian

@can('create contacts') Tambah Kontak Pertama @endcan
@else @foreach($contacts as $contact) @endforeach
Kontak Perusahaan Sumber Status Assigned To Kontak Terakhir Aksi
{{ strtoupper(substr($contact->name, 0, 2)) }}
{{ $contact->name }}
{{ $contact->phone }}
{{ $contact->company ?? '—' }}
@if($contact->position)
{{ $contact->position }}
@endif
@if($contact->source) {{ $contact->source_label }} @else @endif {{ $contact->status_label }} @if($contact->assignedTo)
{{ $contact->assignedTo->initials }}
{{ $contact->assignedTo->name }}
@else Belum diassign @endif
{{ $contact->last_contact_at ? $contact->last_contact_at->locale('id')->diffForHumans() : $contact->created_at->locale('id')->diffForHumans() }}
@can('edit contacts') @endcan @can('delete contacts') @endcan
@endif
@if($contacts->hasPages())
Menampilkan {{ $contacts->firstItem() }}–{{ $contacts->lastItem() }} dari {{ $contacts->total() }} kontak
@endif
{{-- Delete Confirm Modal --}} @endsection @push('scripts') @endpush