@if($customer->lead_number)
- رقم العميل المحتمل
- {{ $customer->lead_number }}
@endif
- المصدر
- {{ \App\Models\Customer::labelForLeadSource($customer->source) }}
@if(filled($customer->source_details))
- تفاصيل المصدر
- {{ $customer->source_details }}
@endif
@if(filled($customer->lead_sector))
- القطاع
- {{ \App\Models\Customer::labelForLeadSector($customer->lead_sector) }}
@endif
@if(filled($customer->lead_company_size))
- حجم الشركة
- {{ \App\Models\Customer::labelForLeadCompanySize($customer->lead_company_size) }}
@endif
@if($customer->lead_budget !== null)
- الميزانية
- {{ number_format((float) $customer->lead_budget, 2) }}
@endif
@if(filled($customer->lead_description))
- الوصف
- {{ $customer->lead_description }}
@endif
@if(filled($customer->lead_requirements))
- المتطلبات
- {{ $customer->lead_requirements }}
@endif
- مسؤول المتابعة (CRM)
-
@if($customer->assignedUser)
@php
$parts = preg_split('/\s+/u', trim($customer->assignedUser->name), -1, PREG_SPLIT_NO_EMPTY);
$crmIni = '';
foreach (array_slice($parts, 0, 2) as $p) {
$crmIni .= mb_substr($p, 0, 1);
}
$crmIni = mb_strtoupper($crmIni);
@endphp
{{ $crmIni }}
{{ $customer->assignedUser->name }}
@else
—
@endif
- الحالة التسويقية
-
@php
$crmSt = $customer->crm_status ?? 'potential';
[$crmLab, $crmBg] = match ($crmSt) {
'interested' => ['مهتم', 'bg-sky-50 text-sky-800 border border-sky-100'],
'active' => ['نشط', 'bg-emerald-50 text-emerald-800 border border-emerald-100'],
'not_interested' => ['غير مهتم', 'bg-red-50 text-red-800 border border-red-100'],
default => ['محتمل', 'bg-violet-50 text-violet-900 border border-violet-100'],
};
@endphp
{{ $crmLab }}
- الأولوية / التقييم
-
@php
[$prLab, $prBg] = match ($customer->lead_priority) {
'high' => ['عالية', 'bg-rose-50 text-rose-800 border border-rose-100'],
'medium' => ['متوسطة', 'bg-amber-50 text-amber-900 border border-amber-100'],
'low' => ['منخفضة', 'bg-teal-50 text-teal-800 border border-teal-100'],
default => ['—', 'bg-gray-50 text-gray-500 border border-gray-100'],
};
$lr = (int) ($customer->lead_rating ?? 0);
@endphp
{{ $prLab }}
@for($i = 1; $i <= 5; $i++)
@if($i <= $lr)
@else
@endif
@endfor
- تاريخ إنشاء السجل
- {{ $customer->created_at ? $customer->created_at->timezone(config('app.timezone'))->format('Y/m/d H:i') : '—' }}
- رقم ضريبي (VAT)
- {{ $customer->vat_number ?? $customer->tax_number ?? '—' }}
- البريد
- {{ $customer->email ?? '—' }}
- الهاتف
- {{ $customer->phone ?? '—' }}
- الجوال
- {{ $customer->mobile ?? '—' }}
@if(filled($customer->company_name))
- الشركة
- {{ $customer->company_name }}
@endif
@if(filled($customer->job_title))
- المسمى الوظيفي
- {{ $customer->job_title }}
@endif
@if(filled($customer->website))
@endif
- الحد الائتماني
- {{ $customer->credit_limit !== null ? 'SAR '.number_format((float) $customer->credit_limit, 2) : '—' }}
- أيام السداد
- {{ $customer->payment_terms_days !== null ? $customer->payment_terms_days.' يوم' : '—' }}