@php $company = $company; $contacts = $contacts ?? collect(); $deals = $deals ?? collect(); $rollup = $rollup ?? ['contacts' => 0, 'open_deals' => 0, 'won_value' => 0]; @endphp
{{ __('All companies') }} {{-- Header --}}

{{ $company->name }}

@if ($company->industry){{ $company->industry }}@endif @if ($company->website){{ $company->website }}@endif @if ($company->email){{ $company->email }}@endif @if ($company->phone){{ $company->phone }}@endif
{{-- AI-CRM Phase 5 — generate a shareable Client Brief deck. Opens the public deck in a new tab. --}}
@csrf
{{-- Delete the company (contacts + deals are kept and unlinked). --}}
@csrf @method('DELETE')
{{-- Rollup KPIs --}}
@foreach ([ ['label' => __('Contacts'), 'value' => number_format($rollup['contacts'])], ['label' => __('Open deals'), 'value' => number_format($rollup['open_deals'])], ['label' => __('Won revenue'), 'value' => number_format($rollup['won_value'], 2)], ] as $kpi)
{{ $kpi['label'] }}
{{ $kpi['value'] }}
@endforeach
{{-- Contacts --}}
{{ __('Contacts') }}
@forelse ($contacts as $c) {{ $c['name'] }} {{ $c['phone'] }} @empty

{{ __('No contacts linked to this company.') }}

@endforelse
{{-- Deals --}}
{{ __('Deals') }}
@forelse ($deals as $d) {{ $d['title'] }} {{ $d['stage'] }} {{ number_format($d['value'], 2) }} @empty

{{ __('No deals for this company.') }}

@endforelse
@if ($company->notes)
{{ __('Notes') }}

{{ $company->notes }}

@endif