@extends('layouts.app') @section('title', 'مبيعات - منصة التقديم') @section('content')
المبيعات

منصة المبيعات

متابعة الليدات حسب الحالة

@php $statusBadgeColors = [ 'new' => 'bg-secondary-500/10 text-secondary-600', 'contacted' => 'bg-blue-50 text-blue-700 border-blue-200', 'interested' => 'bg-green-50 text-green-700 border-green-200', 'waiting_followup' => 'bg-amber-50 text-amber-700 border-amber-200', 'dead' => 'bg-red-50 text-red-700 border-red-200', 'documents_collected' => 'bg-purple-50 text-purple-700 border-purple-200', 'initial_acceptance' => 'bg-secondary-500/10 text-secondary-600', 'payment_stage' => 'bg-accent-50 text-accent-600 border-accent-100', 'final_acceptance' => 'bg-green-50 text-green-700 border-green-200', 'registered' => 'bg-green-50 text-green-700 border-green-200', ]; @endphp

إجمالي الليدات

{{ $totalLeads }}

📊
🔍
👤
إعادة تعيين

📋 لوحة الليدات

@foreach ($statuses as $status) @php $count = $statusCounts[$status] ?? 0; $leads = $leadsByStatus[$status] ?? collect(); $badgeColor = $statusBadgeColors[$status] ?? 'bg-secondary-500/10 text-secondary-600'; @endphp

{{ $statusLabels[$status] ?? $status }}

{{ $count }}
@forelse ($leads as $lead)

{{ $lead->name ?? $lead->full_name }}

@if ($lead->assigned_to && isset($salesUsers[$lead->assigned_to])) {{ $salesUsers[$lead->assigned_to] }} @endif
@if ($lead->phone)

📞 {{ $lead->phone }}

@endif @if ($lead->email)

📧 {{ $lead->email }}

@endif @if ($lead->notes)

{{ $lead->notes }}

@endif
{{ $statusLabels[$status] ?? $status }} {{ \Carbon\Carbon::parse($lead->created_at)->format('Y-m-d') }}
@empty

📂 لا توجد ليدات

@endforelse
@endforeach
@endsection