@php
/** @var \App\Models\Lead $lead */
$convertUrl = $convertUrl ?? null;
$prospectOnly = (bool) ($prospectOnly ?? false);
$showParkFollowUp = (bool) ($showParkFollowUp ?? $showParkFollowUpColumn ?? false);
$assignedNameMy = trim(($lead->assignedUser?->name ?? '').' '.($lead->assignedUser?->surname ?? ''));
$creatorNameMy = trim(($lead->creator?->name ?? '').' '.($lead->creator?->surname ?? ''));
$canMarkSaleRow = $lead->isActiveLead() && ! $lead->hasSale();
$isProspectRow = $lead->isProspect();
$canHotParkRow = ! $lead->isCustomer() && $lead->isInDefaultPipeline() && ! $lead->hasSale();
$resolvedConvertUrl = $convertUrl;
if ($resolvedConvertUrl === null) {
$resolvedConvertUrl = $canMarkSaleRow ? route('leads.convert-to-sale', $lead) : '';
}
@endphp
| #{{ $lead->id }} |
@if ($lead->isCustomer())
Customer
@elseif ($lead->isActiveLead())
Active
@else
Prospect
@endif
|
{{ $lead->isBusiness() ? 'Business' : 'Indiv.' }} |
@if ($showParkFollowUp)
@php
$parkFollowUp = filled($lead->park_follow_up_date)
? \Illuminate\Support\Carbon::parse($lead->park_follow_up_date)
: null;
@endphp
{{ $parkFollowUp?->format('d M Y') ?? '—' }}
|
@endif
{{ optional($lead->created_at)->format('Y-m-d') ?? '—' }}
|
{{ $lead->displayNameForTable() }}
|
@if ($lead->isBusiness())
@php
$repName = $lead->displayRepresentativeName();
$repPhone = $lead->displayRepresentativePhone();
$repEmail = $lead->displayRepresentativeEmail();
@endphp
@if ($repName !== '' || $repPhone !== null || $repEmail !== null)
@if ($repName !== '')
{{ $repName }}
@endif
@if ($repPhone !== null)
{{ $repPhone }}
@endif
@if ($repEmail !== null)
{{ $repEmail }}
@endif
@else
—
@endif
@else
—
@endif
|
{{ $lead->displayPhone() ?? '—' }} |
{{ $lead->displayEmail() ?? '—' }} |
{{ $lead->status ?? '—' }} |
|
|
{{ $assignedNameMy !== '' ? $assignedNameMy : '—' }} |
{{ $creatorNameMy !== '' ? $creatorNameMy : '—' }} |