@extends('agency.layouts.app') @section('title', 'Kara Liste') @section('page_title', 'Kara Liste') {{-- KARA LİSTE — kara listeye alınmış müşteriler. Ekleme ve çıkarma müşteri kartıyla aynı ucu kullanır (agency.customers.toggle-blacklist): neden zorunlu, tarih ve ekleyen kişi kayda yazılır. Kara listedeki müşteri satışlarda seçilemez. --}} @php $breadcrumbs = [ ['title' => 'Dashboard', 'url' => route('agency.dashboard')], ['title' => 'Müşteriler', 'url' => route('agency.customers.index')], ['title' => 'Kara Liste', 'url' => ''], ]; $columns = [ ['key' => 'name', 'label' => 'Müşteri', 'sortable' => true, 'sort' => 'first_name'], ['key' => 'contact', 'label' => 'İletişim'], ['key' => 'reason', 'label' => 'Neden'], ['key' => 'date', 'label' => 'Eklenme', 'sortable' => true, 'sort' => 'blacklisted_at', 'align' => 'center'], ['key' => 'by', 'label' => 'Ekleyen'], ['key' => '_actions', 'label' => 'İşlemler', 'fixed' => true, 'align' => 'end', 'width' => '150px'], ]; $filters = [ ['key' => 'type', 'label' => 'Tip', 'value' => request('type'), 'placeholder' => 'Tüm Tipler', 'options' => [ 'individual' => 'Kişiler', 'corporate' => 'Şirketler', ]], ]; $statCards = [ ['label' => 'Kara listedeki müşteri', 'value' => $stats['total'], 'icon' => 'fa-ban', 'color' => '#dc2626'], ['label' => 'Son 30 günde eklenen', 'value' => $stats['last30'], 'icon' => 'fa-calendar-plus', 'color' => '#f59e0b'], ['label' => 'Şirket', 'value' => $stats['corporate'], 'icon' => 'fa-building', 'color' => '#6366f1'], ]; @endphp @section('content')
@forelse($customers as $customer)
{{ $customer->initials }}
{{ $customer->full_name }}
#{{ $customer->code }} · {{ $customer->customer_type === 'corporate' ? 'Şirket' : 'Kişi' }}
@if($customer->email)
{{ $customer->email }}
@endif @if($customer->phone)
{{ $customer->phone }}
@endif @if(!$customer->email && !$customer->phone)—@endif
{{ $customer->blacklist_reason ?: '—' }}
@if($customer->blacklisted_at)
{{ $customer->blacklisted_at->format('d.m.Y') }}
{{ $customer->blacklisted_at->diffForHumans() }}
@else — @endif {{ $customer->blacklistedBy ? trim($customer->blacklistedBy->first_name . ' ' . $customer->blacklistedBy->last_name) : '—' }} @empty

Kara listede müşteri yok

Satış yapılmaması gereken bir müşteriyi "Kara Listeye Ekle" ile ekleyebilirsiniz.

@endforelse
@endsection @push('styles') @endpush @push('scripts') @endpush