@extends('layouts.app') @section('title', $lead->lead_number) @section('breadcrumb')Leads {{ $lead->lead_number }}@endsection @section('content')
{{ $lead->contact?->initials ?? '??' }}

{{ $lead->contact?->full_name ?? 'Unknown Contact' }}

{{ $lead->lead_number }} {{ $lead->statusLabel() }} {{ ucfirst($lead->priority) }} Priority

Lead Progress

@foreach([['New', 'new'], ['Consult Booked', 'consult_booked'], ['On Hold / Lost', 'on_hold'], ['Sold', 'sold']] as $i => [$label, $key])
@php $active = $lead->status === $key; $done = in_array($lead->status, array_slice(['new','consult_booked','on_hold','sold'], $i+1)); @endphp
@if($done)@else{{ $i+1 }}@endif
{{ $label }}
@if($i < 3)
@endif @endforeach

Lead Information

Source
{{ $lead->source ?? '—' }}
Enquiry Date
{{ $lead->enquiry_date?->format('d M Y') ?? '—' }}
Preferred Contact
{{ $lead->preferred_contact ?? '—' }}
Showroom Consultant
{{ $lead->assignedTo?->name ?? '—' }}
Designer
{{ $lead->designer?->name ?? '—' }}
Booking Date
{{ $lead->booking_date?->format('d M Y') ?? '—' }}

Project Overview

Type
{{ $lead->project_type ? ucfirst($lead->project_type) : '—' }}
Budget
{{ $lead->budget_range ?? '—' }}
Expected Start
{{ $lead->expected_start?->format('M Y') ?? '—' }}
Site Address
{{ $lead->site_address ? $lead->site_address.', '.$lead->site_suburb : '—' }}
@if($lead->description)

Description

{{ $lead->description }}

@endif @if($lead->notes)

Notes

{{ $lead->notes }}

@endif

Appointments {{ $lead->appointments->count() }}

Manage
@if($lead->appointments->isEmpty())

No appointments yet.

@else
@foreach($lead->appointments as $i => $appt) @endforeach
# Appt. With Date & Time Designer Fee Location Both Avail. Note
{{ $i + 1 }} {{ $appt->appointment_with ?? '—' }} @if($appt->appointment_date)
{{ $appt->appointment_date->format('d M Y') }}
@if($appt->appointment_time)
{{ \Carbon\Carbon::createFromFormat('H:i:s', $appt->appointment_time)->format('h:i A') }}
@endif @else @endif
{{ $appt->designer?->name ?? '—' }} @if($appt->appointment_fee) ${{ number_format($appt->appointment_fee, 2) }} @else @endif {{ $appt->appointment_location ?? '—' }} @if($appt->both_available === 'Yes') Yes @else No @endif {{ Str::limit($appt->note, 50) ?? '—' }}
@endif

Follow-Ups {{ $lead->followUps->count() }}

Manage
@if($lead->followUps->isEmpty())

No follow-ups yet.

@else
@foreach($lead->followUps as $i => $fu) @php $typeStyle = match($fu->follow_up_type) { 'Online Meeting' => 'background:#0c4a6e44; color:#38bdf8; border:1px solid #0369a155;', 'Offline Meeting' => 'background:#4a1d9644; color:#a78bfa; border:1px solid #7c3aed55;', default => 'background:#164e6344; color:#2dd4bf; border:1px solid #0d948855;', }; @endphp @endforeach
# Type Date Time Feedback
{{ $i + 1 }} {{ $fu->follow_up_type }} {{ $fu->follow_up_date?->format('d M Y') ?? '—' }} @if($fu->follow_up_time) {{ \Carbon\Carbon::createFromFormat('H:i:s', $fu->follow_up_time)->format('h:i A') }} @else @endif {{ Str::limit($fu->feedback, 80) ?? '—' }}
@endif
@if($lead->contact)

Contact Summary

@if($lead->contact->email) {{ $lead->contact->email }} @endif @if($lead->contact->phone) {{ $lead->contact->phone }} @endif @if($lead->site_address)
{{ $lead->site_address }}
{{ $lead->site_suburb }} {{ $lead->site_state }}
@endif
@endif

Actions

Edit Lead Convert to Job
@csrf @method('DELETE')
@endsection