@extends('agency.layouts.app') @section('title', 'Müşteriler') @section('page_title', 'Müşteri Yönetimi') @push('styles') @endpush @section('content')
{{-- ─── STATS ─── --}}
{{ number_format($stats['total']) }}
TOPLAM MÜŞTERİ
{{ number_format($stats['active']) }}
AKTİF MÜŞTERİ
{{ number_format($stats['priority']) }}
ÖNCELİKLİ MÜŞTERİ
{{ number_format($stats['potential']) }}
POTANSİYEL
{{-- ─── BULK ACTION BAR ─── --}}
0 müşteri seçildi
{{-- ─── TOOLBAR ─── --}}
{{-- Özel Alan Filtreleri --}} @foreach($filterableFields as $field) @endforeach @php $cfFilterKeys = $filterableFields->map(fn($f) => 'cf_' . $f->field_key)->toArray(); @endphp @if(request()->hasAny(array_merge(['search', 'status', 'type', 'priority', 'segment', 'loyalty_tier'], $cfFilterKeys))) Temizle @endif
{{-- ─── TABLE ─── --}}
@if($customers->isEmpty())
Henüz müşteri yok
İlk müşterinizi ekleyerek başlayın.
İlk Müşteriyi Ekle
@else @foreach($listableFields as $field) @endforeach @foreach($customers as $customer) @foreach($listableFields as $field) @endforeach @endforeach
MÜŞTERİ İLETİŞİM TİP DURUM ÖNCELİK YOLCULAR SADAKAT{{ strtoupper($field->label) }}TEMSİLCİ KAYIT İŞLEMLER
{{ $customer->initials }}
{{ $customer->full_name }} @if($customer->blacklisted) @endif
@if($customer->company_name) @endif
@if($customer->email) @endif @if($customer->phone) @endif {{ $customer->customer_type === 'corporate' ? '🏢 Şirket' : '👤 Kişi' }} {{ $customer->status_label }} {{ $customer->priority_label }} {{ $customer->passengers_count }} @if($customer->loyalty_tier) {{ $customer->loyalty_tier_label }} @else @endif @php $val = $customer->getCustomFieldValue($field->field_key); @endphp @if($val !== null && $val !== '') {{ $field->formatValue($val) }} @else @endif @if($customer->assignedAgent)
{{ $customer->assignedAgent->first_name }}
@else Atanmamış @endif
{{ $customer->created_at->format('d.m.Y') }}
{{-- Pagination --}} @if($customers->hasPages())
{{ $customers->firstItem() }}–{{ $customers->lastItem() }} / {{ $customers->total() }} müşteri
{{ $customers->withQueryString()->links('vendor.pagination.bootstrap-5') }}
@endif @endif
{{-- Delete Form --}} @endsection @push('scripts') @endpush