@extends('layouts.admin') @section('title', $opportunity->title) @section('content') @php $stages = $opportunity->pipeline?->stages ?? collect(); $stageName = fn ($id) => $id ? ($stages->firstWhere('id', $id)?->name ?? '#'.$id) : '—'; @endphp Deal list Kanban Create quote
{{ $opportunity->status }} @if($opportunity->stage) {{ $opportunity->stage->name }} @endif
@if($opportunity->lead)

Lead: {{ $opportunity->lead->name ?: $opportunity->lead->email }}

@endif @if($opportunity->next_step)

Next step: {{ $opportunity->next_step }}

@endif
Owner
{{ $opportunity->owner?->name ?? 'Unassigned' }}
@if($opportunity->stage)
@endif
@if($opportunity->status === 'open' && $stages->count() > 1)

Move stage

@csrf
@endif

Line products

@forelse($opportunity->products as $product)
{{ $product->title }}
Qty {{ $product->quantity }}
AUD {{ number_format(($product->unit_price_cents * $product->quantity) / 100, 2) }}
@empty

No products attached.

@endforelse

Stage history

@forelse($opportunity->histories as $history)
{{ $stageName($history->from_stage_id) }} → {{ $stageName($history->to_stage_id) }}
{{ $history->created_at?->format('d M Y H:i') }} @if($history->note) · {{ $history->note }}@endif
@empty

No stage moves yet.

@endforelse
@endsection