@include('Partials.sidebar')
@include('Partials.header')

Wishlists — CRM

Units saved by users — hot leads

  1. Wishlists
{{-- Stat cards --}}
@foreach([ ['Total Saves', $stats['total'], '#ef4444', 'fa-heart'], ['Unique Users', $stats['unique_users'], '#3b82f6', 'fa-users'], ['Unique Units', $stats['unique_plots'], '#8b5cf6', 'fa-home'], ['Still Available', $stats['available'], '#22c55e', 'fa-check-circle'], ['Now Booked', $stats['booked'], '#f59e0b', 'fa-lock'], ] as [$label, $val, $color, $icon])
{{ number_format($val) }}
{{ $label }}
@endforeach
{{-- Top 5 Most Wishlisted --}}
🔥 Most Wishlisted Units
@forelse($topPlots as $i => $wp) @php $medal = ['🥇','🥈','🥉'][$i] ?? ($i+1); $rankColor = ['#c9a96e','#94a3b8','#cd7f32'][$i] ?? '#64748b'; @endphp
{{ $medal }}
Unit {{ $wp->plot_number }}
{{ $wp->plot_type }} @if($wp->price) • {{ $currency }}{{ number_format((float)$wp->price, 0) }} @endif
{{ $wp->wishlist_count }}
saves
@empty
No wishlist data yet.
@endforelse
{{-- Main table --}}
{{-- Filters --}}
{{ $wishlists->total() }} Wishlist Entries
@forelse($wishlists as $w) @php $liveStatus = $w->plot?->status ?? null; $isAvail = strtolower($liveStatus ?? '') === 'available'; $wasBooked = $liveStatus && strtolower($liveStatus) === 'booked'; @endphp @empty @endforelse
User Unit Block / Type Saved Price Live Status Saved On Action
{{ $w->name }}
{{ $w->phone }}
@if($w->user?->email)
{{ $w->user->email }}
@endif
Unit {{ $w->plot_number }}
{{ $w->plot_type }}
@if($w->block) Block {{ $w->block }} @endif @if($w->section) • {{ $w->section }} @endif
@if($w->price) {{ $currency }}{{ number_format((float)$w->price, 0) }} @else @endif @if($liveStatus) {{ $liveStatus }} @if($wasBooked)
Unit taken!
@endif @else Unknown @endif
{{ $w->created_at->format('d M Y') }}
{{ $w->created_at->format('H:i') }}
{{-- WhatsApp nudge --}} @if($isAvail && $w->phone) @endif {{-- Create lead --}}
No wishlist entries found.
@if($wishlists->hasPages()) @endif
@include('Partials.footer')