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

Wishlists — CRM @if(isset($currentTenant)) {{ $currentTenant->name ?? 'Tenant' }} @endif

Units saved by users — hot leads @if(isset($currentTenant)) • Currency: {{ $currency }} @endif

  1. ›
  2. Wishlists
{{-- Stat cards --}}
@foreach([ ['Total Saves', $stats['total'] ?? 0, '#ef4444', 'fa-heart'], ['Unique Users', $stats['unique_users'] ?? 0, '#3b82f6', 'fa-users'], ['Unique Units', $stats['unique_plots'] ?? 0, '#8b5cf6', 'fa-home'], ['Still Available', $stats['available'] ?? 0, '#22c55e', 'fa-check-circle'], ['Now Booked', $stats['booked'] ?? 0, '#f59e0b', 'fa-lock'], ['This Week', $stats['this_week'] ?? 0, '#a855f7', 'fa-calendar-week'], ['This Month', $stats['this_month'] ?? 0, '#ec4899', 'fa-calendar-alt'], ] as [$label, $val, $color, $icon])
{{ number_format($val) }}
{{ $label }}
@endforeach
{{-- Left sidebar with top lists --}}
{{-- Top 5 Most Wishlisted --}}
🔥 Most Wishlisted Units
@forelse($topPlots ?? [] as $i => $wp) @php $medal = ['🥇','🥈','🥉'][$i] ?? ($i+1); @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
{{-- Top Users --}} @if(isset($topUsers))
👤 Most Active Users
@forelse($topUsers as $i => $user)
{{ $i+1 }}
{{ $user->name }}
{{ $user->phone }}
{{ $user->wishlist_count }}
saves
@empty
No user activity yet.
@endforelse
@endif
{{-- Main table --}}
{{-- Filters --}}
@if(isset($wishlists) && $wishlists->total() > 0) @endif
{{ $wishlists->total() ?? 0 }} Wishlist Entries
@if(isset($wishlists) && $wishlists->total() > 0) Showing {{ $wishlists->firstItem() ?? 0 }} - {{ $wishlists->lastItem() ?? 0 }} @endif
@forelse($wishlists ?? [] as $w) @php $liveStatus = $w->plot?->status ?? null; $isAvail = strtolower($liveStatus ?? '') === 'available'; $wasBooked = $liveStatus && strtolower($liveStatus) === 'booked'; $tenantParam = $tenantSlug ?? request()->route('tenant'); @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 --}} {{-- View user wishlists --}} @if($w->user_id) @endif {{-- Delete button --}}
@csrf @method('DELETE')
No wishlist entries found.
@if(isset($wishlists) && ($wishlists->hasPages() || $wishlists->total() > 0)) @endif
@include('Partials.footer') @push('scripts') @endpush