@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 : ''; $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 {{ __('Hot List') }}
@php $hotListAlpineConfig = [ 'toolbarMode' => 'hot_list', '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('__convert_lead_id'))) { $reopenLeadId = (int) old('__convert_lead_id'); $hotListAlpineConfig['reopenConvert'] = [ 'leadId' => $reopenLeadId, 'leadLabel' => (string) old('__convert_lead_label', ''), 'convertUrl' => route('leads.convert-to-sale', $reopenLeadId), ]; } if (filled(old('__park_lead_id'))) { $hotListAlpineConfig['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)

Mark as sale is only for rows with lifecycle Active lead. Convert prospects under Prospects first, or pick an active lead row.

@include('leads.partials.index-table-colgroup') @include('leads.partials.index-table-head') @forelse (($leads ?? []) as $lead) @include('leads.partials.index-table-row', ['lead' => $lead]) @empty @endforelse
@if (! empty($isDealerWideView)) No hot list leads match the selected filters. @else No leads on your Hot List for this period. Select a row on Active Leads and choose Hot List. @endif