@php use App\Models\Crm\Partnership; use App\Services\Crm\Partnerships\PartnershipService; $stageColors = \App\Livewire\Crm\Partnerships\Show::STAGE_COLORS; $oppStageColour = fn (string $stage): string => match ($stage) { 'won' => 'emerald', 'lost' => 'rose', 'deferred' => 'amber', 'qualified', 'proposal', 'negotiation' => 'indigo', default => 'sky', }; $proposalColors = \App\Livewire\Crm\Proposals\Show::STATUS_COLORS; $agreementColors = \App\Livewire\Crm\Agreements\Show::STATUS_COLORS; $path = PartnershipService::PATH; $at = array_search($partnership->stage, $path, true); $cards = [ ['label' => __('Referred'), 'value' => number_format($counts['referred']), 'icon' => 'arrow-path', 'accent' => '#0ea5e9', 'sub' => __('Opportunities opened from referrals')], ['label' => __('Open'), 'value' => number_format($counts['open']), 'icon' => 'flag', 'accent' => '#6366f1', 'sub' => __('Still being worked')], ['label' => __('Won'), 'value' => number_format($counts['won']), 'icon' => 'trophy', 'accent' => '#10b981', 'sub' => trans_choice(':count lost|:count lost', $counts['lost'], ['count' => $counts['lost']])], ['label' => __('Confirmed from referrals'), 'value' => $confirmed === null ? __('Not available') : $base.' '.number_format($confirmed, 2), 'icon' => 'banknotes', 'accent' => '#f59e0b', 'sub' => __('Read from the won opportunities')], ]; @endphp
{{ __('Before :stage: :missing', ['stage' => __(Partnership::STAGES[$next]), 'missing' => implode(' ', $missingForNext)]) }}
{{ $partnership->stage === 'paused' ? __('Paused because') : __('Ended because') }}: {{ $partnership->status_reason }}
@endif{{ $m['label'] }}
{{ $m['value'] }}
{{ $m['sub'] }}{{ __('Each referral is an ordinary opportunity of type Partner Referral, worked through the pipeline') }}
| {{ __('Opportunity') }} | {{ __('Stage') }} | {{ __('Owner') }} | {{ __('Estimated value') }} |
|---|---|---|---|
|
{{ $opportunity->title }}
{{ $opportunity->customer?->name }} · {{ $opportunity->created_at?->timezone(config('app.display_timezone'))->format('j M Y') }} |
|
{{ $opportunity->owner?->name ?? __('Not available') }} | @if ($opportunity->estimated_value === null) {{ __('Not estimated') }} @else {{ $opportunity->currency_code }} {{ number_format((float) $opportunity->estimated_value, 2) }} @endif |
|
|
|||
{{ __('Version :v · :who', ['v' => $proposal->version, 'who' => $proposal->author?->name ?? __('Not available')]) }}
@if ($agreement->ends_on) {{ __('Ends :date', ['date' => $agreement->ends_on->format('j M Y')]) }} @else {{ __('No end date') }} @endif
@if ($row['from']) {{ __(':from to :to', ['from' => __(Partnership::STAGES[$row['from']] ?? $row['from']), 'to' => __(Partnership::STAGES[$row['to']] ?? $row['to'])]) }} @else {{ __('Recorded at :to', ['to' => __(Partnership::STAGES[$row['to']] ?? $row['to'])]) }} @endif
{{ $row['at']?->timezone(config('app.display_timezone'))->format('j M Y H:i') }} · {{ $row['by'] ?? __('System') }} @if ($row['reason']) · {{ $row['reason'] }} @endif
{{ __('This opens an opportunity of type Partner Referral at Prospect, linked to this partnership. :name is credited as the person who brought it in.', ['name' => $partnership->owner?->name ?? __('The partnership manager')]) }}