@if (session('success'))
{{ session('success') }}
@endif
{{-- Quick views: each card sets the filters below. --}}
@foreach ([
['due', 'timer', 'danger', $dueCount, trans('crm.list.card_due'), ['tab' => 'open', 'follow_up' => 'due', 'assignee' => '']],
['unassigned', 'user-square', 'warning', $unassignedCount, trans('crm.list.card_unassigned'), ['tab' => 'open', 'follow_up' => '', 'assignee' => 'unassigned']],
['new', 'notification-status', 'primary', (int) ($counts['new'] ?? 0), trans('crm.list.card_new'), ['tab' => 'new', 'follow_up' => '', 'assignee' => '']],
['converted', 'calendar-tick', 'success', (int) ($counts['converted'] ?? 0), trans('crm.list.card_converted'), ['tab' => 'converted', 'follow_up' => '', 'assignee' => '']],
] as [$key, $icon, $color, $count, $label, $filters])
@endforeach
| {{ trans('crm.lead') }} |
{{ trans('crm.list.source_interest') }} |
{{ trans('crm.list.status') }} |
{{ trans('crm.list.assignee') }} |
{{ trans('crm.list.next_follow_up') }} |
{{ trans('crm.list.last_update') }} |
{{ trans('clinic.common.actions') }} |
@endsection
@section('js')
@include('dashboard.admin.partials.crud-table-js')
@include('dashboard.admin.partials.server-table', [
'tableId' => 'leadsTable',
'url' => route('admin.dashboard.crm.leads.index'),
'columns' => [
['data' => 'lead', 'name' => 'lead', 'orderable' => false],
['data' => 'source_interest', 'name' => 'source', 'searchable' => false],
['data' => 'status', 'name' => 'crm_leads.status', 'searchable' => false],
['data' => 'assignee', 'name' => 'assigned_to', 'searchable' => false],
['data' => 'next_follow_up_at', 'name' => 'next_follow_up_at', 'searchable' => false],
['data' => 'updated_at', 'name' => 'crm_leads.updated_at', 'searchable' => false],
['data' => 'action', 'name' => 'action', 'orderable' => false, 'searchable' => false],
],
'order' => [[5, 'desc']],
])
@endsection