@php $statusColors = ['draft' => 'slate', 'scheduled' => 'sky', 'active' => 'emerald', 'completed' => 'indigo', 'cancelled' => 'rose']; $money = fn (?float $value): ?string => $value === null ? null : $base.' '.number_format($value, 2); $cards = [ ['label' => __('Enquiries'), 'value' => number_format($figures['enquiries']), 'icon' => 'inbox', 'accent' => '#0ea5e9', 'sub' => __(':first new, :influence known', ['first' => $figures['first'], 'influence' => $figures['influence']]), 'source' => __('Each arrival through the tracked link, the QR code, or a lead form that named this campaign.')], ['label' => __('Qualified'), 'value' => number_format($figures['qualified']), 'icon' => 'check-circle', 'accent' => '#10b981', 'sub' => trans_choice(':count opportunity opened|:count opportunities opened', $figures['opportunities'], ['count' => $figures['opportunities']]), 'source' => __('Opportunities on this campaign that reached Qualified for the first time.')], ['label' => __('Open pipeline'), 'value' => $money($figures['open_value']) ?? __('Not estimated'), 'icon' => 'funnel', 'accent' => '#8b5cf6', 'sub' => $figures['open_not_estimated'] > 0 ? __(':count open, :n not estimated', ['count' => $figures['open_count'], 'n' => $figures['open_not_estimated']]) : trans_choice(':count open|:count open', $figures['open_count'], ['count' => $figures['open_count']]), 'source' => __('Open opportunities on this campaign, in the base currency. A blank value was never estimated.')], ['label' => __('Confirmed orders'), 'value' => $money($figures['confirmed']) ?? __('Not available'), 'icon' => 'flag', 'accent' => '#16a34a', 'sub' => trans_choice(':count won|:count won', $figures['won'], ['count' => $figures['won']]), 'source' => __('Won opportunities. The same confirmed figure as each opportunity\'s outcome.')], ['label' => __('Invoiced'), 'value' => $money($figures['invoiced']) ?? __('Not available'), 'icon' => 'banknotes', 'accent' => '#f59e0b', 'sub' => __('Net of voided invoices'), 'source' => __('Invoices raised on those won opportunities. Voided invoices are left out.')], ]; $tabMeta = [ 'overview' => ['label' => __('Overview'), 'icon' => 'squares-2x2'], 'enquiries' => ['label' => __('Enquiries'), 'icon' => 'inbox'], 'content' => ['label' => __('Content'), 'icon' => 'photo'], 'audience' => ['label' => __('Audience'), 'icon' => 'user-group'], ]; @endphp
{{ __('Before this campaign can be scheduled, the brief needs: :fields.', ['fields' => implode(', ', $missing)]) }}
{{ $m['label'] }}
{{ $m['value'] }}
{{ $m['sub'] }}{{ __('Anyone who requests a quote through this link or code is credited to the campaign automatically.') }}
{{ __('The link and QR code are issued when the campaign is scheduled, so nothing goes out before the brief is agreed.') }}
@else{{ __('The public request form is switched off for this workspace. Turn it on in the requests queue settings to get a tracked link.') }}
@endif{{ __('Use the link for the channel you are posting in. Google and Meta add their click ID when someone clicks the ad.') }}
{{ __($link['label']) }}
@if ($link['on_campaign']){{ __('Actual spend is read from Marketing expenses linked to this campaign. A campaign never authorises spending; Finance records it on the Expenses page.') }}
@if ($expenses->isNotEmpty()){{ $m['label'] }}
{{ $m['source'] }}
{{ __('Spend') }}
{{ __('Planned spend is the figure in the brief. Actual spend is Marketing expenses on the Expenses page that name this campaign, in the base currency.') }}
{{ __('The five results are read live and kept apart. They measure different things and are never added together.') }}
{{ __('An organisation new to us takes this campaign as its original source. One already on record keeps its source; the campaign is recorded as influence.') }}
| {{ __('When') }} | {{ __('Organisation') }} | {{ __('Credit') }} | {{ __('Opportunity') }} | {{ __('Request') }} |
|---|---|---|---|---|
| {{ $touch->occurred_at?->timezone(config('app.display_timezone'))->format('j M Y, H:i') }} | @if ($touch->customer && $canOpenOrganisations) {{ $touch->customer->name }} @else {{ $touch->customer?->name ?? __('Counter order, no organisation') }} @endif |
|
@if ($touch->opportunity)
@if ($canOpenOpportunities)
{{ $touch->opportunity->title }}
@else
{{ $touch->opportunity->title }}
@endif
{{ __(\App\Models\Opportunity::STAGES[$touch->opportunity->stage] ?? $touch->opportunity->stage) }} · {{ $touch->opportunity->owner?->name ?? __('No owner') }} @else - @endif |
{{ $touch->serviceRequest?->reference ?? '-' }} |
|
|
||||
{{ __('Planned and published on the content calendar') }}
| {{ __('Publish') }} | {{ __('Title') }} | {{ __('Channel') }} | {{ __('Author') }} | {{ __('Status') }} |
|---|---|---|---|---|
| {{ $item->publish_at?->timezone(config('app.display_timezone'))->format('j M Y') ?? __('Not scheduled') }} | {{ $item->title }} | {{ $channelLabels[$item->channel] ?? ($item->channel ?: '-') }} | {{ $item->author?->name ?? '-' }} | |
|
|
||||
{{ __('Contacts at organisations in :sector. Anyone who withdrew marketing consent, and every organisation marked Do Not Contact, is left out.', ['sector' => $sectorLabel ?? __('the target sector')]) }} @if ($optedOut > 0) {{ trans_choice(':count person in this sector has opted out and is excluded.|:count people in this sector have opted out and are excluded.', $optedOut, ['count' => $optedOut]) }} @endif
| {{ __('Contact') }} | {{ __('Organisation') }} | {{ __('Preferred channel') }} | {{ __('Consent') }} |
|---|---|---|---|
| {{ $contact->name }} @if ($contact->title){{ $contact->title }}@endif | {{ $contact->customer?->name ?? '-' }} | {{ __(\App\Models\Crm\Contact::CHANNELS[$contact->preferred_channel] ?? '-') }} |
|
|
|
|||
{{ $closeAs === 'completed' ? __('A short review, so the next campaign starts from what this one taught us. All three are needed.') : __('Optional: note what was learned before it stopped.') }}