@php $stageTone = [ 'prospect' => ['bar' => 'border-t-sky-400', 'badge' => 'sky'], 'contacted' => ['bar' => 'border-t-cyan-400', 'badge' => 'cyan'], 'meeting' => ['bar' => 'border-t-indigo-400', 'badge' => 'indigo'], 'requirement' => ['bar' => 'border-t-violet-400', 'badge' => 'violet'], 'qualified' => ['bar' => 'border-t-fuchsia-400', 'badge' => 'fuchsia'], 'proposal' => ['bar' => 'border-t-amber-400', 'badge' => 'amber'], 'negotiation' => ['bar' => 'border-t-orange-400', 'badge' => 'orange'], 'won' => ['bar' => 'border-t-emerald-400', 'badge' => 'emerald'], 'lost' => ['bar' => 'border-t-rose-400', 'badge' => 'rose'], 'deferred' => ['bar' => 'border-t-slate-400', 'badge' => 'slate'], ]; $viewMeta = [ 'board' => ['label' => __('Board'), 'icon' => 'squares-2x2'], 'list' => ['label' => __('List'), 'icon' => 'queue-list'], ]; $money = fn (array $totals): string => $totals['by_currency'] === [] && $totals['not_estimated'] > 0 ? __('Not estimated') : $baseCode.' '.number_format($totals['base'], 2); $select = 'block w-full rounded-xl border-slate-300 text-sm shadow-sm focus:border-indigo-500 focus:ring-indigo-500'; @endphp
{{ $opp->customer?->name ?? __('No organisation') }} @if ($opp->customer?->lifecycle === 'prospect') · {{ __('Prospect') }} @endif
@if ($opp->isOpen() && $opp->accepted_at !== null)
{{ \Illuminate\Support\Str::limit($opp->reason_note ?: str_replace('_', ' ', $opp->reason), 60) }}
@endif @if ($editable) {{-- Keyed on the stage and the dialog, so a cancelled move redraws the old stage. --}} @endif| {{ __('Opportunity') }} | {{ __('Stage') }} | {{ __('Owner') }} | {{ __('Estimated value') }} | {{ __('Next action') }} | {{ __('Actions') }} |
|---|---|---|---|---|---|
| {{ $groupKey }} | |||||
|
{{ $opp->title }}
{{ $opp->customer?->name ?? __('No organisation') }} · {{ $types[$opp->type] ?? $opp->type }} @if ($opp->isOpen() && $opp->accepted_at !== null) |
{{ __(':n days in stage', ['n' => (int) $opp->stage_entered_at->diffInDays(now())]) }} @endif |
{{ $opp->owner?->name ?? __('No owner') }}
@if ($opp->originator && $opp->originator_id !== $opp->owner_id)
{{ __('Brought in by :name', ['name' => $opp->originator->name]) }} @endif |
@if ($opp->estimated_value === null) {{ __('Not estimated') }} @else {{ $opp->currency_code }} {{ number_format((float) $opp->estimated_value, 2) }} @endif | @if ($opp->isOpen()) {{ $opp->next_action ?: __('No next action') }} @if ($opp->next_action_due) · {{ $opp->next_action_due->format('j M Y') }} @endif @elseif ($opp->stage === 'deferred' && $opp->review_on) {{ __('Review on :date', ['date' => $opp->review_on->format('j M Y')]) }} @else {{ $opp->outcome_at?->format('j M Y') ?? __('Not available') }} @endif |
@if ($editable)
@endif
{{ __('Open') }}
|
|
@if ($filtersOn)
|
|||||