@php $monthNames = [ 1 => 'January', 2 => 'February', 3 => 'March', 4 => 'April', 5 => 'May', 6 => 'June', 7 => 'July', 8 => 'August', 9 => 'September', 10 => 'October', 11 => 'November', 12 => 'December', ]; $monthSelectOptions = []; foreach ($monthNames as $num => $label) { $monthSelectOptions[] = ['value' => (string) $num, 'label' => $label]; } $yearSelectOptions = collect($yearOptions ?? [])->map(fn ($y) => ['value' => (string) $y, 'label' => (string) $y])->all(); $statusFilterOptions = [['value' => '', 'label' => 'All statuses']]; foreach (($statusOptions ?? []) as $st) { $statusFilterOptions[] = ['value' => (string) $st, 'label' => ucfirst($st)]; } $selectedStatusStr = $selectedStatus !== null ? (string) $selectedStatus : ''; $leadTypeFilterOptions = [['value' => '', 'label' => 'All types']]; foreach (($leadTypeOptions ?? []) as $lt) { $leadTypeFilterOptions[] = ['value' => (string) $lt, 'label' => ucfirst($lt)]; } $selectedLeadTypeStr = $selectedLeadType !== null ? (string) $selectedLeadType : ''; $showParkFollowUpColumn = true; $assignedFilterOptions = []; $selectedAssignedStr = $selectedAssignedUserId !== null ? (string) $selectedAssignedUserId : ''; if (! empty($isDealerWideView) && $isDealerWideView) { $assignedFilterOptions = [['value' => '', 'label' => 'All assignees']]; foreach (($assigneeFilterUsers ?? []) as $u) { $label = trim(($u->name ?? '').' '.($u->surname ?? '')); $label = $label !== '' ? $label : ('User #'.$u->id); $label = (bool) ($u->is_disabled ?? false) ? ($label.' (disabled)') : $label; $assignedFilterOptions[] = ['value' => (string) $u->id, 'label' => $label]; } } @endphp {{ __('Parked Leads') }}
@php $parkedLeadsAlpineConfig = [ 'toolbarMode' => 'parked', 'saleDate' => old('sale_date', now()->format('Y-m-d')), 'saleStatus' => old('status', 'delivered'), 'saleVehicleMake' => old('vehicle_make', ''), 'saleVehicleModel' => old('vehicle_model', ''), 'saleVehicleVariant' => old('vehicle_variant', ''), 'saleVehicleYear' => old('vehicle_year', ''), 'saleStockNumber' => old('stock_number', ''), 'sellingPrice' => old('selling_price', ''), 'grossProfit' => old('gross_profit', ''), 'notes' => old('notes', ''), 'todayDate' => now()->format('Y-m-d'), 'leadUrlBase' => url('/leads'), 'parkReasonDefault' => old('park_reason', ''), 'parkFollowUpDefault' => old('park_follow_up_date', now()->format('Y-m-d')), 'reopenConvert' => null, ]; if (filled(old('__park_lead_id'))) { $parkedLeadsAlpineConfig['reopenPark'] = [ 'leadId' => (int) old('__park_lead_id'), 'leadLabel' => (string) old('__park_lead_label', ''), ]; } @endphp
@if (! empty($isDealerWideView) && $isDealerWideView)
@endif

{{ number_format(count($leads ?? [])) }} record(s)

@include('leads.partials.index-table-colgroup', ['showParkFollowUp' => true]) @include('leads.partials.index-table-head', ['showParkFollowUp' => true]) @forelse (($leads ?? []) as $lead) @include('leads.partials.index-table-row', [ 'lead' => $lead, 'convertUrl' => '', 'showParkFollowUp' => true, ]) @empty @endforelse
@if (! empty($isDealerWideView)) No parked leads match the selected filters. @else No parked leads for this period. Select a row on Active Leads and choose Park to add one with a follow-up date. @endif