@extends('layouts.admin') @section('title', 'CRM & Manajemen Klien') @section('page_title', 'CRM & Manajemen Klien') @section('admin_content')

CRM & Direktori Klien

Pantau perjalanan calon pengantin, follow up draf belum bayar via WhatsApp, dan kelola akun klien.

Segarkan Data
@if(session('success'))
{{ session('success') }}
@endif @if(session('info'))
{{ session('info') }}
@endif
Total Klien Terdaftar
{{ number_format($totalClients) }}
Pengguna akun mempelai
Draf Belum Bayar
{{ number_format($totalDraft) }}
Potensi follow-up WhatsApp
Menunggu Pembayaran
{{ number_format($totalPending) }}
Order checkout pending
Klien Aktif (Paid)
{{ number_format($totalActive) }}
Total Omzet: Rp {{ number_format($totalRevenue, 0, ',', '.') }}
Direktori & Pipeline

Daftar Klien Mempelai

@if(request('status')) @endif @if(!empty($search)) @endif
@php $segments = [ 'all' => ['label' => 'Semua Klien', 'count' => $totalClients], 'draft' => ['label' => 'Draf Belum Bayar', 'count' => $totalDraft], 'pending' => ['label' => 'Menunggu Bayar', 'count' => $totalPending], 'active' => ['label' => 'Klien Aktif', 'count' => $totalActive], 'unverified' => ['label' => 'Email Belum Verif', 'count' => $totalUnverified], 'expiring' => ['label' => 'Segera Habis (<30h)', 'count' => null], 'expired' => ['label' => 'Kedaluwarsa', 'count' => null], ]; @endphp @foreach($segments as $key => $seg) @php $isActive = $status === $key; @endphp {{ $seg['label'] }} @if($seg['count'] !== null) {{ $seg['count'] }} @endif @endforeach
@forelse($clients as $c) @php $inv = $c->invitations->first(); $cleanPhone = preg_replace('/[^0-9]/', '', $c->phone ?? ''); if (str_starts_with($cleanPhone, '0')) { $cleanPhone = '62' . substr($cleanPhone, 1); } elseif (!str_starts_with($cleanPhone, '62') && !empty($cleanPhone)) { $cleanPhone = '62' . $cleanPhone; } $waGreeting = "Halo Kak {$c->name}, salam dari Janoer Koening. Apakah ada yang bisa kami bantu seputar undangan pernikahan digital Kakak?"; @endphp @empty @endforelse
Klien & Kontak Status Email Undangan & Pasangan Paket & Status Tanggal Bergabung Aksi Cepat
{{ strtoupper(substr($c->name, 0, 1)) }}
{{ $c->name }}
{{ $c->email }} @if($cleanPhone) • {{ $c->phone }} @endif
@if($c->hasVerifiedEmail()) Verified @else
Belum Verif
@csrf
@endif
@if($inv)
{{ $inv->groom_nickname && $inv->bride_nickname ? $inv->groom_nickname . ' & ' . $inv->bride_nickname : $inv->title }}
/u/{{ $inv->slug }}
@else Belum buat undangan @endif
@if($inv && $inv->is_paid) PAID / PUBLISHED @if($inv->template) Tier: {{ ucfirst($inv->template->package_tier ?? 'Simple') }} @endif @elseif($inv) DRAFT / UNPAID @else - @endif
{{ $c->created_at->format('d M Y') }}
{{ $c->created_at->diffForHumans() }}
@if($cleanPhone) WA @endif Detail
@csrf
Tidak ada data klien yang sesuai dengan filter atau pencarian.
@if($clients->hasPages())
Menampilkan {{ $clients->firstItem() }} - {{ $clients->lastItem() }} dari {{ $clients->total() }} klien
{{ $clients->links() }}
@endif
@endsection