@php $consentColours = ['granted' => 'emerald', 'withdrawn' => 'rose', 'unknown' => 'slate']; $stageColour = fn (string $stage): string => match ($stage) { 'won' => 'emerald', 'lost' => 'rose', 'deferred' => 'amber', default => 'sky', }; @endphp
{{ __('Contacts') }} @if ($canDelete) {{ __('Remove') }} @endif @if ($canEdit) {{ __('Edit') }} @endif
@if ($contact->customer) {{ $contact->customer->name }} @endif @if ($contact->is_primary) {{ __('Main contact') }} @endif @if ($contact->decision_role) {{ __(\App\Models\Crm\Contact::DECISION_ROLES[$contact->decision_role] ?? $contact->decision_role) }} @endif

{{ __('Reaching them') }}

@foreach ([ __('Email') => $contact->email, __('Phone') => $contact->phone, __('WhatsApp') => $contact->whatsapp, __('LinkedIn') => $contact->linkedin, __('Prefers') => $contact->preferred_channel ? __(\App\Models\Crm\Contact::CHANNELS[$contact->preferred_channel] ?? $contact->preferred_channel) : null, ] as $label => $value) @if ($value)
{{ $label }}
{{ $value }}
@endif @endforeach @if (! $contact->email && ! $contact->phone && ! $contact->whatsapp && ! $contact->linkedin)

{{ __('No way to reach them is recorded yet.') }}

@endif

{{ __('Marketing consent') }}

{{ __(\App\Models\Crm\Contact::CONSENTS[$contact->marketing_consent] ?? 'Not recorded') }}
{{ __('Recorded') }}
{{ $contact->consent_at?->timezone(config('app.display_timezone'))->format('j M Y') ?? __('Not available') }}
{{ __('Source') }}
{{ $contact->consent_source ?: __('Not available') }}
@if ($contact->marketing_consent === 'withdrawn')

{{ __('Left out of every marketing list and export.') }}

@endif

{{ __('Notes') }}

{{ $contact->notes ?: __('Nothing noted.') }}

{{ __('Added :date by :name', ['date' => $contact->created_at?->timezone(config('app.display_timezone'))->format('j M Y'), 'name' => $contact->creator?->name ?? __('an import or the system')]) }}

{{ __('Opportunities') }}

{{ __('Deals this person is involved in.') }}

    @forelse ($opportunities as $opportunity)
  • {{ $opportunity->title }}

    {{ $opportunity->owner?->name ?? __('No owner') }}@if ($opportunity->pivot->role) · {{ $opportunity->pivot->role }}@endif

    {{ __(\App\Models\Opportunity::STAGES[$opportunity->stage] ?? $opportunity->stage) }}
  • @empty
  • @endforelse

{{ __('Conversations') }}

{{ __('The latest calls, messages and meetings logged with this person.') }}

    @forelse ($conversations as $entry)
  • {{ __($types[$entry->type] ?? ucfirst((string) $entry->type)) }} · {{ $entry->occurred_at?->timezone(config('app.display_timezone'))->format('j M Y') ?? __('Date not recorded') }} · {{ $entry->user?->name ?? __('System') }}

    @if ($entry->body)

    {{ $entry->body }}

    @endif
  • @empty
  • @endforelse

{{ __('Files') }}

@include('livewire.crm.contacts.partials.contact-modal')