@extends('admin.layouts.app') @section('title', 'Lead Follow-up Timeline') @section('content') @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if($lead->status === 'Converted' || $lead->status === 'Rejected')
This lead is {{ $lead->status }}. New follow-up cannot be added.
@endif
Customer {{ $lead->customer->customer_name ?? '-' }}
Enquiry Type {{ $lead->enquiry_type ?? '-' }}
Status {{ $lead->status ?? '-' }}
Next Call Date {{ $lead->next_call_date ? \Carbon\Carbon::parse($lead->next_call_date)->format('d-m-Y') : '-' }}
Total Follow-ups {{ $followUps->count() }}
@forelse($followUps as $followup)
{{ $followup->followup_status }} {{ \Carbon\Carbon::parse($followup->followup_date)->format('d-m-Y') }}

{{ $followup->remarks }}

Next Call: {{ $followup->next_followup_date ? \Carbon\Carbon::parse($followup->next_followup_date)->format('d-m-Y') : '-' }} Added By: {{ $followup->createdBy->name ?? '-' }}
@empty
No follow-up found.
@endforelse
@if($lead->status !== 'Converted' && $lead->status !== 'Rejected') @endif @endsection