@php use App\Models\Crm\Proposal; $statusColors = \App\Livewire\Crm\Proposals\Show::STATUS_COLORS; $control = 'mt-1 block w-full rounded-xl border-slate-300 text-sm shadow-sm focus:border-indigo-500 focus:ring-indigo-500'; $tz = config('app.display_timezone'); $seg = 'inline-flex h-9 items-center gap-1.5 whitespace-nowrap px-3 text-xs font-medium transition'; $issueTone = ['fix' => ['pill' => 'bg-rose-50 text-rose-700 ring-rose-100', 'dot' => 'bg-rose-500'], 'tip' => ['pill' => 'bg-amber-50 text-amber-700 ring-amber-100', 'dot' => 'bg-amber-400']]; $score = (int) ($writing['score'] ?? 0); $scoreTone = $score >= 85 ? 'text-emerald-600 ring-emerald-200 bg-emerald-50' : ($score >= 60 ? 'text-amber-600 ring-amber-200 bg-amber-50' : 'text-rose-600 ring-rose-200 bg-rose-50'); @endphp
{{ __('This version was submitted on :date and is read-only. Any change is a new version.', ['date' => $proposal->submitted_at?->timezone($tz)->format('j M Y') ?? __('a date not recorded')]) }}
{{ __('With :name for review. It cannot change until it is approved or sent back.', ['name' => $proposal->reviewer?->name ?? __('a director')]) }}
{{ __('Sent back by :name:', ['name' => $proposal->reviewer?->name ?? __('a director')]) }} {{ $proposal->review_note }}
{{ __('Printed on the company letterhead. The price stays on the quote.') }}
{{ __(':w words · :s sentences · longest :l words · :h headings', ['w' => $writing['stats']['words'], 's' => $writing['stats']['sentences'], 'l' => $writing['stats']['longest'], 'h' => $writing['stats']['headings']]) }} @if ($writing['ai']['used'] ?? false) · {{ __('with the deeper AI review') }} @endif
{{ $writing['ai']['note'] }}
@endif @if ($issues !== []){{ $issue['message'] }}
@if (! empty($issue['suggestion'])){{ __('Try:') }} {{ $issue['suggestion'] }}
@endif{{ __('Check the writing looks for spelling, grammar, tone and structure. The deeper AI review needs the AI assistant key on this installation.') }}
@endif{{ __('A proposal carries no price. It points at the quote that does.') }}
@if ($proposal->quote){{ $proposal->quote->quote_number }}
{{ ucfirst(strtolower((string) $proposal->quote->status)) }}
{{ __('No quote linked.') }}
@endif @if ($editable){{ $proposal->opportunity_id ? __('No quote is linked to the opportunity yet. Request one on its Quotes tab.') : __('No quote for this organisation yet.') }}
@endif{{ $version->author?->name ?? __('Not available') }} @if ($version->submitted_at) · {{ __('submitted :date', ['date' => $version->submitted_at->timezone($tz)->format('j M Y')]) }} @endif
{{ __('Only directors approve proposals. The director you choose gets a review task; the draft is frozen until they approve it or send it back.') }}