@php $tz = config('app.display_timezone'); $money = fn (?float $value): ?string => $value === null ? null : trim($baseCode.' '.number_format($value, 2)); $statusColors = ['not_started' => 'slate', 'in_progress' => 'sky', 'opportunity_open' => 'indigo', 'not_a_fit' => 'amber', 'do_not_contact' => 'rose']; $stageColors = ['won' => 'emerald', 'lost' => 'rose', 'deferred' => 'amber']; $metrics = [ ['label' => __('Organisations'), 'value' => number_format($funnel['total']), 'icon' => 'building-office', 'accent' => '#6366f1', 'sub' => trans_choice(':count waiting|:count waiting', $funnel['not_started'], ['count' => number_format($funnel['not_started'])])], ['label' => __('Open pipeline'), 'value' => $money($figures['pipeline']) ?? __('Not estimated'), 'icon' => 'funnel', 'accent' => '#8b5cf6', 'sub' => $figures['unestimated'] > 0 ? trans_choice(':open open, :count not estimated|:open open, :count not estimated', $figures['unestimated'], ['open' => $figures['open'], 'count' => $figures['unestimated']]) : trans_choice(':count open opportunity|:count open opportunities', $figures['open'], ['count' => $figures['open']])], ['label' => __('Confirmed business'), 'value' => $money($figures['confirmed']) ?? __('Not available'), 'icon' => 'trophy', 'accent' => '#10b981', 'sub' => trans_choice(':count won|:count won', $figures['won'], ['count' => $figures['won']])], ['label' => __('Mode'), 'value' => __(\App\Models\Crm\Portfolio::MODES[$portfolio->mode] ?? $portfolio->mode), 'icon' => 'user-group', 'accent' => '#0ea5e9', 'sub' => $portfolio->isJoint() ? __('Sponsor collaborates on each') : __('Sponsor watches progress')], ['label' => __('Last activity'), 'value' => $figures['last_activity'] ? $figures['last_activity']->timezone($tz)->format('j M Y') : __('None yet'), 'icon' => 'clock', 'accent' => '#64748b', 'sub' => $figures['last_activity'] ? $figures['last_activity']->diffForHumans() : __('Nothing worked yet')], ]; $funnelMeta = [ 'not_started' => ['queue' => 'waiting', 'color' => 'bg-slate-400'], 'contacted' => ['queue' => 'in_progress', 'color' => 'bg-sky-500'], 'in_pipeline' => ['queue' => 'pipeline', 'color' => 'bg-indigo-500'], 'won' => ['queue' => 'pipeline', 'color' => 'bg-emerald-500'], 'lost' => ['queue' => 'pipeline', 'color' => 'bg-rose-500'], 'not_a_fit' => ['queue' => 'set_aside', 'color' => 'bg-amber-400'], ]; $funnelTotal = max(1, $funnel['total']); $pageIds = $members->pluck('id')->all(); $allOnPageSelected = $pageIds !== [] && array_diff($pageIds, array_map('intval', $selected)) === []; @endphp
{{ $portfolio->description }}
@endif{{ $m['label'] }}
{{ $m['value'] }}
{{ $m['sub'] }}{{ ctype_digit($assignee) ? __('For the person chosen below') : __('The whole list') }} @if ($funnel['nurture'] > 0) · {{ trans_choice(':count deferred to nurture|:count deferred to nurture', $funnel['nurture'], ['count' => $funnel['nurture']]) }} @endif
{{ $row['user']->name }}
{{ $row['target'] !== null ? __(':pulled of :target pulled this week', ['pulled' => $row['pulled_this_week'], 'target' => $row['target']]) : __(':pulled pulled this week', ['pulled' => $row['pulled_this_week']]) }}
{{ __('Tier 1 first. Pull a batch at a time: each one opens an opportunity with a dated next action.') }}
| @endif | {{ __('Organisation') }} | {{ __('Tier') }} | {{ __('Worked by') }} | {{ __('Status') }} | {{ __('Next') }} | {{ __('Actions') }} |
|---|---|---|---|---|---|---|
| @endif |
@if ($orgLinks && $member->customer)
{{ $member->customer->name }}
@else
{{ $member->customer?->name ?? __('Not available') }}
@endif
@if ($member->customer?->sector)
{{ $sectors[$member->customer->sector] ?? $member->customer->sector }} @endif |
{{ $member->tier ? __('Tier :n', ['n' => $member->tier]) : '-' }} | {{ $member->assignee?->name ?? __('Unassigned') }} |
@if ($opportunity)
@if ($oppLinks)
{{ $member->status_reason }} @endif |
@if ($opportunity && $opportunity->next_action) {{ $opportunity->next_action }} @if ($opportunity->next_action_due) · {{ $opportunity->next_action_due->format('j M') }} @endif @elseif ($inQueue) @if ($step < count($cadence)) {{ __('Touch :n of :total: :touch', ['n' => $step + 1, 'total' => count($cadence), 'touch' => __($cadence[$step])]) }} @else {{ __('Sequence finished with no reply') }} @endif @if ($member->last_touch_at) · {{ __('last :when', ['when' => $member->last_touch_at->diffForHumans()]) }} @endif @else - @endif |
@if ($canPull && $inQueue)
@if ($step < count($cadence))
@endif
@elseif ($canPull && in_array($member->work_status, ['not_a_fit', 'do_not_contact'], true))
@endif
|
|
@if ($funnel['total'] === 0)
|
||||||
{{ __('Loaded from :file.', ['file' => $portfolio->importBatch->file_name]) }} {{ __('See the import') }}
@endif{{ __('Each organisation becomes an opportunity at Prospect. :sponsor is the originator and whoever works it is the owner.', ['sponsor' => $portfolio->sponsor?->name ?? __('The sponsor')]) }} @if ($portfolio->isJoint()) {{ __('On this Joint list the sponsor is added to each as a collaborator.') }} @endif
{{ __('A prospect marked Do not contact is marked so everywhere in the CRM. A trading customer keeps its lifecycle.') }}
@endif{{ trans_choice('Move :count organisation to someone else. The reason is noted on the list.|Move :count organisations to someone else. The reason is noted on the list.', count($selected), ['count' => count($selected)]) }}
{{ __('Applies to opportunities pulled from now on.') }}
{{ __('The sponsor cannot be changed: they originated every opportunity pulled from this list.') }}
{{ mb_strlen(trim($addSearch)) < 2 ? __('Type at least two letters of a name.') : __('No organisation on record matches, or they are all on this list already.') }}
@endforelse